Skip to content

Instantly share code, notes, and snippets.

View dzcpy's full-sized avatar
🎯
Focusing

dzcpy

🎯
Focusing
View GitHub Profile
var Promise = require('bluebird');
var request = Promise.promisifyAll(require('request'));
ENABLE_FIDDLER_PROXY = false;
var proxy = ENABLE_FIDDLER_PROXY ? {proxy: 'http://127.0.0.1:8888'} : {};
console.log('before all requests');
// Google and v2ex are parallel requests
module.exports = {
get: function (req, res) {
res.sendfile(req.path.substr(1));
},
_config: {
rest: false,
shortcuts: false
}
};
@dzcpy
dzcpy / mclarens.js
Created November 3, 2013 06:10 — forked from nikhilm/mclarens.js
/*
* Mclarens Bar: Redis based Instant Messaging
* Nikhil Marathe - 22/04/2010
* A simple example of an IM client implemented using
* Redis PUB/SUB commands so that all the communication
* is offloaded to Redis, and the node.js code only
* handles command interpretation,presentation and subscribing.
*
* Requires redis-node-client and a recent version of Redis