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
== Rules == | |
On Infrastructure | |
----------------- | |
There is one system, not a collection of systems. | |
The desired state of the system should be a known quantity. | |
The "known quantity" must be machine parseable. | |
The actual state of the system must self-correct to the desired state. | |
The only authoritative source for the actual state of the system is the system. | |
The entire system must be deployable using source media and text files. |
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
# Source accepts the protocol s3:// with the host as the bucket | |
# access_key_id and secret_access_key are just that | |
s3_file "/var/bulk/the_file.tar.gz" do | |
source "s3://your.bucket/the_file.tar.gz" | |
access_key_id your_key | |
secret_access_key your_secret | |
owner "root" | |
group "root" | |
mode 0644 | |
end |
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
begin | |
require 'json' | |
rescue LoadError | |
require 'rubygems' | |
require 'json' | |
end | |
require 'benchmark' | |
puts "Testing without cleanup" | |
Benchmark.bm do |b| |
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 | |
INFO=$( echo $PWD )/MyApp-Info | |
TAG=$( git describe --tags `git rev-list --tags --max-count=1` ) | |
COMMIT= | |
GITPATH=/usr/bin:/usr/local/bin:/usr/local/git/bin | |
PATH=$PATH:$GITPATH; export PATH | |
if [ -z $( which git ) ]; then | |
echo "Unable to find git binary in \$GITPATH" |
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
Vagrant::Config.run do |global_config| | |
aptdir = (ENV['APTCACHE'] or "#{ENV['HOME']}/aptcache/") | |
checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks") | |
ip_prefix = (ENV['IP_PREFIX'] or "192.168.76.") | |
mac_prefix = (ENV['MAC_PREFIX'] or "080027076") | |
fixed = (ENV['FIXED'] or "10.0.76.0/24") | |
global_config.vm.define :chef do |config| | |
suffix = "100" | |
ip = "#{ip_prefix}#{suffix}" | |
config.vm.box = "base" |
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
// Minimal is the smalles GameJs app I could think of, which still shows off | |
// most of the concepts GameJs introduces. | |
// | |
// It's a pulsating, colored circle. You can make the circle change color | |
// by clicking. | |
// | |
// Play: <http://gamejs.org/apps/minimal/> | |
var gamejs = require('gamejs'); |
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 sys, os.path, logging | |
try: | |
import sysconfig | |
except ImportError: | |
sysconfig = None | |
def warn_on_path_overlap(): | |
""" |
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 | |
# https://gist.github.com/949831 | |
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/ | |
# command line OTA distribution references and examples | |
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson | |
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution | |
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/ | |
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html |
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 | |
####################################### | |
# Graphite Install | |
# Run with sudo for best results | |
# | |
####################################### | |
if [[ "$(/usr/bin/whoami)" != "root" ]]; then | |
echo "This script must be run as root or using sudo.Script aborted." | |
exit 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
virtualenv --no-site-packages . | |
source bin/activate | |
bin/pip install Django psycopg2 django-sentry | |
bin/pip freeze > requirements.txt | |
bin/django-admin.py startproject mysite | |
cat >.gitignore <<EOF | |
bin/ | |
include/ | |
lib/ | |
EOF |
OlderNewer