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
upstream backend { | |
server 127.0.0.1:8001; | |
server 127.0.0.1:8002; | |
} | |
server { | |
listen 80; | |
access_log /var/log/nginx/yoursite.access.log; | |
error_log /var/log/nginx/yoursite.error.log; |
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
function gpush() { | |
gc .; gp origin $(git rev-parse --symbolic-full-name --abbrev-ref HEAD) | |
} | |
function gpull() { | |
gc .; git pull origin $(git rev-parse --symbolic-full-name --abbrev-ref HEAD) | |
} |
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
#!/bin/bash | |
# Install rbenv | |
# https://github.com/sstephenson/rbenv | |
cd ~ | |
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev \ | |
libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev -y |
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
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
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 update | |
sudo apt-get install -y python-software-properties python g++ make | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs |
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
#! env python | |
from boto import ec2 | |
conn = ec2.connect_to_region('us-west-2') | |
vols = conn.get_all_volumes(filters={'status': 'available'}) | |
for vol in vols: | |
print 'checking vol:', vol.id, 'status:', vol.status, 'attachment_id:', vol.attach_data.status | |
conn.delete_volume(vol.id) |
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
''' | |
@author Bommarito Consulting, LLC | |
@date 20120622 | |
Identify and, if requested, remove orphaned snapshots from an EC2 account. | |
''' | |
# Imports | |
import boto |