Slow test suites are a major pain point in projects, often due to RSpec and FactoryBot. Although minitest and fixtures...
While the main goal always is to prevent long-running queries in the first place, automatic timeouts can serve as...
Ever needed to migrate data between Redis instances? Give RIOT - Redis Input/Output Tools a try. It supports migration to different...
On our Ubuntu machines we have nautilus file manager with nautilus-extension-gnome-terminal installed. This adds an entry to...
Starting with ChromeDriver 127, if your application displays a beforeunload confirmation dialog, ChromeDriver will immediately close it. In consequence, any...
I recently stumbled upon the Rails feature composed_of. One of our applications dealt with a lot of addresses and...
You can improve your LIKE / ILIKE search queries in PostgreSQL by adding a GIN index with an operate class ("opclass...
Recently I needed to benchmark an Active Record query for performance measurements. I wrote a small script that runs each...
testing-library are widely used testing utilities libraries for javascript dependent frontend testing. The main utilities provided are query methods...
You are given two CSS selectors that you do not control. How can you build a new selector that matches...
Reacting on a class getting added can be done with a mutation observer. Example: const items = document.querySelectorAll('.item') const expectedClass...
I was recently asked to optimize the response time of a notoriously slow JSON API endpoint that was backed by...
While most Rails Apps are tied to at least one external REST API, machine-to-machine communication via GraphQL is...
Add apt source: apt update -y && apt install -y gpg sudo wget curl sudo install -dm 755 /etc/apt/keyrings
Debouncing a method call delays its execution until after a specified time has passed. If it's called again before...
This card is a short summary on different ways of assigning multiple attributes to an instance of a class.
Using Capistrano, we usually have some array configurations in the config/deploy.rb file, like set :linked_files, %w[config/database.yml], so in...
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...
When you are using PgBouncer with e.g. a Ruby on Rails application which uses different application_names for the PostgreSQL...
tl;dr Do not use the option optional on association declarations with a symbol, lambda or proc. Explanation Association declarations...
As we're switching from PT to Linear, I've updated the existing bash script to work for commits that...
If you want to use rsync to transfer files that don't belong to your user to another system you...
Your commit messages should include the ID of the issue your code belongs to. Our preferred syntax prefixes the issue...