-
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
-
Plain JSBin's
-
Ember Version Base JSBin's
This file contains 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
# https://docs.docker.com/get-started/part2/#conclusion-of-part-two | |
docker build -t friendlyname . # Create image using this directory's Dockerfile | |
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80 | |
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode | |
docker container ls # List all running containers | |
docker container ls -a # List all containers, even those not running | |
docker container stop <hash> # Gracefully stop the specified container | |
docker container kill <hash> # Force shutdown of the specified container | |
docker container rm <hash> # Remove specified container from this machine | |
docker container rm $(docker container ls -a -q) # Remove all containers |
This file contains 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 Immutable from 'immutable'; | |
const { isIterable } = Immutable.Iterable; | |
const { isMap } = Immutable.Map; | |
const { isList } = Immutable.List; | |
const isLeafNode = (node) => { | |
if (!isIterable(node)) { | |
return true; | |
} |
This file contains 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
[0, ['a', 'b', 'c'], 2, 'd', 4, 5, 'f', 7, ['g', 'h'], 9].reduce(function rec (prev, curr) { | |
if (/array/i.test(curr.constructor)) { | |
return curr.reduce(rec, prev); | |
} else if (/string/i.test(curr.constructor)) { | |
prev.push(curr); | |
} | |
return prev; | |
}, []); |
This file contains 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
module.exports = function() { | |
return process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME']; | |
} |
This file contains 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 guid = function fn (n) { | |
return n ? | |
(n ^ Math.random() * 16 >> n/4).toString(16) : | |
('10000000-1000-4000-8000-100000000000'.replace(/[018]/g, fn)); | |
}; |
This file contains 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
const logicGates = { | |
nand (a, b) { return !(a && b); }, | |
not (a) { return this.nand (a, a); }, | |
and (a, b) { return this.not (this.nand (a, b)); }, | |
or (a, b) { return this.nand (this.not (a), this.not(b)); }, | |
nor (a, b) { return this.not (this.or (a, b)); }, | |
xor (a, b) { return this.and (this.nand (a, b), this.or(a, b)); }, | |
xnor (a, b) { return this.not (this.xor (a, b)); } | |
}; |
This file contains 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
['aaawhu', 'aaaajkssh', 'aaahwv', 'aaa'].join().match(/^(\w*)\w*(?:,\1\w*)*$/).pop(); |
This file contains 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
# Turn on git state in command prompt | |
GIT_PS1_SHOWDIRTYSTATE=true | |
# Command prompt with "username path (git state) | " | |
export PS1='\[\033[1;37m\]\u \[\033[0m\]\w$(__git_ps1)\[\033[1;37m\] | \[\033[0m\]' |
This file contains 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
[core] | |
editor = subl -n -w | |
excludesfile = ~/.gitignore_global | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow |
NewerOlder