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...
When you are using the #selector_for helper in Cucumber steps, as e.g. Spreewald does, the following snippet will save...
In this post, I'll walk you through the four phases of the typical journey into coding and what you...
When a gem author releases a new version to Rubygems, usually a tag with the version number (e.g. v1.2.0) is...
Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current...
When testing code that uses pushState / replaceState, your browser will appear to navigate away from http://localhost:3000/specs (or wherever...
JavaScript objects can have getter and setter functions that are called when a property is read from or written to...
jQuery comes with .animate() that lets you transition some CSS selectors: function floatIn($element) { $element.css({ 'opacity': 0, 'margin-top': 200px...
You can do so much more than console.log(...)! See the attached link for a great breakdown of what the developer...
Cucumber will clean up files you've uploaded in your Cucumber features automatically with the attached code. Put the file...
RSpec::Matchers.define :be_naturally_sorted do match do |array| array == array.natural_sort end end See RSpec: Where to put custom...
Chances are you're seeing the warning repeated a lot of times, maybe thousands of times. Here's how to...
If you want a class-like construct in JavaScript, you can use the module pattern below. The module pattern gives...
If you have trouble updating something on FreeBSD you should always take a look in the UPDATING file.
A lot of the advice involves less separations of concerns in your code ("don't use $watch", "don't use...
When you run code inside a $watch expression that forces a repaint (e.g. by computing an element's width, or...
Option 0: Download from the official page (preferred) Open https://googlechromelabs.github.io/chrome-for-testing/ In Section "Stable" > chromedriver / linux64 > Download ZIP from...
A very clever hack to parse a structured URL object is to create a element and set its href to...
When putting phone numbers into web pages, you should use tel: links so smartphone users can click those numbers to...
One of the many useful features of TextMate is autocompletion of words. If I were in TextMate right now, I...
Hash#fetch is a great way to ensure that a hash key is present. The error message when a key...
If you have issues with PDFs, fix them like this: pdftk .pdf output .pdf Background I had an issue where...
The asset pipeline changes the paths of CSS files during precompilation. This opens a world of pain when CSS files...