Skip to content

Instantly share code, notes, and snippets.

View dshaw's full-sized avatar
🦄
Always bet on Node.js ✨

Dan Shaw dshaw

🦄
Always bet on Node.js ✨
View GitHub Profile
@dshaw
dshaw / 0-readme.md
Created October 29, 2012 16:53 — forked from burke/0-readme.md

A Bloom Filter in Redis

This is a really simple implementation of a bloom filter using Redis 2.6's lua scripting facility.

Though it "works", it's just a proof of concept. The choice and implementation of hashing functions leave something to be desired (I'm sure it's a fine implementation of CRC32 that I borrowed, but it's in pure lua, and, well, CRC32 is not the best function to use for a bloom filter).

Caveat Emptor, no refunds, etc. MIT License.

@dshaw
dshaw / server.js
Last active January 3, 2016 14:59
var jade = require('jade')
, data = require('./data.json')
;
var header = new Buffer('HTTP/1.1 200 OK\r\n\r\n');
var server = require('net').createServer(function(conn) {
conn.write(header);
conn.close();
}).listen(8000);
@dshaw
dshaw / nsolid-install.sh
Last active October 19, 2015 05:20 — forked from pmuellr/nsolid-install.sh
install N|Solid components into ~/nsolid
#!/bin/sh
#-------------------------------------------------------------------------------
# download/unpack componentry for N|Solid into ~/nsolid
#-------------------------------------------------------------------------------
# directories
DIR_DOWN=~/Downloads
DIR_INST=~/nsolid