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

Raspberry Plex

I’ve been running Plex on a Synology NAS for the last year, with a Google Chromecast handling display. It’s worked well enough, but my DS 216 struggles at times to keep up with the movie (I’m not transcoding; that would never work). I decided to get into the Raspberry Pi game and build a Plex server on it, while keeping my media on the NAS. These are my notes on setup.

Image

I’m comfortable in Debian so I started with a stock Raspbian image on a 32 GB SD card. I used Etcher on OSX for this and didn’t encounter problems. I’d say it took 8-10 minutes.

Read More

The LaGuardia-Newark Shuffle

Due to circumstances beyond my control I found myself on a flight to LaGuardia (LGA) the other day, but needing to get back to Newark Liberty (EWR) to retrieve my car. LGA was terra incognita to me but I knew that crossing Manhattan via to reach New Jersey is a fool’s errand. I decided against the various van shuttles and used public transport. The only thing I knew about LGA going in is that it has no direct subway service, although it has been proposed. In the end, I used a combination of a bus, a subway, a train, and a people mover. On a good day it’ll take you an hour and 45 minutes and cost $15.

Bus

A Q70 Select Bus Service under the 61st Street–Woodside subway station in Woodside, Queens. Image by Tdorante10 (Own work) CC BY-SA 4.0, via Wikimedia Commons

Read More

Writing a Zotero translator

Sometimes I joke that I do web development to support my railfanning habit. It’s not entirely true, but it’s always pleasant when the two intersect.

I’m a Trains subscriber. Trains is a monthly publication which serves both those who actually work in the railroad industry and enthusiasts (railfans) like me. Beyond the monthly print publication (which I get electronically, but never mind), Trains publishes a daily news feed called News Wire. There’s lots of good information here on the various comings and goings in the industry, though US-centric.

I use Zotero to index information for research projects–mostly railroading, but other topics as well. There’s an extension for Chrome, Zotero Connector, which lets you import web content directly into Zotero, saving a lot of manual entry. Many publications like The Atlantic and The Washington Post are natively supported. When one isn’t, Zotero makes a best guess based on page structure and metadata. How well that works depends on how well-formed the page here.

Read More

Quick note on agent forwarding with Docker

I’ve been building a CI/deployment stack with GitLab CI, Docker, and Capistrano. I’m hoping to give a talk on this in the near future, but I wanted to add a brief note on a problem I solved using SSH agent forwarding in Docker in case anyone else runs into it.

In brief, I have code flowing like this:

  1. Push from local development environment to GitLab
  2. GitLab CI spins up a Docker container running Capistrano
  3. Capistrano deploys code to my staging environment via SSH

Read More

The Changelog Is A Lie

Today at WordCamp Lancaster Ryan Duff gave a talk on “Choosing WordPress Themes And Plugins: A Guide To Making Good Decisions.” It jogged my mind about an incident on the WordPress.org plugins database I observed last year. This incident, though minor, illustrates the significant limitations with that place.

Two years ago–to the day–I called the WordPress.org plugins database a swamp and I stand by that. Ryan noted that there’s no canonical right way to select plugins and themes. You have to mitigate risk as much as possible. That means you have to look at a plugin in the round. WordPress.org gives you some tools for that: ratings, reviews, installation base, support forums. You can evaluate the social credit of the developer. You can review the code yourself, if you’re so inclined and have the technical background.

Here at Lafayette we use a plugin called Category Posts Widget. It’s pretty simple: it creates a widget which will display recent posts from a given category. Its original author released version 3.3 in August 2011 and then never updated it again. We’d been running it since 2010 or earlier. If we’d stumbled on it 2013 we’d have seen it was outdated and passed, but if a plugin keeps working you never really notice it’s been abandoned unless you have a regular review process (which we don’t).

Read More

Gulp, it's Code-Checker!

Code-Checker is a tool distributed by Moodle HQ which lets you validate code against core coding standards. You install it as a local plugin in a development environment and run it against specified files. It then spits out all kinds of nit-picky errors:

  • #76: ····page\_heading();·?>

  • This comment is 67% valid code; is this commented out code?

  • Inline comments must start with a capital letter, digit or 3-dots sequence

  • Inline comments must end in full-stops, exclamation marks, or question marks

Read More

Wait, let me finish!

This summer we have our student worker building out a set of Behat tests for our WordPress environment. We’ve started with smoke tests. For example, on www.lafayette.edu we’re looking at the following:

  • Are there news items? If so, do the links to those items work?
  • Are there calendar events? If so, do the links to the events works?
  • Does the “Offices & Resources” drop-down function? Do the links in that drop-down work?

That’s a short list of tests but it covers a lot of ground:

Read More

The Monkey Hustle

I first saw Monkey Hustle at the 2004 B-Fest and I enjoyed more than any other blaxploitation film I’ve seen since, there or elsewhere. It holds a 4.8 on IMDb as of writing and was panned on its release. I’m here to tell you that it’s a good film and the critics be damned.

In a nutshell, Monkey Hustle is about various characters in a Chicago neighborhood, their interactions, and the looming threat of a new expressway (tapping in to the freeway revolts of the 1960s and 1970s). Monkey Hustle’s detractors argue that the plot, such as it is, doesn’t hang together and that most of the scenes don’t relate to each other and make little sense. This is all nonsense. What we’ve got here is a film loaded with subtext, with characters who don’t know they’re in a movie and don’t feel a need to explain themselves.

Look at Daddy Fox (Yaphet Kotto) and Goldie (Rudy Ray Moore). No one tells the audience that, though rivals, they go way back and that Fox has some kind of claim over Goldie. We get that from their interactions. In the climax of the film Fox and Goldie use their connections to divert the neighborhood-threatening expressway. A lesser film would have told us some pointless story about how Goldie saved the alderman’s life (alluded to) or how the alderman owed Fox some favor. In the Monkey Hustle, it’s sufficient that they exercised their influence. Look at the melancholy expression on Goldie’s face at the block party–it cost him something to make this happen.

Read More