This file contains hidden or 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
<div id="chart_wrap"> | |
<div id="chart"> | |
<img src="images/spinner.gif" alt="loading..."> | |
</div> | |
<div id="selector"> | |
<a id="pie_graph_button" class="button">Show Pie Chart</a> | |
<a id="bar_graph_button" class="button active">Show Bar Graph</a> | |
<a id="line_graph_button" class="button">Show Line Graph</a> | |
</div> | |
</div> |
This file contains hidden or 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
url = "http://otter.topsy.com/search.js?callback=?&apikey=38A260E9D12A4908B1AF9184B691131&q=bieber&window=d"; | |
requests.push($.ajax({ | |
url: url, | |
dataType: 'jsonp', | |
timeout: 1500, | |
success: function(data) { | |
trend.total += data.response.total; | |
} | |
})); |
This file contains hidden or 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
$ curl -i "http://otter.topsy.com/searchcount.js?q=Barack+Obama" | |
HTTP/1.1 200 OK | |
Cache-Control: max-age=5 | |
Content-Type: application/javascript; charset=utf-8 | |
Expires: Fri, 02 Sep 2011 20:11:57 GMT | |
Last-Modified: Fri, 02 Sep 2011 20:11:52 GMT | |
Server: lighttpd/1.4.26 | |
Content-Length: 220 | |
Date: Fri, 02 Sep 2011 20:11:52 GMT | |
X-Varnish: 344028207 |
This file contains hidden or 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
# in irb | |
-> Notifier.tell_me | |
=> NoMethodError: undefined method `tell_me' for Notifier:Class | |
from /data/**/shared/bundled_gems/ruby/1.8/gems/actionmailer-2.3.8/lib/action_mailer/base.rb:400:in `method_missing' | |
from (irb):1 |
This file contains hidden or 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
(rdb:33) params[:shape] | |
{"type"=>"squiggle", "points"=>{"0"=>{"x"=>"252", "y"=>"336"}, "1"=>{"x"=>"252", "y"=>"335"}, "2"=>{"x"=>"252", "y"=>"325"}, "3"=>{"x"=>"252", "y"=>"309"}, "4"=>{"x"=>"252", "y"=>"289"}, "5"=>{"x"=>"252", "y"=>"267"}, "6"=>{"x"=>"257", "y"=>"251"}, "7"=>{"x"=>"265", "y"=>"236"}, "8"=>{"x"=>"276", "y"=>"228"}, "9"=>{"x"=>"284", "y"=>"225"}, "10"=>{"x"=>"294", "y"=>"222"}, "11"=>{"x"=>"303", "y"=>"222"}, "12"=>{"x"=>"312", "y"=>"223"}, "13"=>{"x"=>"318", "y"=>"226"}}, "stroke_width"=>"1"} | |
(rdb:33) params[:shape][:type] | |
"squiggle" | |
(rdb:33) Shape.create(params[:shape]) | |
#<Shape id: 4, slide_id: nil, type: nil, stroke_width: 1, stroke_color: nil, fill_color: nil, height: nil, width: nil, radius: nil, created_at: "2011-09-19 04:30:44", updated_at: "2011-09-19 04:30:44", points: 1> | |
(rdb:33) |
This file contains hidden or 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
def create | |
presentation = Presentation.new(params['presentation']) | |
respond_to do |format| | |
if presentation.save | |
format.html { redirect_to presentation, notice: 'Post was successfully created.' } | |
end | |
end | |
end |
This file contains hidden or 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
(0.5ms) SELECT COUNT(*) FROM `tasks` WHERE `tasks`.`user_id` = 7 AND `tasks`.`done` = 0 AND `tasks`.`work_id` = 378 | |
(0.5ms) SELECT COUNT(*) FROM `tasks` WHERE `tasks`.`user_id` = 7 AND `tasks`.`done` = 0 AND `tasks`.`work_id` = 205 | |
(0.5ms) SELECT COUNT(*) FROM `tasks` WHERE `tasks`.`user_id` = 7 AND `tasks`.`done` = 0 AND `tasks`.`work_id` = 31 | |
(0.5ms) SELECT COUNT(*) FROM `tasks` WHERE `tasks`.`user_id` = 7 AND `tasks`.`done` = 0 AND `tasks`.`work_id` = 21 | |
(0.7ms) SELECT COUNT(*) FROM `tasks` WHERE `tasks`.`user_id` = 7 AND `tasks`.`done` = 0 AND `tasks`.`work_id` = 351 | |
(0.6ms) SELECT COUNT(*) FROM `tasks` WHERE `tasks`.`user_id` = 7 AND `tasks`.`done` = 0 AND `tasks`.`work_id` = 123 | |
(0.4ms) SELECT COUNT(*) FROM `tasks` WHERE `tasks`.`user_id` = 7 AND `tasks`.`done` = 0 AND `tasks`.`work_id` = 397 | |
(0.5ms) SELECT COUNT(*) FROM `tasks` WHERE `tasks`.`user_id` = 7 AND `tasks`.`done` = 0 AND `tasks`.`work_id` = 247 | |
(0.9ms) SELECT COUNT(*) FROM `tasks` WHERE `tasks`.`user_id` = 7 |
This file contains hidden or 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
$('#link').click( -> | |
$.get(link_path, (response) -> | |
$('div').html(response) | |
) | |
) |
This file contains hidden or 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
def show | |
while true | |
if thing.ready? | |
break | |
end | |
sleep 15 | |
end | |
end |
This file contains hidden or 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
callme( | |
test( | |
morefunctions({ | |
"param" : 1, | |
"param2" : 2 | |
}) | |
) | |
) |