I can't wake up with usual alarm clock.
So I made a peculiar alarm clock named "SITEI ZIKAN MADENI TOMENAITO FILE KESITYAU KUN".
The clock is a simple ruby script.
We can use it like this
$./delete_timer.rb 10 0
set timer for 11:0
If you don't stop it with Ctrl+C before coming of the time you set, it will delete your file on directory specified with DELETE_DIRECTORY_PATH.
So you will wake up properly to save your file.
I assume that DELETE_DIRECTORY_PATH is set to a directory which contains precious pictures user shoted or something.
Naturally I'm using it like that.
Have you got the urge to use "SITEI ZIKAN MADENI TOMENAITO FILE KESITYAU KUN"?
DELETE_DIRECTORY_PATH = "F:/picture"
DEBUG = false
DELETE_FILES = 1
all_candidates = Dir.glob(DELETE_DIRECTORY_PATH + "/**/*")
all_files = 
all_files << candidate if File::ftype(candidate) == "file"
to_delete = all_files[rand(all_files.length).to_i]
p to_delete if DEBUG
hour = ARGV
minute = ARGV
puts "set timer for " + hour.to_s + ":" + minute.to_s
current_time = Time.now
if current_time.hour == hour.to_i && current_time.min == minute.to_i
puts "game over :" + current_time.to_s