Terminator: do not broadcast to other windows
Broadcasted input in Terminator can reach other running windows and create dangerous side effects. Disabling the DBus server keeps Alt+a broadcasting local to the current terminal.
IIFEs in Coffeescript
Coffeescript loop variables can leak into later callbacks, causing repeated values; do and IIFEs create a fresh scope for each iteration.
Ruby: Comparing a string or regex with another string
Using === with strings and regexes can change matching behavior in Ruby; match? is only safe when the left side is definitely a regex.
Ruby: A short summary of available hooks in Cucumber
Cucumber Ruby offers scenario-level, step-level, and global lifecycle hooks, plus tag filtering and World modules for reusable helper methods.
Manage Linux services on the command line (Ubuntu)
Ubuntu 18.04 uses systemd to manage services; systemctl starts, stops, enables, disables, and lists units, while service handles System V init scripts.
HTML file inputs support picking directories
Directory uploads are possible with <input type="file" webkitdirectory multiple>, letting users select a folder and its nested files instead of choosing individual files.
Migrate gem tests from Travis CI to Github Actions with gemika
Moving gem test suites from Travis CI to GitHub Actions reduces maintenance and aligns CI with current Ruby support. gemika generates the workflow for gems already using it.
How to downgrade Google Chrome in Ubuntu
Need to roll back Google Chrome on Ubuntu after an update breaks it; fetching an older .deb from Google’s servers can isolate the regression, but outdated browsers are risky.
Installing old versions of mysql2 on Ubuntu 20.04+
Legacy mysql2 gem versions 0.2.x and 0.3.x fail on Ubuntu 20.04+ for older Rails apps; a fork and libmariadb-dev can restore compatibility.
Installing Ruby <= 2.3 on Ubuntu 20.04+
Old Ruby versions fail to build on Ubuntu 20.04+ because they need OpenSSL 1.0, which current Ubuntu releases no longer ship.
VCR: Alternative way of mocking remote APIs
VCR records real HTTP interactions and replays them from YAML, making network-dependent tests run offline without manual stubs.
Error when deploying 1.8.7 app: "NoMethodError: undefined method `select!' for ["zlib@openssh.com", "zlib"]:Array"
Deployment failures with older Ruby apps can come from net-ssh and select! incompatibilities, and pinning net-ssh to 2.9.1 restores compatibility.
PostgreSQL: Importing dumps created with newer versions
Loading a pg_dump file can fail with unsupported dump format versions when pg_restore is older than the dump creator. Installing a newer PostgreSQL client and connecting through localhost resolves the mismatch.
Rails: How to restore a postgres dump from the past
Old PostgreSQL dumps can fail to load when their schema no longer matches the current Rails database; restoring them often requires checking out the migration version used when the dump was created.
Security issues with hash conditions in Rails 2 and Rails 3
Hash conditions in Rails scopes can overwrite earlier constraints when chained, creating security risks in user-filtered queries. SQL fragments avoid the overwrite, but change record-building behavior.
Where to find .desktop files on Ubuntu
Launcher entries on Ubuntu are stored in different locations depending on how an app was installed, which affects finding or editing desktop launchers.
How to implement simple queue limiting/throttling for Sidekiq
Sidekiq queue-wide throttling can be implemented with middleware and a mutex when simple per-queue limits are enough. Blocking workers is a trade-off compared with re-queuing.
Generated face images for UI mockups
AI-generated face images for UI mockups avoid real people and copyrighted stock photography while providing realistic-looking portraits.
VCR and the webdrivers gem
VCR can complain when webdrivers checks the internet for driver updates during tests. Updating locally, ignoring the update host, or pinning the driver version avoids the noise.
Rails: How to list all validations on a model or an attribute
Inherited models and concerns can hide which checks run on a Rails model; validators and validators_on reveal them at runtime.
Always, always declare your associations with symbols
Active Record associations must be declared with symbols, especially in metaprogramming, or newer Rails versions raise an ArgumentError.
How to include Sidekiq job IDs in Rails logs
Sidekiq jobs lose request context in Rails logs, making parallel worker output hard to trace. Tagging log lines with worker class and jid keeps job activity readable.
Pagy
Pagy is a Ruby gem for pagination with strong performance claims and benchmark advantages over other gems.
How to generate GIDs from an ActiveRecord scope
Efficiently generate Global ID URI strings for an ActiveRecord scope without instantiating records. Supports STI and avoids the performance cost of map(&:to_global_id).