So you're hunting down a regression (or just a bug) and want to use git bisect to find out...
We tend to use database transactions as a magic bullet to get rid of all our concurrency problems. When things...
For websites that don't do JavaScript rendering on the client, it's best practice to put script tags at...
Use the click method on the DOM element: let link = document.querySelector('a') link.click()
Connect to your memcached host. (AWS elasticache is memcached) telnet foohost23.cs2631.0001.euw1.cache.amazonaws.com 11211 Once you're connected, find out which 'slabs...
Set the hash to a dummy hash which doesn't hit any id at your page, for example: window.location.hash = "_";
This card shows how to upgrade a Rails 2 application from Rails 2.3.8 through every single patch level up to...
Coffeescript allows you to create classes whose methods are automatically bound to the correct this. You can do this by...
Our development process makes us deploy very often. As the number of releases grows, junk clogs up the hard drive...
Getting a regular expression from a string in JavaScript is quite simple: new RegExp('Hello Universe'); # => /Hello Universe/
This trick might be useful to implement more complicated directives in AngularJS. I needed it to do drag'n'drop...
Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once...
When you want to do a git diff but do not care about the full diff and just want to...
tl;dr: Ruby's Bundler environment is passed on to system calls, which may not be what you may want...
Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...
TL;DR: Variables not declared using var are stored outside the current scope, most likely in the global scope (which...
When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...
The following code doesn't work like expected: page.find(css_selector).find(other_css_selector) The second .find will search...
Great presentation about writing Javascript like you write everything else: Well-structured and tested. JavaScript is no longer a toy...
Chart.js seems to be a good alternative to Google's Chart API and other commercial chart drawing libraries.
Rails understands a :limit options when you create columns in a migration. Its meaning depends on the column type, and...
JavaScript has no built-in functions to compare two objects or arrays for equality of their contained values.
If you open a pop-up window [1] in your Selenium tests and you want to close it, you can...
JavaScripts and CSS should be minified for production use. In Rails 3.1+ the asset pipeline will take care of this...