remove all but last 5. Run this from the releases directory.
sudo rm -rf `ls -t | awk 'NR>5'`
''' | |
@author Bommarito Consulting, LLC | |
@date 20120622 | |
Identify and, if requested, remove orphaned snapshots from an EC2 account. | |
''' | |
# Imports | |
import boto |
remove all but last 5. Run this from the releases directory.
sudo rm -rf `ls -t | awk 'NR>5'`
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE busconfig PUBLIC | |
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | |
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | |
<busconfig> | |
<!-- Only the root user can own the Upstart name --> | |
<policy user="root"> | |
<allow own="com.ubuntu.Upstart" /> | |
</policy> |
# Why use RAILS_ROOT and RAILS_ENV? Because this way we can tell our Sinatra app about the config file: | |
# $ RAILS_ENV=production resque-web rails_root/config/initializers/resque.rb | |
require 'resque' | |
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..' | |
rails_env = ENV['RAILS_ENV'] || 'development' | |
resque_config = YAML.load_file(rails_root + '/config/resque.yml') | |
Resque.redis = resque_config[rails_env] |
if Rails.env.production? | |
PAYPAL_ACCOUNT = 'production@gmail.com' | |
else | |
PAYPAL_ACCOUNT = 'development@gmail.com' | |
ActiveMerchant::Billing::Base.mode = :test | |
end |
## The Problem | |
Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.) | |
## The temptingly easy but ultimately wrong solution: | |
Alter the port the script talks to from 8000 to 80: | |
}).listen(80); |