Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 38 lines (34 sloc) 1.21 kB
e04e308 @chalkers Preparing for Heroku
authored
1 %w(rubygems sinatra).each {|l| require l}
ea2e868 @chalkers HAML Submodule
authored
2 load "./lib/haml/lib/haml.rb"
e04e308 @chalkers Preparing for Heroku
authored
3
ce15547 @chalkers Adding production
authored
4 configure :production do
5 end
6
75f44df @chalkers Is it?
authored
7 get "/" do
8 @magic = 1234567890
9 haml :index, :layout => !request.xhr? ? :layout : false
10 end
11 use_in_file_templates!
12 __END__
13 @@ layout
14 !!!Strict
15 %html
16 %head
17 %title= "Is UNIX time >= #{@magic}?"
18 %style * {font-family: 'Lucida Grande', Helvetica, sans-serif;padding:10px;margin:0px;text-align:center;} h2 {font-size:300px;}
922779d @chalkers Rack/Passenger Config.
authored
19 %script{:src=>"http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"}
75f44df @chalkers Is it?
authored
20 %script $(getTime); function getTime() { $("body").load("/");setTimeout(getTime,1000);};
7df64d2 @chalkers Analytics
authored
21 %script
22 var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
23 document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
24 %script
25 try {
26 var pageTracker = _gat._getTracker("UA-658908-9");
27 pageTracker._trackPageview();
28 } catch(err) {}
75f44df @chalkers Is it?
authored
29 %body
30 = yield
31 @@ index
32 %h1= "Is UNIX time >= #{@magic}?"
33 %div#time
34 %h2= (Time.now.to_i >= @magic) ? "YES" : "NO"
35 -if !(Time.now.to_i >= @magic)
36 %h3= "~#{@magic - Time.now.to_i} seconds 'til #{@magic}"
922779d @chalkers Rack/Passenger Config.
authored
37
Something went wrong with that request. Please try again.