How to focus stack a set of images in Photoshop

I recently rented a Nikon 105mm VR Macro lens for a weekend, and wanted to experiment with different types of macro photography.

One of the things I was most interested in was focus stacking. See, there's a problem with macro photography in that you're dealing with a depth of field measured in millimeters when reproducing images at a 1:1 ratio, even stopped down to f/8 or f/11. And, wanting to avoid diffraction at higher apertures, there's no way to take a straight-out-of-camera picture of a 3D object that's sharp from front to back.

One frequent subject of my close-up photography is the Raspberry Pi single board computer. You can see the problem when taking just one photo:

Converting a non-Composer Drupal codebase to use Composer

A question which I see quite often in response to posts like A modern way to build and develop Drupal 8 sites, using Composer is: "I want to start using Composer... but my current Drupal 8 site wasn't built with Composer. Is there an easy way to convert my codebase to use Composer?"

Convert a tarball Drupal codebase to a Composer Drupal codebase

Unfortunately, the answer to that is a little complicated. The problem is the switch to managing your codebase with Composer is an all-or-nothing affair... there's no middle ground where you can manage a couple modules with Composer, and core with Drush, and something else with manual downloads. (Well, technically this is possible, but it would be immensely painful and error-prone, so don't try it!).

Use Ansible's YAML callback plugin for a better CLI experience

Ansible is a great tool for automating IT workflows, and I use it to manage hundreds of servers and cloud services on a daily basis. One of my small annoyances with Ansible, though, is it's default CLI output—whenever there's a command that fails, or a command or task that succeeds and dumps a bunch of output to the CLI, the default visible output is not very human-friendly.

For example, in a Django installation example from chapter 3 of my book Ansible for DevOps, there's an ad-hoc command to install Django on a number of CentOS app servers using Ansible's yum module. Here's how it looks in the terminal when you run that task the first time, using Ansible's default display options, and there's a failure:

Ansible 2.5 default callback plugin's not quickly digestible—and this is one of the shorter error messages I've seen!

Using Ansible through Windows 10's Subsystem for Linux

Ever since I heard about the new 'Beta' Windows Subsystem for Linux, which basically installs an Ubuntu LTS release inside of Windows 10 (currently 14.04), I've been meaning to give it a spin, and see if it can be a worthy replacement for Cygwin, Git shell, Cmder, etc. And what I was most interested in was whether I could finally point people to a more stable and friendly way of using Ansible on a Windows workstation.

In the past, there was the option of running Ansible inside Cygwin (and this is still the best way to try getting Ansible working in an older Windows environment), but this always felt kludgy to me, and I hated having to recommend either that or forcing Windows users to do a full Linux VM installation just to run Ansible commands. I finally updated my PC laptop to the latest Windows 10 Anniversary Update, and installed the Windows Subsystem for Linux, and lo and behold, Ansible works!

Remove a single Certbot (LetsEncrypt) certificate from a server

I've been using Certbot to generate and renew Let's Encrypt certificates for most of my smaller sites and services, and recently I needed to move a site from one server to another. It was easy enough to build the new server, then generate the certificate on the new server and use it in Apache or Nginx's configuration.

However, on the old server I no longer wanted to have the old certificate get renewed every week/month/etc. during the certbot-auto cron runs, so I looked to see if there was a way to simply have Certbot delete a certificate. It turns out there's not, but there is an issue—adding -delete option to remove the cert files—to add this functionality.

How I record my own conference presentations

At this year's php[tek] conference, I decided to record my own sessions (one on a cluster of Raspberry Pis, and another on tips for successfully working from home). Over the years, I've tried a bunch of different methods of recording my own presentations, and I've settled on a pretty good method to get very clear audio and visuals, so I figured I'd document my method here in case you want to do the same.

How to Build a Simple $50 Standing Desk

Detail of standing desk surface

I'm no stranger to experimenting with my workspace; since I work from a computer for at least 8 hours a day, I try to find ways to prevent RSI and joint pain. I've tried most everything—from über-expensive fancy mesh desk chairs to ergonomic keyboards and vertical mice. But nothing has made as large (and quick) a difference as working from a standing desk.

Tips and Tools for New Homeowners

Note: many of my suggestions are linked to products I recommend from—using these links when you purchase one of them helps me keep this article and site fresh!

In the past few years, I've moved three times; from a dorm room to a two-bedroom apartment, from that apartment to a two-bedroom condo, and from that condo to a house. I'm not claiming to be a moving expert, but the moves have gone very well every time.

Garage full of stuff
It's nice to know that pretty much everything we own fits in a two-car garage (for now!).

The physical move itself is a very small part of migrating to a new place—it's the weeks of work getting 'settled in' afterwards that can make a move a nightmare, or a great experience. The tips, tricks, and tools I recommend below are things that have really helped me make the days and weeks following the move be a great experience.

How to Repair Your Intel iMac — DIY Guide from

Over on, I posted a detailed tutorial/guide on how to replace the hard drive inside a 24" Intel iMac with an aluminum enclosure (the process is similar on other aluminum iMacs). It's a rather intricate process, so in addition to a few illustrations, I posted a video of the process on YouTube (it's embedded over on as well!).

Intel iMac Teardown and Hard Drive Replacement - DIY/Guide


iMac - Intel - Guts exposed

Have fun repairing your iMac! (Please be sure to leave comments on the post, and not here).


Subscribe to RSS - how-to