Skip to content

Instantly share code, notes, and snippets.

View Enome's full-sized avatar

Geert Pasteels Enome

View GitHub Profile
app.configure(function(){
app.use(express.cookieParser());
app.use(express.session({ secret: 'keyboard cat' }));
app.use(function (req, res, next) { res.locals.session = req.session; next();});
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
//app.use(express.logger());
app.use(express.bodyParser());
%lex
%%
\n+ { process.stdout.write('[ENDLINE(S)]\n'); return 'ENDLINE'; }
<<EOF>> { process.stdout.write('[EOF]'); return 'EOF'; }
@Enome
Enome / gist:5199203
Last active December 15, 2015 04:09 — forked from kenperkins/gist:5199162
var service = something('foo');
service.error(function (error) {
next(error)
});
service.client(function (client){
// do stuff with client
});
@Enome
Enome / nginx.conf
Created October 24, 2013 11:51 — forked from srpouyet/nginx.conf
### Nginx upstart script
### source: http://serverfault.com/a/391737/70451
### /etc/init/nginx.conf
description "nginx http daemon"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/usr/local/sbin/nginx