Skip to content

Instantly share code, notes, and snippets.

@aedoran
aedoran / gist:2846406
Created May 31, 2012 21:23
linear hotness
article = {
meta : {
white_click_count : 38,
unknown_click_count : 399,
white_saved_count : 299
}
};
//weights from 0 to 1 of how important the attribute is
//sum of weights should add to 1
@aedoran
aedoran / gist:2512048
Created April 27, 2012 19:25
node redis example
for (var i in people) {
var id = i;
client.hmset(id,people[i],function() {});
client.sadd("proc", id);
}
client.multi()
.smembers("proc", function(err,res) {
_.each(res, function(r) {
client.hgetall(r,function(err,res) {