Created
December 1, 2010 11:27
-
-
Save nfo/723364 to your computer and use it in GitHub Desktop.
Sends a screenshot via HTTP (faster than logging to LogMeIn for simple checks)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
Dir.mktmpdir('screenme') do |dir| | |
file = File.join(dir, Time.now.strftime('%Y%m%d%H%M%S') + '.png') | |
%x(/usr/sbin/screencapture -x #{file}) | |
send_file file | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment