How to list updateable dependencies with Bundler and Yarn

List outdated gems and packages that can be upgraded, with filters for allowed versions and dependency groups to narrow bulk updates.

Cucumber step to test that a tooltip text exists in the HTML

HTML-attribute tooltips are entity-encoded, so presence checks need decoded text or encoded matching in Capybara.

Delay your Jasmine tests until the document is ready

Jasmine specs can run too early when the DOM is not ready, causing setup to fail. $(done) inside beforeAll waits for document readiness before the suite starts.

Select an unknown option with Capybara

Selecting a dropdown value without knowing the available options helps in tests where only a valid choice is needed. Capybara can read an option from the list and select it by text.

Timeouts for long-running SQL queries

Database query limits prevent runaway SQL from consuming all resources; PostgreSQL statement_timeout and MySQL max_execution_time can cancel slow statements automatically.

Spreewald 1.2.11 fixes frequent "no alert open" errors on Chrome

Chrome updates can cause frequent no alert open errors in Capybara dialog tests. Spreewald 1.2.11 waits for browser dialogs before confirming them.

Don't assert exceptions in feature specs

Capybara feature specs do not reliably catch server exceptions in another thread; request specs or visible UI assertions fit this user-level behavior better.

Async control flow in JavaScript: Promises, Microtasks, async/await

JavaScript async code often becomes hard to read and error-prone; promises and async/await flatten control flow, model failures, and avoid callback nesting.

Using ngrok for exposing your development server to the internet

Temporary public access to a localhost development server is useful for testing on another device or through TLS without port forwarding or self-signed certificates.

Initiate SSL secured TCP connections to remote services

telnet and nc cannot open SSL-secured TCP connections to remote services; openssl s_client can test the connection and handshake.

RSpec: Ensuring a method is called on an object that will be created in the future

RSpec’s and_wrap_original can attach expectations to objects created during a call, making it easier to verify the right validator instance without relying on expect_any_instance_of.

Rails: Use fixture helpers like `users(:alice)` in the Rails console

Rails console fixture lookups are awkward when only fixture names are known; a small initializer adds users(:alice)-style helpers for loaded fixture records.

Bash functions to provide repository context for LLM chats

Bash functions package repository context and Git diffs into XML files for Gemini chats, reducing copy-paste friction and API usage.

How to tweak RSpec's truncation behavior

RSpec truncates long inspected values to 200 characters, which can hide the real cause of failing specs. Raising max_formatted_output_length reveals more of the error message.

Auto-generating plain-text bodies for HTML e-mails in Rails apps

HTML e-mails in Rails need a plain-text part to avoid spam penalties; premailer-rails can generate it automatically and be tuned for line length and formatting.

Testing HTTPS with badssl.com

Sites with unusual HTTPS setups help verify browser certificate handling, proxy interference, and security-product side effects.

Configure RSpec to raise an error when stubbing a non-existing method

RSpec 3.3+ can reject stubbing or mocking methods that do not exist, preventing non-verified partial doubles from masking test mistakes.

Don't use Ruby 1.9.2

Ruby 1.9.2 loads files very slowly, making Rails startup and test runs painfully long. Upgrading to 1.9.3 removes the bottleneck.

Testing ActiveRecord callbacks with RSpec

Database-backed RSpec checks for ActiveRecord lifecycle behavior are more reliable than stubs when verifying side effects like automatically creating associated records.

Find files modified since a given timestamp

Find files changed after a specific time or within the last day using find age tests and a reference timestamp file.

RSpec: Example groups define constants that can shadow your models

RSpec example groups can define constants that shadow Rails models during association class lookup, causing flaky failures when spec files load in the same process.

Bash: How to grep logs for a pattern and expand it to the full request

Find all Rails log lines for matching requests by extracting request IDs and re-grepping the full log, avoiding interwoven output from concurrent requests.

Using Low-Level Prompts for High-Accuracy AI Coding

Precise, low-level prompts and tight context improve AI code edits across files; structured keywords, reusable patterns, and early review reduce guesses and errors.

Howto: Create a self-signed certificate

Local HTTPS development often needs a trusted certificate; openssl or mkcert can create self-signed X.509 certificates for testing without browser warnings.