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 | |
if [ `whoami` != "root" ]; then | |
echo "$0 must be run as root." | |
exit 1 | |
fi | |
for i in $(locate webrick/config.rb); do | |
echo "Processing $i" | |
sed -e 's/^.*:DoNotReverseLookup => nil,$/:DoNotReverseLookup => true,/' $i > /tmp/config.rb |
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 | |
# Script to backup git repo to S3 | |
# Set bucket, dir, password and account to use for the backup. I keep mine in local env vars | |
# These are set by localrc which lives on an encrypted home directory and is executed by my bashrc | |
bucket=$GITHUB_BACKUP_BUCKET | |
dir=$GITHUB_BACKUP_DIR | |
password=$GITHUB_BACKUP_PASSWORD | |
account=$GITHUB_ACCOUNT |
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 | |
find /tmp -name '* *' | while read filename; do | |
echo "Converting:$filename" | |
faad -o - "$filename" | lame - "${filename%.m4a}.mp3" | |
done |
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
Gemfile: | |
source 'http://rubygems.org' | |
gem 'rails', '3.1.3' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' |
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
Start an instance and specify the metadata with -d. | |
# ec2-run-instances --region us-east-1 -key 'key' --instance-type 'm1.large' ami-1927f370 -d 'this is the data I need' | |
RESERVATION r-67bdc406 608324328795 default | |
INSTANCE i-5ad9aa38 ami-1927f370 pending weaver 0 m1.large 2012-01-06T15:44:47+0000 us-east-1b aki-08ed0761 monitoring-disabled ebs paravirtual xen sg-357c745c default | |
Retrieve the instance hostname. | |
# ec2-describe-instances --region us-east-1 i-5ad9aa38 | grep ^INSTANCE | awk {'print $4'} |
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 | |
# | |
# Modified by bweaver to add root key to ea user | |
# | |
# This script will be executed *after* all the other init scripts. | |
# You can put your own initialization stuff in here if you don't | |
# want to do the full Sys V style init stuff. | |
touch /var/lock/subsys/local |
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 | |
USER=ec2-user | |
echo 'Removing host keys' | |
sudo /bin/rm -rf /etc/ssh/ssh_host*_key* | |
echo 'Removing ec2-user' | |
userdel -f $USER ; /bin/rm -rf /home/$USER |
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 | |
whitelist=ami_rpm_whitelist.txt | |
# List rpms to installed rpmts | |
rpm -q -a > /tmp/installed_rpms | |
# create white list file of rpms installed on the given whitelist | |
for i in `cat $whitelist |tr -d '\r'`; do | |
egrep ^$i /tmp/installed_rpms |
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 | |
# Fucking umask!!! | |
umask 022 | |
# Install epel yum repo | |
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm | |
# Install deps for ruby build | |
yum install -y gcc rpm-build readline-devel.x86_64 libffi-devel.x86_64 libyaml-devel.x86_64 zlib-devel.x86_64 openssl-devel.x86_64 wget |
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 | |
# Fucking umask!!! | |
umask 022 | |
# Get image magic source | |
cd /var/tmp | |
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz | |
# Extract source |
OlderNewer