How to tweak RSpec's truncation behavior

RSpec truncates long inspected values to 200 characters, which can hide the real cause of failing specs. Raising max_formatted_output_length reveals more of the error message.

Matching Unicode characters in a Ruby regexp

Ruby 1.9+ \w and \d stay ASCII-only; Unicode-aware POSIX character classes match letters, digits, and other script-specific characters.

JavaScript: Stopping expensive work in inactive tabs

Pause expensive periodic work when a tab is hidden to save battery and mobile data; document.hidden and visibilitychange let background pages go passive.

zizmor - Static analysis for GitHub Actions

Static analysis for GitHub Actions workflow security and hardening finds unsafe interpolation, weak defaults, and unpinned actions; some warnings can be auto-fixed.

Rails 8: The db:migrate task might not run all migrations in db/migrate/ anymore

rails db:migrate on fresh databases now loads db/schema.rb or db/structure.sql first, which can skip data-manipulation migrations and leave state incomplete.

How to reliably center icons vertically with text

Icons and other inline blocks can be centered against capital letters instead of the text baseline. vertical-align with font metrics or 1lh gives a reliable result.

Ruby tempfiles

Temporary files in Ruby are removed automatically when no reference remains, and early unlink prevents stale paths and unauthorized access.

How to use pessimistic row locks with ActiveRecord

Concurrent requests can overwrite each other in Rails; pessimistic locking makes one transaction wait so only one update wins when a record is loaded or saved.

Testing HTTPS with badssl.com

Sites with unusual HTTPS setups help verify browser certificate handling, proxy interference, and security-product side effects.

ActiveType 1.2 supports "change_association"

ActiveType 1.2 allows modifying has_many and similar associations after definition, useful for form models that need custom record types.

Speed up your sass compile with sass-embedded

Sass compilation can be a build bottleneck. sass-embedded is a drop-in replacement for the deprecated sass package and is often about 50% faster.

How to change the time for a Docker container from the outside

Run a Docker container with a different perceived system time by injecting faketime via LD_PRELOAD and a mounted library path.

GoodJob: Ensure you get notified about background exceptions

ActiveJob and GoodJob can swallow exceptions, causing silent background job failures. Subscribing to job events and on_thread_error restores exception notifications and adds failure context.

Format your JavaScript with prettier

Opinionated formatting for JavaScript and TypeScript can remove whitespace debates and keep code consistent, with a small config and automatic reformatting.

Ruby: Avoiding errors when casting user input to Integers

User input often breaks integer conversion with exceptions or misleading zeros. Integer(..., exception: false) and ActiveModel type casting return nil instead.

Automatic Log Rotation in Rails

Rails log files rotate automatically around 100 MB, and config.log_file_size lets you cap growth and keep logs manageable in development, test, or production.

Checklist: Rails Authentication

Authentication is easy to get wrong because most users only sign in once. HTTPS with HSTS and a proven solution like Devise, Clearance or Rails primitives reduce security risks.

Documenting your project's Node.js version in .nvmrc

Node.js compatibility depends on the exact runtime version, and projects can pin a supported release in .nvmrc so teams use the same setup.

How to organize large I18n dictionaries in Ruby on Rails

Rails can split large translation files across config/locales to keep model, view, and boilerplate strings manageable.

Bookmarklet to generate a Pivotal Tracker story from Zammad Ticket

Create Pivotal Tracker stories directly from Zammad tickets with a bookmarklet for quick handoff to SWAT teams.

Timecop: reset after each test

Frozen time in tests can make suites flaky when state leaks between examples. Resetting Timecop after each test or using block form prevents order-dependent failures.

Reliably sending a request when the user leaves the page

Reliable analytics or logging delivery on page exit is difficult; navigator.sendBeacon can send POST data during unload or when the tab becomes hidden.

Stabilize integrations tests with flakiness introduced by Turbo / Stimulus / Hotwire

Turbo-driven Rails integration tests can become flaky under load because asynchronous renders and requests finish unpredictably. A Stimulus-based lockstep controller coordinates Capybara with Turbo events.

What does 100% mean in CSS?

CSS percentage values resolve against different reference boxes depending on the property, causing layout surprises when width, height, margins, padding, or transforms are involved.