Skip to content

Instantly share code, notes, and snippets.

View sterrym's full-sized avatar

Tim Glen sterrym

  • Shopify Inc
  • Ontario, Canada
View GitHub Profile
#!/bin/bash
# ec2-run-instances --key build --user-data-file ec2-userdata.sh --group default --group basic ami-ed46a784
set -e -x
export DEBIAN_FRONTEND=noninteractive
apt-get update && apt-get upgrade -y
# ruby
wget http://rubyforge.org/frs/download.php/58679/ruby-enterprise_1.8.6-20090610_i386.deb
document.observe("dom:loaded", function() {
tabs = new UpperTabs();
});
UpperTabs = Class.create({
sticky: new Array,
current: new Array,
menus: new Array,
submenus: new Array,
timer: null,
define_builder(Country) do |klass, overrides|
# set up some presets
canada = { :iso => 'CA', :name => 'CANADA', :printable_name => 'Canada', :iso3 => 'CAN', :numcode => '124'}
usa = { :iso => 'US', :name => 'UNITED STATES', :printable_name => 'United States', :iso3 => 'USA', :numcode => '840' }
uk = { :iso => 'GB', :name => 'UNITED KINGDOM', :printable_name => 'United Kingdom', :iso3 => 'GBR', :numcode => '826' }
zimbabwe = { :iso => 'ZW', :name => 'ZIMBABWE', :printable_name => 'Zimbabwe', :iso3 => 'ZWE', :numcode => '716' }
# set up the default
country_attributes = canada
# check for a preset
overrides.process(:preset) do |preset|