This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # __git_ps1 accepts 0 or 1 arguments (i.e., format string) | |
| # returns text to add to bash PS1 prompt (includes branch name) | |
| __git_ps1 () | |
| { | |
| local g="$(git rev-parse --git-dir 2>/dev/null)" | |
| if [ -n "$g" ]; then | |
| local r | |
| local b | |
| if [ -d "$g/rebase-apply" ] | |
| then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
| "http://www.w3.org/TR/html4/strict.dtd"> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
| <title>Do you know where your browsers are?</title> | |
| <link rel="stylesheet" href="boilerplate.css"> | |
| <!-- The key must be generated per-domain from | |
| http://code.google.com/apis/maps/signup.html --> | |
| <script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAAdKqUl5P5ngUsPujIZwvdLxT-kkuWzSk8krYKTTtCBWsRXId_rRTY8yt15zaUmCJYh3zpAZ07ywSc7g" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from optparse import make_option | |
| import sys | |
| from django.conf import settings | |
| from django.core.management.base import BaseCommand | |
| from django.test.utils import get_runner | |
| test_runner = get_runner(settings) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from optparse import make_option | |
| import sys | |
| from django.conf import settings | |
| from django.core.management.base import BaseCommand | |
| from django.test.utils import get_runner | |
| test_runner = get_runner(settings) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Watch a bunch of files and run a command if any changes are detected. | |
| Usage | |
| ----- | |
| :: | |
| python watcher.py 'echo changes' one.py two.py | |
| To automatically keep Sphinx docs up to date:: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| BIN=$1/bin | |
| $BIN/easy_install -Z pip | |
| $BIN/pip install -i 'http://people.mozilla.org/~jbalogh/pypi' ipython |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| site_packages=$(virtualenvwrapper_get_site_packages_dir) | |
| PROJECT=`basename $VIRTUAL_ENV` | |
| DIR="$HOME/dev/$PROJECT" | |
| if [ -d $DIR ]; then | |
| cd $DIR | |
| fi | |
| unset DIR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| site_packages=$(virtualenvwrapper_get_site_packages_dir) | |
| PROJECT=`basename $VIRTUAL_ENV` | |
| DIR="$HOME/dev/$PROJECT" | |
| if [ -d $DIR ]; then | |
| cd $DIR | |
| fi | |
| unset DIR |
OlderNewer