Skip to content

Instantly share code, notes, and snippets.

View mcavage's full-sized avatar

Mark Cavage mcavage

View GitHub Profile
@mcavage
mcavage / seattlejs.js
Created October 9, 2011 22:20
Example of running ldapjs over the GitHub API
var fs = require('fs');
var ldap = require('ldapjs');
var log4js = require('log4js');
var GitHubApi = require("github").GitHubApi;
///--- Globals
@mcavage
mcavage / gist:1056404
Created June 30, 2011 14:57
Serving static content with restify
// Docs/etc.
server.get(null, '/', function(request, response, next) {
response.send(302, null, {
Location: config.siteName + '/docs'
});
return next();
}, log.w3c);
server.get(null, '/docs', function(req, res, next) {