AppArmor in Linux

AppArmor can block daemons after configuration changes, causing misleading file-access errors such as "File not found" or "Can't open file or directory".

Rails: How to get the ordered list of used middlewares

rake middleware reveals the ordered Rails request stack, useful for adding, removing, or profiling middleware that runs on every request.

PostgreSQL: Difference between text and varchar columns

PostgreSQL character columns differ mainly in declared limits, not speed; unbounded varchar and text behave alike in Rails 4+, though some tools still render them differently.

Extracting parts of forms into Unpoly modals/popups

Unpoly popups outside a surrounding form can drop filter values on submit; mirroring inputs between a root form and overlay form preserves pagination and search state.

Changes to positional and keyword args in Ruby 3.0

Ruby 3.0 stops auto-converting hashes to keyword arguments, breaking some method calls and delegation code across Ruby versions.

CarrierWave: How to remove GIF animation

Animated GIF uploads can slow Rails workers and waste processing time; dropping all but the first frame with ImageMagick avoids resizing work.

JavaScript: Comparing objects or arrays for equality (not reference)

JavaScript has no built-in deep equality check for objects and arrays; use _.isEqual(), up.util.isEqual(), or isDeepStrictEqual() for value comparison.

How to apply transparency to any color with pure CSS

CSS can create a transparent variant of any color without preprocessor support, using color-mix() or relative color syntax for borders, backgrounds, and other components.

How to invert currentColor with pure CSS

Modern CSS can derive an inverse from currentColor with hsl(from ...), rotating hue and flipping lightness for contrasting effects.

Selecting the nth element matching a selector

CSS Level 4 :nth-child(of ...) targets the nth sibling matching a selector, enabling pure-CSS selection by class or other filter instead of element type.

The developer console can do more than you think!

Browser developer tools offer richer logging than console.log, including tables, grouped output, timers, clickable object links, and stack traces for debugging.

JSON APIs: Default design for common features

JSON API design benefits from established conventions for attributes, pagination, errors, and related objects, making client integration more predictable.

Capybara: Preventing server errors from failing your test

Capybara can fail tests after all steps when the Rails server raises an error on session cleanup. Filtering known missing-file errors avoids false failures.

Fuzzy scoping in Rails with PostgreSQL

Approximate string filtering in Rails can find names that nearly match a term by using PostgreSQL trigram similarity and a tunable threshold.

Git Rebase: How to squash/fixup/edit/... commits without actually rebasing (keeping the base)

Clean up commits on a long-lived feature branch without changing its base, then later rebase one polished commit onto main.

Prevent unnecessary automated back-and-forth when sending noreply-emails

Automated messages from a noreply@ address can trigger out-of-office replies and error bounces. Setting Auto-Submitted: auto-generated suppresses the unwanted back-and-forth.

Sidekiq: How to check the maximum client Redis database size

Sidekiq queues can fill Redis memory quickly; checking maxmemory_human reveals the database limit, and job payload size determines how much capacity remains.

How to fill in multiple lines in a textarea with cucumber

Multi-line textarea input in Cucumber needs docstrings for text with line breaks and paragraphs; the spreewald gem provides the step definition.

How to use a local gem in your Gemfile

Use a local gem copy in Gemfile to test code changes immediately and debug or modify the gem without publishing. Avoid committing local paths because they break for other developers.

Escape a string for transportation in a URL

Safely transporting arbitrary text in URLs requires percent-encoding reserved characters like & and =; Rails helpers do this automatically, while manual URLs need CGI.escape or encodeURIComponent.

Testing Accessibility using Orca

Linux screen reader testing can be noisy and hard to inspect; capturing Orca speech in real time makes spoken output readable during accessibility checks.

Rails: Configuring the default sorting behaviour

Default ordering in ActiveRecord queries falls back to id unless implicit_order_column is set, which can make first and other finder calls return a different record order.

Efficiently add an event listener to many elements

Attaching one listener to many elements can slow the browser; delegating to document reduces setup cost and suits low-frequency events like click.

How to grep through the DOM using the Capybara API

Capybara can search page HTML in Ruby when CSS or XPath is awkward, but DOM changes can cause stale element errors.