Skip to content

Instantly share code, notes, and snippets.

@daxroc
Last active August 29, 2015 13:57
Show Gist options
  • Save daxroc/9410375 to your computer and use it in GitHub Desktop.
Save daxroc/9410375 to your computer and use it in GitHub Desktop.
last_checksum = File.open(last_file) do | f |
md5 = Digest::MD5.new
buffer = ""
md5.update(buffer) while f.read(4096, buffer)
md5
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment