So you want to find out how many horizontal pixels you have available on a mobile device. This is super...
If you say git stash, your stashed changes will be identified with an automatically generated message: $ git stash
While you are probably using will_paginate to paginate ActiveRecord scopes, it can actually paginate plain Ruby arrays. The resulting...
When doing a git blame, git will blame the person who added or removed white space in a line (e.g...
Axlsx is an incredible gem to generate "Office Open XML" spreadsheet files (XLSX). Does not break on large spreadsheets and...
TLDR: In tests you need to clean out the database before each example. Use :transaction where possible. Use :deletion for...
When you are using git rebase and are currently editing a commit (due to a conflict, for example), you may...
jquery-timing is a very useful jquery plugin that helps to remove lots of nested anonymous functions. It's API...
A nice way to stage absolutely all changes (edits, additions, deletions): git add --all
When searching for text in a MySQL table, you have two choices: The LIKE operator FULLTEXT indexes (which currently only...
Git commits should be very deliberate, and only contain changes that you really want to be in there. In order...
Our old solution for cronjobs, the "craken" plugin, is no longer maintained and does not work on Rails 3.2+.
Capybara uses www.example.com as the default hostname when making requests. If your application does something specific on certain hostnames and...
Hopefully you are using Psych for everything, but if you have legacy Syck YAML files lying around you could be...
ActiveRecord has a feature called counter caching where the containing record in a has_many relationship caches the...
For two years we've been using SearchableTrait which gives models the ability to process Googlesque queries like this: Contact.search...
Selenium cannot reliably control a browser when its window is not in focus, or when you accidentally interact with the...
If you can now longer hear or record sounds after upgrading Ubuntu, you probably need to re-tell Ubuntu which...
In Rails 2, when calling instance_eval or instance_exec on a scope, the scope will fetch its records from...
Unlike in Gnome, there is no graphical tool to set a mouse cursor in Xfce. Run this on a terminal...
So you are debugging like a boss and lost track of where you actually are in your code? No problem...
The gem author Jonas Nicklas highlights in a Google Groups post that the release is not backwards compatible to 1...
A technique to vastly reduce the number of join model records that need to be stored in the database.
This is super stupid: In the Thunar file manager, select the file Go to File / Properties / Open With (WTF!)