When you need to check a value for presence, don't rely on JavaScript since it considers 0 or "0...

In a JavaScript console, type this: > 9112347935156469760 9112347935156470000 Ooops. And that's not a float! This occurs because JavaScript uses...

JavaScript's NaN ("Not a Number") is hard to compare against. It never equals anything, not even itself:

github.com

bower-rails is a great solution for managing vendored assets in your Rails app. It feels especially much more convenient...

github.com

JavaScript structures that include circular references can't be serialized with a"plain" JSON.stringify. Example: a = { name: 'Groucho' };

makandra dev
ankane.github.io

Create beautiful Javascript charts with one line of Ruby. Promising chart library for easily rendering charts with Google Charts.

Capybara will fail to find tags that are missing an href attribute. This will probably happen to you every now...

makandra dev
github.com

PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...

stackoverflow.com

If you want to move an element inside an array, neither JavaScript/ES6+ nor libraries like LoDash offet that natively.

Nearly all jQuery traversal functions ignore elements that are not HTML tags. To work with other type of nodes (like...

blog.arkency.com

Amazing guide how to divide a ball of Javascript spaghetti distinct separate layers (model, view, controller, backend adapter).

polymer-project.org

The Paper elements are a set of UI elements that implement the material design system.

rails-assets.org

Automatically builds gems from Bower packages (currently 1700 gems available). Packaged Javascript files are then automatically available in your asset...

If your requests blow up in Ruby or CURL, the server you're connecting to might only support requests with...

This card describes how to pass an array with multiple element to a JavaScript function, so that the first array...

Aruba is an extension to Cucumber that helps integration-testing command line tools. When your tests involve a Rails test...

When you cannot make Selenium trigger events you rely on (e.g. a "change" event when filling in a form field...

blog.salsify.com

An all-in-approach to fix the problem of pending AJAX requests dying in the browser when the server ends...

I use this to simulate the (non-existing) :last-letter CSS pseudoclass, e. g. to insert a tombstone at the...

code-experience.com

React.js is a relatively new Javascript templating engine that has two-way-bindings like AngularJS or Batman. The interesting idea...

makandra dev

When you want the table headers to always stay around (e.g. because that table is huuuge), use the code below...

So you have a restangular collection and you want to remove an element from it, after you've successfully deleted...

If you are using Angular and want something like Rails' simple_format which HTML-formats a plain-text input into...

If you want to do JavaScript-style camelization, ActiveSupport's String#camelize method can actually help you out. Simply pass...