Skip to content

Instantly share code, notes, and snippets.

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() {
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
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";
hella (if stupid
'woohoo'
else
'boring')
hella(if stupid
'woohoo'
else 'boring')
class Lion extends Animal
eat: (food, cb)->
cb()
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) ->
"""
# 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
var find = function(obj, id) {
if(id !== undefined) {
var results;
if(obj.id === id) {
results.push(obj);
}
return results;
}
return obj;
}
find = (obj, id) ->
if id isnt undefined
thing for thing in obj when thing.id is id
else
obj