makandra dev

When you call a method on an object, Ruby looks for the implementation of that method. It looks in the...

Development environment setup Rails Composer Basically a comprehensive Rails Template. Prepares your development environment and lets you select web server...

makandra dev

To print a colored full-width bar on the bash, use this bash script expression: echo -e '\033[37;44m...

makandra dev

rake stats # => LOC per controllers, models, helpers; code ratios, and more rake notes # => collects TODO, FIXME and...

String#indent is not a standard Ruby method. When you use it, be sure to know where this method comes...

Wondering how a specific method on an object is exactly named? You can use Enumerable#grep to detect it in...

When you are working with Backbone models and inheritance, at some point you want to overwrite inherited methods but call...

Warning: Because of (unclear) rounding issues and missing decimal places (see examples below), do NOT use this when dealing with...

If you want to switch to another ruby versions, you have several options, depending on what you want: Do you...

makandra dev
github.com

Publish/subscribe for Ruby classes. Bonus: You do not have to declare events before using them.

I had a huge MySQL dump that took forever (as in: days) to import, while I actually just wanted to...

coderwall.com

There seems to be no way to use therubyracer -v '0.11.4' and libv8 -v '3.11.8.17' on OS X Mavericks.

Rbenv won't compile REE 2011.03 properly on Ubuntu 12.04, failing with an error in tcmalloc.cc. If you want to...

makandra dev

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

confreaks.com

Opal is a source to source ruby to javascript compiler, corelib and a runtime implementation that currently passes 3000 rubyspecs...

If you want to sort a Ruby array with a primary, secondary, etc. criterium, use a sort_by that contains...

On recent/fresh installations of Ruby 1.8.7 you may encounter this error why calling any bundled binary (or just bundle exec...

We've since created ActiveType which has a restricted subset of Virtus' features. It might be enough for your needs...

When a Ruby block or proc takes multiple parameters, and you call it with an Array, Ruby will unexpectedly splat...

An annoying part of using font icons is that the icons usually need to live in the DOM. This is...

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...