Caution: rem in @media query definitions ignore your font-size
rem breakpoints in @media queries can ignore a set root font size and shift at the browser default instead, causing unexpected responsive behavior.
Problems with git submodules in Gitlab CI
Git submodules in GitLab CI can fail with permission errors when cloning private repositories into other projects. Access restrictions on CI token usage must be loosened or allowlisted.
Canceling promises
Async functions can be made cancelable with AbortSignal and AbortController; rejecting with AbortError matches browser APIs and improves compatibility.
Cucumber's table diffing does not play nice with Spreewald's `patiently do`
Cucumber::MultilineArgument::DataTable#diff! caches state, so repeated checks inside patiently do keep failing; expected_table.dup.diff! avoids the stale comparison.
Debug SAML in development using a local keycloak server
Local Keycloak can emulate a SAML identity provider for development, letting SSO flows and attribute mapping be tested without waiting on an external IDP.
Ruby: How to connect to a host with expired SSL certificate
HTTPS requests to hosts with an expired certificate can stay safe by accepting only one known certificate instead of disabling verification entirely.
Your Cronjobs should not rely on a perfect schedule
Cron jobs can miss their scheduled run because of network or hardware failures, so recurring work should resume safely after delays by tracking the last successful execution.
Stretching an HTML page to full height
html and body default to content height, so absolutely positioned footer elements may miss the viewport bottom; min-height: 100% or 100vh keeps pages full height.
Ruby's percent notation can do more than strings
Ruby percent notation creates symbols, arrays, regexes and shell output with compact literals and interpolation support.
Triggering JavaScript when an element is clicked
Clickable actions often rely on anchor or div hacks that break accessibility or CSP. A native button provides keyboard support, screen-reader semantics, and safer JavaScript triggers.
Auto-generating plain-text bodies for HTML e-mails in Rails apps
HTML e-mails in Rails need a plain-text part to avoid spam penalties; premailer-rails can generate it automatically and be tuned for line length and formatting.
DNS debug tools
DNS lookup tools help diagnose domain resolution, showing addresses, name servers, and resolver responses with different levels of detail.
RSpec matcher to compare two HTML fragments
Compare two HTML snippets in RSpec while ignoring whitespace, comment nodes, quote style, and attribute order.
Why has_many :through associations can return the same record multiple times
has_many :through can return duplicate records when multiple join rows point to the same target; :uniq or DISTINCT removes repeated results.
Git: Switching back to the previous branch
git checkout - returns to the previously used branch, and the same shortcut can reuse the last branch argument in commands like git merge.
Rails: Testing file downloads with request specs
File downloads are slow and fragile to test through Capybara. Request specs make exports fast, stable, and easy to verify, with a small end-to-end check for the link.
List of handy Ruby scripts to transcode different file types (often by using GPT)
Tiny Ruby CLI scripts convert text, images, audio and video with GPT, ffmpeg and ImageMagick, avoiding browser uploads and manual parameter tweaking.
MySQL: Disable query cache for database profiling
MySQL query caching hides true database timings during profiling; disabling it and Rails per-request caching reveals actual query costs.
How to write a good changelog
A changelog records notable release changes in chronological order and helps users and contributors track breaking and compatible updates.
Carrierwave processing facts
CarrierWave processing runs differently on originals and versions: class-level processing affects only the original file, while callbacks run for each file instance.
Ubuntu: Disable webcam microphone
System-wide webcam microphone disablement in Ubuntu prevents external USB webcams from being used as audio inputs in PulseAudio and meeting apps.
Ruby on Rails: Finding a memory leak
Memory leaks in Ruby on Rails can be hard to isolate. rbtrace, ObjectSpace.trace_object_allocations_start, heapy, and sheap help trace allocations and narrow down the source.
Geordi 10.0.0 released
Geordi 10.0.0 adds console and test-runner fixes, IRB configuration, and safer PostgreSQL dump restoration, with breaking changes to database drop handling.
Grid by Example: a website about CSS Grid
A curated CSS Grid resource with video tutorials, layout examples, and copy-paste patterns for learning grid placement and track sizing.