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
# EC2 Helper | |
# Usage: | |
# $ ec2 ec2-254-254-254-254.compute-1.amazonaws.com | |
# | |
#============ | |
ec2 () { | |
ssh -i ~/.ssh/<path_to_your_key_here> ec2-user@$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
#!/bin/bash | |
# From http://devblog.springest.com/a-script-to-remove-old-git-branches/ | |
# This will remove all remote branches that have been merged into develop (excluding develop, stage, production branches)! | |
# | |
echo "The following remote branches have been removed from origin and will be pruned:" | |
git remote prune origin --dry-run | |
say "The following remote branches have been removed from origin and will be pruned:" | |
read -p "Continue (y/n)? " REPLY_1 | |
if [ "$REPLY_1" == "y" ]; then |
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
$ brew install s3cmd | |
$ s3cmd --version | |
s3cmd version 1.0.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
# Apt-install various things necessary for Ruby, guest additions, | |
# etc., and remove optional things to trim down the machine. | |
apt-get -y update | |
apt-get -y remove apparmor | |
apt-get -y install linux-headers-$(uname -r) build-essential | |
apt-get -y install zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev libssl-dev openssl libreadline5-dev | |
apt-get clean | |
# Remove this file to avoid dhclient issues with networking | |
rm -f /etc/udev/rules.d/70-persistent-net.rules |
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 | |
# Setup a debian based vagrant machine | |
TO_CLEAN_PKGS=() | |
nullify_free_space() { | |
echo 'clearing free space' | |
dd if=/dev/zero of=/EMPTY bs=1M | |
rm -f /EMPTY | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 bash | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Some apps don't have a cask and so still need to be installed by hand. These | |
# include: | |
# | |
# - Twitter (app store) |
OlderNewer