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 excludedCommands to 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 FactoryBot sequences 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::UniqueGenerator before each test

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.

Three quick Rails console tips

Rails console access to routing helpers, request simulation, and view helpers speeds up debugging and quick checks without leaving rails console.

Heads up: Playwright 1.62.0+ might break hover states in your test suite

Playwright 1.62.0+ can trigger unexpected hover events in tests when the mouse stays at (0,0); moving the pointer offscreen avoids false positives.

Carrierwave: always limit images to a reasonable size

Large camera uploads can reach tens of megabytes and should usually be reduced to a practical resolution before storage or delivery.

Capybara: Execute asynchronous JavaScript

evaluate_async_script runs asynchronous JavaScript in Capybara and waits for completion, avoiding Selenium timeouts and allowing Ruby to receive results or error details.