-
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
| // 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
| 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
| { | |
| "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' | |
| ] | |
| ); |
A Pen by Fabrizio Bianchi on CodePen.
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
| #!/bin/bash | |
| # <UDF name="user_name" label="Unprivileged user account name" example="This is the account that you will be using to log in or deploy (deployer)." default="deployer" optional="false" /> | |
| # <UDF name="user_password" label="Unprivileged user password" optional="false" /> | |
| # <UDF name="user_sshkey" label="Public Key for user" default="" example="Recommended method of authentication. It is more secure than password log in." optional="false" /> | |
| # <UDF name="user_shell" label="Shell" oneof="/bin/zsh,/bin/bash" default="/bin/bash" /> | |
| # <UDF name="sys_hostname" label="System hostname" default="myvps" example="Name of your server, i.e. linode1." optional="false" /> | |
| # <UDF name="sys_private_ip" Label="Private IP" default="" example="Configure network card to listen on this Private IP (if enabled in Linode/Remote Access settings tab). See http://library.linode.com/networking/configuring-static-ip-interfaces" optional="false" /> | |
| USER_GROUPS=sudo |
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
| // app/initializers/froala-semantic-icons.js | |
| import Ember from 'ember'; | |
| export function initialize() { | |
| // https://www.froala.com/wysiwyg-editor/docs/concepts/custom-icon | |
| Ember.$.FroalaEditor.ICON_DEFAULT_TEMPLATE = 'semantic_ui'; | |
| Ember.$.FroalaEditor.DefineIconTemplate( 'semantic_ui', '<i class="[NAME] icon"></i>'); | |
| Ember.$.FroalaEditor.DefineIcon( 'color' , { NAME: 'theme' } ); // tint | |
| Ember.$.FroalaEditor.DefineIcon( 'undo' , { NAME: 'undo' } ); // rotate-left | |
| Ember.$.FroalaEditor.DefineIcon( 'redo' , { NAME: 'repeat' } ); // rotate-right |