Skip to content

Instantly share code, notes, and snippets.

@jbalogh
jbalogh / amodeploy.py
Created May 19, 2011 19:06 — forked from oremj/amodeploy.py
amo deploy using commander
import os
from commander.deploy import hostgroups, local_command
AMO_DIR = "/data/amo_python/src/prod/zamboni"
_amo_dir = lambda *p: os.path.join(AMO_DIR, *p)
_git_lcmd = lambda ctx, c: ctx.local("/usr/bin/git %s" % c)
#!/bin/bash
# Sets ~site_packages and tries to `cd ~/dev/<virtualenv`.
site_packages=$(virtualenvwrapper_get_site_packages_dir)
PROJECT=`basename $VIRTUAL_ENV`
DIR="$HOME/dev/$PROJECT"
if [ -d $DIR ]; then
@jbalogh
jbalogh / git-url
Created April 28, 2010 19:28 — forked from davedash/gist:382311
git-url: helps you close bugs good
#!/bin/sh
# Usage: `git url` or `git url <commitish>`
#
# * copies the commit's github url to your clipboard
# * prints out the log message
# * opens the bugzilla page if it found a bug number
#
# Set up the github url with `git config github.url <url>`.
# Only for the Mac.
@jbalogh
jbalogh / a.diff
Created March 31, 2010 19:39 — forked from davedash/a.diff
diff --git a/apps/search/client.py b/apps/search/client.py
index 2cb0813..7f38415 100644
--- a/apps/search/client.py
+++ b/apps/search/client.py
@@ -1,4 +1,6 @@
import re
+import socket
+import logging
from django.conf import settings
site_packages=$(virtualenvwrapper_get_site_packages_dir)
PROJECT=`basename $VIRTUAL_ENV`
DIR="$HOME/dev/$PROJECT"
if [ -d $DIR ]; then
cd $DIR
fi
unset DIR
site_packages=$(virtualenvwrapper_get_site_packages_dir)
PROJECT=`basename $VIRTUAL_ENV`
DIR="$HOME/dev/$PROJECT"
if [ -d $DIR ]; then
cd $DIR
fi
unset DIR
@jbalogh
jbalogh / meeting.py
Created October 20, 2009 18:42 — forked from fwenzel/meeting.py
from datetime import datetime
import random
from pyquery import PyQuery
URL = ('https://wiki.mozilla.org/Webdev:Meetings:%s-%s-%s' %
datetime.now().timetuple()[:3])
names = PyQuery(url=URL)('h2 .mw-headline').text().split()