Skip to content

Instantly share code, notes, and snippets.

View Robdel12's full-sized avatar
🏁
Making a PitStop

Robert DeLuca Robdel12

🏁
Making a PitStop
View GitHub Profile
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@Robdel12
Robdel12 / controllers.application.js
Last active August 20, 2016 16:41
JSON Parse ember object to clone?
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
stringify: Ember.computed(function() {
let stringify = JSON.stringify(EmberObject);
return stringify;
}),
parse: Ember.computed('stringify', function() {
#!/usr/bin/env bash
# Check for Homebrew, install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes
# brew update
# Binaries
binaries=(
This?
@Robdel12
Robdel12 / controllers.application.js
Last active October 3, 2016 14:58
Form onsubmit
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
actions: {
work(event){
event.preventDefault();
alert('woah');
}
}
{{#markdown-component}}
## I want this to be markdown
So all of this _should_ be parsed and code like this:
```hbs
{{my-component on-change=(action "thing")}}
```
shouldn't be executed.
{{/markdown-component}}
/*
* Adds options to the `ember build` and `ember serve` commands to configure
* which API endpoints will be hit as well as whether to disable mirage or not.
*/
var ServeCommand = require('ember-cli/lib/commands/serve');
var BuildCommand = require('ember-cli/lib/commands/build');
var TestCommand = require('ember-cli/lib/commands/test');
var DeployCommand = require('ember-cli-deploy/lib/commands/deploy');
import React, { Component } from 'react';
import {
Text,
Image,
StyleSheet
} from 'react-native';
import {
Card,
CardItem,
@Robdel12
Robdel12 / components.my-component.js
Last active January 17, 2017 21:34
tagName-null
import Ember from 'ember';
export default Ember.Component.extend({
init: function() {
this._super.apply(this, arguments);
console.log(this.get('tagName'));
},
whatIsTheTagName: Ember.computed('tagName', function() {
let tagName = this.get('tagName');
if (tagName === null) {
import React, { Component } from 'react'
class App extends Component {
render() {
let isCondition = false;
let Component = isCondition ? <OneComponent /> : <AnotherComponent />;
return (
<div>
<Component />