tl;dr The :where() pseudo selector - zero specificity - matches against a comma-separated list of selectors. Example Compound selectors like...

developer.mozilla.org

The inset CSS property is a shorthand that corresponds to the top, right, bottom, and/or left properties. It has the...

When paginating records, we usually need to know the number of total records in order to render pagination links. Popular...

When redirecting you should take care to use the right HTTP status code. From controllers When redirecting from a controller...

It might sometimes be useful to check whether your Rails application accesses the file system unnecessarily, for example if your...

I recently had the problem that embedded code boxes crashed my layout. It turned out that pres break out of...

Code quality can be measured in four levels: (Working code) Reliable code (minimum) Readable code (ok for short-lived code...

tl;dr You can use attribute? as shorthanded version of attribute.present?, except for numeric attributes and associations. Technical Details

In Chrome DevTools you can use getEventListeners(object) to get a list of registered event listeners on the specified object...

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...

ImageMagick can convert SVGs to raster image formats. Example for PNG: convert input.svg output.png If the SVG has a...

Jasmine is a great way to unit test your JavaScript components without writing an expensive end-to-end test for...

You want to use fields in your applications. However, your desktop users may encounter some weird quirks: Aside from allowing...

Often people need links which are not linked directly, but should trigger execution of JavaScript. ❌ Bad workarounds

We had a card that described how to install multiple mysql versions using mysql-sandbox. Nowadays with the wide adoption...

moncefbelyamani.com

The linked article points out that COUNT queries might be unexpectedly slow in PostgreSQL. If you just need to know...

When storing files for lots of records in the server's file system, Carrierwave's default store_dir approach may...

Sometimes you want to load code on demand. For instance, when a a large library is only used on a...

To attach files to your records, you will need a new database column representing the filename of the file...

When you have a hex color code, you can easily convert it into its RGB values using plain Ruby.

We prefer to run our end-to-end tests with headless Chrome. While it's a very stable solution overall...

Browsers blocks abusable JavaScript API calls until the user has interacted with the document. Examples would be opening new tab...

labs.bishopfox.com

The linked article shows that there are unclear parts in the JSON specification and that different parsers treat them differently...