Skip to content

Instantly share code, notes, and snippets.

@henrik
Created April 21, 2011 20:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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