Skip to content

Instantly share code, notes, and snippets.


gregory tomlinson gtzilla

Block or report user

Report or block gtzilla

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gtzilla / merge commits git
Created Jan 25, 2011
instructions I need to merge git commits together
View merge commits git
# Go back to the last commit that we want to form the initial commit (detach HEAD)
git checkout <sha1_for_B>
# reset the branch pointer to the initial commit,
# but leaving the index and working tree intact.
git reset --soft <sha1_for_A>
# amend the initial tree using the tree from 'B'
#!/usr/bin/env python
### Requires latest boto (cuz I checked in code to boto a moment ago)
import uuid
from boto.mturk.connection import MTurkConnection
from boto.mturk.question import Question, QuestionForm, QuestionContent
from boto.mturk.question import AnswerSpecification, FreeTextAnswer
from boto.mturk.question import Overview
#from boto.mturk.qualification import Qualifications # these exist!
gtzilla / basic dev box
Created Nov 7, 2010
custom webserver for doing dev / prod
View basic dev box
## actually install them all these (use -s to simulate -- not install)
sudo apt-get -y upgrade
sudo apt-get -y install build-essential ssh openssl nginx python-dev locate python-virtualenv \
git-core libevent-dev curl nmap fail2ban python-pycurl netcat cryptcat socat gdb python-scapy python-crypto wireshark python-pyx
## python-scapy python-crypto wireshark python-pyx are for admin scripts etc
## restart?
# sudo init 6
gtzilla / static ipaddress ubuntu
Created Nov 7, 2010
full set of notes needed to set up a static ip address
View static ipaddress ubuntu
# derived from
# and comments, and needed modifications to work on 10.10
sudo cp /etc/network/interfaces /etc/network/interfaces~backup
sudo vi /etc/network/interfaces
## leave this alone
## auto lo
## iface lo inet loopback
View my starter css
filename: basic.css
author: gregory tomlinson
*{ padding:0; margin:0; }
h1,h2,h3,h4,h5,h6,input,textarea,select,option, body {
font-family:Arial, sans-serif;
View tab completion for python interative shell in Mac OSx leopard
import rlcompleter
import readline
readline.parse_and_bind ("bind ^I rl_complete")
#Whereas this one does not:
#import readline, rlcompleter
#readline.parse_and_bind("tab: complete")
View my bash_profile
# display current git branch
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/
function has_virtualenv {
if [ -e .venv ]; then
curr_env=`cat .venv`
import pylibmc
import Queue
import logging
import functools
This is a transparent pool library that wraps a pylibmc client
from MemcachePool import mc
gtzilla / Simple Queue Command Line Args
Created Sep 4, 2010
starting simplequeue on user specified port and IP
View Simple Queue Command Line Args
# sample for
simplequeue -p 4414 -a
The actual code for command line args to simplequeue:
address = "";
port = 8080;
opterr = 0;
View Configuring Daemontools for Ubuntu 10
## you'll have to do a couple extra steps to get this running
## there are probably other ways to handle svncanboot, but this is from the linux forum
set -e
touch /etc/_testr_file
You can’t perform that action at this time.