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 reviewgallery.settings.development.defaults import * | |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': True, | |
'formatters': { | |
'default': { | |
'format': '%(name)s-%(levelname)s -- %(message)s' | |
} | |
}, |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>untitled</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<script type="text/javascript"> |
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
tedkaemming@reventon % sudo ipfw pipe 1 config bw 128Kbit/s delay 200ms | |
tedkaemming@reventon % sudo ipfw add 1 pipe 1 src-port 8000 | |
00001 pipe 1 ip from any 8000 to any |
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 os, git, sys | |
previous, current, branch = sys.argv[1:4] | |
WATCH_FILES = ('conf/python/requirements.txt',) | |
if branch: | |
repository = git.Repo(os.getcwd()) | |
previous_commit = repository.commit(previous) | |
current_commit = repository.commit(current) |
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
function foo () { | |
setTimeout(function () { | |
throw new Error('Uh oh!'); | |
}, 10); | |
} | |
try { | |
foo(); | |
} catch (e) { | |
// This catch block will never get called, because the `foo` function has |
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 | |
""" | |
Nagios plugin to check PostgreSQL 9 streaming replication lag. | |
Requires psycopg2 and nagiosplugin (both installable with pip/easy_install). | |
MIT licensed: | |
Copyright (c) 2010 Jacob Kaplan-Moss. All rights reserved. |
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 | |
cd .. | |
env -i git reset --hard |
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
var _ = require('./vendor/underscore'), | |
spawn = require('child_process').spawn; | |
var log = function (message, newline) { | |
if (newline === undefined) { newline = true; } | |
process.stdout.write('[' + Date.now().toString() + '] ' + message + (newline ? '\n' : '')); | |
return; | |
}; | |
// Stores the exit codes for each test runner. |
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 | |
export PROJECT_NAME=$1 | |
export REPOSITORY_URL=$2 | |
# | |
export PROJECT_DIRECTORY="${PWD}/${PROJECT_NAME}" | |
virtualenv --no-site-packages $PROJECT_DIRECTORY | |
cd $PROJECT_DIRECTORY | |
echo >> ./bin/activate |
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 os | |
ENVIRONMENT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) | |
activate_file = os.path.join(ENVIRONMENT_ROOT, 'bin', 'activate_this.py') | |
execfile(activate_file, dict(__file__=activate_file)) | |
admin_file = os.path.join(ENVIRONMENT_ROOT, 'bin', 'django-admin.py') | |
execfile(admin_file) |