For long running scripts it is useful to show a indicator for the progress in the terminal. Alternatively you can...

Method delegation in Rails can help you to keep your code organized and avoid deep call chains (law of demeter...

Here is a bash script that I use to auto-configure displays on Ubuntu 24.04 with Xorg. Background

Hint If you are using our opscomplete.com hosting we can set all environment variables mentioned below for your deployment on...

Elements can be hidden and shown by toggling the display property. However, this is not animatable, so we often turn...

TL;DR: Rails ships two methods to convert strings to constants, constantize and safe_constantize. Neither is safe for untrusted...

tl;dr When a cookie includes an Expires attribute or an HTTP response includes caching headers like Expires or Cache...

When users type into a Tom Select control, the options list is updated with a short delay which can feel...

masilotti.com

Slow test suites are a major pain point in projects, often due to RSpec and FactoryBot. Although minitest and fixtures...

esbuild comes with a minifier that is good enough for most cases. If you're looking to squeeze out as...

Terser is a really good minifier ("compressor") for JavaScript code. I'm often surprised by the thoughtfulness of its compressed...

testing-library are widely used testing utilities libraries for javascript dependent frontend testing. The main utilities provided are query methods...

Reacting on a class getting added can be done with a mutation observer. Example: const items = document.querySelectorAll('.item') const expectedClass...

I recently stumbled over a quirk in the way Ruby handles local variables that I find somewhat dangerous. Consider:

Modern JavaScript includes Intl.NumberFormat to format numbers in different formats and locales. In this card, we describe a wrapper for...

This card shows an uncommon way to retrieve a file using selenium where JavaScript is used to return a binary...

chrisboakes.com

Debouncing a method call delays its execution until after a specified time has passed. If it's called again before...

ActiveModel classes have a class method .human_attribute_name. This returns a human-readable form of the attribute: Person.human_attribute...

I used two lab days to read the The framework field guide - Fundamentals, the first of a three part series...

As we're switching from PT to Linear, I've updated the existing bash script to work for commits that...

shoelace is a library of web components. Here is a proof of concept how a integration (slightly different as the...

Your commit messages should include the ID of the issue your code belongs to. Our preferred syntax prefixes the issue...

This card describes four variants, that add a more intuitive workflow when working with nested attributes in Rails + Unpoly:

...HTML elements can automatically start playing when the autoplay attribute is set on them. Except for when they can not...