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 Thing; | |
var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { | |
for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } | |
function ctor() { this.constructor = child; } | |
ctor.prototype = parent.prototype; | |
child.prototype = new ctor; | |
child.__super__ = parent.prototype; | |
return child; | |
}; | |
Thing = (function() { |
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
jann@debjann:~/gitty$ git clone git://github.com/jashkenas/coffee-script.git 2coffeescript | |
Cloning into 2coffeescript... | |
remote: Counting objects: 19669, done. | |
remote: Compressing objects: 100% (5683/5683), done. | |
remote: Total 19669 (delta 14642), reused 18839 (delta 13915) | |
Receiving objects: 100% (19669/19669), 7.67 MiB | 2.14 MiB/s, done. | |
Resolving deltas: 100% (14642/14642), done. | |
jann@debjann:~/gitty$ cd 2coffeescript/ | |
jann@debjann:~/gitty/2coffeescript$ cake build | |
jann@debjann:~/gitty/2coffeescript$ cake build:parser |
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 obfuscationArray = []; | |
obfuscationArray["03E8"] = "ntElNDUNAQxJyDfhycFjKHHIbPfCMZNh"; | |
obfuscationArray["07D0"] = "dmxyYSUfkHqaGIeuRqawDbSaUblNUBOQ", obfuscationArray["0BB8"] = "ivwXvoZDazVJsWESCiXRlLztiqFMTzyK"; | |
obfuscationArray["0FA0"] = "HFohOKNwmbRgrVuqcghoDhRBLhGIfYJE"; | |
obfuscationArray["1388"] = "FOSZYEeTUREDoLQByhdTtUIFrvKkkDop"; | |
obfuscationArray["1770"] = "zhPOZGWPLYlXdqvBcHdVpHcmeWiUuIbV"; | |
obfuscationArray["1B58"] = "vQouJLndiMuMDPZBXDQlOJidliNiIIoX"; | |
obfuscationArray["1F40"] = "kPtnneYtPzguZJaVnnIphZpDdlOWQfMm"; | |
obfuscationArray["2328"] = "eMDGeIHwUDQhVWoBnDyXFUCkkJAaOWFS"; | |
obfuscationArray["2710"] = "hlhqHrWUdKWhjXkHOQgJJhaSdUsIuLPf"; |
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
hella (if stupid | |
'woohoo' | |
else | |
'boring') |
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
hella(if stupid | |
'woohoo' | |
else 'boring') |
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
class Lion extends Animal | |
eat: (food, cb)-> | |
cb() |
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
files = fs.readdirSync 'lib' | |
files = ({filename} for filename in files when filename.match(/\.js$/)) | |
resultstring = """ | |
var modules = {}; | |
function require(name) { | |
return modules[name]; | |
} | |
""" | |
wrap = (filename, code) -> | |
""" |
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
# How do I add the second params to a method args after the first one being a function? | |
timeout = setTimeout(function() { | |
sys.puts('Timeout') | |
tweetEmitter.removeListener(listener) | |
}, 10000) | |
timeout = setTimeout -> | |
sys.puts 'Timeout' | |
tweetEmitter.removeListener listener |
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 find = function(obj, id) { | |
if(id !== undefined) { | |
var results; | |
if(obj.id === id) { | |
results.push(obj); | |
} | |
return results; | |
} | |
return obj; | |
} |
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
find = (obj, id) -> | |
if id isnt undefined | |
thing for thing in obj when thing.id is id | |
else | |
obj |
OlderNewer