Skip to content

Instantly share code, notes, and snippets.

@rsese
Last active May 6, 2017 20:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsese/b8bc0131566f2ed9acadd462df28be6e to your computer and use it in GitHub Desktop.
Save rsese/b8bc0131566f2ed9acadd462df28be6e to your computer and use it in GitHub Desktop.
Create a test file of size NUM_LINES * LINE_LENGTH 📰
fout = File.open("test.dat", "w+")
NUM_LINES = 50000
LINE_LENGTH = 130
line = ("a" * LINE_LENGTH) + "\n"
(1..NUM_LINES).each do
fout.write(line)
end
fout.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment