Five years of "Today I Learned" from Josh Branchaud

Posted About 4 years ago by Michael Leimstädtner.
github.com

The linked GitHub repository is a bit like our "dev" cards deck, but groomed from a single person (Josh Branchaud...

Always disable autocomplete for date pickers

Posted About 4 years ago by Henning Koch.

When we write a form with date fields, we often use graphical data picker like Rome to get a consistent...

nvm: Setting a default Node.js version

Posted About 4 years ago by Henning Koch.

To set a default Node version for new shells, use nvm alias default : nvm alias default 1.2.3

Jasmine: Test that an object is an instance of a given class

Posted Over 4 years ago by Henning Koch.

To test that an object was constructed by a given constructor function, use jasmine.any(Klass): describe('plus()', function() { it ('returns...

Defining new elements for your HTML document

Posted Over 4 years ago by Henning Koch.

Browsers come with a set of built-in elements like or . When we need a new component not covered by...

Defining "partials" in pure HTML without additional rendering helpers

Posted Over 4 years ago by Henning Koch.
matthewphillips.info

A while ago I tweeted a thread about how a small JavaScript snippet, one that can fit in a single...

Bookmarklet to generate a Pivotal Tracker story from Zammad Ticket

Posted Over 4 years ago by Daniel Straßner.

This is a bookmarklet you can add to Chrome or Firefox which will allow you to create a story in...

Guideline for moving from jQuery to vanilla JavaScript

Posted Over 4 years ago.

jQuery is still a useful and pragmatic library, but chances are increasingly that you’re not dependent on using it...

Capybara: Execute asynchronous JavaScript

Posted Over 4 years ago by Tobias Kraze.

Capybara provides execute_script and evaluate_script to execute JavaScript code in a Selenium-controlled browser. This however is not...

WProofreader: How to manually enable for a WYSIWYG editor instance (with CKeditor 4 example)

Posted Over 4 years ago by Arne Hartherz.

WProofreader is a spelling and grammar checking tool that integrates with textareas and numerous WYSIWYG editors. While it usually activates...

Bash script to list commits by Pivotal Tracker ID

Posted Over 4 years ago by Michael Leimstädtner.

The main benefit of our convention to prefix commits by their corresponding Pivotal Tracker ID is that we can easily...

Using CSS transitions

Posted Over 4 years ago by Dominik Schöler.

CSS transitions are a simple animation framework that is built right into browsers. No need for Javascript here. They're...

DOM API for jQuery users

Posted Almost 5 years ago by Dominik Schöler.

General hints on the DOM the root of the DOM is document custom elements inherit from HTMLElement. They need a...

Unpoly: Automatically show the full better_errors page when Rails raises an error

Posted Almost 5 years ago by Henning Koch.

When an AJAX request raises an exception on the server, Rails will show a minimal error page with only basic...

Webpack(er): A primer

Posted Almost 5 years ago by Tobias Kraze.

webpack is a very powerful asset bundler written in node.js to bundle (ES6) JavaScript modules, stylesheets, images, and other assets...

RubyMine: Efficiently filtering results in the "Finder" overlay

Posted Almost 5 years ago by Michael Leimstädtner.

RubyMine comes with a nice way to grep through your project's files: The finder (ctrl + shift + f). Don't...

Adding Jasmine JavaScript specs to a Webpack(er) project

Posted Almost 5 years ago by Tobias Kraze.

The goal is to get Jasmine specs running in a Rails project using Webpacker, with the browser based test runner...

Unpoly: Testing values for presence or blankness

Posted Almost 5 years ago by Henning Koch.

In Ruby on Rails, all objects have a useful blank? method. It returns true for nil but also for empty...

Documenting your Rails project's Node.js version in .nvmrc

Posted Almost 5 years ago by Henning Koch.

Not all versions of Node.js are compatible with each other. Also npm packages may require a minimum or maximum version...

Events triggered by jQuery cannot be observed by native event listeners

Posted Almost 5 years ago by Henning Koch.

jQuery has a function $.fn.trigger(). You can use it to dispatch an event on a jQuery object: let $element = $('.foo...

How to: Migrate from CoffeeScript to ES6

Posted Almost 5 years ago by Emanuel.

It is quite easy to migrate from CoffeeScript to ES6. You can use decaffeinate to convert your CoffeeScript source to...

Webpack: Automatically generating an icon font from .svg files

Posted Almost 5 years ago by Tobias Kraze.

Over the years we have tried several solution to have vector icons in our applications. There are many ways to...

Webpack: How to split your bundles

Posted Almost 5 years ago by Tobias Kraze.

To keep JavaScript sources small, it can sometimes make sense to split your webpack bundles. For example, if your website...