josephschmitt/Clamp.js

Truncates overflowing HTML content with an ellipsis, including multi-line text. Useful when CSS text-overflow is limited to single lines and -webkit-line-clamp lacks broad support.

Cucumber: Wait for any requests to finish before moving on to the next scenario

Selenium/Cucumber scenarios can finish before browser requests and redirects are done, leaving the session busy and breaking later steps and hooks.

ClockPicker: Android-style time picker for Bootstrap

Android-style time selection for Bootstrap projects with a polished clock interface, but the ClockPicker library is no longer maintained.

Rails 3.1.0 has been released!

Rails 3.1 adds jQuery by default, streaming responses, role-based attr_accessible, prepared statements, and simpler migrations.

Failtale

Exception tracking service for any platform with a Rails notifier and REST API, useful as a free alternative to Hoptoad/Airbrake for custom error reporting.

Debugging failed AJAX requests with better_errors

better_errors adds enhanced development error pages with a live REPL, and /__better_errors lets you inspect exceptions from AJAX requests.

How to hide your selenium browser window with "headless"

Selenium browser windows can steal focus during Cucumber acceptance tests; headless with xvfb keeps them hidden while running Selenium WebDriver through Capybara.

Installing Node.js / npm under Ubuntu with nvm (with yarn)

Node.js on Ubuntu is easier to manage with nvm, avoiding sudo for global packages and enabling per-version npm and yarn setup.

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.

Using Capybara finder methods with arbitrary matching conditions

Capybara matchers and finders can take a Ruby block for extra DOM conditions when built-in options are not enough. Script calls inside filter blocks need a temporary wait time to avoid Selenium timeouts.

Element.animate() to animate single elements with given keyframes

Animate HTML elements with Element.animate() from the Web Animations API; control timing, playback state, and completion without extra libraries.

Change how Capybara sees or ignores hidden elements

Capybara’s default hidden-element handling affects DOM queries globally, while :visible scopes visibility checks to one lookup. Driver-specific visibility rules differ between RackTest and Selenium.

How to fix "Command "webpack" not found"

Deployment asset precompilation can fail with Command "webpack" not found when Yarn dependencies are missing. A bin/yarn binstub lets yarn install run during deploy.

Event order when clicking on touch devices

Touch interactions on mobile fire mouse events after touchstart and touchend, which can create duplicate handling unless the sequence is canceled.

jQuery Tag Cloud

Tag clouds can be rendered and animated on an HTML5 canvas with TagCanvas, enabling interactive visualizations instead of plain text lists.

Detect mobile or touch devices on both server and client

Shared device detection on Rails server and browser client keeps touch-specific behavior available beyond CSS-only or feature-detection hacks.

Cucumber steps to travel through time with Timecop

Cucumber step definitions for Timecop provide date and time travel in tests, including relative shifts into the past or future; Selenium browser time needs timemachine.js.

AngularJS: Binding to Perl-style getter/setters functions

AngularJS 1.3+ can bind ng-model to accessor functions instead of plain properties, enabling getter/setter style state with ng-model-options.

Rails: Integrating shoelace components

Web components from Shoelace can be integrated into a Rails app with webpack and Unpoly, offering an alternative setup to the official approach.

Cucumber: Clear localStorage after each scenario

Client-side storage can persist between Cucumber scenarios even when cookies are cleared, causing test leakage in Selenium-driven browser runs.

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.

Run Selenium tests in Chrome instead of Firefox

Switching Selenium from Firefox to Chrome requires a matching chromedriver and Capybara driver configuration. Older Capybara versions need a manual Selenium WebDriver setup.

Ruby: Generating and parsing JSON, or: understanding JSON::ParserError "unexpected token"

JSON.parse rejects JSON values produced by to_json for non-Hash and non-Array objects; JSON.generate pairs with JSON.parse, while JSON.load restores Ruby objects and should not handle untrusted input.

CSP: strict-dynamic

CSP nonce-based policies can replace brittle host allowlists, while strict-dynamic lets trusted scripts load additional scripts in modern browsers.