Skip to content

Instantly share code, notes, and snippets.

@e0da
Created April 13, 2012 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e0da/2379581 to your computer and use it in GitHub Desktop.
Save e0da/2379581 to your computer and use it in GitHub Desktop.
Generate a list of GGSE instructional hostnames
all_rooms = []
%w[
4211 4219 4108 4205 4201
3242 3209 3138 3134 3130
3112 2209 2101 1217 1215
1213 1211 1207 1205 1203
1201
].map do |room|
%w[win mac].each do |os|
[*1..30].each do |i|
all_rooms.push "#{room}-#{os}-#{i}"
end if room == '4211'
%w[r b].each do |color|
all_rooms.push "#{room}-#{os}-#{color}"
end unless room == '4211'
end
end
puts all_rooms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment