This card shows an uncommon way to retrieve a file using selenium where JavaScript is used to return a binary...
A Rails script lives in lib/scripts and is run with bin/rails runner lib/scripts/.... They are a simple tool to perform...
87.140.79.42 - - [23/Jan/2024:09:00:46 +0100] "GET /monitoring/pings/ HTTP/1.1" 200 814 "-" "Ruby" 87.140.79.42 - - [23/Jan/2024:09:00:46 +0100] "GET...
I, [2024-01-21T06:22:17.484221 #2698200] INFO -- : [4cdad7a4-8617-4bc9-84e9-c40364eea2e4] test
Getting an entire test suite green can be a tedious task which involves frequent switches between the CLI that is...
This Capistrano task runs a command on all servers. bundle exec cap production app:run cmd='zgrep -P "..." RAILS_ROOT/log/production.log...
Most of our applications use CarrierWave for file uploads. CarrierWave has an integrated processing mechanism for different file versions with...
We regularly have tasks that need to be performed around a deploy. Be it to notify operations about changed application...
When you write your next CarrierWave uploader, consider processing your images with libvips instead of ImageMagick. Reasons for libvips
With this Ruby script you can print all values in a Redis database to your console (derived from this bash...
Sidekiq 7 adds a new feature called capsules. Use cases: a chrome queue limited to 1 for e.g. PDF processing...
TLDR: sass >= 1.35.0 has the option quietDeps to silence deprecation warnings from dependencies. quietDeps: If true, the compiler must not...
tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...
New versions of wkhtmltopdf dissallow file:// URLs by default. You can allow them by passing --enable-local-file-access.
If you need to convert an SVG source to PS or EPS, the most common suggestion on the interwebs is...
In case you have trouble with the zeitwerk autoloader, you can check out the documentation Autoloading and Reloading Constants and...
When you need information about a gem (like version(s) or install path(s)), you can use the gem binary...
This card explains how to generate an entity relationship diagram for your Rails application. We also show how to limit...
A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...
Inspired by recent "git shortcut" cards I figured it would be nice to have one of these for rebasing a...
git --fixup is very handy to amend a change to a previous commit. You can then autosquash your commits with...
Generate a password htpasswd -Bn firstname.lastname This will ask you for a password and use bcrypt (-B, more secure) and...
To attach files to your records, you will need a new database column representing the filename of the file...
In Ruby (almost) everything is an Object. While this enables a lot of powerful features, this concept might be confusing...