This file contains 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
# Prevent pip from doing anything unless you're inside an activated virtualenv. | |
PIP=/usr/local/bin/pip | |
function pip { | |
if [ "x$VIRTUAL_ENV" = 'x' ]; then | |
echo "No virtualenv activated; bailing." | |
else | |
PIP -E `basename $VIRTUAL_ENV` "$@" | |
fi | |
} |
This file contains 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
open -a /Applications/Google\ Chrome.app --args --disable-web-security |
This file contains 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 django.db import models | |
from django.utils.functional import curry | |
def contribute_to_model(contrib, destination): | |
""" | |
Update ``contrib`` model based on ``destination``. | |
Every new field will be created. Existing fields will have some properties | |
updated. |
This file contains 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/bash | |
# Script for placing sudoers.d files with syntax-checking | |
if [ -z "$1" ]; then | |
# Making a temporary file to contain the sudoers-changes to be pre-checked | |
TMP=$(mktemp) | |
cat > $TMP <<EOF | |
Cmnd_Alias VAGRANT_EXPORTS_ADD = /bin/su root -c echo '*' >> /etc/exports | |
Cmnd_Alias VAGRANT_NFSD = /etc/init.d/nfs-kernel-server restart | |
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /bin/sed -e /*/ d -ibak /etc/exports |
This file contains 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
#!/usr/bin/env python | |
from github import Github | |
import os | |
TOKEN = os.environ.get("GITHUB_TOKEN") | |
USERS = ("openstack", "stackforge", "openstack-dev", "openstack-infra", "openstack-attic", "stackforge-attic", "hackebrot") | |
g = Github(TOKEN) | |
me = g.get_user() |