Skip to content

Instantly share code, notes, and snippets.

@henrik
Created April 21, 2011 20:06
Show Gist options
  • Save henrik/935351 to your computer and use it in GitHub Desktop.
Save henrik/935351 to your computer and use it in GitHub Desktop.
def aws_zone
[ ["east", "d"], ["west", "c"] ].inject([]) do |array, (zone, max)|
'a'.upto(max) { |letter| array << "us-#{zone}-1#{letter}" }
array
end.sample
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment