Created
December 20, 2013 15:52
-
-
Save Fonsan/8056688 to your computer and use it in GitHub Desktop.
webscope
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
<html> | |
<head> | |
<meta http-equiv="refresh" content="3" > | |
<title>LOL</title> | |
</head> | |
<body> | |
<img style="width:100%;height:100%" src="data:image/gif;base64,<%= @image %>"> | |
</body> | |
</html> |
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 'sinatra' | |
require 'Base64' | |
LOL = {} | |
Thread.start { | |
loop do | |
LOL[:image] = Base64.encode64(`imagesnap -w 2 -`) | |
end | |
} | |
get '/' do | |
@image = LOL[:image] | |
erb :index | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment