CSS Grid Display allows defining number of grid columns based on child width
display: grid can size columns from child width with repeat(auto-fit, 100px) or auto-fill; auto-fit collapses empty columns, auto-fill preserves them.
Selector for finding the currently selected option in a <select> tag
Use option:checked to read the current selection in a <select>; option[selected] only matches the markup, not later user changes.
Jasmine: Spy on value properties
Jasmine spyOnProperty() fails on plain value fields; a helper can convert them into accessors so they can be stubbed or asserted in tests.
Nokogiri: How to parse large XML files with a SAX parser
Large XML imports can exhaust RAM with Nokogiri’s DOM parser; SAX parsing streams data and avoids building the full tree in memory.
New gem: Rack::SteadyETag
Rack::SteadyETag makes HTML caching effective by keeping ETags stable when only CSRF tokens or CSP nonces change.
Spreewald 4.3.3 released
Built-in support for Rails and Bootstrap error classes reduces step overrides, while configurable error classes, XPath selectors, and optional negation improve flexibility.
Semantic HTML
HTML semantics improve readability, accessibility, and parser interpretation by matching elements to meaning, while HTML5 sectioning and text-level elements add structure and built-in behavior.
Elasticsearch: recover from readonly mode
Low disk space can switch Elasticsearch indices into read-only mode, blocking writes even after space is freed. Resetting index.blocks.read_only_allow_delete restores updates and deletes.
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.