Controlling how your website appears on social media feeds
Social network previews often pick the wrong title, image and description unless OpenGraph meta tags provide them; Facebook caches previews and may need manual refresh.
How to bulk-unwatch many repositories on Github
Opting out of notifications for many GitHub repositories is faster through the watching page than changing each repository individually.
Defining custom RSpec matchers
Custom RSpec matchers support reusable test assertions, chaining, block expectations, and complex matcher classes for domain-specific checks.
Your database tables should probably have timestamps
Missing created_at and updated_at columns make record history harder to trace and bug reports harder to investigate. Rails migrations can add and backfill timestamps for old tables.
Rubocop fails with undefined StringIO
RuboCop can crash with uninitialized constant ... StringIO and related socket reader errors when an old version misses a required stringio require. Upgrading fixes it.
Controlling the order of DOM event listeners
DOM event listeners run in registration order, so forcing a handler to fire first or last can require capture, delegation, or a related event.
How to accept more than 4k query parameters in Rails
Large form submissions can fail with hidden Rack::QueryParser::QueryLimitError when total request parameters exceed Rails' default limit. Raising params_limit allows bigger POSTs.
Testing ActiveJob `limits_concurrency` with Solid Queue
ActiveJob concurrency checks can pass falsely with the :test adapter because blocked jobs still enqueue; using :solid_queue verifies real blocking behavior.
Generating test images on the fly via JavaScript or Ruby
Create placeholder images dynamically as SVG data URIs in JavaScript or Ruby, avoiding external image services and keeping the graphic easily adjustable.
Use a global .gitignore file to ignore stuff from your machine
Git can ignore machine-specific files globally instead of per repository, avoiding repeated setup and cluttered project .gitignore files.
Faux-disabled fields in HTML forms
Form fields can block input without using disabled, but readonly, pointer-events: none, and inert each affect submission and accessibility differently.
Opt out of selenium manager's telemetry
selenium-webdriver can send hourly usage stats during browser feature specs; setting SE_AVOID_STATS=true disables the telemetry call.
Cucumber CI job quirks
Cucumber CI rerun logic can pass green after syntax errors when no failing_features file is written; native --retry avoids this edge case.
Debugging Rails Active Jobs with the Vanilla Adapters
Rails jobs can be hard to inspect because adapters behave differently in development, test, and production. Logging, synchronous execution, and queue tables help trace failures and pending work.
pnpm: How to update a single package conservatively
Selective pnpm dependency updates for CVE mitigation can be smaller than a full install. pnpm up with exact package versions keeps package.json and the lockfile changes minimal.
Project management best practices: Standup
Daily team check-ins keep small projects aligned, surface blockers early, and prevent developers from disappearing into isolated work.
Rails disables CSRF protection in tests
Rails test environment turns off CSRF checks by default, so missing authenticity tokens can hide broken POST flows. Enabling forgery protection in JavaScript tests catches these failures.
How to iterate over all ActiveRecord models
Rails maintenance scripts can loop through every loaded ActiveRecord model for migrations or data fixes. eager_load! and ApplicationRecord.descendants help avoid missing models.
Rails: Join model table migration template
create_join_table builds association tables without ids or timestamps, using foreign keys and optional unique indexes to prevent orphaned or duplicate join records.
Plain CSS does not support variables in media queries (yet)
CSS custom properties cannot be used inside media queries in plain CSS, so responsive breakpoints stay fixed. PostCSS custom media adds reusable query names, but not @container queries.
Working with lists of DOM elements in JavaScript
DOM query results can be live, array-like lists rather than true arrays, and some APIs include text nodes or comments as children.
Fix PNG colors in IE, old Safaris and new Firefoxes
PNG files can show inconsistent colors across browsers because of embedded color profiles and metadata. Converting to a standard profile or stripping PNG chunks improves display consistency.
Git: Show commits that have touched specific text in a file
Find Git commits that changed a specific line or text in a file using git log -G; tig offers a navigable view of matching changes.
RSpec: How to aggregate failures
aggregate_failures in RSpec groups multiple expectation failures in one example, improving test feedback and making debugging mismatched values easier.