github.com

jquery-placeholder is a simple jQuery plugin that enables form placeholders in browsers that do not support them natively, i.e...

bugs.ruby-lang.org

TL;DR Under certain circumstances, dynamically defined symbols may break keyword arguments in Ruby 2.2. This was fixed in Ruby...

Rails comes with a Rake task notes that shows code comments that start with "TODO", "FIXME", or "OPTIMIZE".

makandra dev

Code folding is a very useful feature to me. It gives me a quick overview over a file and keeps...

When using threads, you must make your code thread-safe. This can be done by either locking (mutexes) all data...

When ending a Selenium test Capybara resets the browser state by closing the tab, clearing cookies, localStorage, etc.

There are some frontends available, but they all suck, are no longer maintained or are hard to install.

You know that ActiveRecord caches associations so they are not loaded twice for the same object. You also know that...

It's generally not trivial to change a datetime's seconds, minutes, etc in SQL. Here is how it works...

makandra dev
github.com

Nested exceptions for Ruby: When you rescue an error and then re-raise your own, you don't have to...

Web applications can be used by multiple users at the same time. A typical application server like Passenger has multiple...

techblog.livingsocial.com

Clever hack using data-attributes to assign labels to cells. It's still a massive duplication of code (labels), but...

stackoverflow.com

TL;DR You shouldn't call $scope.$apply() or $scope.$digest() inside a function that can be invoked by Angular...

help.github.com

Please don't simply copy line number links from Github. The URL usually contains a branch name like master which...

patrickmarabeas.github.io

Webfonts are not always available when your JavaScript runs on first page load. Since fonts may affect element sizes, you...

tech.bellycard.com

The debate between using mixins or extends in Sass has been heating up recently. From the surface it appears they...

SELECT table_name, table_rows FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'your_database' order by table_rows;

jQuery doesn't store information about event listeners and data values with the element itself. This information is instead stored...

This guide shows how to create an AngularJS application that consumes more and more memory until, eventually, the browser process...

xaprb.com

The linked article explains how to get a database-wide lock without creating table rows: This article explains how I...

When you are using the #selector_for helper in Cucumber steps, as e.g. Spreewald does, the following snippet will save...

guides.rubyonrails.org

When running migrations with rake db:migrate, there's the STEP and VERSION parameters that you can pass to nearly...

If you want to load an SQL dump from an ActiveRecord migration, you might find this to be harder than...

vikingcodeschool.com

In this post, I'll walk you through the four phases of the typical journey into coding and what you...