I hereby claim:
- I am jfine on github.
- I am jfine (https://keybase.io/jfine) on keybase.
- I have a public key whose fingerprint is 761D C5F8 5DF0 87C4 D08B AE00 9772 8452 92B5 9C8D
To claim this, I am signing this object:
require 'benchmark' | |
require 'active_support/all' | |
n = 1_000_000 | |
Benchmark.bm(25) do |x| | |
x.report("sm original:") { n.times { { foo: :bar } } } | |
x.report("sm w/ indifferent:") { n.times { { foo: :bar }.with_indifferent_access } } | |
x.report("md original:") { n.times { Hash[('a'..'z').zip('a'..'z')] } } | |
x.report("md w/ indifferent:") { n.times { Hash[('a'..'z').zip('a'..'z')].with_indifferent_access } } | |
end |
I hereby claim:
To claim this, I am signing this object:
# Redirect GET www requests | |
constraints(host: /^www\./i) do | |
get '(*path)', to: redirect(status: 302) do |params, request| | |
[request.scheme, '://', request.host.sub(/^www\./i, ''), request.fullpath].join | |
end | |
end |