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.

Setting up Ubuntu Server as Virtual Machine in VMware

Ubuntu Server in VMware needs manual VM setup, VMware Tools installation, and display and keyboard configuration for a usable desktop console.

Bash script to run specs and features

Run rspec and Cucumber from any project directory with optional spinner support; features are skipped when specs fail.

Nautilus File Manager slows down the system after new installation of ubuntu

Ubuntu One can start after installation and try to sync the entire home directory, making Nautilus File Manager extremely slow.

Change the hostname on Mac OS X

Set a Mac’s network name from Terminal when the default hostname is wrong or needs to match a local domain.

Using QEMU to quickly test an ISO or bootable USB drive

Bootable media can be tested quickly in QEMU instead of setting up VirtualBox, using an ISO or a USB drive directly.

Vector Magic: Precision Bitmap To Vector Conversion Online

Convert raster images to scalable vector files for cleaner artwork, smaller files, and sharp resizing without manual tracing.

Playing audio in a browser

Browser audio playback is fragmented across Flash and HTML5, with codec, seeking, loading, and styling limitations that often require a hybrid library.

Print-Friendly Images and Logos with CSS

The trick is this: send a low-resolution version of your image to the screen, and a high-resolution version to the printer.

Git Cheatsheet

Git state management is easier when you know which commands change the working tree, index, stash, or upstream references.

javan/whenever - GitHub

Whenever is a Ruby gem that provides a clear syntax for writing and deploying cron jobs.

Validations on associated objects

Conditional validation across associated records can fail during new parent creation because the child object is not yet linked. Moving the check to the parent and using sticky errors keeps the child invalid.

Speed up Capistrano deployments using a remote cached copy of repository

Capistrano deployments can be much faster by reusing a cached repository copy on the server instead of cloning from the git host each time.

Apprise - The attractive alert alternative for jQuery

A lightweight jQuery alert and dialog replacement with full control over styling, content, position, and behavior, without a full UI framework.

Capistrano 2: Which Capistrano hooks to use for events to happen on both "cap deploy" and "cap deploy:migrations"

Capistrano 2 hooks must target deploy:update_code, deploy:symlink, and deploy:restart to run tasks for both cap deploy and cap deploy:migrations.

Why a Rails flash message is shown twice

Flash messages can appear twice when render is used instead of redirect_to; flash.now is for the current request, flash[] for the next one.

Ignore an error class with Airbrake

Airbrake can suppress selected exceptions by default or through config.ignore, reducing noise from expected failures such as invalid requests and unsupported HTTP methods.

Haml and Sass 3.1 are Released

Sass now comes with user-defined functions, keyword arguments, list manipulation. Haml and Sass are now two separate gems.

HTML5 Presentation

Awesome presentation for the new HTML5 features we will get to play with. This presentation should probably be viewed in Chrome only.

How to translate “business value” of things that are technically important

User Stories should describe what a user wants the system to do. Purely technical tasks should usually be implemented as part of a User Story. But, sometimes there are technical tasks which cannot be directly linked to customer value. Things like “Upgrade to MySQL 6.0″ or “replace magic numbers with enums” need to be done. How can you prioritize these critical chores against User Stories? How can you make the product owner aware of the importance of such tasks (and the business risks of procrastination)?

Rails jQuery UJS: Now Interactive

We can now plug into every facet of the Rails jQuery UJS adapter, binding to custom events, and even customizing internal functions, without hacking or monkey-patching the rails.js file itself.

Saving application objects in your session will come back to haunt you

Storing application objects in sessions can trigger ActionController::SessionRestoreError after class removal or deployment. Keep session data to strings and numbers, or provide stubs for old classes.

How to: Apache logs on a daily basis without logrotate

Daily Apache access log rotation without logrotate uses CustomLog with rotatelogs to create timestamped files and avoid nightly web server restarts.