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
| yo method so fat, the Global Interpreter Lock (GIL) can't stop it | |
| yo method so fat, it doesn't fit in 1 thread. In fact, it takes up 8 of them. | |
| yo method so fat, the garbage collector had to make 10 trips! - buddy | |
| yo models so fat, its factory definition had to named FactoryYoMama, - buddy | |
| yo method so fat, it eats up all the memory (no seriously, open your CPU ... ) (incomplete) - buddy | |
| yo method so fat, _________ | |
| Add suggestions in the comments :P |
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
| describe "RubyMotion App" do | |
| before do | |
| @app = UIApplication.sharedApplication | |
| end | |
| it "has one window" do | |
| @app.windows.size.should == 1 | |
| 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
| class Numeric | |
| [['multiply', '*'], ['divide', '/'], ['add', '+'], ['subtract', '-']].each do |method, operator| | |
| define_method("#{method}_10") do | |
| method(operator).call(10) # line not readable, should be something like self + 10, self - 10, etc... | |
| end | |
| end | |
| end | |
| puts 40.add_10 | |
| puts 40.subtract_10 |
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
| desc 'Update traffic condition' | |
| task :update_condition => :environment do | |
| Report.all.each do |report| | |
| report.update_attribute(:conditions, Tweet.new(report).conditions) unless report.user | |
| 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
| I tried the basic idea from thoughtbot as much as possible (it uses Underscore.js, but I think I don't need it yet) | |
| So do I need to be able to pass all the needed variables (like body) from the jquery.validate.remote_spec to window.sharedExamples? |
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
| describe("jQuery validate remote option", function() { | |
| var body, form; | |
| beforeEach(function() { | |
| body = $('body'); | |
| spyOnEvent(body, 'signup:timeout'); | |
| spyOnEvent(body, 'signup:connecting'); | |
| spyOnEvent(body, 'signup:timeoutRecovery'); | |
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
| Then /^there should be a report "([^"]*)" with the condition "([^"]*)" from (?:"([^"]*)"|anonymous)$/ do |text, condition, username| | |
| Report.last.text.should == text | |
| Report.last.conditions.should == [condition] | |
| Report.last.username.should == username | |
| 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
| class Aso | |
| def initialize(name) | |
| @name = name | |
| end | |
| end | |
| class TubigNaAso < Aso | |
| def initialize name | |
| @name = "TubigNa" + name | |
| 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
| marcrendlignacio:~/RebaseAfterMerge: development$ git log -p | |
| commit 36b2f0ddba699197acfb4540bfe21113342e6c2a | |
| Merge: 2e51d47 17e1525 | |
| Author: Padi Ignacio <marcrendlignacio@gmail.com> | |
| Date: Tue Sep 6 14:18:46 2011 +0800 | |
| Merge branch 'feature-1' into development <<< watch this commit disappear. | |
| commit 17e1525836ca186b7936a81dd6a4a6b6b2b0b0bc | |
| Author: Padi Ignacio <marcrendlignacio@gmail.com> |
NewerOlder