To ensure a consistent code style for JavaScript code, we use ESLint. The workflow is similar to integrating rubocop...
This are the steps I needed to do to add esbuild to an application that used the vanilla rails asset...
We use foreman to start all necessary processes for an application, which are declared in a Procfile. This is very...
Building application assets with esbuild is the new way to do it, and it's great, especially in combination with...
Sometimes you need to access a dev server running on localhost from another machine that is not part of the...
Since Rails 6.1, if we use where.not with multiple attributes, it applies logical NAND (NOT(A) OR NOT(B)) instead...
Jasmine has spyOnProperty(), but it only works if the property is implemented using getter and setter functions. This is a...
In my case [...] the catalog is an XML that contains all kinds of possible products, categories and vendors and it...
TL;DR When using Cache-Control on a Rails application, make sure the Vary: Accept header is set.
The Interactive Advertising Bureau (IAB) is a European marketing association which has introduced a standard how advertising can be served...
I sometimes had the issue that I received an error when starting an existing vagrant box with vagrant up:
A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...
If you want Sidekiq to be able to talk to Redis on staging and production servers, you need to add...
Within development and test environments, Rails is usually configured to show a detailed debug page instead of 404s. However, there...
You want to use fields in your applications. However, your desktop users may encounter some weird quirks: Aside from allowing...
The gem better_errors offers a detailed error page with an interactive REPL for better debugging. I had the issue...
Event delegation is a pattern where a container element has a single event listener that handles events for all descendants...
Besides their default styling properties, HTML elements have a semantic meaning. For example, an h1 tag is usually styled with...
Bookmarks for directories will be most helpful if you are forced to work in deeply nested projects. Then it's...
With cd .. you can navigate one directory up from the one you are at now. If you use that a...
The tree command will show you the contents of a directory and all its sub directories as a tree:
There is an option you can set so that when using the cd command, small typos are automatically corrected. Add...
Rails has the handy controller method send_file which lets us download files easily. We can decide whether the file...
It is generally discouraged to load your JavaScript by a tag in the : The reason is that a tag will pause the DOM parser until the script has loaded and executed. This will delay the browser's first contentful paint. A much better default is to load your scripts with a tag: A deferred script has many...