Skip to content

Instantly share code, notes, and snippets.

@bfagundez
Last active August 29, 2015 14:24
Show Gist options
  • Save bfagundez/524e628df9a58136a45a to your computer and use it in GitHub Desktop.
Save bfagundez/524e628df9a58136a45a to your computer and use it in GitHub Desktop.
combination_block
a = ('a'..'z').to_a
b = ['1','2','3','4','5','6','7','8','9','0']
d = ('A'..'Z').to_a
c = a+b+d
#File.open('randomness.txt','w'){|f|
allcombos = []
MAX_COMBOS = 3
c.combination(7).each_with_index do |combo,i|
allcombos.push(combo.join)
if i == MAX_COMBOS - 1
break
end
end
puts allcombos
#}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment