[color]
diff = auto
status = auto
branch = auto
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
// kommunism.js | |
// build on false promises | |
// to chain callbacks | |
function PrimitiveKommunism(computationFunction, thisArg){ | |
// todo: return promise that will resolve when computation is done | |
var someInnerComputationsResult = computationFunction.apply(thisArg, _.toArray(arguments)); | |
function Kommunism(currentCallback, optionalCallbackParameters){ | |
var currentArguments = _.toArray(arguments).slice(1); |
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
# On a mac with snow leopard, for nicer terminal colours: | |
# - Install SIMBL: http://www.culater.net/software/SIMBL/SIMBL.php | |
# - Download'Terminal-Colours': http://bwaht.net/code/TerminalColours.bundle.zip | |
# - Place that bundle in ~/Library/Application\ Support/SIMBL/Plugins (create that folder if it doesn't exist) | |
# - Open Terminal preferences. Go to Settings -> Text -> More | |
# - Change default colours to your liking. | |
# | |
# Here are the colours from Textmate's Monokai theme: | |
# |
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
function topLevel(){ | |
var i = 1; | |
console.log('Top level i: ',i); | |
function innerLevel(){ | |
console.log('Inner level i: ',i); | |
console.log('... because var i was silently declared in the beginning of scope === function'); | |
var i = 2; | |
console.log('Inner level i after assigment: ', i); | |
} | |
innerLevel() |