Skip to content

Instantly share code, notes, and snippets.

View IanVaughan's full-sized avatar
👯‍♀️
OMG

Ian Vaughan IanVaughan

👯‍♀️
OMG
View GitHub Profile
### Keybase proof
I hereby claim:
* I am ianvaughan on github.
* I am ianvaughan (https://keybase.io/ianvaughan) on keybase.
* I have a public key whose fingerprint is 9B1C 3D39 19A5 B944 5E9F 0670 97B6 4C4E 5D9B 7C23
To claim this, I am signing this object:
@IanVaughan
IanVaughan / boot2docker.sh
Last active August 29, 2015 14:22
Docker
brew install boot2docker
boot2docker init
boot2docker up
# To connect the Docker client to the Docker daemon, please set:
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH=/Users/ian/.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1
#!/bin/bash
# Dont allow commits containing the addition of '@wip'
if test "$(git diff --cached | grep '\+\s*@wip')"
then
echo "Error: Attempt to commit an @wip line"
echo
echo "To skip this check, add the --no-verify option"
echo
exit 1
fi
@IanVaughan
IanVaughan / cucumber
Created May 26, 2015 19:59
zeus bin stubs
#!/usr/bin/env ruby
args = *ARGV
if File.exists?('.zeus.sock')
puts "=> Using Zeus..."
exec "zeus cucumber #{args.join(' ')}"
else
puts "=> NOT Using Zeus..."
exec "bundle exec cucumber #{args.join(' ')}"
end
@IanVaughan
IanVaughan / invalid_records.rb
Last active August 29, 2015 14:19
Finds invalid rails records
#!/usr/bin/env ruby
puts "Loading Rails..."
require 'ruby-progressbar'
require './config/environment'
require "csv"
puts "Booting Rails..."
Rails.application.eager_load!
@IanVaughan
IanVaughan / trigger_ci.sh
Created April 10, 2015 08:15
Trigger Jenkins build remotely
# Ever wanted to force a jenkins build quickly?
# Put this file in your path somewhere, and chmod +x it
curl "http://<jenkins-server-url>/buildByToken/build?job=<job-name>&token=<token>”
# Replace <vars> with your own config
# Goto your project configure page : http://<jenkins-server-url>/job/<job-name>/configure
# And set “Trigger builds remotely” to <token>
@IanVaughan
IanVaughan / upload_to_s3.rb
Last active August 29, 2015 14:11
Uploads a given file to S3 files.econultancy.com bucket and sets permissions to Everyone:Read/Download
#!/usr/bin/env ruby
# Uploads a given file to S3 files.econultancy.com bucket
# and sets permissions to Everyone:Read/Download
# (Default of Tech:Read/Write/Delete still set)
# Uses config in ~/.fog if present,
# otherwise falls back to using ENV vars
# export AWS_ACCESS_KEY_ID=xxx
@IanVaughan
IanVaughan / move_todo.rb
Created November 6, 2014 10:29
Move TODOs from code to GitHub
require 'github_api'
path = '.'
USER = 'user'
REPO = 'repo'
OAUTH_TOKEN = 'xxxx'
def files(path)
(`ag TODO #{path} -l`).split
@IanVaughan
IanVaughan / go-slow.sh
Created October 11, 2014 22:06
Make your internet like the 80ies
#!/bin/bash
help() {
echo 'G o S L O W ...'
}
stop() {
sudo ipfw delete 1
sudo ipfw delete 2
sudo ipfw pipe 1 delete