Delete a Clearance session after some time of inactivity
Inactive users are logged out after a period without requests, using Clearance cookie expiration and a per-request refresh to keep active sessions alive.
Rails 3: Sending tempfiles for download
Temporary downloads can fail in Rails 3 when send_file triggers X-Sendfile and the web server cannot read files under /tmp. Using an allowed temp directory avoids 404 errors.
How to type accented characters on keyboard layouts without dead keys
Typing accented letters on dead-key-free keyboard layouts is still possible with a configured Compose key and the right compose combinations.
Rails 3: Make "link_to :remote => true" replace HTML elements with jQuery
Rails 3 remote links can replace page content with returned HTML, restoring the Rails 2 link_to_remote update behavior through jQuery and rails-ujs.
Fix for: Your Firefox profile cannot be loaded. It may be missing or inaccessible.
Selenium and Launchy can trigger Firefox profile errors when Launchy opens pages through the active browser. Setting LAUNCHY_BROWSER and BROWSER to Chrome or another browser avoids the conflict.
RSpec 2.6 supports "any_instance" now
any_instance stubbing and expectations now work in RSpec 2.6, enabling should_receive and stub on instances created inside code.
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.
Hex color codes for the CGA palette
Hex values for the 16-color CGA palette used on Color Graphics Adapter displays in the 1980s.
Virtual attributes for date fields
Virtual date attributes in forms arrive as strings, so Rails does not auto-cast them like database columns. A custom accessor can coerce them to Date objects or nil.
How to remap your caps lock to a second Escape key
Turn an unused Caps Lock into a second Escape key for faster modal editing and keyboard-driven workflows.
url_for with added params
url_for accepts only one argument, so extra query parameters fail. polymorphic_url builds the same link and keeps additional params.
Rails 3 issue: update_all ignores conditions, when :orders and :limit options are supplied
update_all can ignore conditions when :order and :limit are present, causing unintended bulk updates in Rails 3.
How to use different encodings for text in HTTP headers
Non-ASCII values in HTTP headers need RFC 5987-style encoding, especially for filenames in Content-Disposition downloads with plain ASCII fallbacks.
Shell script to generate a Git commit with Pivotal Tracker story ID and title
Generate Git commit messages from Pivotal Tracker stories with geordi commit, selecting a story and using its ID and title automatically.
Fix "private method `select' called for Capybara::Node::Element
Capybara and selenium-webdriver version mismatches can break element interaction with a private select method error. Aligning gem versions avoids the API incompatibility.
Edit your previous Skype messages
Skype messages with typos can be corrected after sending by reopening the last or any current-session message and editing it in place.
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.
Dotfiles: Keep your linux configuration on github
Centralizing Linux configuration in a Git-backed ~/.dotfiles repository keeps settings versioned and easy to sync across machines.
Running the Awesome window manager within Gnome
Run a tiling window manager inside GNOME to keep GNOME services while gaining automatic layouts and multi-monitor workspaces.
Hoptoad is now Airbrake
Hoptoad has been renamed to Airbrake after a trademark dispute over frog- and toad-related names.
How to enlarge a VirtualBox VDI disk file
VirtualBox lacks a built-in VDI resize feature; enlarging the disk means cloning to a larger virtual drive and expanding the partition afterward.
Show the status of a running dd copy
dd copies can run silently until completion or failure; pkill -USR1 dd or status=progress reveals live transfer progress.
Disable Thumbs.db on Windows 7
Windows 7 creates hidden Thumbs.db files in image folders, adding clutter to archives and shared files. Group Policy can stop thumbnail caching and file creation.
Check gem dependencies before installation
Inspect a gem's dependency requirements before installation to avoid surprises and see development-time packages such as hoe, rake-compiler, and rexical.