Minify Font Awesome fonts with webpack

Reduce Font Awesome icon font size by subsetting unused glyphs with fontmin-webpack, keeping low CPU usage and no JavaScript while avoiding oversized font downloads.

Ruby object equality

Ruby equality methods differ by purpose: == for value comparison, eql? and hash for hash keys, === for case matching, equal? for identity.

How to: Validate dynamic attributes / JSON in ActiveRecord

JSONB columns can hold dynamic attributes in ActiveRecord, but validation and strict defaults are easy to lose. JSON Schema keeps evolving hashes predictable.

Show the character set and the collation of your MySQL tables

MySQL table collation and default character set are available through SHOW TABLE STATUS and SHOW CREATE TABLE; individual columns can still use different encodings.

Understanding the Selenium error "Modal Dialog Present" (aka Selenium::WebDriver::Error::UnhandledAlertError)

Intermittent Cucumber failures can come from a leftover browser alert blocking Selenium commands after an unfinished AJAX request.

Rails: How to write custom email interceptors

Global mail interception in Rails can prefix subjects by environment and redirect staging mail to a fallback address unless recipients are allowlisted.

Heads up: RSpec's diffs may not tell the truth

RSpec diffs can mislead when matchers print like failures or when Time.now values differ only by milliseconds.

Check that a Range covers an element in both Ruby 1.9 and 1.8.7

Range#include? becomes slow for non-numeric ranges in Ruby 1.9, while Range#cover? is unavailable in 1.8.7. A compatibility method keeps one check working across both versions.

Embed Google Analytics code for some environments only

Google Analytics should run only in production to avoid polluting visitor statistics. Rails environment checks can gate the tracking snippet.

Raise when there's a I18n translation missing

translate! and t! raise I18n::MissingTranslationData on missing translations instead of returning placeholder text. A custom exception handler can make I18n raise globally.

Performance analysis of MySQL's FULLTEXT indexes and LIKE queries for full text search

MySQL text search performance differs sharply between LIKE and FULLTEXT; LIKE stays surprisingly fast on medium datasets, while FULLTEXT benefits from larger vocabularies.

Web Operations 101 For Developers

Web application developers increasingly need operational knowledge beyond coding, testing, and deploying. Traditional development workflows now overlap with running and maintaining production systems.

Project management best practices: User stories & Issues

Clear, well-scoped issues reduce misunderstandings and rework in Linear. User stories, acceptance criteria, backlog priority, and rough estimates keep work actionable.

Unpoly: Testing values for presence or blankness

Blank and missing values in JavaScript need explicit handling; Unpoly provides up.util.isBlank(), up.util.isPresent(), up.util.isMissing() and up.util.isGiven() for common and custom types.

Copy to clipboard without flash (clipboard.js)

Flash-free copy-to-clipboard handling with clipboard.js, including success and error callbacks, text selection feedback, and support for text fields or data attributes.

How to check if a file is a human readable text file

Ruby's File.binary? is only a fast guess and can misclassify PDFs or UTF-8 text. A safer check validates the file contents against the target encoding.

ActiveRecord::Store: migrate data in store

Migrate hashed settings stored in a single column by renaming keys safely in an ActiveRecord::Migration, using the store's coder and an embedded model.

responsive.is

Online tool for checking how a site renders across common desktop, tablet and phone screen sizes.

Running Cucumber deletes my whole app!

Capybara Screenshot can delete the application directory during a Cucumber run when screenshots are stored in .. Upgrading to 1.0.26 and setting Capybara.save_path avoids the destructive cleanup.

GitHub Actions: Manually running a workflow

Manual workflow runs in GitHub Actions require workflow_dispatch; eligible workflows then appear in the Actions tab with a Run Workflow button.

Using Thin for development (with SSL)

Local SSL development with Thin avoids mixed-content and redirect issues while testing force_ssl on localhost using a self-signed certificate and separate HTTP and HTTPS ports.

Freeze (vendor, unpack) a single Ruby gem with and without Bundler

Vendoring a patched Ruby gem in Rails can fail without gem metadata, especially with Bundler. A proper .specification file and :path setup make the local copy usable.

Rails logs are not flushed automatically (in Rake tasks)

Production Rake tasks can lose Rails log output because the logger buffers lines and does not flush on exit. Rails.logger.flush or a task wrapper writes pending entries to disk.

How to mount a legacy database to migrate data

Legacy data can be imported into a new Rails app by connecting a second database and mapping old tables and columns with Active Record models.