The Node Version Manager allows installing multiple NodeJS versions and switching between them. By default, it does not automatically switch...
When giving a presentation where you do some coding, the font size you usually use is probably a bit too...
When testing JavaScript functionality in Selenium (E2E), you may need to access a class or function inside of a evaluate...
I encountered a unlucky behavior of byebug 11.1.3 (the most recent version at time of writing) when using it with...
Matching the "space" character class For matching whitespaces in a regular expression, the most common and best-known shorthand expression...
The usual way to build a relation in a ActiveSupport::Concern is this: module MyModule extend ActiveSupport::Concern
When storing files for lots of records in the server's file system, Carrierwave's default store_dir approach may...
When deleting a record in your Rails app, Carrierwave automatically takes care of removing all associated files. However, the file...
If your Webpack build is slow, you can use the Speed Measure Plugin for Webpack to figure out where time...
Webpack builds can take a long time, so we only want to compile when needed. This card shows what will...
Installing gems on a server that has no access to the internet (especially rubygems.org) requires to bundle the gems into...
When you need the DOM node of a tag (e.g. to read extra attributes, or to modify the DOM near it), you can usually reference it via document.currentScript. However, document.currentScript is unsupported in ancient browsers, like Internet Explorer 11 or wkhtmltopdf's Webkit engine. If you are not running async scripts, you can easily polyfill it: document.scripts[document.scripts.length - 1] It works because document.scripts grows with each tag that was evaluated. That is also the reason why this solution will not work reliably for async code. Demo: https://codepen.io/foobear/pen/poRLxQm
To attach files to your records, you will need a new database column representing the filename of the file...
https://tableconvert.com/ is an online tool to convert tables between different formats (e.g. json, markdown, csv).
In Ruby (almost) everything is an Object. While this enables a lot of powerful features, this concept might be confusing...
The ActionDispatch module of Rails gives you the helper method flash to access the flash messages in a response.
json is part of the standard library of Ruby and deals with JSON, obviously. As you know, JSON is the...
5.4.0 2021-02-01 Compatible changes Add geordi branch command that checks out a feature branch based on a story...
By default parallel_tests will spawn as many test processes as you have CPUs. If you have issues with flaky...
CarrierWave comes with a set of default configuration options which make sense in most cases. However, you should review these...
A rough guide how to implement a REST API. The discussion here includes some interesting points as well: Timestamps: ISO8601...
The linked article provides a good overview of the various concurrency primitives in Ruby, and what's changing in Ruby...
When you repeat a subpattern with a *, + or {...} operator, you may choose between greedy, lazy and possessive modes. Switching modes...
Recently I made an upgrade from Bootstrap 3 to Bootstrap 4 in a bigger project. Here are some tips how...