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
NoMethodError: undefined method `load_balancers' for #<Instance:0x007f8ea48e75a8> | |
from /Users/charleskirk/.rvm/gems/ruby-1.9.3-p286/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' | |
from /Users/charleskirk/.rvm/gems/ruby-1.9.3-p286/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' | |
from (irb):24 | |
from /Users/charleskirk/.rvm/gems/ruby-1.9.3-p286/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start' | |
from /Users/charleskirk/.rvm/gems/ruby-1.9.3-p286/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start' | |
from /Users/charleskirk/.rvm/gems/ruby-1.9.3-p286/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>' | |
from script/rails:6:in `require' | |
from script/rails:6:in `<main>' |
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
def save_aws_data | |
@elb = AWS::ELB.new( | |
:access_key_id => AWS_CONFIG['access_key_id'], | |
:secret_access_key => AWS_CONFIG['secret_access_key']) | |
instances_downloaded = Array.new | |
@elb.load_balancers.inject({}) do |a, b| | |
@lb = LoadBalancer.create(:name => b.name, :canonical_hosted_zone_name_id => b.canonical_hosted_zone_name_id, :dns_name => b.dns_name) | |
@elb.load_balancers[b.name].instances.inject({}) do |m, i| |
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
@list[:hosted_zones].each do |zone| | |
records = @r53.client.list_resource_record_sets({:hosted_zone_id => zone[:id].gsub('/hostedzone/','')}) | |
records.resource_record_sets.each do |record| | |
if required_records.include? record[:type] | |
new_record = {:name => record[:name], :type => record[:type], :set_identifier => record[:set_indentifier], | |
:region => record[:region]} | |
if record.has_key?("alias_target") | |
new_record[:alias_target_zone] = record[:alias_target][:hosted_zone_id] | |
new_record[:alias_target_dns_name] = record[:alias_target][:dns_name] | |
end |
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
@full_list = Array.new | |
@list = @r53.client.list_hosted_zones | |
loop do | |
@list[:hosted_zones].each do |zone| | |
@full_list << zone | |
end | |
@next_marker = @list[:next_marker] | |
@list = @r53.client.list_hosted_zones({ :marker => @next_marker }) |
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
Net::SSH::Multi.start(:on_error => :ignore) do |ssh| | |
Instance.all.each do |instance| | |
if instance.status == 'running' | |
ssh.use 'portal_user@' + instance.ip_address, :keys => ['~/.ssh/portal_user.pem'] | |
end | |
end | |
stdout = "" | |
# run this on all boxes | |
ssh.open_channel do |channel| | |
channel.request_pty do |c, success| |
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
awk: {print ,,} | |
awk: ^ syntax error | |
awk: {print ,,} | |
awk: ^ syntax error | |
awk: cmd. line:1: {print ,,} | |
awk: cmd. line:1: ^ unexpected newline or end of string | |
i am here | |
i-de1111beAmazon Linux AMI release 2012.09 | |
cpe:/o:amazon:linux:2012.09:ga |
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
group :assets do | |
gem 'coffee-rails', '~> 3.2.1' | |
gem 'uglifier', '>= 1.0.3' | |
gem 'ejs', '>= 1.0.0' | |
gem "compass-rails" | |
gem 'sass-rails', '~> 3.2.3' | |
gem 'bootstrap-sass', '~> 2.3.1.0' | |
end | |
gem 'twitter-bootstrap-rails' |
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
{ | |
"caret_style": "solid", | |
"color_scheme": "Packages/Theme - Brogrammer/brogrammer.tmTheme", | |
"detect_indentation": false, | |
"detect_slow_plugins": false, | |
"drag_text": false, | |
"draw_minimap_border": true, | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ |
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
button.class_name { | |
-webkit-box-shadow: 0px 0px 15px 2px rgba(0,0,0,0.75); | |
-moz-box-shadow: 0px 0px 15px 2px rgba(0,0,0,0.75); | |
box-shadow: 0px 0px 15px 2px rgba(0,0,0,0.75); | |
} |