Debugging SPF records
SPF records can be hard to validate, especially when syntax errors or DNS lookup limits break mail delivery. Online checkers help test coverage and new policies before deployment.
Git diff: Deemphasizing code that was only moved around
Long diffs can hide real edits inside large code moves; git diff --color-moved=dimmed-zebra dims unchanged moved lines and highlights changes.
How Ruby method lookup works
Ruby method dispatch follows a fixed lookup chain across singleton classes, prepended modules, class methods, included modules, and superclasses.
Make your CI config simpler with ActiveSupport::ContinuousIntegration
Rails 8.1 CI setup can be split into focused commands for tests, linting, and security checks, reducing local overhead while keeping full coverage in continuous integration.
Updated: Balance your texts with text-wrap: balance
text-wrap: balance is available in all major browsers now.
Rails: Passing array values to tag helpers like link_to
Array values in Rails HTML options become space-separated strings, making class helpers accept multiple CSS classes without manual joining.
Storing trees in databases
Tree data in relational databases can be stored with parent links, paths, nested boundaries, or closure tables; the choice trades write cost against read speed.
Fixing flaky E2E tests
E2E tests often fail from race conditions between browser, app, and test script; synchronizing actions, retries, and test environment settings improves stability.
RSpec: Example groups define constants that can shadow your models
RSpec example groups can define constants that shadow Rails models during association class lookup, causing flaky failures when spec files load in the same process.
How to inspect and update gems with bundle_update_interactive
Interactive gem updater with CVE checks and Bundler-aware version filtering; helps review available updates before applying them selectively.
Updated: Restricting Claude Code's sandbox configuration
- Added
excludedCommandsto allow selected git commands to run unsandboxed, even in strict mode
Case sensitivity in PostgreSQL
PostgreSQL compares strings case-sensitively, which can break email and username lookups and uniqueness checks. Lowercasing values or using case-insensitive matching avoids common bugs.
Preconnect & prefetch
Early browser hints such as preconnect reduce page load time by opening network connections before resources are requested.
How to export OTP secrets from authenticator apps
Need to move 2FA codes out of Google Authenticator or similar apps when QR-based export is impractical. extract_otp_secrets reads the transfer QR code with a webcam and reveals the OTP seed.
Claude Code: Using the advisor tool
Pairing an advisor model with Claude Code can improve planning, debugging, and routine tasks, with different model combinations balancing speed, cost, and robustness.
Claude: How to set up read-only access for MCP connectors
MCP connectors often expose write and delete tools by default, so Claude agents can gain more access than needed. Permissions can be restricted to read-only in Claude.ai settings.
A quick introduction to CORS
Cross-origin browser requests need explicit server approval; otherwise the Same-Origin Policy blocks access. CORS uses Origin and Access-Control-Allow-Origin headers, with preflight checks for some methods.
Git: Advisory for cherry-picks to production branches
Cherry-picking individual commits to a production branch can create later merge pain because Git treats the same change as different history. Merge production back into main after each cherry-pick.
Working on the Linux command line: How to efficiently navigate up
Frequent upward directory changes in deeply nested trees are slow; shell aliases like .. and ... make jumping to parent folders faster.
Updated: Ruby: Don't build randomness into your factories
- Added guidance for when random values are unavoidable, recommending
FactoryBotsequences and rewinding them before each example - Added a “If you must use Faker” section showing how to set a fixed random seed and clear
Faker::UniqueGeneratorbefore each test
Updated: Restricting Claude Code's sandbox configuration
Default to strict sandbox mode.
Migrating from rbenv / nvm to mise
Replace rbenv and nvm with mise for faster Ruby and Node.js version installs, using precompiled binaries and idiomatic version files.
Rails: Fixing ETags that never match
Rails default ETags often never repeat because rotating CSRF tokens and CSP nonces change response bytes, blocking cache hits and 304 responses.
Don't mix Array#join and String#html_safe
Mixing safe and unsafe HTML strings with Array#join breaks Rails output safety and can trigger incorrect escaping or unsafe rendering.