Skip to content

Instantly share code, notes, and snippets.

@ambethia
Created August 20, 2009 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ambethia/171360 to your computer and use it in GitHub Desktop.
Save ambethia/171360 to your computer and use it in GitHub Desktop.
# requires "isightcapture" in the cwd (http://www.intergalactic.de/pages/iSight.html)
INTERVAL = 20
@t1 = Time.now - INTERVAL
while true
@t2 = Time.now
if @t2 - @t1 >= INTERVAL
@t1 = @t2
system "./isightcapture #{@t1.strftime("%Y%m%d%H%M%S")}.jpg &"
print "\n#{@t1}"
else
print "."
end
STDOUT.flush
sleep(1)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment