Skip to content

Instantly share code, notes, and snippets.

#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
[vhosts]
swinger.iodyne.net = /swinger/_design/swinger/_rewrite
@quirkey
quirkey / nicer.rb
Created November 1, 2010 00:12 — forked from mrb/nicer.rb
class Engine
include Achievements::AchievementsEngine
achievements do
:context1 do
achieve {:name => :one_time, :threshold => 1}
end
:context2 do
achieve {:name => :one_time, :threshold => 1}
//
// goal: load in data, then template
//
var nav = $.sammy('#mainNav',function(){
this.use(Sammy.Mustache,'ms');
this.get('#/', function() {
this.load('data/nav.json')
.render('templates/nav.ms') // render will take the previous data as the `data` arg for rendering
.swap();
@quirkey
quirkey / emoji.m
Created August 16, 2012 15:48 — forked from javan/emoji.m
Campfire Emoji
sDictionary = [[NSDictionary alloc] initWithObjectsAndKeys:
// People
@":smile:", @"\ue415",
@":blush:", @"\ue056",
@":smiley:", @"\ue057",
@":relaxed:", @"\ue414",
@":smirk:", @"\ue402",
@":heart_eyes:", @"\ue106",
@":kissing_heart:", @"\ue418",
½ cup light brown sugar
¼ cup sweet paprika
1 tbsp. chili powder
1 tbsp. onion powder
1 tbsp. garlic powder
1 tbsp. cayenne
apple cider (farmer's market)
3 lemons
Shichimi togarashi
crème fraîche
#!/usr/bin/env ruby
# Evaluates a sample of keys/values from each redis database, computing statistics for each key pattern:
# keys: number of keys matching the given pattern
# size: approximation of the associated memory occupied (based on size/length of value)
# percent: the proportion of this 'size' relative to the sample's total
#
# Copyright Weplay, Inc. 2010. Available for use under the MIT license.