I hereby claim:
- I am mikeauclair on github.
- I am mikeauclair (https://keybase.io/mikeauclair) on keybase.
- I have a public key whose fingerprint is 783C 1A28 9EE3 A88F BE4C 0FFB E2C7 0FC4 D157 FFB3
To claim this, I am signing this object:
| require 'ruby-prof' | |
| def profile_as(name) | |
| if ENV['PROFILE'] | |
| RubyProf.start | |
| yield | |
| result = RubyProf.stop |
| ± ./node_modules/.bin/flow check 039efe8|add_more_types* | |
| test.js:18 | |
| 18: getQQ().then(function(val){ | |
| ^^^^ property `then`. Property not found in | |
| 18: getQQ().then(function(val){ | |
| ^^^^^^^ Array | |
| Found 1 error |
| describe('example', function() { | |
| beforeEach(function(){ | |
| var scheduler = this.scheduler = new Rx.TestScheduler(); | |
| this.userEmails = this.scheduler.createHotObservable( | |
| Rx.ReactiveTest.onNext( | |
| 210, | |
| {email: '[email protected]'} | |
| ), |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env ruby | |
| require 'benchmark' | |
| REGEXPS = [ | |
| /^no such file to load -- (.+)$/i, | |
| /^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i, | |
| /^Missing API definition file in (.+)$/i, | |
| /^cannot load such file -- (.+)$/i, | |
| ] |
| (define person (lambda (first last) | |
| (define setFirst (lambda (value) (set! first (list-ref value 0)))) | |
| (define setLast (lambda (value) (set! last (list-ref value 0)))) | |
| (lambda (method . args) | |
| (case method | |
| ('first | |
| (if (null? args) | |
| first | |
| (setFirst args) | |
| ) |
Easy steps for CPU profiling a Rails app
| class Account | |
| #blahblah | |
| def external_management | |
| if appdirect? | |
| @external_management ||= OpenStruct.new(:user_url => 'blah', :accont_url => 'blah') | |
| end | |
| end | |
| #blahblah | |
| end |
| class ActiveRecord::Base | |
| mattr_accessor :shared_connection | |
| @@shared_connection = nil | |
| def self.connection | |
| @@shared_connection || retrieve_connection | |
| end | |
| end | |
| ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection |