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 Array(10).length | |
// evaluates to `10` | |
new Array(10).map(function(current, i) { return i }); | |
// evaluates to `[]` | |
var arr = []; | |
arr[2] = undefined; | |
arr[9] = undefined; |
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
# Untested - must run on an actual machine at some point in time! | |
# Also, I completely forget BASH | |
# The idea: each machine on the network has a clone of the backup directory. The last | |
# N revisions of each file are kept in a respective folder (e.g. gen0/ for most recent | |
# revision, gen1/ for 2nd most recent, gen2/, gen3/ ... to genN/). | |
# Updates on the central server get pushed out to the node machines. Like a DVCS that only | |
# keeps N revisions of each file |
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
// <script src="script/weld.min.js"></script> | |
/* | |
* Weld, re-interfaced so as not to be so annoying. The Weld way is to push the | |
* data into the template in-place, making updates to an existing DOM annoying | |
* and/or unreliable. Instead, is this. Initialise a template, | |
* and call 'create' to build a new instance of template+data, thus behaving | |
* like all other sensible view generation systems. | |
*/ | |
var Welder = function(templateText) { |