Skip to content

Instantly share code, notes, and snippets.

@expandrive
Created December 14, 2010 21:46
Show Gist options
  • Save expandrive/741165 to your computer and use it in GitHub Desktop.
Save expandrive/741165 to your computer and use it in GitHub Desktop.
Macruby segfault generator
require 'digest'
require 'find'
path = "/Users/jmancuso"
digest = Digest::SHA2.new(512)
Find.find(path) do |entry|
if File.file?(entry) or File.directory?(entry)
stat = File.stat(entry)
digest.update("#{entry} - #{stat.mtime} - #{stat.size}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment