Skip to content

Instantly share code, notes, and snippets.

View juliangruber's full-sized avatar

Julian Gruber juliangruber

View GitHub Profile
@creationix
creationix / component-build.js
Created October 25, 2012 16:27
architect http plugin for dynamic component building
module.exports = setup;
setup.consumes = ["http"];
function setup(config, imports, register) {
imports.http.wrap(require('./middleware')(config));
register();
}
// Javascript Doubly Ended Queue
var Dequeue = function() {
this._head = new Dequeue.Node();
this._tail = new Dequeue.Node();
this._head._next = this._tail;
this._tail._prev = this._head;
}
Dequeue.Node = function(data) {
this._data = data;