Skip to content

Instantly share code, notes, and snippets.

# -*- sh -*-
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
## Read rc bits
for rcfile in "$HOME"/.shell/*.rc(rN); do
if [ -r "$rcfile" ]; then
. "$rcfile"
fi
done
No config file found, using default configuration
pylint 0.19.0,
astng 0.19.3, common 0.45.2
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3]
javascript:(function()%20{if%20(window.__JQUERY_CONSOLE__)%20{window.__JQUERY_CONSOLE__.toggle();}%20else%20{function%20init($)%20{function%20HistoryManager()%20{this.curr%20=%20-1;this.entries%20=%20[];};HistoryManager.prototype%20=%20{push:%20function(item)%20{if%20(this.entries.length%20&&%20this.entries[0]%20==%20item)%20return;if%20(item.match(/^\s*$/))%20return;this.entries.unshift(item);this.curr%20=%20-1;},scroll:%20function(direction)%20{var%20moveTo%20=%20this.curr%20+%20(direction%20==%20%27prev%27%20?%201%20:%20-1);if%20(moveTo%20>=%200%20&&%20moveTo%20<%20this.entries.length)%20{this.curr%20=%20moveTo;return%20this.entries[this.curr];}%20else%20if%20(moveTo%20==%20-1)%20{this.curr%20=%20moveTo;return%20%27%27;}%20else%20{return%20null;}}};var%20context%20=%20{},history%20=%20new%20HistoryManager(),$drag%20=%20$(%27<div/>%27).css({backgroundColor:%20%27#e0e0e0%27,%20border:%20%271px%20solid%20#a0a0a0%27,%20fontSize:%20%2711px%27,%20fontFamily:%20%27sans-serif%27,%20lineHeight:%201,%20padding:%20%2
#!/usr/bin/env python
"""
Print out (to stdout) a tag cloud of bugs in bugzilla for 1.7
"""
from collections import defaultdict
import datetime
import cookielib
import urllib
import urllib2
#!/usr/bin/env python
from xml.dom import minidom
import datetime, time
from email.utils import parsedate
import sys, codecs
# wget -O goodreads.xml
# "http://www.goodreads.com/review/list/1519786.xml?key=LV0wx2GkLwTCVLSFIiNQBQ&v=2&shelf=read&per_page=200"
import cgi
#!/bin/bash
# hack -- create a branch for a bz ticket off of whatever branch you are
# currently in or the branch you pass in as an argument
bug=$1
base=$2
if [ -z "${bug}" ] || [ "${bug}" == "-?" ] ; then
echo "Usage: hack [BZTICKET]"
exit 1
#!/bin/bash
# fix the issue by pushing the current branch to the remote named origin
# if the branch isn't named "bugfix/bz[0-9]+ then fail
# inspired by http://reinh.com/blog/2008/08/27/hack-and-and-ship.html
current=`git branch | awk '/\*/{print $2}'`
if ! echo "$current" | egrep -q "^bugfix/bz[0-9]+" ; then
echo "Not in a bugfix branch. Must be named bugfix/bz[0-9]+"
exit 1
@slackorama
slackorama / audit_raw_logs.py
Created September 29, 2011 22:56
Get year, month and day from a python date object.
year = time.strftime("%Y", sampledate)
month = "%02d" % int(time.strftime("%m", sampledate))
day = "%02d" % int(time.strftime("%d", sampledate))
@slackorama
slackorama / .emacs
Created October 6, 2011 22:36
Loading packages for emacs
(message "Loading package.el")
(when
(require 'package
(expand-file-name "~/.emacs.d/lisp/package.el") 'noerror)
(add-to-list 'package-archives '("marmalade"
. "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("org-odt" . "http://repo.or.cz/w/org-mode/org-jambu.git/blob_plain/HEAD:/packages/"))
(package-initialize)
(load (expand-file-name "~/.emacs.d/common/elpa-autoload.el")))
@slackorama
slackorama / elpa-autoload.el
Created October 6, 2011 22:37
autload elpa packages. Taken from emacs-starter-kit.
;;; elpa-autoload.el -- install a base set of package automatically
;;; lifted from emacs-starter-kit
;;; http://github.com/technomancy/emacs-starter-kit/raw/master/starter-kit-elpa.el
(defvar ssm-kit-packages (list 'anything
'anything-config
'full-ack
'gist
'htmlize
'json