Unfinished and not tested beyond my own case.
Usage
var wait = new Wait();
wait.complete(function () {
console.log('we are done - now report');
});| // See comments below. | |
| // This code sample and justification brought to you by | |
| // Isaac Z. Schlueter, aka isaacs | |
| // standard style | |
| var a = "ape", | |
| b = "bat", | |
| c = "cat", | |
| d = "dog", |
| // attempts to get flash/session accessible in any template | |
| // - this middleware function fails and keep producing 'Error: req.flash() requires sessions' | |
| // - this middleware has been place *after* session middleware in the stack | |
| app.use(function(req,res, next){ | |
| console.log("flash middleware") | |
| res.locals({ | |
| session : req.session, | |
| flash : req.flash() | |
| }); | |
| }); |
| var FS = require('fs'); | |
| var EventEmitter = require('events').EventEmitter; | |
| // http://www.mjmwired.net/kernel/Documentation/input/joystick-api.txt | |
| function parse(buffer) { | |
| var event = { | |
| time: buffer.readUInt32LE(0), | |
| number: buffer[7], | |
| value: buffer.readInt16LE(4) | |
| } |
| #include <Servo.h> | |
| char messageBuffer[11]; | |
| int index = 0; | |
| char cmd[3]; | |
| char pin[3]; | |
| char val[3]; | |
| char aux[4]; | |
| bool debug = false; | |
| Servo servo; |
Unfinished and not tested beyond my own case.
Usage
var wait = new Wait();
wait.complete(function () {
console.log('we are done - now report');
});| // swap the keybindings for paste and paste_and_indent | |
| { "keys": ["super+v"], "command": "paste_and_indent" }, | |
| { "keys": ["super+shift+v"], "command": "paste" } |
| Create remote called heroku | |
| > git remote add heroku git@heroku.com:YOURAPPNAME.git | |
| create a local tracking branch called heroku | |
| > git checkout -b heroku -t heroku/master | |
| This will checkout the last revision you deployed to Heroku. | |
| Now tell git to push the heroku branch to heroku/master |
| /** | |
| * Requires node v0.7.7 or greater. | |
| * | |
| * To connect: $ curl -sSNT. localhost:8000 | |
| */ | |
| var http = require('http') | |
| , repl = require('repl') | |
| , buf0 = new Buffer([0]) |
| function getSafe (self, uuid) { | |
| if (typeof self === 'object' || typeof self === 'function') var safe = {} | |
| if (Array.isArray(self)) var safe = [] | |
| var recurse = [] | |
| Object.defineProperty(self, uuid, {}) | |
| var attrs = Object.keys(self).filter(function (i) { | |
| if (i === uuid) return false |
| var ED = ED || {}; | |
| // Utility functions | |
| ED.util = (function() { | |
| // Data structure functions | |
| function each(object, callback) { | |
| if (object === null) return; |