makandra dev
nexts.github.io

Small (1.5 KB) Javascript library that lets you render tables, lists, etc. with hundreds of thousands of items.

jasmine.github.io

Jasmine has a jasmine.clock() helper that you can use to travel through time and trigger setTimeout and setInterval callbacks:

When you want to UPDATE a table with information from an associated table, you can JOIN the associated table into...

Several Rails migration methods accept index: true as an option to create an index. In some cases (like #add_column...

github.com

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

You can freeze any Ruby object to prevent further modification. If you freeze an ActiveRecord and try to set an...

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

relishapp.com

In RSpec you can tag examples or example groups with any tags you like simply by saying describe ReportCreator, slow...

makandra dev

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

To use a form model with devise, you can simply override #resource_class in a controller. A typical use case...

makandra dev
yoyo.io

Fontawesome 4 ships with many useful CSS helper classes. Enlarge Icon Add fa-lg (133%), fa-2x, fa-3x, fa...

yoyo.io

Fontawesome 4 has introduced new naming conventions that make it easy to retrieve variants of a given icon.

edgeapi.rubyonrails.org

Starting from Rails 4.0, you can use a special form options helper called #collection_check_boxes. It behaves similar to...

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

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

Awesome hack by Tim VanFosson:

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

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

relishapp.com

RSpec 3 has verifying doubles. This breed of mock objects check that any methods being stubbed are present on an...

If you need to log to a file you can use Ruby's Logger class: require 'logger'

If you want to rotate text, you can use CSS transforms in somewhat modern browsers to rotate the container element...

blog.carbonfive.com

What if a complicated component comes along that is naturally modeled by multiple directives? This group of directives, as a...

stackoverflow.com

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

github.com

You can hook into Slack when using Capistrano for deployment. The slackistrano gem does most of the heavy lifting for...