Last active
August 29, 2015 14:24
-
-
Save bfagundez/524e628df9a58136a45a to your computer and use it in GitHub Desktop.
combination_block
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
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