Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Generates a dummy file full of 0's and 1's up to desired size
DESIRED_SIZE = 1073741824 # 1gb
FILE_NAME = "dummy" # name of the dummy file
dummy_file = File.new(FILE_NAME, "w")
while dummy_file.size < DESIRED_SIZE
dummy_file.write([0,1].sample)
end
dummy_file.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment