Skip to content

Instantly share code, notes, and snippets.

View rickrussell's full-sized avatar

Rick Russell rickrussell

  • Noneck Media
  • The Real NorCal
View GitHub Profile
❯ digga google.com [3:13:52 PM]
google.com. 35 IN A 74.125.20.100
google.com. 35 IN A 74.125.20.102
google.com. 35 IN A 74.125.20.113
google.com. 35 IN A 74.125.20.101
google.com. 35 IN A 74.125.20.138
google.com. 35 IN A 74.125.20.139
google.com. 35 IN AAAA 2001:4860:400b:c01::65
google.com. 335 IN MX 40 alt3.aspmx.l.google.com.
google.com. 21335 IN SOA ns1.google.com. dns-admin.google.com. (
export DATE=`date +'%F'-'%T' | sed 's/[-,:]//g'`
export AWS_USERNAME="noneck"
export AWS_SSH_KEY_PATH="$HOME/.ec2/dev/.ssh/$AWS_USERNAME-evident-io-dev.pem"
export AWS_KEYPAIR_NAME="$AWS_USERNAME-dev"
export AWS_STACK_NAME="esp-devstack-$AWS_USERNAME"
export AWS_AMI_ID="ami-c0c3a7a8"
export AWS_SECURITY_GROUP="evident-dev-stack-noneck"
export AWS_VPC_ID="$AWS_DEV_USERNAME-evident-io-dev"
export AWS_VPC_SUBNET="subnet-46479e1f"
#!/bin/bash
# This script cleans up your EC2 instance before baking a new AMI.
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.githubusercontent.com/rickrussell/e56e81517bc89b575a0f/raw/d07f873dc7bd2cbc4dee21ed99e7fb6a169956ab/ami-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
# update-alternative (install)
sudo update-alternatives --install /usr/bin/ruby ruby2.0 /opt/rubies/2.0.0-p353/bin/ruby 0
sudo update-alternatives --install /usr/bin/erb erb2.0 /opt/rubies/2.0.0-p353/bin/erb 0
sudo update-alternatives --install /usr/bin/gem gem2.0 /opt/rubies/2.0.0-p353/bin/gem 0
sudo update-alternatives --install /usr/bin/irb irb2.0 /opt/rubies/2.0.0-p353/bin/irb 0
sudo update-alternatives --install /usr/bin/rake rake2.0 /opt/rubies/2.0.0-p353/bin/rake 0
sudo update-alternatives --install /usr/bin/rdoc rdoc2.0 /opt/rubies/2.0.0-p353/bin/rdoc 0
sudo update-alternatives --install /usr/bin/ri ri2.0 /opt/rubies/2.0.0-p353/bin/ri 0
sudo update-alternatives --install /usr/bin/testrb testrb2.0 /opt/rubies/2.0.0-p353/bin/testrb 0
### Keybase proof
I hereby claim:
* I am rickrussell on github.
* I am noneck (https://keybase.io/noneck) on keybase.
* I have a public key whose fingerprint is B13B 64C8 9C75 321D CAA3 513E 61FB 4FC4 E9E6 AD28
To claim this, I am signing this object:
@rickrussell
rickrussell / gist:4278571
Created December 13, 2012 18:38
Jenkins Build Scripts
#!/bin/bash
mkdir -p log
rm -f log/deploy.log
source ~/.bash_profile
rvm install ree-1.8.7-2011.12
cp .rvmrc.template .rvmrc
rvm rvmrc trust
cd .
cp ~/secrets.rb config/secrets.rb
@rickrussell
rickrussell / my-cnf.erb
Created June 18, 2012 06:03
Tuned MySQL Master Config File
#
# The MySQL database server configuration file.
#
[mysqld]
# GENERAL #
bind-address = 0.0.0.0
user = mysql
socket = /var/run/mysqld/mysqld.sock