Hugo Blog Revival

2021-03-13
I’ve recently relaunched this website, and this blog more generally. I’ve taken the opportunity to clean up a lot of things, including switching the primary generation of the static content to Hugo from Jekyll. The primary advantage of Hugo is speed; the site now generates a lot faster. However, it’s also a bit more featureful and cleaner. It’s inbuilt templating allowed me to stop using the somewhat dated and awkward m4.

Quickly Cleaning Up Docker Images from the Command Line

2018-05-01
One of the things I find quite annoying is cleaning up Docker images on a development machine, such as my laptop. Over time, they tend to accumulate as you experiment with things, clogging up your machine. It’s really handy to have a quick and easy way to get rid of them. As I typically work from the command line, I wanted a way to do it there, and so I created a shell alias that does it in combination with fzf.

Switching between 'Soft' and 'Hard' wrapping in vim

2016-11-29
One of the things I sometimes find quite frustrating about vim is that the standard textwidth and wrap options imply assumptions about whether a text-style file (.txt, .md, READMEs, etc.) have “hard” carriage returns (where paragraphs are wrapped with actual carriage returns) or “soft” (where paragraphs are wrapped dynamically by the editor). When you create your own files, you’ll probably have your own preference for which of these you do, but when you are working with files that come from others, it’s very useful to have the ability to quickly switch between them.

FZF and zsh plugin released

2016-05-05
If you’re anything like me, you like fzf, you like zsh, and you oh-my-zsh’s z plugin. However, although the z plugin does a great job of allowing you to switch between frequently-used directories just by typing z *somedirectorysubstring*, it doesn’t really easily allow you to browse those directories, with partial-string search. I’ve written a zsh plugin which brings together the z plugin and fzf to allow you to easily browse recently used directories at any point on the command line.

Working around Docker's COPY command copying as root using GNU M4

2015-09-18
I’ve been working with Docker a lot recently, and have been switching to non-root users within the Dockerfile using the USER instruction (not for security reasons, but in order to test software not as root). As a result, I’ve been suffering a little from this issue - essentially, files copied into a Docker image using ADD or COPY are copied with the owner as root, irrespective of the ownership outside the Docker image.

Getting the Logitech Presenter R800 Working with QuickTime Player on the Mac

2015-09-16
Based on my previous post about getting my Logitech R800 presenting tool working with Keynote using Karabiner, I’ve now spent some time extending my private.xml to add support for QuickTime Player also. It now supports (inside QuickTime Player): Left: Rewind the video at various speeds. Right: Fast-forward the video at various speeds. “Start presentation”: Go into fullscreen. “Blank presentation”: Pause/play presentation. This is very useful when giving a “live” demo from a QuickTime video, as you can pause/play/rewind etc.

How I Used Basic Debian Packaging with Git

2015-09-09
I was recently looking for a way to support building a basic Debian package for email2pdf - a fairly simple Python program I maintain. In particular, I wanted to: Keep the Debian build process simple - its packaging has always been a bit of a mystery to me. Ensure that the git revision was in some way reflected in the Debian version number in a mostly monotonic way, which solely the git revision would not, since it’s merely a SHA1 hash.

Blog Refresh

2015-03-30
Recently I relaunched this blog on andrewferrier.com. This was for several reasons: I wanted to get away from Wordpress. I’d been beholden to it as a tool for a little too long, and it’s become somewhat heavyweight, and was also exposing andrewferrier.com to a lot of spam. By removing a database backend and the ability to add comments, this should go. I wanted to give a refreshed look and feel. I’ve redesigned everything from scratch using Bootstrap.

email2pdf - "Automatic" Conversion of Emails to PDFs

2014-09-28
Like many folks, I am increasingly trying to go paperless, and am basing this strategy around the PDF format. I already have some good workflows set up with my network scanner to scan documents to PDF, which get automatically transferred to the desktop of my Mac for myself to file using rsync. However, I also get a lot of emails which I’d like to capture in PDF format. Currently, for each one, I have to go into my email program, and ‘print them out’ using a PDF printer.

Getting Logitech Presenter R800 Working with Keynote on Mac

2012-10-12
Recently I attempted to get my Logitech Presenter R800 working with Keynote on my Mac. I swiftly discovered that although it works with PowerPoint for Mac out-of-the-box, in Keynote the ‘start/stop presentation’ and ‘blank presentation screen’ keys didn’t work. After a bit of investigation, I found the solution, which was to use KeyRemap4MacBook. The presenter tool behaves like a USB keyboard, and uses for blank screen, and F5 for show/hide presentation.
[tags]