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

Switching from rbenv and nvm to mise centralizes Ruby and Node.js version management and can cut new Ruby installs from minutes to seconds.

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.

Claude Code: How to set up read-only access for MCP connectors

MCP connectors can give Claude Code broad access to external services, including write and delete actions. Blocking the write/delete tools limits agents to read-only use.

How to update your pinned NodeJS package manager (pnpm, yarn, ...)

Pinned packageManager versions in package.json can lag behind and block newer package manager releases. corepack use updates the pinned version and rewrites the manifest.

Rails: Preparing scopes with values for creation

where, default_scope, and create_with control which attributes relations apply to new records and how default query conditions differ from default creation values.

Rails: Overriding view templates under certain conditions only

Use request-specific view paths to swap in alternate templates for selected conditions, with fallback to the default templates when no override exists.

Using the Truemail gem to validate e-mail addresses

Email address validation can catch invalid sign-ups before they reach your app. Truemail offers regex, MX, and SMTP checks, with MX as the practical middle ground.

Decide whether cronjobs should run on one or all servers

Cron jobs can need single-server or all-server execution; whenever can be configured with roles like cron and primary_cron to control where jobs are written.

Claude Code doesn't read your AGENTS.md

Claude Code ignores AGENTS.md; it reads CLAUDE.md instead, so repositories need an import or symlink to keep shared coding instructions working.

Pretty commit messages via geordi

Generate polished Git commit messages from Linear stories, including issue ID, title, and link, using geordi commit and a .geordi.yml repository config.

Recommended Git workflow for feature branches

Git feature branches stay clean by using WIP commits, frequent rebases onto master, and interactive cleanup before fast-forward merging.

Ubuntu: How to reset DND on startup

Ubuntu’s Do Not Disturb setting can stay enabled after reboot, leaving notifications muted unexpectedly. A startup command can switch banners back on each login.

patiently is now a gem

patiently helpers are now packaged as the patiently gem, with configurable retries and timeouts for feature and system specs.

How to test a controller concern with rspec-rails anonymous controllers

RSpec controller concerns can be exercised with anonymous controllers, letting shared authorization behavior be tested through real requests without messy dummy routes or rebuilt stacks.