How to: Specify size of Selenium browser window
Set a consistent browser viewport for Selenium tests to avoid layout-dependent failures and mobile-versus-desktop behavior differences.
Fix error: rails console No such file to load -- irb/encoding_aliases.rb (LoadError)
Rails console fails after upgrading Ruby because spring tries to load a missing irb file. Updating binding_of_caller to 0.8.0 restores console startup.
How to enable Chromedriver logging
Chromedriver logging helps diagnose Selenium Chrome test failures by recording driver activity to a file or terminal. Service configuration or a manually started driver can enable verbose output.
palkan/isolator: Detect non-atomic interactions within DB transactions
isolator raises errors for non-rollbackable side effects inside DB transactions, such as HTTP calls, queued jobs, and emails.
The nitty-gritty of compile and link functions inside AngularJS 1 directives
AngularJS directive lifecycle hooks control template mutation and link-time behavior before and after child directives run, enabling DOM customization and coordinated initialization.
Bash script to list commits by Pivotal Tracker ID
Quickly list Git commits tied to one Pivotal Tracker story ID, making related changes easier to spot with a small Bash helper.
Convert SCSS to SASS
Convert .scss files to indented Sass syntax from the command line with sass-convert, including whole directories.
CSS-Style
CSS class naming and file structure choices improve maintainability, flexibility, and debugging. Prefer classes over IDs and inline styles, and separate normalization, layout, modules, and icons.
Powerful favicon generator
Generates a complete favicon set for browsers, mobile home screens, and Touch Bar use from a square SVG or image.
Haml: Prevent whitespace from being stripped in production
Whitespace can disappear in Haml-rendered pages in staging or production, causing inline elements like buttons to stick together. A helper can make intended spacing explicit.
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.
Joining PDFs with Linux command line
Combine multiple PDF files from the Linux command line with pdftk or pdfjam; convert works too, but often lowers quality and increases file size.
IE11 ignores calc() functions in the flex shorthand
IE11 drops calc() inside the flex shorthand, breaking layouts that need percentage widths with gutters. Using flex-basis separately preserves the intended size.
Class methods in Coffeescript
CoffeeScript class methods use @ on the class definition and can be called from instances through @constructor or the class itself.
Take care of existing users when upgrading Clearance
Upgrading Clearance can break existing logins when password hashes change from SHA1 to BCrypt, causing BCrypt::Errors::InvalidHash for legacy users.
Known MariaDB version incompatibilities
MariaDB and MySQL version changes can alter query results despite sql_mode; aggregated date queries may switch from strings to Datetime, breaking existing applications.
Fix for "Rails assets manifest file not found" in Capistrano deploy
Webpacker-only Rails deploys can fail on deploy:assets:backup_manifest because capistrano-rails expects Sprockets assets. Clearing that task avoids the missing manifest error.
Capistrano: Finding out who deployed which revision of your application and when
Capistrano records successful deployments with branch, commit, release ID, and user, letting teams trace who shipped which revision and when.
DOM API for jQuery users
Quick reference for replacing common jQuery DOM tasks with native browser APIs and handling event delegation gaps without jQuery.
Restore changes, even from deleted files, with RubyMines "Local History"-Feature
Lost or overwritten files can sometimes be recovered after git accidents or failed undo actions by using RubyMine's Local History.
CSS font metrics in detail
CSS line-height and vertical-align depend on font metrics and inline formatting, making text and element alignment less predictable than it seems.
Installing Ruby 2.3 or below on Ubuntu 17 and above
Ruby versions below 2.4 fail to build on newer Ubuntu because of OpenSSL and compiler mismatches. Temporary libssl1.0-dev and gcc-6 workarounds restore old installs.
How to inspect the HTML of an email in Thunderbird
Encoded email source can hide the plain HTML markup in Thunderbird. Opening a message in composition mode gives access to the HTML view.
Git: Apply a diff
git apply can place a diff onto HEAD, often replacing a rebase-and-merge workflow when reconstructing commits or working from a patch file.