Skip to content

Instantly share code, notes, and snippets.

@ubermuda
Created July 26, 2013 18:01
Show Gist options
  • Select an option

  • Save ubermuda/6090893 to your computer and use it in GitHub Desktop.

Select an option

Save ubermuda/6090893 to your computer and use it in GitHub Desktop.
Maid.rules do
rule 'Old files downloaded while developing/testing' do
dir('~/Downloads/*').each do |path|
if downloaded_from(path).any? {|u| u.match 'http://localhost'} && 1.week.since?(last_accessed(path))
trash(path)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment