DEV Community

Discussion on: Write a simple but impactful script

Collapse
 
philnash profile image
Phil Nash

Sharing my Ruby version of this script. Feel free to use to attempt the bonus challenge!

File.open("leaked_pins.txt", "w") do |file|
  (0...10000).to_a.shuffle.each do |number|
    file << number.to_s.rjust(4, "0") + "\n"
  end
end