Skip to content

Instantly share code, notes, and snippets.

@dsc
dsc / make-monetdb.sh
Created February 23, 2010 18:35
Downloads, Builds and Installs MonetDB -- http://monetdb.com
#!/bin/bash
### MonetDB Installer for RHEL5 ###
# Script needs to be run as root if any any packages need installing.
# For more info, see:
# - http://monetdb.cwi.nl/MonetDB/Documentation/Linux-Installation.html#Linux-Installation
# MonetDB RPM's for RHEL5:
@dsc
dsc / uri.py
Created February 23, 2010 02:12
A simple URI Encoding/Decoding commandline tool.
#!/usr/bin/env python
# encoding: utf-8
""" A simple URI Encoding/Decoding commandline tool.
"""
__author__ = 'David Schoonover <[email protected]>'
__date__ = '2009-06-05'
__version__ = (0, 0, 1)
import sys, select, urllib
@dsc
dsc / bitly.sh
Created February 12, 2010 19:03
bitly.sh -- shorten URLs without an API key
#!/bin/bash
# @author [email protected]
if test "$1"; then
LONG_URL="$1"
else
read LONG_URL
fi
BITLY="http://bit.ly/?s=&keyword=&url="
@dsc
dsc / pack.py
Created November 14, 2009 23:55
BitString - A file-like class for writing bits
""" BitString - A file-like object for reading/writing bits.
"""
try:
from cStringIO import StringIO
except:
from StringIO import StringIO
def binlen(n):