Skip to content

Instantly share code, notes, and snippets.

View felixge's full-sized avatar

Felix Geisendörfer felixge

View GitHub Profile
function loadConfig() {
return posix.cat('config.json')(function(error, config) {
return error || posix.cat('configuration.json')
})(function(error, config) {
return error || JSON.parse(config);
})
}
From 799ef6ec9ca295fbb0e63f182c8a9a3f93892ff4 Mon Sep 17 00:00:00 2001
From: Yuichiro MASUI <masui@masuidrive.jp>
Date: Sat, 13 Feb 2010 03:27:01 -0800
Subject: [PATCH] Fixed: promise late chain
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Felix Geisendörfer <felix@debuggable.com>
---
Connection.prototype.query = function (sql, cb) {
if (!this._queries) this._queries = [];
cb.sql = sql;
this._queries.push(cb);
this.maybeDispatchQuery();
};
#!upstart
description "broodmother"
author "marak"
start on startup
stop on shutdown
script
exec sudo -u root /usr/local/bin/node /root/nodejitsu/server.js >> /var/log/brood.log 2>&1
end script
@felixge
felixge / nodecamp.eu-talks-2011.md
Created June 17, 2011 14:56 — forked from a2800276/nodecamp.eu-talks-2011.md
A collection of talks and presentations held at nodecamp.eu 2011
@felixge
felixge / firefox.log
Created September 29, 2011 08:51
Showing that this keyword is referencing executing context
red
red
green
yellow
red
.DS_Store
node_modules
@felixge
felixge / duff.c
Created April 14, 2012 07:42 — forked from tj/duff.c
duff's device
#include <stdio.h>
int
odd() {
static int i = -1;
return i += 2;
}
int
main(void) {