If your terminal has many tabs, you'll want to keep them organized. To change their title from the prompt...
We have released Modularity 2. It has many incompatible changes. See below for a script to migrate your applications automatically...
When you do something like this in your code: def var_value @var ||= some_expensive_calculation end
In Ruby, classes and modules are called constants. This card explains how Ruby resolves the meaning of a constant.
Modern IRB has time measurement built in. measure # Enable measure :off # Disable Custom Should your version of IRB not offer...
Before Rails 3.2.14, when supplying an invalid locale to I18n, it would fall back to its config.i18n.default_locale (which is...
If you're still working on ruby 1.8, you should know that using SimpleDelegator is often prohibitively slow. I have...
If you get a Quota error with OpenStack, it doesn't have to be what it tell. For example, I...
Font Awesome 4 has renamed all icons. What the fuck. Check the attached link for an icon list for the...
Rails has always included a scaffold script that generates a default controller implementation for you. Unfortunately that generated controller is...
It is good programming practice to Don't Repeat Yourself (or DRY). In Ruby on Rails we keep our code...
So you client has asked you to implement a row of buttons to like the URL on Facebook, Twitter and...
When writing Rails migrations to convert a string column to an integer you'd usually say: change_column :table_name...
Working with lists in Javascript is painful because the native Array class is so poorly designed. One way to reduce...
For all late night coders: The program "redshift" changes your monitors' white balance according to your position on the planet...
In contrast to RSpec's included allow_value matcher, the attached matcher will also work on associations, which makes it...
bundle open BUNDLED_GEM will open the BUNDLED_GEM's source code in your default editor.
In order to keep the controllers directory tidy, we recently started to namespace controllers. With the :controller option you can...
When two classes implement the same behavior (methods, callbacks, etc.), you should extract that behavior into a trait or module...
Custom matchers are a useful RSpec feature which you can use to DRY up repetitive expectations in your specs. Unfortunately...
Shared example groups are a useful RSpec feature. Unfortunately the default directory structure generated by rspec-rails has no obvious...
We tend to use database transactions as a magic bullet to get rid of all our concurrency problems. When things...
The linked page lists and explains global Ruby "dollar" variables, such as: $: (load path) $* (ARGV) $? (Last exit status) $$ (PID)
1. Saving files to a directory that is not shared between deploys or servers If you save your uploads to...