Working with lists in Javascript is painful because the native Array class is so poorly designed. One way to reduce...

angular-tips.com

Angular comes with different types of services. Each one with its own use cases. All of these services are singletons...

github.com

The asset pipeline (which is actually backed by sprockets) has a nice feature where templates ending in .jst are compiled...

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()

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/

Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once...

Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...

stackoverflow.com

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

opensoul.org

Great presentation about writing Javascript like you write everything else: Well-structured and tested. JavaScript is no longer a toy...

chartjs.org

Chart.js seems to be a good alternative to Google's Chart API and other commercial chart drawing libraries.

Don't Google this, you will lose all will to live. Instead use Object#isEqual() from Lodash or Underscore.js:

If you open a pop-up window [1] in your Selenium tests and you want to close it, you can...

makandra dev

JavaScripts and CSS should be minified for production use. In Rails 3.1+ the asset pipeline will take care of this...

If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...

kushagragour.in

A tooltip library that does not use Javascript. Works in IE9+. This library (or the technique used by it) could...

Spreewald now comes with a step that tests if a form field is visible: Then the "Due date" field should...

developers.google.com

The attached article outlines considerations when choosing client-side vs. server-side implementations of the Google Geocoding APIs (geocoder, directions...

So you want to find out how many horizontal pixels you have available on a mobile device. This is super...