Skip to content

Instantly share code, notes, and snippets.

View whitmo's full-sized avatar
💭
state 26

Whit Morriss whitmo

💭
state 26
View GitHub Profile
@whitmo
whitmo / gist:2003089
Created March 8, 2012 20:02
install.sh
rm -rf $VIRTUAL_ENV/build
ZMQVERSION=zeromq-2.1.11
wget -O - "http://download.zeromq.org/${ZMQVERSION}.tar.gz" | tar -xvzf -
pushd . > /dev/null
cd $ZMQVERSION
./configure --prefix $VIRTUAL_ENV
make; make install
ZMQ_DIR=$VIRTUAL_ENV pip install pyzmq
popd > /dev/null
mkdir $VIRTUAL_ENV/src
@whitmo
whitmo / gist:2003163
Created March 8, 2012 20:16
doula-install.sh
rm -rf $VIRTUAL_ENV/build
ZMQVERSION=zeromq-2.1.11
if [! -d $ZMQVERSION]
then
wget -O - "http://download.zeromq.org/${ZMQVERSION}.tar.gz" | tar -xvzf -
fi
pushd . > /dev/null
cd $ZMQVERSION
./configure --prefix $VIRTUAL_ENV
@whitmo
whitmo / doula-install.sh
Created March 12, 2012 17:07
doula-install.sh
rm -rf $VIRTUAL_ENV/build
ZMQVERSION=zeromq-2.1.11
if [ ! -d $ZMQVERSION ]
then
wget -O - "http://download.zeromq.org/${ZMQVERSION}.tar.gz" | tar -xvzf -
fi
pushd . > /dev/null
cd $ZMQVERSION
./configure --prefix $VIRTUAL_ENV
@whitmo
whitmo / doula_reg.py
Created March 12, 2012 18:39
doula.register
import zig
ctx = zig.CTX()
pusher = ctx.push(connect='tcp://0.0.0.0:5560')
payload = dict(action='doula.register', address='http://yourmomshouse', site='yourmomshouse', node='yourmom')
pusher.send_json(payload)
@whitmo
whitmo / dotpythonrc.py
Created March 15, 2012 19:09
.pythonrc.py
from pprint import pprint as pp
import inspect as ins
import json
import pdb
st = pdb.set_trace
def pd(obj):
return pp(dir(obj))
@whitmo
whitmo / metatag.py
Created May 9, 2012 20:30
metatag.py
class Site(object):
"""
Represents a collection of services
"""
def __init__(self, *services):
self.services = services
@property
def taggable(self):
return not any(True for x in self.services if x.state == 'fucked')
@whitmo
whitmo / pip-diff.sh
Created June 21, 2012 02:04
pip-diff.sh
#! /usr/bin/bash
# pip-diff.sh oldreq.txt
reqfile=$1
pip freeze -l | sort > /tmp/_pip_diff_new.txt
sort $reqfile | diff -u - /tmp/_pip_diff_new.txt
@whitmo
whitmo / gist:2999576
Created June 26, 2012 22:00
ayb.conf
[circus]
check_delay = 5
endpoint = tcp://127.0.0.1:5555
pubsub_endpoint = tcp://127.0.0.1:5556
stats_endpoint = tcp://127.0.0.1:5557
[watcher:webworker]
cmd = chaussette --backend=gevent --fd $(circus.socket.webapp) ltweb.tests.allyourbase.application
use_sockets = True
numprocesses = 3
@whitmo
whitmo / gist:3062596
Created July 6, 2012 20:30
wierd facebook spam
Hello.
My name is Miss juliet,i saw your profile today at F/B and became interested in you,
i will also like to know you more,and i want you to send an email to my
email address (julietbemba @yahoo.com)so i can give you my picture for you to know whom i am.
i believe we can move from here.I am waiting for
your mail to my Email address above.
@whitmo
whitmo / gist:3091281
Created July 11, 2012 15:47
condom.1
CONDOM(1) EUNUCH Programmer's Manual CONDOM(1)
NAME
condom - Protection against viruses and prevention of child
processes
SYNOPSIS
condom [options] [processid]