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
curl "localhost:3000/api/discs/1636.json" | |
# => | |
{ | |
"disc": { | |
"album_id": 1515, | |
"amazon_id": null, | |
"amazon_purchase": false, | |
"comment": null, | |
"created_at": "2012-04-04T20:47:22Z", | |
"id": 1636, |
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
2012-04-18T14:07:45+00:00 heroku[web.3]: Error R14 (Memory quota exceeded) | |
2012-04-18T14:07:50+00:00 app[web.3]: | |
2012-04-18T14:07:50+00:00 app[web.3]: | |
2012-04-18T14:07:50+00:00 app[web.3]: Started GET "/shop.Scott1" for 10.117.7.179 at 2012-04-18 14:07:50 +0000 | |
2012-04-18T14:07:51+00:00 app[web.3]: Processing by ShopController#index as | |
2012-04-18T14:07:51+00:00 app[web.3]: Rendered layouts/application.html.haml (5.0ms) | |
2012-04-18T14:07:51+00:00 app[web.3]: Rendered shared/_user_nav.html.haml (0.9ms) | |
2012-04-18T14:07:51+00:00 app[web.3]: Rendered content/_nav.html.haml (0.5ms) | |
2012-04-18T14:07:51+00:00 app[web.3]: Rendered shared/_footer.html.haml (1.8ms) | |
2012-04-18T14:07:51+00:00 app[web.3]: Rendered shared/_google_analytics.html.haml (0.0ms) |
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
def do_things(puppie_count, missle_count) | |
puts "Played with #{puppie_count} puppies" | |
puts "Launched #{missle_count} missles" | |
end | |
puts "Everything is Fine" | |
do_things(5,0) | |
do_things(10,0) | |
do_things(12,0) |
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
=begin | |
Our "Connascence of Position" problem can be solved with named parameters available in Ruby 2.0 | |
=end | |
def do_things(puppie_count: 0, missle_count: 0) | |
puts "Played with #{puppie_count} puppies" | |
puts "Launched #{missle_count} missles" | |
end | |
puts "Everything is Fine" |
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
[~/tmp] gem install xcodeproj --pre | |
gem:14: /usr/local/bin/gem: bad interpreter: /usr/local/bin/ruby: no such file or directory | |
Fetching: xcodeproj-0.2.0.rc3.gem (100%) | |
Building native extensions. This could take a while... | |
Successfully installed xcodeproj-0.2.0.rc3 | |
1 gem installed | |
[~/tmp] irb | |
zsh: /usr/local/bin/irb: bad interpreter: /usr/local/bin/ruby: no such file or directory | |
1.9.3-p194 :001 > project = Xcodeproj::Project.new | |
NameError: uninitialized constant Xcodeproj |
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
name = params['name']; | |
callback("Hello "+name) |
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
describe "Quickpay.startQuickPay", -> | |
it "calls animate on .single_item_quick_pay", -> | |
quickPay = new Threadflip.QuickPay() | |
event = new jQuery.Event("click") | |
animateSpy = spyOn($.fn, "animate") | |
quickPay.startQuickPay(event) | |
expect($.fn.animate).toHaveBeenCalledWith({height: "300px"}) | |
expect(animateSpy.mostRecentCall.object.selector).toEqual('.single_item_quick_pay') |
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
describe "Quickpay.startQuickPay", -> | |
it "calls animate on .single_item_quick_pay", -> | |
quickPay = new Threadflip.QuickPay() | |
event = new jQuery.Event("click") | |
$('.single_item_quick_pay').spyOn('animate') | |
quickPay.startQuickPay(event) | |
expect($('.single_item_quick_pay').animate).toHaveBeenCalledWith({height: "300px"}) |
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
def valid(tracking_number) | |
chars = tracking_number.chars.to_a | |
expected_check_digit = chars.pop.to_i | |
total = 0 | |
chars.reverse.each_with_index do |digit, index| | |
if index.even? | |
total += digit.to_i * 3 | |
else | |
total += digit.to_i |
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
{"ref":"refs/heads/master","after":"71875ba99b5109cbdfef770e590ba7504536eb53","before":"bb86ebb305cf27a94e2249ee1b0c8a96919bfa03","created":false,"deleted":false,"forced":false,"compare":"https://github.com/21x9/ServiceLog/compare/bb86ebb305cf...71875ba99b51","commits":[{"id":"171bbbae6646c0bc6bdabf2e0b0ea04392c86ce1","distinct":true,"message":"Fixed another bug related to the status bar disappearing after resigning from the photo view controller while the bars are hidden","timestamp":"2012-01-24T10:48:58-08:00","url":"https://github.com/21x9/ServiceLog/commit/171bbbae6646c0bc6bdabf2e0b0ea04392c86ce1","author":{"name":"Mark Adams","email":"mark.adams86@gmail.com","username":"21x9"},"committer":{"name":"Mark Adams","email":"mark.adams86@gmail.com","username":"21x9"},"added":[],"removed":[],"modified":["ServiceLog/PhotoViewerViewController.m"]},{"id":"417939bf185774585cedacf91dfc111260d30d8b","distinct":true,"message":"Fixed some interface stuff like disclosure indicators and the ability to select maintenance e |