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
syntax enable | |
colorscheme elflord | |
set nu | |
set clipboard=unnamed | |
set syntax=on | |
set expandtab | |
set autoindent | |
set sts=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
install | |
cmdline | |
# text | |
url --url http://mirror.xnet.co.nz/pub/centos/6.5/os/x86_64/ | |
lang en_US.UTF-8 | |
keyboard us | |
network --onboot yes --device eth0 --bootproto dhcp --noipv6 |
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 | |
# Variables | |
user=$(whoami) | |
hostname=$(hostname | sed 's/.local//g') | |
distro="OS X $(sw_vers -productVersion)" | |
kernel=$(uname) | |
uptime=$(uptime | sed 's/.*up \([^,]*\), .*/\1/') | |
shell="$SHELL" | |
terminal="$TERM" |
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 zsh | |
# Given a list of instance-id in an AWS region, it makes a snapshot of the root | |
# volume (assumed to be /dev/sda!) and copies it to the target region. | |
# | |
# The root volume is remounted 'ro' on each instance - so this script must | |
# be run from somewhere that can SSH to the server (possibly may require | |
# special firewall rules to be applied). | |
# | |
# Output is written to ${OUTPUT_FILE} |
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
VOLUME_ID=$(cat /tmp/staging-volume) | |
ec2-detach-volume ${VOLUME_ID} | |
# Detach | |
while [[ $(ec2-describe-volumes $VOLUME_ID | cut -f 6) != 'available' ]] ; do | |
echo "waiting...." | |
done | |
# Snapshot and create AMI |
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 | |
SNAPSHOT_ID=${1-"snap-8faa63bc"} | |
STAGING_INSTANCE_ID=${2-"i-55538e69"} | |
ZONE=$(ec2-describe-instance-status ${STAGING_INSTANCE_ID} | awk '$1 == "INSTANCE" { print $3 }') | |
# REGION=$([[ $EC2_URL =~ /.*ec2\.(.*)\.amazonaws.com/ ]] && echo ${BASH_REMATCH[1]}) | |
# Create volume, wait for it to be available | |
echo "creating volume" |