Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
letters = %w(A T G C) File.open(ARGV[0], 'w+') do |f| (lines = ARGV[1].to_i).times do (width = (ARGV[2] || 70).to_i).times do f.write letters[rand(4)] end f.write "\n" unless f.pos == (lines * (width + 1) - 1) end puts "wrote #{lines} lines to #{ARGV[0]}" end
This paste will be private.
From the Design Piracy series on my blog: