Events triggered by jQuery cannot be observed by native event listeners

jQuery trigger() emits events that native addEventListener() handlers cannot observe, which breaks mixed jQuery and non-jQuery code. Native dispatchEvent() works for both worlds.

ImageMagick: Converting SVG to raster image formats like PNG or JPEG

SVG to raster conversion can look blurred when scaled naïvely; using -density instead of -resize preserves quality and can keep transparency in PNG output.

The TCF 2.0 (Tranparency and Consent Framework) standard, and what you should know about it

GDPR-compliant ad consent requires a registered CMP, consent strings, and __tcfapi so vendors can verify user choices before serving personalized ads.

Ad blockers: How to debug blocked elements

Browser ad blockers can hide embedded app content or iframes, leaving empty frames and blocked resources. Dev tools and filter lists help trace matched URLs and adjust them.

vagrant < 2.2.9: handle conflicting host only adapter

Starting an existing vagrant up can fail when VirtualBox host-only networks conflict over DHCP settings. Versions before 2.2.9 need a Vagrantfile workaround.

Google Chrome now has a JavaScript bundle visualizer

Chrome’s Lighthouse adds a visualizer for JavaScript bundles, making large modules and unused bytes easier to spot when source maps are available.

no passenger served applications running error when deploying via capistrano

Capistrano deployments can abort when Passenger reports no running app process, even though the app will start on first request.

Finding ancestors with Capybara

Capybara's #ancestor finder locates parent elements with CSS or XPath, replacing verbose XPath and supporting order: :reverse for the nearest match.

Hints for debugging MySQL InnoDB deadlocks

MySQL InnoDB deadlocks occur when concurrent transactions lock rows in different order, often due to broad queries or missing indexes. SHOW ENGINE INNODB STATUS and the application backtrace help identify the conflicting statements.

You can use graphs in gitlab comments!

GitLab comments support Mermaid diagrams, letting text-based graphs and class diagrams communicate ideas more clearly.

Strict Loading Associations can prevent n+1 queries

Rails 6.1 strict loading prevents lazy association loading and raises errors when unread associations are accessed, helping avoid n+1 queries.

Setup Sidekiq and Redis

Sidekiq needs a Redis connection configured separately for client and server environments. A REDIS_URL constant and startup load path keep staging, production, and test settings consistent.

RSpec: how to prevent the Rails debug page if you want to actually test for 404s

Rails development and test environments often replace real 404s with the debug page, which can hide authorization failures in request specs.

RSpec: ". not_to include" behaves like ".to exclude"

not_to include with multiple values checks each value separately, so one matcher can verify several exclusions at once instead of negating the whole expectation.

A Guide To CSS Debugging

Unexpected CSS layout results often come from a small set of common causes. Systematic debugging helps isolate the issue and prevent recurring styling bugs.

Fix REPL of better_errors page

better_errors can lose its interactive REPL on Ruby 2.5.8; updating binding_of_caller to 0.8.0 or later restores advanced debugging features.

Git shortcut to rebase onto another branch

Interactive Git helper for rebasing a chosen run of commits onto another branch, reducing off-by-one mistakes and manual commit counting.

Disable built-in dragging of text and images

Browser text and image dragging can block custom horizontal scrolling or pointer-based movement. Disabling native drag behavior needs CSS and, in Firefox, JavaScript.

Bash alias to switch between recent branches

Quickly jump between recently used Git branches with a shell alias and fzf, avoiding manual branch names and speeding up context switches.

Large CSS box shadows can bring browsers to a crawl

Large blurred shadows can make scrolling and DOM updates sluggish, especially with fixed or sticky elements. filter: drop-shadow() may render faster with hardware acceleration.

Rails: Removing the cucumber-rails warning when setting cache_classes to false without Spring enabled

cucumber-rails emits a transaction warning in test runs when cache_classes stays false without Spring, affecting parallel execution setups.

Working on the Linux command line: How to use bookmarks for directories

Navigate deeply nested project folders faster by storing directory bookmarks in CDPATH and jumping back with short symlinks.

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.

Unpoly 2: Don't try to download files through AJAX requests

AJAX downloads fail because browsers try to render files instead of saving them. Exclude download links from Unpoly link handling and use Content-Disposition: attachment or download.