Skip to content

Instantly share code, notes, and snippets.

@danielberlinger
danielberlinger / redis-counters.js
Created March 8, 2012 18:01 — forked from dvbportal/redis-counters.js
Storing Counters In Redis
// Additional code in node-http-proxy.js
var crypto = require('crypto');
var redis = require('redis');
var client = redis.createClient(config.opt.redis_port, 'cloudno.de');
client.auth(config.opt.redis_auth, function(result) {
util.log("Redis authenticated.");
})
@danielberlinger
danielberlinger / shopify_stats.rb
Created March 8, 2012 17:45 — forked from tobi/shopify_stats.rb
What would a stats server backed by redis look like?
require 'rubygems'
require 'redis'
$redis = Redis.new
class Request
def referrer
'http://www.google.com/search?q=Shopify+Store'
end