Skip to content

Instantly share code, notes, and snippets.

View adworse's full-sized avatar

Dima Ermilov adworse

  • Apptopia
  • Varna, Bulgaria
View GitHub Profile
file = File.expand_path(File.dirname(__FILE__)) + '/words.txt'
words = File.read(file).split("\n")
(4..5).each do |x|
puts "\n#{words.length} words to randomize, #{x} words * 50"
50.times do
puts x.times.map {
words.delete_at(rand(words.length)).delete(' ')
}.join(' ')
end