You should prefer native promises to jQuery's Deferreds. Native promises are much faster than their jQuery equivalent. Native promises...
Native promises have no methods to inspect their state. You can use the promiseState function below to check whether a...
rack-cargo gives your API a new /batch route that lets clients perform multiple API calls with a single request...
In the ruby shell (IRB) and rails console the return value of the previous command is saved in _ (underscore). This...
I often see the use of || to set a default value for a variable that might be nil, null or...
Capybara clears cookies before each scenario, but not other client-side data stores. If your app is using localStorage or...
ActiveRecord::RecordNotFound errors provide quite meaningful error messages that can provide some insight on application details. Consider the following:
select2 is a great jQuery library to make (large) fields more usable. For Bootstrap 3 there is select2-bootstrap-theme...
Webpack is the future. We're using it in our latest Rails applications. For tests, we want to compile assets...
ChromeDriver clicking works by simulating a mouse click in the middle of the element's first client rect (or bounding...
Middleman is a static page generator that brings many of the goodies that Rails developers are used to.
The parallel-gem is quite easy to use and can speed up rendering time if you want to render the...
Note: The behaviour of Spreewald's within step is as described below for version < 1.9.0; For Spreewald >= 1.9.0 it is...
To move elements around we should be familiar with coordinates. Most JavaScript methods deal with one of two coordinate systems...
This is not an issue in newer versions of HAML (starting with 5.0.0), as the ugly-option was removed...
As web developers, we know how easy it is to end up with web page bloat. But loading a webpage...
window.getSelection().toString(); Browser support: IE9+, Android 4.3+, Safari 5+
You can easily have a JavaScript hash/object that returns a default value for unset keys/properties -- as long as you need...
There seems to be a nasty bug in Chrome 56 when testing with Selenium and Capybara: Slashes are not written...
If you use Angular 1.4+ together with Angular Animate, all ng-show, ng-hide, ng-class etc. are animated on...
Reminder of what you can do with Geordi. Note: If you alias Geordi to something short like g, running commands...
Collection of useful tools in the Chrome JavaScript console. Make the whole page editable This is not special to Chrome...
Sometimes huge refactorings or refactoring of core concepts of your application are necessary for being able to meet new requirements...
TLDR: A function is hard to use when it sometimes returns a promise and sometimes throws an exception. When writing...