Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.
var foo = 'bar';
(function(){
var window,top,self,parent,global;
// How do you get the global object here?
// http://www.quirksmode.org/dom/w3c_html.html
console.log( (document.defaultView || document.parentWindow).foo ); //==> bar
}).call({});
// This works also (though less intuitive)
var baz= 'far';