blog.bitcrowd.net

When cucumber encounters a failing step in a @javascript feature, the selenium browser window instantly closes. Sometimes you do not...

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

Sometimes you want to use a vanilla Ruby method like a block. You can use Object#method to obtain a...

You can use this shell command: uniq -u input.txt output.txt

You can use fold: fold -sw 60 You can now paste your texts. fold will echo them back, word-wrapped...

When you don't know which options are available, but need to have an option selected, use this step.

stackoverflow.com

These methods are available to you: page.driver.browser.switch_to.alert.accept page.driver.browser.switch_to.alert.dismiss page.driver.browser.switch_to.alert.text # the confirmation text Spreewald gives you steps like these:

social.technet.microsoft.com

Let's say you have an Explorer window showing a directory and want a cmd terminal to be opened there...

I believe that when WEBrick has trouble bringing up your Rails application, the WEBrick component that is supposed to print...

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

Note that converting from RGB to CMYK will usually degrade your colors because no exact mapping is possible. Anyway, this...

Use the PDF toolkit: sudo apt-get install pdftk To rotate page 1 by 90 degrees clockwise: pdftk in.pdf cat...

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

pdfposter.origo.ethz.ch

Pdfposter is a Python script that allows to convert large PDFs into a PDF with multiple pages that can be...

When the Ruby parser module of Ruby-GetText comes across a file in one of its search directories (e.g. lib/scripts...

Grep prints one line per match. To return the number if matches, use the -c switch: grep -c "something" filename...

Open up your "Base File.sublime-settings" (Preferences Menu → File Settings – User) in Sublime Text 2. Add entries for font_face...

We have a big flat screen TV (Samsung LE46c650l1kxxu) in our conference room. Configuring it properly, we were encountering some...

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

The Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node...

Possible fixes: Upgrade your Firefox. It's fixed in 5.0. Hunt down funny float or overflow directives in your CSS...

The Javascript code below is a rough equivalent to the simple_format helper that ships with Rails: function simpleFormat(str...

Resque comes with its own dashboard (Resque server) that you can mount inside your Rails 3 application with #config/routes.rb:

tools.ietf.org

In order to use different encodings than ASCII for HTTP headers use the following syntax: Header-Key: Header-Value; Parameter...