makandra dev
stackoverflow.com

Using git rebase can be painful but luckily you can resort to cheating with git reset and committing anew.

commandlinefu.com

The colors in Rails log files are helpful when watching them but, since they are ANSI color codes like ^[[4...

makandra dev

Never use raise_error without specifying the Error you expect. expect { do_a_lot_of_complicated_stuff }.to raise_error...

You can use the step definition below to say this: Then the "Last name" field should have an error

The technique described in this card has an important caveat: The result of GROUP_CONCAT is truncated to the maximum...

You can use heredoc to avoid endlessly long lines of code that nobody can read. Heredoc strings preserve linebreaks and...

awsdocs.s3.amazonaws.com

There is a new card about how to do this with the new AWS Command Line Interface

makandra dev

cURL makes a web request and shows you the response body. You can redirect the response body to /dev/null just...

Consider you have a website vhost listening to www.example.com, redirecting all incoming requests that do not talk about the configured...

If you get an error "Adress already in use" with autossh check with lsof or netstat if something already listen...

Observed on Rails 2.3 and machinist 1.0.6 Like the title says, when you define the method empty? like in the...

There is a bug in Rails 3's dbconsole script, which makes the following command open a database console for...

While it might seem trivial to implement an invoice that sums up items and shows net, gross and vat totals...

You've been there: A form cannot be submitted, but you don't see a validation error because the field...

Sometimes the Rails helper #distance_of_time_in_words is using too much magic. When you need a time difference...

makandra dev
forums.mysql.com

Do you wonder which databases are actually taking up how much space but only have one huge ibdata1 in your...

Detecting if a Javascript is running under Selenium WebDriver is super-painful. It's much easier to detect the current...

Vim allows recording a batch of commands as a macro. This is handy if you need to do the same...

Hint: There's another card with this helper for Cucumber features. Sometimes you feel like you need to stub some...

tl;dr: Always have your attachment path start with :rails_root/storage/#{Rails.env}#{ENV['RAILS_TEST_NUMBER']}/. The directory where you...

wiki.nginx.org

If you get the error "413 Request Entity Too Large" from Nginx client_max_body_size is too low (default...

Don't simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and...

When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...

makandra dev

When you need to create a locale for a language variant (like Austrian for German), you probably don't want...