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...

Whenever Firefox updates, all your Cucumber features that use Selenium break. This is annoying. In order to remedy this, version...

You can create a Regexp object from existing Regexp objects by using the interpolation syntax you know from strings:

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...

Rails doesn't know which host it is running on. For generating links, it strips the hostname off the request...

Note that if you plan to downgrade Firefox because your Selenium tests broke after a Firefox upgrade, there is a...

Note that if you plan to freeze your Firefox versions because your Selenium tests break whenever Firefox updates, there is...

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...

This article from the FreeBSD Handbook suggests that editing /etc/rc.conf enables DHCP. Unfortunately, some times this seems not sufficient.

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...