Skip to content

Instantly share code, notes, and snippets.

View olegshaldybin's full-sized avatar

Oleg Shaldybin olegshaldybin

  • Google
  • San Francisco CA
View GitHub Profile
Haml | Haml :ugly | ERB | Erubis |
--------------------------------------------------------------------------------
Cached 0.316 | 0.179 | 0.280 | 0.277 |
ActionView 0.687 | 0.492 | 0.640 | |
ActionView with deep partials 11.034 | 8.974 | 5.958 | |
rescue WWW::Mechanize::ResponseCodeError => e
puts e
rescue Timeout::Error
puts "Fuck... timeout!"
rescue EOFError
puts "OMG... EOFError!"
rescue Exception => e
puts "OK, I am tired: #{e}"
end
class ForgedRequest
def self.perform(host, params = {})
params = params.stringify_keys
return nil if params["controller"].nil?
controller = ("%sController" % [ params["controller"].to_s.camelize ]).constantize
fake_env = {
"HTTP_HOST" => host,
/**
Heapsort...
Sorted with heapsort, 1517707 ops, 1475370 swaps, 0.04 sec
Selection sort...
Sorted with selection sort, 4999950000 ops, 1845148512 swaps, 50.57 sec
Insertion sort...
Sorted with insertion sort, 2498635023 ops, 2498635023 swaps, 25.53 sec
Bubble sort...
Sorted with bubble sort, 4999950000 ops, 2491307845 swaps, 53.79 sec
Merge sort...

Keybase proof

I hereby claim:

  • I am olegshaldibin on github.
  • I am zbb (https://keybase.io/zbb) on keybase.
  • I have a public key ASA0SrkpUS-mEFOq1P6eID0FKQ56uMLhoRMHntIphQemgAo

To claim this, I am signing this object: