Testing webpages globally (as in "around the globe")

Global website checks reveal DNS propagation issues and location-specific rendering problems before users do.

Using Apache Benchmark (ab) on sites with authentication

Authenticated pages can be benchmarked with ab by supplying the right session cookies; otherwise login-protected requests fail or measure the wrong content.

Ruby: Comparing a string or regex with another string

Using === with strings and regexes can change matching behavior in Ruby; match? is only safe when the left side is definitely a regex.

How to fix gsub on SafeBuffer objects

html_safe strings lose $1 and other match variables inside gsub blocks. A SafeBuffer override can restore access to capture groups during replacements.

Acceptance testing using Capybara's new RSpec DSL

Capybara now includes an RSpec acceptance-testing DSL, replacing much of Steak’s earlier role and making end-to-end testing in RSpec more seamless.

Good real world example for form models / presenters in Rails

Rails form-specific model layer for screen logic, separate validations, and callbacks without bloating the base model; useful for different workflows and presentable collections.

velesin/jasmine-jquery

Jasmine DOM testing is easier with matchers like toBeVisible() and toHaveCss(css), plus fixture loading for temporary HTML setup and cleanup.

esbuild: Make your Rails application show build errors

esbuild watch errors stay hidden in the terminal while Rails keeps serving stale assets; writing them to a file lets the app render build failures in development.

Web development: Accepting a self-signed certificate in Google Chrome

Chrome can reject locally generated self-signed certificates and hide HTTPS even when they work. Importing the certificate or launching with --ignore-certificate-errors allows testing.

Postgres in Alpine docker container: sorting order might differ

String sort order can change when PostgreSQL runs in an Alpine-based Docker image because locale and collation defaults differ from Debian images.

thoughtbot/capybara-webkit

Capybara driver for browser testing with QtWebKit when JavaScript support is needed.

GitHub Actions: Retrying a failing step

Flaky commands in GitHub Actions can fail intermittently; nick-invision/retry reruns them with a timeout and limited attempts.

How to organize and execute cucumber features (e.g. in subdirectories)

Cucumber feature files can live in subdirectories, but step definitions and support files need an explicit load path. Using -r features keeps subfolder runs working.

Disabling Spring when debugging

Spring can hide code changes while debugging Rails commands because it reuses a cached application process. Disabling it avoids stale behavior in rails and rake runs.

git: find the version of a gem that releases a certain commit

Find the gem version that first contains a commit by using git name-rev --tags; it points to the next release tag after the change.

How to migrate CoffeeScript files from Sprockets to Webpack(er)

Migrating CoffeeScript from Sprockets to Webpacker can keep existing classes and dependencies working by adding coffee-loader and adjusting imports and global namespace exposure.

Savon testing: How to expect any message

Savon mocks usually require an exact SOAP request body, but message: :any accepts any payload and returns the stubbed XML.

davetron5000/methadone - GitHub

Ruby framework for building command-line apps with parameter handling, utility classes, and Cucumber support for CLI testing.

Upgrading Cucumber and Capybara to the latest versions available for Rails 2

Rails 2-compatible versions of Cucumber, Capybara, and related gems avoid breakage from newer dependencies and Capybara API changes.

Making ZSH the default shell on Ubuntu 20.04

ZSH can replace Bash on Ubuntu 20.04 and adds command-line conveniences like completion, corrections, themes, and plugins.

Implementing social media "like" buttons: Everything you never wanted to know

Embedding social widgets can expose cookies, trigger background tracking, and slow pages; privacy-friendly two-step buttons and async loading reduce the impact.

How to combine greps on log files opened with tail -f

Chaining grep with tail -f needs --line-buffered, otherwise matches may not appear immediately in a pipeline.

How to revert features for deployment, merge back, and how to stay sane

Feature reverts can block deployment when unfinished work must stay out of production; consolidating reverts into a few commits makes restoring them after release easier.

Linux: Create file of a given size

Create a file with an exact target size on Linux for testing or temp data, using dd or zero-filled writes.