semaphoreci.com

Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest...

FactoryBot.define do factory :parent do transient do child_name nil child_allowed_to_drive false end child do association(:child...

When you have an element you want to hide, you can add a ng-show='isOpen' attribute to that element...

forum.openoffice.org

If you're a frequent user of LibreOffice, I strongly recommend to checkout out the VLOOKUP function (SVERWEIS in German...

jasmine.github.io

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

gist.github.com

Re-creating a complex ActiveRecord scenario quickly without setting up a full-blown Rails app can come in handy e.g...

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

# Given the following models class Image < ActiveRecord::Base has_many :album_images has_many :albums, through: :album_images

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

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

Instead of this: Image.order('images.created_at DESC') You can write this: Image.order(created_at: :desc) Not only do you not...

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

docs.angularjs.org

If you are using Coffeescript, it is likely to be the culprit. Since Coffeescript always returns the value of...

stackoverflow.com

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

patrickmarabeas.github.io

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

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