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 {functionA, functionB} = require('./module') | |
functionA() // hitting cmd+B does not go to the definition |
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 React = require('react') | |
var Immutable = require('immutable') | |
var Bacon = require('baconjs') | |
var NextPiecesView = require('./views/nextPiecesView') | |
var {worldStream} = require('./playField') | |
var PlayField = require('./views/playFieldView') | |
var input = require('./input') | |
var history = Immutable.List.of() |
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
# No more templates: the power of abstraction in CoffeeScript and Underscore | |
## Terse syntax for creating DOM elements | |
$('div') # Find div elements in DOM | |
$('<div>') # Create a div element, detached from DOM | |
## Creating DOM trees | |
$('<article>').append( | |
$('<h1>').text('My blog post'), | |
$('<p>').text(" |
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
hg_branch() { | |
test -e .hg/branch && echo " hg:$(cat .hg/branch)" | |
} | |
git_branch() { | |
test -e .git && git branch | grep \* | awk '{ printf " git:" substr($0, index($0,$2)) }' | |
} | |
export PS1='\h:\w$(hg_branch)$(git_branch) $ ' |
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
new Date() > new Date() // false | |
new Date() < new Date() // false | |
new Date() == new Date() // false | |
new Date() >= new Date() // true | |
new Date() <= new Date() // true |