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/sh | |
# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $ | |
# This script starts an instance of Xvfb, the "fake" X server, runs a command | |
# with that server available, and kills the X server when done. The return | |
# value of the command becomes the return value of this script, except in cases | |
# where this script encounters an error. | |
# | |
# If anyone is using this to build a Debian package, make sure the package |
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 ruby | |
# workaround-upstart-snafu | |
# | |
# When lied to about the behavior of a job’s main process wrt. forking with the | |
# “expect” stanza, Upstart can get into a confused state where it’s tracking a | |
# nonexistent pid. | |
# | |
# This hack creates new short-lived processes until one gets the pid in | |
# question, then has its parent die so that it’s going to get reaped by pid 1 |
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
# cleanup all local branches that have been merged | |
git branch --delete $(git branch --merged | grep -v master) |
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 | |
import time | |
import random | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/timeout_sometimes') |
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 bash | |
set -ue | |
if ! which boot2docker > /dev/null | |
then | |
echo "Boot2docker doesn't seem to be installed" | |
exit 0 | |
fi | |
$(boot2docker shellinit) |
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 bash | |
set -e | |
. /opt/elasticbeanstalk/hooks/common.sh | |
# switch to current app directory | |
cd $EB_CONFIG_APP_CURRENT | |
# Dockerrun.aws.json can override settings in Dockerfile | |
echo "Reading settings from Dockerrun.aws.json" |
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
# Delete all stopped containers | |
docker rm $(docker ps -a -q) | |
# Remove unused, dangling images | |
docker rmi $(docker images -q -f dangling=true) | |
# Remove all but X images with a specific name (old image cleanup), | |
# in this case, we leave the 2 newest images. | |
$(docker images | grep my-docker-image | tail -n+3 | awk '{ print $1":"$2; }') |
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
# haiku/urls.py | |
urlpattnerns = [ | |
# all the private ones | |
] | |
public_urlpatterns = [ | |
url(....) | |
] |
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
[tox] | |
envlist = {py27,py26}-django{14,15,16}-oscar{05,06}-env{test,dev} | |
[testenv] | |
basepython = | |
py26: python2.6 | |
py27: python2.7 | |
deps = | |
-r{toxinidir}/requirements.txt |
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
# -*- coding: utf-8 -*- | |
#! /usr/bin/env python | |
import os | |
import sys | |
import click | |
DEFAULT_CONFIG_TEMPLATE = "default_app_config = '{module_path}.{config_module}.{app_name}AppConfig'" # noqa | |