Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jandudulski/487251 to your computer and use it in GitHub Desktop.
Save jandudulski/487251 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby1.9.1
# coding: utf-8
if ARGV.empty?
STDERR.puts "Usage: fajrant hours"
exit(-1)
end
begin
hours = Integer(ARGV[0])
rescue ArgumentError => e
STDERR.puts e.message, "\n", "Usage: fajrant hours"
exit(-1)
end
(hours * 60).downto(0) do |i|
puts(format('Minutes left: %10d', i))
sleep(60)
end
puts "FAJRAAAAAAAAAANT!!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment