If your requests blow up in Ruby or CURL, the server you're connecting to might only support requests with...
In whenever you can schedule Ruby code directly like so: every 1.day, :at => '4:30 am' do runner "MyModel.task_to...
RSpec 3.0 deprecates the :should way of writing specs for expecting things to happen. However, if you have tests you...
When you have a string containing umlauts which don't behave as expected (are not matched with a regexp, can...
So you want your Ruby script to install missing gems instead of dying? Take this method: def installing_missing_gems...
When you want the table headers to always stay around (e.g. because that table is huuuge), use the code below...
If you come across an (older) application that is using Prototype instead of jQuery, you may often see events bound...
Article about implementing authentication (current_user) and authorization (access rights) in AngularJS. Has an surprising amount of practical and understandable...
Development environment setup Rails Composer Basically a comprehensive Rails Template. Prepares your development environment and lets you select web server...
rake stats # => LOC per controllers, models, helpers; code ratios, and more rake notes # => collects TODO, FIXME and...
Crazy hack. Might be useful one day. The code required has since been extracted into a library.
Colorizes code in LibreOffice Writer. Note that you need to create a paragraph style _code for this to work.
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...