I’ve had a mysterious broken page on this site for a while - but been too busy to look into it. My Comprehensive Linux Backups with etckeeper & backupninja article has been refusing to load, and returning a weird HTTP 418 Unused status code instead. I finally made the time to figure out the cause.
It turned out that this was being ...
This site has been generated using Pelican 3.3 for over two years - and I finally found some time to upgrade to the current version of Pelican, 3.6.3. This is how I did the upgrade.
I decided to be lazy and do the upgrade in-place, instead of creating a new virtualenv and copying the content & settings over. Luckily, this worked out OK, after a bit of fiddling around.
I also decided, rather cavalierly, to upgrade all the packages ...
We use CentOS VM’s at work to emulate our production environment - and it took me a while to figure out how to get the VirtualBox Guest Additions to build reliably on CentOS 6.4/5. This is what I’ve currently settled on as a reliable method.
First, make sure that you’ve got the kernel headers and tools installed that you need to build stuff:
sudo yum update -y sudo yum install gcc kernel-devel kernel-headers dkms make bzip2 ...
To create image thumbnails from a PDF document, run this in a terminal window:
convert -thumbnail x300 -background white -alpha remove input_file.pdf output_thumbnail.png
The parameters to convert do the following things:
|-thumbnail||Similar to -resize, but optimized for speed and strips metadata.|
|x300||Make the thumbnail 300px tall, and whatever width maintains the aspect ratio.|
|-background white||Sets the thumbnail background to white.|
|-alpha remove||Removes the alpha channel from the thumbnail output.|
I had a feature request for automatic figure numbering, like latex. I was revamping this plugin for Pelican 3.3 anyway - and this didn’t seem too hard - so I decided to add it.
So, the Better Figures & Images plugin now supports automatic figure numbering. To enable this for all posts, just add this to your config file:
FIGURE_NUMBERS = True
If you want to enable this per post, just add this to the metadata ...
There are quite a few changes in Pelican 3.3 - most of them minor, but a few which might mean making some changes to your site in order to upgrade. This is what I did to move my site from Pelican 3.2 to 3.3.
The change that had the biggest impact and took the most work was around image linking - caused by a combination of things. I think I was doing it wrong before and things changed in ...
As he’s such a nice guy - and as I’ve just borrowed his tagsort jinja ...
I’m going to build on Jamie Zawinski’s excellent advice about backups, which you should read first. This is basically that, but with some extra bits. If this seems too complex, then just do what he says.
The plan is to use Backupninja to backup everything to an external USB drive — and also to Amazon S3 or Dropbox, depending on what it is. Backupninja provides a centralized way to configure and schedule many different backup utilities, just by dropping ...