Move Window Buttons Back to the Right in Ubuntu 10.04 / 10.10

Ubuntu 10.04 and 10.10 place window controls on the left by default. gconftool-2 restores the minimize, maximize, and close buttons to the right.

Script to create and copy a production dump to your project root

Creates a production database dump for a chosen Capistrano stage, copies it into the project tmp directory, and can optionally load it into the local development database.

Releasing geordi

geordi bundles handy makandra note scripts into one gem for production database dumps, remote gem installs, and running rake tasks across environments.

IE7 not properly redrawing elements with position: relative

Internet Explorer 7 can misplace nested position: relative elements after DOM changes, leaving elements redrawn in the wrong spot. JavaScript repaint hacks or overflow: hidden may help.

Faker is now I18n aware, ships with unicorns

Faker now reads strings from locale files, which can trigger confusing translation missing errors when locale data is incomplete.

Before installing the Curb gem

Curb requires libcurl3-dev to compile and install successfully on systems using apt-get.

Updating a gem created with Bundler

Releasing a Bundler-based gem needs a version bump, a tagged commit, and a RubyGems push; rake release handles the packaging and publication.

ActiveSupport::StringInquirer

Wrapping a string in this class gives you a prettier way to test for equality.

Test that a number or money amount is shown with Cucumber

Reliable Cucumber checks for displayed numbers and monetary amounts prevent false positives from partial matches and accept spaces or nonbreaking spaces before units.

Setting up FreeBSD as Virtual Machine in VMware

FreeBSD in VMware needs manual setup for installation, VMware Tools, and display resolution. Missing sources under /usr/src can block screen size configuration.

Don't call #node on a Capybara element

Capybara elements become driver-specific when #node is used, breaking code that should work across Rack::Test and Selenium. Prefer the driver-neutral Capybara API for searches and interactions.

Rails 3.1: Release candidate

Asset pipeline, HTTP streaming, jQuery as default framework, auto-reversable migrations, identity map for ActiveRecord.

Ruby 1.8.x support will be dropped with or after Rails 4.

Automatically build the Passenger Apache module, without interactively asking for user input.

Automated installation of the Passenger Apache module avoids interactive prompts and enables non-interactive builds with passenger-install-apache2-module --auto.

Sudo a gem executable does not work on Ubuntu

sudo cannot find Ruby gem executables on Ubuntu because gem binaries live outside its secure path; symlinks, a different bindir, or changing secure_path work around it.

Getting started with Chef

Chef setup depends on curl, sudo access to gems, and running commands inside the chef-repo directory to keep configuration files available.

Fix randomly failing PDF cucumber tests

PDF Cucumber tests can fail intermittently on the first run when generation is not ready. A readiness step waits for PDF output before checking contents.

Remove carriage returns from DOS-formatted text files using Vim

DOS-formatted text files can contain carriage return characters that break Unix tools and line handling. Vim can rewrite them with Unix line endings.

Script to open an SSH shell to a Capistrano deployment target

Need an SSH shell on a Capistrano target without guessing deploy user or directory; shell-for parses config/deploy and can run remote commands before opening bash.

Protect your Mac

Mac data security can be improved by encrypting the drive and Time Machine backups with PGP Whole Disk Encryption.

Conditional comments for Internet Explorer with Haml

IE conditional comments can target specific browser versions, and Haml supports them directly; semi-conditional HTML still requires an :erb section.

Getting started with Puppet

Puppet helps learn and manage configuration automation through a virtual machine and basic setup on Ubuntu or Mac OS X.

Matching line feeds with regular expressions works differently in every language

Dot matching for line breaks differs across regex engines, and the same modifier letters can mean different things. Ruby, JavaScript, and Perl use different patterns for matching any character.

Putting static content on Cloudfront

Static assets on CloudFront can speed up page loads, but cache invalidation, gzip handling, SSL, fonts, and mixed-content rules need careful handling.

Split an array into columns

Distributing array items into visual columns is awkward with in_groups and in_groups_of; in_columns returns wrapped column arrays in pure Ruby and Rails.