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
target.parentNode.insertBefore element, target.nextSibling |
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
exports.http = | |
get: (options, callback)-> | |
options.method = 'get' | |
@request options, callback | |
post: (options, callback)-> | |
options.method = 'post' | |
@request options, callback |
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
### | |
makefile.coffee v0.1.3 | |
### | |
fs = require 'fs' | |
path = require 'path' | |
{spawn} = require 'child_process' | |
coffee = require 'coffee-script' | |
{parser, uglify} = require 'uglify-js' | |
{Relay} = require 'relay' |
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
FB.XFBML.parse(); |
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
RGB(new HSV(0, 1, 1)); | |
HSV(new RGB(255, 0, 0)); |
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
NUMBERS = [ | |
'zero' | |
'one' | |
'two' | |
'three' | |
'four' | |
'five' | |
'six' | |
'seven' | |
'eight' |
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 _keys = function(obj){ | |
//if(Object.keys) return Object.keys(obj); | |
var keys = []; | |
for(var k in obj){ | |
if(obj.hasOwnProperty(k)) keys.push(k); | |
} | |
return keys; | |
}; | |
_keys('foo'); // [0, 1, 2] |
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
my.JSON = (function () { | |
if (window.JSON && window.JSON.stringify([new Date()]).charAt(21) === '.') { | |
return window.JSON; | |
} | |
var JSON = {}; | |
// implementation | |
return JSON; | |
})(); |
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
supportsTouch = document.createTouch? |
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
function escapeAsUnicode (text) { | |
var unicode = ''; | |
for (var i = 0, len = text.length, code; i < len; ++i) { | |
code = text.charCodeAt(i).toString(16); | |
while (code.length < 4) { | |
code = '0' + code; | |
} | |
unicode += '\\\u' + code; | |
} | |
return unicode; |