Skip to content

Instantly share code, notes, and snippets.

@uu59
Created May 28, 2013 13:34
Show Gist options
  • Save uu59/5662797 to your computer and use it in GitHub Desktop.
Save uu59/5662797 to your computer and use it in GitHub Desktop.
require "sinatra"
get "/" do
<<-HTML
<!DOCTYPE html>
<html>
<body>
<p id="a">a</p>
<script type="text/javascript">
var a = document.querySelector('#a');
var i=0;
setInterval(function(){
a.innerHTML = new Date;
}, 500);
</script>
</body></html>
HTML
end
Process.spawn("sleep 0; google-chrome --app=http://localhost:4567/")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment