This file contains hidden or 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 'net/http' | |
| require 'base64' | |
| require 'json' | |
| module Cfn | |
| class << self | |
| def instance_identity_document() | |
| Net::HTTP.get(URI('http://169.254.169.254/latest/dynamic/instance-identity/document')) | |
| end |
This file contains hidden or 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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "precise-server-cloudimg-amd64" | |
| config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
| config.vm.network :private_network, ip: "172.16.0.2", netmask: "255.255.255.0" | |
| config.vm.provision :shell do |shell| |
This file contains hidden or 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
| package main | |
| import ( | |
| "bytes" | |
| "encoding/binary" | |
| "fmt" | |
| "net" | |
| "syscall" | |
| ) | |
This file contains hidden or 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
| if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
| . $(brew --prefix)/etc/bash_completion | |
| fi | |
| if [ `which gsed` ]; then | |
| alias sed='gsed' | |
| fi | |
| alias ls='ls -G' | |
| alias grep='grep --color' |
This file contains hidden or 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 |config| | |
| %w{20130425 20130429 20130502 20130506}.each do |date| | |
| config.vm.define "ubuntu-#{date}" do |vm| | |
| vm.vm.box = "ubuntu-#{date}" | |
| vm.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/#{date}/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
| vm.vm.customize ["modifyvm", :id, "--cpus", 4] | |
| vm.vm.host_name = "ubuntu-#{date}" | |
| end |
This file contains hidden or 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 | |
| # pre-commit git hook to make sure developers don't accidentally commit code they didn't mean to commit :) | |
| REMOVEME_STRING="REMOVEME" | |
| ALLOW_COMMITTING_REMOVEME=`git config hooks.allowcommittingremoveme` | |
| # redirect stdout to stderr | |
| exec 1>&2 | |
| if [ "$ALLOW_COMMITTING_REMOVEME" != "true" ] && |