Our most recent pattern is EMAIL = /\A[a-z0-9\+\-_\.]+@[a-z\d\-.]+\.[a-z]+\z/i Notes

Browser rendering engines are very slow at rendering large box shadows. I had a situation where a complex layout with...

stackoverflow.com

url = 'http://www.foocorp.com/foo/bar' URI.parse(url).host # => www.foocorp.com Note that this will raise an error if the given argument is...

In theory you can take any scope and extend it with additional joins or conditions. We call this chaining scopes...

ActiveModel::Errors is used to handle validation errors on Rails objects. If you inspect an instance, it feels like a...

Around will not happen until after a feature's Background has been processed. Use Before and After to avoid that...

vimeo.com

Hashrocket Lunch n' Learn #1 with Avdi Grimm: Making Little Classes out of Big Ones A look at the pros...

If you require your Rails models manually, pay attention to the path you use. Unless you have...

Why is this useful? You can have a background image on the same element, overlaying it with a transparent gradient...

When is this useful? When both parent and child elements have borders, with this technique you don't get two...

If your application has forms to edit string fields, you probably want to strip the entered values (remove whitespace from...

blog.codeclimate.com

“Fat models” cause maintenance issues in large apps. Only incrementally better than cluttering controllers with domain logic, they usually represent...

In a Rails application, *_spec.rb files get special treatment depending on the file's directory. E.g. when you put a...

makandra dev
bitbucket.org

Makes a robust determination of a user's timezone through Javascript.

makandra dev
github.com

Richard Powell presents a collection of CSS styling advice that's mainly taken from SMACSS. Although at makandra we're...

github.com

Takes a screenshot when you call it, or when a test fails.

makandra dev
speakerdeck.com

The linked slidedeck holds many tips, of which I list the most interesting to me below DATA and END

shifteleven.com

The __END__ keyword tells Ruby where a file ends – but you don't have to stop there. Any text you...

blog.teamtreehouse.com

Randy Hoyt is presenting a way to display something (e.g. products) in a grid. It's responsive, too!

Geordi now supports our solution for running Selenium tests without having Firefox or Chrome windows popping up all over your...

Ruby's mathn library changes Fixnum division to work with exact Rationals, so 2 / 3 => 0 2 / 3 * 3 => 0...

markdalgleish.com

Many jQuery plugins suffer from a good plugin architecture. When you write jQuery plugins you should use the plugin pattern...

If you get this warning on your local machine one of these steps might help: Rebuilt the gem with the...

Example task: Multiply the table holidays between several stages. Open two terminals: shell-for stage_1 shell-for stage_2...