Git: Revert one or more commits

Reverting creates a new commit that undoes earlier changes, useful for backing out a single change or several related commits without rewriting history.

CSS: Flex and "min-width"

Flex items can overflow small screens because min-width:auto prevents shrinking below content size; min-width: 0 lets them fit available space.

Using local fonts with Webpack / Webpacker

Using self-hosted or purchased fonts with Webpack or Webpacker requires either bundling them from assets or packaging them locally for clean imports.

rails_state_machine 1.1.2 released

valid? no longer changes a record's state in rails_state_machine 1.1.2, preventing validation checks from causing unintended transitions.

How to fix parallel_tests with Redis on powerful machines

Parallel test runs can exceed Redis’s default 16 databases on multi-core machines, causing ERR DB index is out of range; increasing the database limit resolves it.

How to fix: Session hash does not get updated when using "merge!"

Rails session hashes can ignore merge!, leaving new values invisible or unsaved. update loads the session for writing and avoids the mismatch.

Bootstrap 4 skin for the Rome datepicker

Make Rome datepicker match Bootstrap 4 with utility classes and custom styling, while preserving Rome’s positioning CSS and internal state handling.

Upgrade guide for moving a Rails app from Webpack 3 to Webpack 4

Webpacker 4 and Babel 7 change config files, package names, asset paths, and polyfill imports when upgrading a Rails app from Webpack 3.

Rails: How to get URL params without routing parameters (or vice versa)

Rails merges query string, request body, and routing data in params; request.query_parameters and request.path_parameters separate URL values from route data.

Micro clearfix mixin for Sass

A float-clearing Sass mixin can avoid extra markup while preserving margin collapse and visible overflow. display: block is a safer clearfix choice than display: table or overflow: hidden.

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.

JavaScript without jQuery

Moving away from jQuery improves performance, reduces bundle size, and aligns with the modern web platform. Native DOM APIs and polyfills now cover most common needs.

How to install bundler for Ruby < 2.3

Bundler 2 needs Ruby 2.3.0+ and RubyGems 2.5.0+; older Ruby versions require installing the last Bundler 1 release with gem install bundler -v '~>1'.

AngularJS 1: How to keep "ng-hidden" elements from flickering on page load

AngularJS elements can flash visible before bindings apply. ng-cloak hides content until Angular loads; preadding ng-hide also prevents flicker but relies on internals.

Carrierwave: Built-in resize methods

Built-in CarrierWave image resizing helpers preserve aspect ratio, crop, or pad images to target dimensions, with MiniMagick and RMagick offering the same methods.

Trigram indexing as an alternative to PostgreSQL fulltext search

PostgreSQL fulltext search misses partial matches in dates, serial numbers, and other token fragments. Trigram indexes speed up wildcard LIKE searches on large tables.

How to drop all tables in PostgreSQL

Removing every table while keeping the PostgreSQL database can be done by dropping the schema or iterating through tables with DROP TABLE statements.

RubyGems can't find bundle executable although Bundler is installed

bundle install fails with Gem::GemNotFoundException when Bundler 2 runs on RubyGems 2; updating RubyGems to 3.0+ restores the bundle executable.

How to overwrite and reset constants within Cucumber features

Cucumber feature tests can temporarily replace global constants and restore them after each scenario, including newly created constants, without warning noise.

Upgrading Ruby from 1.8.7 to 2.3.5

Ruby 2.3.5 migration from 1.8.7 needs gem updates, syntax fixes, and test adjustments to resolve compatibility errors across Rails apps.

Rails index route for resources named after uncountable substantives

Uncountable Rails resources break normal route helpers and form handling. resource can still expose the index action through a special _index_path helper.

How to create a Basic Auth header value

Basic Auth sends credentials as a Base64-encoded username:password string in the Authorization header; Ruby can generate it with Base64.strict_encode64.

Ruby: Reading and writing CSVs

Ruby can read and write CSV files with the standard CSV library, and smarter_csv makes imports more convenient when converting rows into hashes.

CSS: How to find out the rendered font in chrome

System-specific font fallbacks can make text look different across machines; Chrome DevTools can reveal the actual rendered font in the Computed panel.