Not all versions of Node.js are compatible with each other. Also npm packages may require a minimum or maximum version...
jQuery has a function $.fn.trigger(). You can use it to dispatch an event on a jQuery object: let $element = $('.foo...
To keep JavaScript sources small, it can sometimes make sense to split your webpack bundles. For example, if your website...
Download buttons can be difficult to test, especially with Selenium. Depending on browser, user settings and response headers, one of...
We're always striving towards keeping our website's JavaScript as small as possible. If you're using webpack(er...
TL;DR Most web applications do not require action on this. SameSite=None (old browser default) will continue to work...
When delivering non-public uploaded files (images, documents etc), one has to decide whether and how to do authorization. The...
An alternative of using a multiple assignment for a Regex are named groups. Especially when your Regex becomes more complicates...
When doing some meta-programming magic and you want to do something for all attributes of a class, you may...
In Rails, we usually have a mailer setup like this: class MyMailer < ActionMailer::Base def newsletter mail to: 'receiver@host.tld',
From at least Rails 4, the ActionView tag helper turns Array values of HTML options into a single space-separated...
Today's cameras create huge images, some beyond 50MB. Unless you need to offer this large files, you should always...
Class-level process definitions are only applied to the original file Versions are generated based on the processed original file...
Spammers have started abusing other application to send their spam. This works like this: The application has some form that...
When restoring a PostgreSQL dump using pg_restore, you usually add the --clean flag to remove any existing data from...
When building an application that sends e-mails to users, you want to avoid those e-mails from being classified...
The standard way to abort async code is that your function takes a AbortSignal { signal } property. The caller can use...
To restart all tasks monitored by God, don't use god restart. This command is only meant to soft-restart...
To reload a single-item association in Rails 5+, call #reload_ : post.reload_author In older Railses you can say
When projects run for many years, they require special regular maintenance to stay fresh. This kind of maintenance is usually...
There are two ways to lock a user in devise. Using the lockable module Customizing the user account status validation...
When you are using lambdas in RSpec to assert certain changes of a call, you know this syntax: expect { playlist.destroy...
This repository was created with the intention of helping developers master their concepts in JavaScript. It is not a requirement...
Setting array columns When using PostgreSQL array columns, you can set an array attribute to a value with square brackets...