Skip to content

Instantly share code, notes, and snippets.

View wil's full-sized avatar

Wil Tan wil

View GitHub Profile
@rcrowley
rcrowley / graphite-deb.sh
Created April 5, 2012 14:34
Graphite Debian packaging
VERSION="0.9.9"
BUILD="betable1"
set -e -x
# Keep track of the original working directory.
OLDESTPWD="$PWD"
# Work in a temporary directory.
cd "$(mktemp -d)"
@stefanv
stefanv / sparks.py
Created November 17, 2011 00:25
Command line sparks in Python
#!/usr/bin/python
# coding=utf-8
# Python version of Zach Holman's "spark"
# https://github.com/holman/spark
# by Stefan van der Walt <[email protected]>
"""
USAGE:
@rduplain
rduplain / README.md
Created October 17, 2011 20:04
Connect to MSSQL using FreeTDS / ODBC in Python.

Goal: Connect to MSSQL using FreeTDS / ODBC in Python.

Host: Ubuntu 11.10 x86_64

Install:

sudo apt-get install freetds-dev freetds-bin unixodbc-dev tdsodbc
pip install pyodbc sqlalchemy

In /etc/odbcinst.ini:

@dpwiz
dpwiz / partial.py
Created May 25, 2011 12:33
Partial(dict) with extra helpers for nose
"""Partial(dict) with extra helpers for nose.
>>> data = {'spam': 'salad', 'sausage': 'spam', 'whatever': 42}
Check only what you care for:
>>> data == {'spam': 'salad'}
False
>>> data == Partial({'spam': 'salad'})
True