-
Data Down / Actions Up
- http://emberjs.jsbin.com/nayaho/edit?html,js - Interdependent select boxes. No observers.
- http://ember-twiddle.com/2d7246875098d0dbb4a4 - One Way Input
-
Ember Version Base JSBin's
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A Ruby-like "range" for JavaScript | |
// https://github.com/thunder9 | |
// | |
// Require: https://github.com/thunder9/rb-enumerable.js | |
(function (global) { | |
if (!global.RubyLike.enumerable || !global.RubyLike.Enumerator) { | |
throw Error('rb-enumerable.js required'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ui.container.grid>.column>.ui.message>h1.header+p+a.ui.blue.button |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ES7, async/await | |
function sleep(ms = 0) { | |
return new Promise(r => setTimeout(r, ms)); | |
} | |
(async () => { | |
console.log('a'); | |
await sleep(1000); | |
console.log('b'); | |
})() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This exists because `Object.create(null)` is absurdly slow compared | |
* to `new EmptyObject()`. In either case, you want a null prototype | |
* when you're treating the object instances as arbitrary dictionaries | |
* and don't want your keys colliding with build-in methods on the | |
* default object prototype. | |
* | |
* See: http://jsperf.com/object-create-null-vs-literal/27 | |
*/ | |
const proto = Object.create(null, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
theme: Ember.inject.service() | |
// ... | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
heightToggled: false, | |
click() { | |
this.toggleProperty('heightToggled'); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
... | |
location / { | |
try_files $uri @prerender; | |
} | |
location @prerender { | |
set $prerender 0; | |
if ($http_user_agent ~* "googlebot|bot|bingbot|adsbot-google|mediapartners-google|baiduspider|twitterbot|facebookexternalhit|rogerbot|linkedinb$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"plugins": ["react"], | |
"ecmaFeatures": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var spawn = require('child_process').spawn; | |
var child = spawn( | |
'CMD', [ | |
'/S', | |
'/C', | |
'node', | |
'./child.js' | |
] | |
); |