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
# /etc/network/interfaces.d/eth1.cfg | |
# The secondary network interface | |
auto eth1 | |
iface eth1 inet dhcp | |
address <%= @ipaddress_eth1 %> | |
netmask <%= @netmask %> | |
up ip route add default via <%= GATEWAY_ADDRESS %> dev eth1 table out | |
up ip rule add from <%= @ipaddress_eth1 %>/32 table out | |
up ip rule add to <%= @ipaddress_eth1 %>/32 table out | |
up ip route flush cache |
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 | |
branch=$(git rev-parse --symbolic --abbrev-ref $1) | |
module=$(basename $PWD) | |
valid=0 | |
if [[ "$module" == "puppet.git" ]]; then | |
valid=1 | |
modulename="dram" | |
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
#!/usr/bin/env python | |
import sys | |
import os | |
import os.path | |
import logging | |
import subprocess | |
ENV_DIR = "environments" | |
MODULES = ['core', 'client'] |
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 sys | |
import os | |
import os.path | |
import logging | |
import subprocess | |
ENV_DIR = "environments" | |
MODULES = ['core', 'site'] |
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 | |
branch=$(git rev-parse --symbolic --abbrev-ref $1) | |
module=$(basename $PWD) | |
valid=0 | |
for modname in site-puppet.git core-puppet.git; do | |
if [[ "$module" == "$modname" ]]; then | |
valid=1 | |
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
# Port of rufus-mnemo to Python | |
# https://github.com/jmettraux/rufus-mnemo | |
# Original copyright (c) 2007-2011, John Mettraux, jmettraux@gmail.com | |
consonants = list('bdghjkmnprstz') | |
vowels = list('aeiou') | |
syllables = [c + v for c in consonants for v in vowels] + ['wa', 'wo', 'ya', 'yo', 'yu'] | |
negative = 'wi' | |
replacements = [ |
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
conf = { | |
"sqs-access-key": "", | |
"sqs-secret-key": "", | |
"sqs-queue-name": "", | |
"sqs-region": "us-east-1", | |
"sqs-path": "sqssend" | |
} | |
import boto.sqs | |
conn = boto.sqs.connect_to_region( |
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 | |
# encoding: utf-8 | |
""" | |
django.cgi | |
A simple cgi script which uses the django WSGI to serve requests. | |
Code copy/pasted from PEP-0333 and then tweaked to serve django. | |
http://www.python.org/dev/peps/pep-0333/#the-server-gateway-side |
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
Aardwolf | |
Abdol, Ahmet | |
Abner Little | |
Abominable Snowman | |
Abomination | |
Abominatrix | |
Abraxas | |
Absalom | |
Absorbing Man | |
Abyss |
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
import restkit | |
import simplejson | |
YQL_URL = ('http://query.yahooapis.com', '/v1/public/yql') | |
value = '11215' | |
pmr = restkit.Resource(YQL_URL[0]) | |
query = 'SELECT * FROM geo.places WHERE text = "%s"' | |
qs = value.replace(r'"', r'\"') |