Don't push rocks uphill

For three years Lafayette’s official WordPress deployment strategy was to push rocks uphill. This was a doubtful plan, but it represented an improvement over its predecessor, which was to stare at the rocks doubtfully, then roll them around a field at random. Here follows a warning to others.

Git all the things!

In 2013 we had embraced git with the fervor of the converted. Applying this to WordPress was difficult. WordPress.org gave us two options for getting themes and plugins:

Read More

Apparating a source

This is a story about adding a little knowledge to the public internet.

A few weeks ago I went looking for information on the Morrison-Knudsen TE70-4S diesel locomotive. It’s an oddball; a rebuild of a General Electric U25B with a Sulzer engine. Only four conversions were done, all for the Southern Pacific Railroad, and they were unsuccessful. There isn’t much information on the internet about them.

Three M-K TE70-4S locomotives on their initial run in 1978. Photo by Roger Puta.

Read More

Character recognition with PDFs in OS X

I’ve started using Tesseract to add an optical character recognition (OCR) layer to PDFs. What follows are my notes on getting this to a reasonable state, and a word of warning about Preview on Sierra.

Background

I’ve written about my collection of articles before. They’re all PDFs and indexed in Zotero. Their source various: some are distillations of digital documents, some are scans from print or microfilm. Some, but especially the latter, haven’t been through OCR so they aren’t searchable. That’s not a big deal in a 1-2 page article, but in longer works it’s obnoxious. Adding OCR also exposes the text to Spotlight, OS X’s internal search.

Read More

Writing LDAP unit tests for a Moodle plugin

In 2016 Lafayette College began maintaining the LDAP Syncing Scripts (local_ldap) plugin after the tragic death of the previous maintainer, Patrick Pollet.

I didn’t know Patrick but he had a strong reputation in the Moodle community. I’m pleased to say that we made few substantive changes to his code. Most of the changes were simple updates, such as migrating the command-line/cron scripts to Moodle’s task infrastructure, and various nit-picky code standards issues which didn’t affect functionality.

PHPUnit

Read More

Remembering the Hoosier State

Today Amtrak resumes full operation of the Hoosier State, ending an 18-month experiment in which Iowa Pacific proved rolling stock and on-board services. I had an opportunity to take this unusual train in June 2016 while on a business trip to Indianapolis. What follows are my notes on the experience.

Aboard the Hoosier State

We’ve just wrapped up the CLAMP’s Hack/Doc Fest at Butler University in Indianapolis, Indiana. You can read Ken Newquist’s daily updates to see how the conference went, including all the gory details on the updated annotation in Moodle 3.1. Short version: it needs love. I’d like to talk about a most unusual aspect of the conference: Amtrak and Iowa Pacific’s Hoosier State, which runs between Chicago and Indianapolis.

Read More

The Toledo Option

Or, I reconsider the Lake Shore Limited yet again, and find a use for it.

A frequent complaint about Amtrak service is that “you can’t get there from here,” and it’s a fair criticism. As a Michigan expatriate living on the East Coast I’m sensitive to these limitations. Michigan itself has comparatively good service: three Wolverines to Detroit/Pontiac, the Blue Water to Lansing and Port Huron, and the Pere Marquette to Grand Rapids. Unfortunately for me all three services pivot on Chicago. Coming from the East Coast, I’m facing hours of layovers and backtracking.

As an alternative, Amtrak offers a Thruway Motorcoach connection at Toledo to various destinations in Michigan. Thruway Motorcoachs are contracted buses which you can book with trains to help get you closer to your final destination. I’d resisted this option for years because of the timings in Toledo and general uncertainty about the whole enterprise. After a positive experience with an Amtrak bus in Florida in 2014 and a growing desire to avoid driving on I-80, I decided to take the plunge.

Read More

Hammering Cases

Last December I went down to Philadelphia for WordCamp US 2016. Met some great people, heard some great talks, overall had a good time. Holding the after party at the Academy of Natural Sciences was a genius move.

Sitting at Lisa Yoder’s talk on Version Control Your Life: Alternate Uses For Git inspired me to try taking notes in Markdown (versioned in git) instead of Evernote. I’m trying to move away from Evernote anyway and it made perfect sense. I’m always working on the command line; I always have Typora open as scratch-space.

I ran into an immediate (and silly) snag. All the WCUS sessions are titled “This Is The Name Of My Awesome Talk”. That’s a bad filename if you’re working on the command line. Ideally I want my notes on that talk to be called “this-is-the-name-of-my-awesome-talk.md”. Manually typing all that is boring, and I’m lazy. Better way? Better way.

Read More

What I'm reading

  • John le Carré_, The Secret Pilgrim_. A semi-sequel to The Russia House, consisting of the reminisces of Ned at the end of his career. Fascinating and absorbing.
  • John R. Schindler_, Fall of the Double Eagle: The Battle for Galicia and the Demise of Austria-Hungary_. An account of the Battle of Galicia, the opening collision between Russia and Austria-Hungary in World War I. It’s always refreshing to read an account of Austria-Hungary which doesn’t place it in the shadow of the German Empire. I’m familiar with the subject but Schindler’s treatment of the ethnic issues in the military is fresh.
  • Tim Hadley_, Military Diplomacy in the Dual Alliance: German Military Attaché Reporting from Vienna, 1879–1914_. I heard Hadley give a talk on this subject at the German Studies Association conference in Pittsburgh way back in 2006. The premise is that there was a disconnect between the reporting of German military attachés in Vienna and German strategic planning. This book is the outgrowth of that talk, and I can’t wait to read it.

Nextcloud on Pi

Following on with running Nextcloud, I decided to play around with Nextcloud. This is very much a work in progress, with all my failures and blind alleys lovingly detailed. Note: some guides refer to both ownCloud and Nextcloud almost interchangeably. Nextcloud is a fork of ownCloud; technologically they’re very close. The Nextcloud desktop client is a themed fork of ownCloud’s and they’re compatible with the other’s servers.

Web application

At its core Nextcloud is a PHP application; setting those up isn’t complicated and there’s a good guide for doing so on a Raspberry Pi. I broke with it and opted for PHP 7 over for performance reasons. I used part of Andy Miller’s guide for that (ignoring the Nginx stuff) but I found I needed more PHP modules:

Read More