- heroku toolbelt
- AngularJS
- UIRouter
- SASS (SCSS)
- Express
- Sequelize
- express-resource
/* @flow */ | |
/////////////////////////////////////////////////////////// | |
// Types and Classes | |
// | |
class User { | |
n: number; | |
constructor(n) { | |
this.n = n; |
/* @flow */ | |
class User { | |
n: number; | |
constructor(n) { | |
this.n = n; | |
} | |
} | |
class UserDAOIFace { |
function derp(expansions) { | |
var o = {}; | |
// parse a period-delimited string | |
// and use the resulting array to | |
// add keys to an object. | |
function f1(acc, item) { | |
f2(acc, item.split('.')); | |
return acc; | |
} |
You already run too many chat clients. This gist provides you with steps for consolidating Flowdock, HipChat, Google Talk, and IRC communications into Adium.
Adium also supports OTR communication, so Google and friends can't index your shit and sell your personal secrets to Internet pirates. OTR chat can be done through the following messaging services:
function ensure(notOkCode, notOkMessage, response, okFx) { | |
return function(err) { | |
if (err) { | |
response.status(notOkCode).json({"message": notOkMessage}); | |
} | |
else { | |
okFx.apply(okFx, Array.prototype.slice.call(arguments, 1)); | |
} | |
}; | |
} |
expressRouter.get("/api/ledgers/:id", function(req, res) { | |
UserService.getLedgerById(req.params.id, function(err, ledger) { | |
if (err) { | |
res.status(404).json({"message": "Not Found"}); | |
} | |
else { | |
res.status(200).json(ledger); | |
} | |
}); | |
}); |
function createAccount(email, password, done) { | |
var id = uuid(); | |
async.waterfall([ | |
_.partial(Services.Accounts.provision, email, password), | |
_.partial(Services.Notification.confirm, email) | |
], | |
_.partial(done, _, id, _)); | |
} |