Skip to content

Instantly share code, notes, and snippets.

@zacharyvoase
zacharyvoase / pythonrc.py
Created May 4, 2011 13:31 — forked from benhodgson/pythonrc.py
Python startup file with completion, history and colored source browsing.
import inspect
import sys
def src(obj):
"""Read the source of an object in the interpreter."""
def highlight(source):
try:
import pygments
@SeanOC
SeanOC / chef-fabfile.py
Created December 17, 2010 17:55
A fab script for easily running "chef-client" across a cluster of servers
'''
Fabfile for running chef-client across a cluster of servers.
EC2 credentials are automatically read from the knife config file and servers
are discovered via the ec2 API.
Put this file in the root of your chef repo and tehn run ``fab ec2_instances run_chef`` to run "chef-client" on all of your EC2
servers or run ``fab ec2_instances:group_id=web run_chef`` to run
"chef-client" on just the servers in a given security group.
@toastdriven
toastdriven / rebuild_environment.sh
Last active December 3, 2019 19:12
Rebuild Environment
brew install git
brew update
brew install readline
brew link readline
brew install python
brew install postgres
brew install tmux
brew install pip
brew install nginx
brew install libevent
import bisect
class NFA(object):
EPSILON = object()
ANY = object()
def __init__(self, start_state):
self.transitions = {}
self.final_states = set()
self._start_state = start_state