alistapart.com

I was recently confronted with the task of creating a two-column liquid layout with a header and footer in...

kernel.org

The ‘merge.*.driver` variable’s value is used to construct a command to run to merge ancestor’s version, current...

timeless.judofyr.net

This must be one of the coolest, yet quite unknown, technique in Ruby. For certain types of problems (e.g. when...

In regular expressions you can use the zero-width pattern \b to match the beginning or end of a word...

When you need to see the content of a page (i.e. not all the HTML but the relevant text body...

makandra dev

Every time you amend, rebase or reset, git commits get "overwritten". However, git still allows you to checkout those commits...

So you added a new callback to your model that (e.g.) caches some data when it is saved. Now you...

Using this step definition you can check if any form field (text field, checkbox, etc) or button is disabled:

github.com

Ruby's net/http is setup to never verify SSL certificates by default. Most ruby libraries do the same. That means...

gurge.com

How to write to the db 27,000 times in 24 seconds instead of 9 minutes.

When you eagerly load an association list using the .include option, and at the same time have a .where on...

If you want to find out whether a Class object is directly inheriting from another class, use superclass: ActiveRecord::RecordNotFound.super...

RSpec 1, RSpec 2 To test whether two arrays have the same elements regardless of order, RSpec 1 and 2...

snippets.dzone.com

These two models can be used to access the posts and associated comments of a WordPress database.

To change the commit message of the latest (unpushed, unmerged) commit, you can use git commit --amend

Deadlocks only occur if two transactions in separate threads compete for the same rows in the database. They usually (but...

If your controller spec never reaches your controller code: Make sure you are signed in. Make sure you are actually...

tug.dk

Gallery of fonts you can use without much hassle in LaTeX. The license of the fonts vary, but are all...

yehudakatz.com

The first thing you need to understand is that the purpose of refinements in Ruby 2.0 is to make monkey...

When a has_many association basically serves to store a list of associated strings (tags, categories, ...), it can be convenient...

This card explains how to install RubyMine for the first time. If you want to upgrade an existing RubyMine installation...

When you just went through a long debug-fest and infested your code with dozens of debug messages, it can...

Don't insert table rows in a Rails database migration. This will break tests that expect that database to be...

Occasionally some complex query must be processed on the database because building thousands of Ruby objects is impracticable.