Install (copy & paste):
curl -sL \
gist.github.com/raw/1676577/eb66596ba3d69bf1ba9d782ce7ddaaab295cc4db/travis.rb \
> ~/bin/travis && chmod +x ~/bin/travis
gem install hub | tail -2
For more information, you can read a related blog post on this topic
Node is awesome, Phidgets are awesome. Syngergy. All I wanted to do was tweet the temperature of my house automatically…
node_modules | |
*.log | |
*~ |
var fs = require('fs') | |
var DataCollector = function(arr) { | |
this.setFiles(arr) | |
} | |
DataCollector.prototype = { | |
setFiles: function(arr) { | |
this.files = arr | |
} |
global.config = require('./lib/config').load("config/app.json"); | |
var cluster = require('cluster'); | |
var fs = require('fs'); | |
var app = require('./app'); | |
// Logging | |
var log = require('./lib/winston'); | |
global.log = log; | |
// Write out pidfile |
history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -rn | |
284 git | |
29 heroku | |
28 bin/runserver | |
24 cd | |
23 node | |
13 ll | |
11 vi | |
10 open |
history|awk '{print $2}'|awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c|sort -r
288 git
29 heroku
28 bin/runserver
24 cd
23 node
13 ll
11 vi
10 open
var cursor = dbclient.collection('example', _).find(_); | |
var count = cursor.count(_); | |
for(var obj = cursor.nextObject(_), oi = 0; obj; obj = | |
cursor.nextObject(_), oi++) { | |
/** | |
* do something with every obj here | |
* suppose for this example it needs total count and offset (oi). | |
*/ | |
}); |
// Here is a proposal for minimalist JavaScript classes, humbly offered. | |
// There are (at least) two different directions in which classes can be steered. | |
// If we go for a wholly new semantics and implementation, then fancier classical | |
// inheritance can be supported with parallel prototype chains for true inheritance | |
// of properties at both the class and instance level. | |
// If however, we keep current JavaScript prototype semantics, and add a form that | |
// can desugar to ES3, things must necessarily stay simpler. This is the direction | |
// I'm assuming here. |
with application | |
set env to production | |
set view engine to jade | |
get /user/tj | |
send "hello" | |
delete /user/tj | |
send "no can do!" |