Skip to content

Instantly share code, notes, and snippets.

View ingenthr's full-sized avatar

Matt Ingenthron ingenthr

View GitHub Profile
@dustin
dustin / perftest.py
Created January 18, 2011 19:31
ep-engine strategy performance test thing
#!/usr/bin/env python
import os
import sys
import time
import glob
import string
import random
import subprocess
@dustin
dustin / post-fetch
Created December 16, 2010 23:44
My post fetch hook for gitmirror running doxygen.
#!/bin/sh
PATH=$PATH:/usr/local/bin
export PATH
T=$HOME/Sites/doxygen/ep-engine
H=/Users/dustin/prog/ep-engine
git fetch
branches=`git branch | cut -c3- | egrep -v "z|gh-pages"`
//Changes filter: "conflicts": "function(doc, req) { if(doc._conflicts) { return true; } else { return false; }}"
var dbase = 'focus';
var ddoc = 'app';
var sys = require('sys'),
couchdb = require('node-couchdb/lib/couchdb'),
client = couchdb.createClient(5984, 'crate.im'),
db = client.db(dbase),
changes = db.changesStream({filter: ddoc + '/conflicts'});
import multiprocessing
import sys
from multiprocessing import JoinableQueue
from multiprocessing import Pipe
from multiprocessing import Queue
from multiprocessing import Process
from pylibmc import Client
from time import sleep
@dustin
dustin / flume.py
Created July 27, 2010 21:05
tap -> flume
#!/usr/bin/env python
#
# tap -> flume
#
# requires: python thrift bindings + compiled flume thrift binding.
#
import sys
import time
import struct