RSpec: automatic creation of VCR cassettes
RSpec examples tagged :vcr automatically record and replay HTTP cassettes, while untagged specs block network calls unless HTTP access is explicitly enabled.
Keeping web applications fast
Fast web apps avoid unnecessary database work, oversized assets, and heavy client-side rendering, while measuring bottlenecks before optimizing caches, scripts, images, or page delivery.
Apache Tika: Performance-optimized configuration for hybrid PDFs (Text + OCR)
Hybrid PDFs can trigger duplicate text and very slow OCR in Apache Tika when page images and layout fragments are processed indiscriminately. A size threshold keeps OCR focused on real content while preserving digital text extraction.
Small helper to conditionally re-record VCR cassettes
Conditional VCR cassette re-recording for RSpec specs avoids manual YAML deletion while iterating on failing tests.
Rails: Reporting CSP Violations to a log file
Capture CSP violation reports in a log file to spot blocked resources and browser-extension noise, with a dedicated Rails endpoint for incoming reports.
Rails: Destroying vs Deleting
Rails record removal differs in object instantiation, callbacks, and relation cache state; destroy honors dependent associations, while delete and delete_all skip them.
Jasmine: using async/await to write asynchronous specs
Readable Jasmine specs can use async/await for promises, async setup, event waiting, and controllable async spies instead of done callbacks.
Project management best practices: User stories & Issues
Clear, well-scoped issues reduce misunderstandings and rework in Linear. User stories, acceptance criteria, backlog priority, and rough estimates keep work actionable.
PSA: Chrome and Firefox do not always clear session cookies on exit
Chrome and Firefox can retain session cookies on exit when reopening tabs from the last session, so browser shutdown does not always end cookie lifetime.
ActiveRecord: count vs size vs length on associations
size is usually the right way to count associated records in Rails; count can ignore loaded children, while length loads everything.
nvm: Setting a default Node.js version
Set a persistent default Node.js version for new shells with nvm alias default, including an LTS release.
Toggling a maintenance page with Capistrano
Capistrano can switch an app into maintenance mode by publishing a static page on each web server, with customizable message, timing, and template.
How to get notified when Claude Code needs your input
Desktop notifications for Claude Code prevent missed prompts when the agent pauses for input; clicking the alert can reopen the project in your IDE.
Rails: Including HTML in your i18n locales
Rails t automatically marks _html translations as HTML-safe, allowing intentional links and formatting while still escaping unsafe interpolations.
8 steps for fixing other people's code
Making fixes in someone else’s GitHub repository is easier with modern open source tools, but pull requests and branch workflow still need care.
CSP: Nonces are propagated to imports
Module scripts with a nonce automatically pass that trust to dynamic import(), enabling chunk loading under restrictive CSP without strict-dynamic.
A restrictive (but still practicable) CSP for Rails projects
A strict Content Security Policy for Rails limits scripts to nonce-approved sources while keeping styles, images, forms, and fonts workable.
When you want to format only line breaks, you probably do not want `simple_format`
Rendering text with only line-break handling can avoid simple_format's HTML-preserving side effects. A small helper or white-space: pre-wrap keeps output predictable.
Caching file properties with ActiveStorage Analyzers
Slow PDF property lookup can avoid repeated downloads by caching intrinsic file metadata such as page count on ActiveStorage::Blob and using custom analyzers for shared uploads.
Detect the current Rails environment from JavaScript or CSS
Expose Rails.env on <html> to branch JavaScript and CSS by environment, making Selenium- and test-specific behavior easy to toggle.
Running "bundle update" will update all gems without constraints
bundle update without arguments refreshes every gem and can break an app; updating gems regularly and conservatively reduces risky dependency changes.
Best practices: Large data migrations from legacy systems
Large legacy data migrations need deep source-system understanding, fast failure, dedicated logging, and traceable migration metadata to keep long-running imports debuggable and verifiable.
How to fix "Could not resolve any esbuild targets" when building assets
Outdated browserslist data can make esbuild-plugin-browserslist fail with “Could not resolve any esbuild targets” when a stale query matches no known browsers.
Sending newsletters via rapidmail with SMTP and one-click unsubscribe
Newsletter delivery via SMTP with rapidmail, plus Gmail-compatible one-click unsubscribe using signed tokens and List-Unsubscribe headers.