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 | |
aws cloudformation create-stack --stack-name test-vpc --template-body file://vpc.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
<% | |
director_uuid = 'CHANGEME' | |
static_ip = 'CHANGEME' | |
root_domain = "#{static_ip}.xip.io" | |
deployment_name = 'cf' | |
cf_release = '170' | |
protocol = 'http' | |
common_password = 'c1oudc0wc1oudc0w' | |
%> | |
--- |
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
<% | |
director_uuid = 'CHANGEME' | |
static_ip = 'CHANGEME' | |
root_domain = "#{static_ip}.xip.io" | |
deployment_name = 'cf' | |
cf_release = '170' | |
protocol = 'http' | |
common_password = 'c1oudc0wc1oudc0w' | |
%> | |
--- |
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
require 'psych' | |
def tree o, options = {} | |
visitor = Psych::Visitors::YAMLTree.create options | |
visitor << o | |
visitor.tree | |
end | |
# create a YAML AST from a Ruby object | |
my_object = [ "(( foo ))" ] |
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 tweepy | |
from BeautifulSoup import BeautifulSoup as parser | |
import urllib | |
import sys | |
import argparse | |
import ConfigParser |
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
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
require 'guard/guard' | |
require 'mixlib/shellout' | |
module ::Guard | |
class Kitchen < ::Guard::Guard | |
def start | |
::Guard::UI.info("Guard::Kitchen is starting") |
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 | |
# reset stuff | |
sudo rm -r .blobs | |
rm -r blobs | |
rm -r blobs_import | |
git checkout -- config/blobs.yml | |
git checkout -- config/final.yml | |
rm config/private.yml |
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 | |
# | |
# Discover the contribution status of a user for all their watched repos: owner, collaborator, or watcher | |
# Returns either JSON (default) or HTML (example http://github-user-profiles-example.heroku.com/) | |
# | |
# JSON: Returns either Array of JSON; or streams each JSON result as discovered (--stream flag) | |
# { "repo" => { ... }, "owner" => is project owner?, "collaborator" => has collaborator access? } | |
# | |
# HTML: Sort-of pretty HTML output. Nice to use --stream | bcat. | |
# |
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 | |
cd ${1:?USAGE: convert-to-credhub.sh path/to/ci} | |
function indent() { | |
c='s/^/ /' | |
case $(uname) in | |
Darwin) sed -l "$c";; | |
*) sed -u "$c";; | |
esac |
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 | |
# linux firewall/forwarding | |
modprobe iptable_nat | |
echo 1 | tee /proc/sys/net/ipv4/ip_forward | |
iptables -t nat -A POSTROUTING -s 10.10.10.1/2 -o eth0 -j MASQUERADE | |
# install openvpn | |
apt-get update && apt-get install -y openvpn | |
cd /etc/openvpn/ | |
INSTANCE=$(curl http://169.254.169.254/latest/meta-data/public-hostname) | |
openvpn --genkey --secret ${INSTANCE}.key |
OlderNewer