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.

Use look-behind assertions in regular expressions with Ruby 1.8

Ruby 1.8 lacks look-behind in Regexp; Oniguruma provides zero-width assertions such as positive and negative look-behind for pattern matching.

Disable text selection on iOS and Android devices

Mobile browsers can trigger accidental text highlighting and copy menus, confusing users. A small JavaScript/jQuery workaround suppresses selection on touch devices.

Get syntax highlighting for puppet files (.pp) in vi

Puppet manifests can be hard to read in vi without syntax coloring. Installing vim-puppet or adding a syntax bundle enables highlighting for .pp files.

Installing Rails on a fresh system

Setting up Rails on Ubuntu needs Ruby, Bundler, and the right development packages; repository RubyGems often causes problems, and project gems should be installed with bundle install.

CPU limit

cpulimit caps a process's CPU usage by percentage, making batch jobs less greedy and adapting quickly to system load.

Disable Dell U2410 beeping sound

Persistent monitor button beeps on the Dell U2410 can be turned off through the on-screen display, avoiding an annoying sound every time a control is pressed.

Fix slow specs using SOLR

Specs can stall for 30+ seconds when SOLR connections are left open and the pool is exhausted. Lowering the old-connection timeout reduces the delay.

Getting non-Aero toolbars for Thunderbird 5 on Windows 7

Thunderbird 5 on Windows 7 can use translucent Aero toolbars and menubars; a userChrome.css tweak restores solid backgrounds.

Traverse large XML files with Nokogiri

Large XML files can exhaust memory when parsed at once; Nokogiri’s XML::Reader streams nodes one at a time for lower-memory processing.