The User-Agent HTTP header identifies the client and is sent by "regular" browsers, search engine crawlers, or other web...

Spreewald's patiently repeats the given block again and again until it either passes or times out.

The way Rational#to_s works on Ruby has changed from Ruby 1.9 on. Here is how to get the...

When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...

Unfortunately, Capybara does not offer a switch to disable cookies in your test browser. However, you can work around that...

To set a cookie in your test browser for cucumber tests, you need to know which driver you are using...

opensoul.org

Great presentation about writing Javascript like you write everything else: Well-structured and tested. JavaScript is no longer a toy...

stackoverflow.com

Access the Method object Dead simple: Get the method object and ask for its owner: "foo".method(:upcase) # => #

For example if you use rvm and get this message: ERROR: Loading command: install (LoadError) no such file to load...

Consider this class: class Foo private def test puts "Hello" end end While you can say create a block to...

ariejan.net

Rails understands a :limit options when you create columns in a migration. Its meaning depends on the column type, and...

Google Chrome saves your profile data in ~/.config/google-chrome. To transfer the profile to for example a system you have setup...

web.archive.org

TL;DR: You should generally use #size to count associated records. size Counts already loaded elements If the association is...

Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting...

mysqlperformanceblog.com

When MySQL refuses to use your index, there's a number of things that you may be doing wrong. One...

calc() lets you mix CSS units. Ever wanted to give an element "the container's width minus 20px on each...

tl;dr: Do not use merge! for session hashes. Use update instead. Outline Let's assume you're modifying the...

Safari & Chrome Use $x() in your console: $x('//span') # selects all span elements Firefox There's an add-on.

Don't Google this, you will lose all will to live. Instead use Object#isEqual() from Lodash or Underscore.js:

github.com

MongoMapper is a MongoDB adapter for Ruby. We've forked it so it works for Rails 2.3.x applications running...

If you open a pop-up window [1] in your Selenium tests and you want to close it, you can...

gist.github.com

Rails 2.3.16+ on Ruby 1.9 causes warnings like this: .../gems/activesupport-2.3.17/lib/active_support/core_ext/string/output_safety.rb:22: warning: regexp match /.../n against to UTF-8 string...

If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...

If others on a call (Skype, SIP, ...) can not hear you loud enough, your volume levels are probably too low...