Skip to content

Instantly share code, notes, and snippets.

@hunj
Created September 24, 2015 01:12
Show Gist options
  • Select an option

  • Save hunj/98332de663fc6a6ca456 to your computer and use it in GitHub Desktop.

Select an option

Save hunj/98332de663fc6a6ca456 to your computer and use it in GitHub Desktop.

Revisions

  1. hunj created this gist Sep 24, 2015.
    10 changes: 10 additions & 0 deletions dummy_generate.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    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