This file contains hidden or 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
sudo apt-get install libevent-dev python-all-dev daemontools lzop pv postgresql-client python-pip | |
sudo pip install wal-e | |
# There's an issue with Ubuntu 14.04 and wall-e where you need to upgrade six. | |
# Not sure why. | |
sudo pip install --upgrade six | |
# Replace access_key and secret_access_key with your AWS keys. | |
# Replace project-name with your bucket name. | |
sudo mkdir -p /etc/wal-e.d/env |
This file contains hidden or 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
{ | |
"Statement": [ | |
{ | |
"Action": "s3:*", | |
"Effect": "Allow", | |
"Resource": [ | |
"arn:aws:s3:::project-name", | |
"arn:aws:s3:::project-name/*" | |
] | |
} |
This file contains hidden or 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
# Launch a shared tmux session. | |
wemux |
This file contains hidden or 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 wemux | |
sudo git clone git://github.com/zolrath/wemux.git /usr/local/share/wemux | |
sudo ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux | |
sudo cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf | |
# Change the host_list value to your pair usernames (change to your usernames) | |
sudo vim /usr/local/etc/wemux.conf | |
host_list=(dave dayton) | |
# Save and quit (:wq) |
This file contains hidden or 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
# Copy your shh key to the server | |
scp ~/.ssh/id_rsa.pub dave@198.199.xx.x: | |
# Login to your account | |
ssh dave@198.199.xx.x | |
# Enable ssh access using your rsa key | |
mkdir .ssh | |
mv id_rsa.pub .ssh/authorized_keys |
This file contains hidden or 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
# Create our pair users | |
# You'll want to substitude your own usernames for dave and dayton | |
adduser dave | |
adduser dayton | |
# Add them to the sudo group | |
usermod -a -G sudo dave | |
usermod -a -G sudo dayton |
This file contains hidden or 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
# Log into your VPS and enter the provided password when prompted. | |
ssh root@[YOUR VPS IP] | |
# Update the system. This will take a little while to complete. | |
apt-get update | |
apt-get safe-upgrade | |
# Install essential build tools, git, tmux, vim, and fail2ban. | |
apt-get install build-essential git tmux vim fail2ban |
This file contains hidden or 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
<script> | |
window.onload = function() { | |
parent.postMessage('height:' + document.body.scrollHeight, "*"); | |
}; | |
</script> |
This file contains hidden or 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC2EG5UiCIn4e/iECf3K5IwJsXwtSz0qZ1fXXlvUVvF4hHfsWOeX4vXqtX4jLiu1h1Zpyqa0bJeXtkQDF3U/aT+Ez/Y6qBBo5ONdkAsNHWdmYvfkcQ+HBCd3HSd3nGjR1xTShZbEWakCt/yO+tSw7HWgIgQYVPJ+kHvfkBvw10Z7aLc3+WM0Hg8BmQIl6YKLKzhEQjdq1x81Q6OKMO5Vqmb61eE8TSr+ISEqzUjg9gAkT3qyF0CegXw0b3/wIpvhtCpYh9QpWi87JqMfWqNvARH4ciIcj+T/6HeB+aOVhtYv5Q+X84GcyNBErbYqFfzbomAgeqzv2Ag+kIUfNrJSfwF rapind@rapindesk |
This file contains hidden or 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
# The only true solution to the "Turn this array into a snake" test. | |
class Array | |
def motherfucking_spiral | |
[ 1, 2, 3, 4, | |
12, 13, 14, 5, | |
11, 16, 15, 6, | |
10, 9, 8, 7 ] | |
end | |
end |