The time between Christmas and New Year’s Day, it seems from our experience, is always filled with the unexpected.

Last year it was my father-in-law taking a tumble on a Charlottetown sidewalk and breaking both his wrists (something he only learned after 24 hours of living with them thinking it was just a sprain).

This year has been no exception.

Monday night it was Ethan’s turn to be the unexpected.

After a perfectly normal day, he woke up in a state after midnight, barking and whining and clearly needing to go out.

Catherine got up first. I got up second, about half an hour later. And then Catherine, bless her soul, got up for times number three, four, five, six and seven.

Over the course of the overnight hours Ethan managed to poop and barf out everything in his digestive system and, come daylight, both he and Catherine were exhausted and lethargic.

We made an appointment with the vet and at 3:00 p.m. we bundled Ethan in the car for the ride uptown (the beneficiary of our new snow-plowing contract, thanks to the Herculean plow-finding efforts of our neighbour).

After some poking and prodding and temperature-taking, our personable and capable vet surmised Ethan had fallen victim to a gastrointestinal virus. He was given some subcutaneous fluids (giving him a short-lived watery hunchback), and we took home some anti-diarrheal medication, and some stomach-friendly tinned food.

I’m happy to report that today the spring appears to be back in his step and he seems to be on the mend.

The week wasn’t over with us yet, though.

Despite my best efforts to clear all snow from our roof as soon as it falls – recall my experiences with this genre last year, which are a great motivator to early-action – on Tuesday night Oliver reported hearing a drip-drip-drip in his room and, upon investigation, I found that, indeed, water was coming into the window cavity on the back of the house.

I did what best I could to remedy the situation, lining the windowsill with towels and buckets; and left things for the night.

Other than a bucket’s worth of water gathered (in a bucket, fortunately) this morning, things seem to have subsided.

I will continue my regular roof-raking (it’s become oddly theraputic), but I fear we haven’t seen the last of Old Man Water this season.

(If we’re chatting next summer and I happen to say anything like “oh, it wasn’t so bad; we can wait another year to fix the roof,” please refer me to this blog post).

The week isn’t over yet; I’m hoping the worst is over.

IMG_20151228_135434688

🗓️

Here’s a little holiday project I tried to spin on Twitter: in the days leading up to New Year’s Eve, when you’re in a position to tip your server, tip them a percentage equal to the day. 21% on December 21, for example, leading up to 31% on New Year’s Eve. Servers work hard, and they work especially hard during the holidays; it’s not a huge difference to your bill, but if everyone got on board, it could mean a helpful difference to their collective take-home.

Tip The Day: December 21 Tip The Day: December 22 Tip The Day: December 23 Tip The Day: December 24
🗓️
Christmas  •  Money

Catherine and I arrived on Prince Edward Island in the spring of 1993; our first Christmas Eve here was that December.

We opted not to travel back to family in Ontario for the holidays; thus left to our own devices, we were childless, had no family and few friends here, and were only in the very early stages of acclimation to the Island way of life.

I imagined that we could spend Christmas Eve having a nice meal out followed by a movie.

What I didn’t factor in is that Prince Edward Island shuts down completely about 4:00 p.m. on Christmas Eve, and so not only could we not go to the movies, but there was not a single restaurant open for as far as the eye could see.

And, of course, we’d nothing in the pantry.

What were we thinking?

(I should add here that all references to “we” should more honestly be attributed to “me,” as Catherine’s head is screwed on much more tightly than mine, and it’s likely as not that our errors in this regard were entirely due to me.)

What were we to do?

Improvising, we headed down the street to the CP Hotel (now the Delta) and booked ourselves a room for the night.

It turns out that even the hotel’s restaurants had the night off, so all thoughts of room service were out and we were left to forage supper from the vending machines. Fortunately we had plenty of pocket change.

We spent Christmas Eve eating potato chips and chocolate bars and watching cable TV – a novelty for us at the time, as we only had rabbit ears in our apartment.

These days we’re much farther along the road to Island acclimation — halfway, perhaps? – and we know full-well that we need to not only arrange for all meals well in advance of the Island-wide shutdown, but that we also need to stock up on milk, eggs, coffee and entertaining diversions.

Our pantry is full this year. And we have tickets booked for the 6:20 showing of Star Wars (the last show of the night). We have dog food.

We’re set.

But we’ll always hold that first Christmas on the Island dear.

🗓️

For future reference, mostly my own.

I was given a disk with almost 100 PDF files containing form data that I wanted to be able to analyze. Every one of the PDFs had an “owner password” assigned – a password I wasn’t given – that prevented copy-and-paste and various other automated things I might wish to do to the files.

I hasten to add that I have permission to  use the PDF files, they were given to me specifically for this purpose, and the presence of the password is an inconvenient bureaucratic hurdle; I’m not trying to “crack” anything I’m not supposed to have access to.

To work around this, I did the following:

  1. Found the password using pdfcrack. The password turned out to be a common dictionary word, so using a word list like those found here allowed me to find the password in a few seconds.
  2. Removed the password from the PDF files using qpdf along with this helpful shell script.
  3. Using pdftk I extracted the form data from the files like this:
for file in *.pdf; do
    set -e
    echo "Dumping $file"
    pdftk "$file" dump_data_fields_utf8 > "text/$file.txt"
done

What I ended up with was a folder filled with text files with the data that had been entered into each of the PDF files. Now I can load that up into a spreadsheet or database for analysis.

🗓️
🗓️
Premier  •  Prince Edward Island  •  Open Data  •  Food

While we’re talking about Tryon and roads, I note for the record that the Tryon highway realignment plays in role in how I came to acquire my Golding Jobber № 8 printing press.

The former owners of the press were Bill and Gertie Campbell of Campbell’s Printing. The press was housed in their print shop, out in back of their house in Tryon, a house and shop that were scheduled for demolition because the Branch Road and the Tryon Mill Road were to be rejigged as part of the larger process.

You can see the former location of their print shop in the Google Satellite view below, with the current, up to date, Google Maps road map overlaid. If you drive through Tryon today you’ll notice that neither house nor shop is there any longer.

Tryon in Google Satellite Map

Here’s a photo I took on the day the press started its trip to town, showing the shop that’s no longer there, with Bill in the background (you can read the whole story here):

Golding Jobber Move

🗓️

I’ve been spending time this fall volunteering with Bryson Guptill and his team at Island Trails to improve the representation of hiking trails on Prince Edward Island in OpenStreetMap (here’s a list of relations I’ve been working on, and you can see the results of my labours in maps like this one of the Bonshaw Trails).  

As part of this work I sought an updated map of the Confederation Trail that’s more up to date than the 2010 version on the province’s website. My man in the Department of Transportation noted, when he was preparing this for me, that OpenStreetMap didn’t include the realignment of the Tryon section of the Trans Canada Highway that was constructed over the last couple of years, and he helpfully sent along a GIS file of the change. Reasoning that this will eventually make its way to the National Road Network, which is licensed for incorporation into OpenStreetMap, I incorporated the changes into the highway.

Here’s a GIF animation showing the changes, which I’ve found helpful in visualizing what’s happened there:

Animation of Tryon Trans Canada Highway realignment.

🗓️

Longtime readers will recall that, for as long as either of us can remember, Oliver and I have been going to the Charlottetown Farmer’s Market on Saturday mornings.

I first wrote about this back in 2005, when Oliver was 5 years old; I know, from evidence like this TV commercial from 2001, that we’ve been going for longer than that – on and off for 14 years and, I suspect, almost every Saturday for more than a decade.

There’s this CBC Land & Sea documentary, to add to the pile of evidence; around 19:05 in, you’ll find Oliver and I, sitting in the same place we sit every week, enjoying our smoked salmon bagels:

Animated GIF from CBC Land & Sea documentary.

Of course these days we have Ethan in tow, so our footprint is a little wider and more complicated to maneuver, as you can see in this photo taken this summer by my friend Julie:

Me, Oliver and Ethan, at the Charlottetown Farmers Market, taken by my friend Julie.

While we’ve varied our routine over the years, the inviolable stop on our weekly schedule is at the Medallion Smoked Salmon booth. For years it was Kim Dormaar behind the counter; for the last couple of years it’s been Ross Munro, who acquired the business from Kim. Our stop is inviolable as is our bagel order, which always takes new staff some time to commit to memory: two bagels, both with no onions, one with no lemon. Oliver doesn’t like lemon.

In the early days of our stop for smoked salmon, Oliver wasn’t tall enough to see over the counter, so I would, with the help and permission of Garth Taylor from the Taylor’s Taters booth next door, hop up on their potato shelf so he could see what was going on. Medallion is moving its booth after Christmas – across the market to the corner occupied by Avondale Meadows Farm, which it’s switching spots with – and so I thought it a good idea to snap a photo of Oliver at the old place one last time:

Oliver at the Smoked Salmon Booth

And although we’ll continue to buy our carrots and potatoes from Garth and Peggy, it seemed like a good day to get a picture of them and Oliver together too:

IMG_20151219_103311340‘

🗓️

For the last several months I’ve been working on printing a set of Prince Edward Island Terms of Union cards on my letterpress.

There are 18 cards in the set, each one summarizing a point in the 1873 agreement that saw PEI joining Canadian Confederation.

I’m now selling a limited quantity of the sets, each inside a custom-printed envelope, in my Etsy shop for $20 a set.

If you’d rather purchase for local pickup, I’m happy to arrange this directly; just drop me a line.

IMG_20151212_165022975

Island in Chase

IMG_20151119_161847181

The Lighthouses

🗓️

I’ve been using Bitly.com as a URL-shortening service for many years, mostly via IFTTT in a recipe that automatically tweets my blog posts here and post links to them on Facebook.

I took advantage of Bitly’s ability to configure a custom URL (they call it a “branded short domain”) to have my short links rendered under the l.ruk.ca subdomain rather than under bit.ly, something I did to allow me to repatriate the links under a system of my own control if something ever went wrong on Bitly’s end.

Recently I started to notice that my Bitly-hosted short links were showing up in a Google Search for site:ruk.ca and that made me uncomfortable, as, even though I’d been linking to whatever the destination of the link was at some time, I didn’t want the world, via Google, to think that the destinations were sites under my control.

I might post a link somewhere to the Republican Party, for example, and Bitly might give me a short URL like http://l.ruk.ca/1Y5vFet and then Google might index that and display it in search results. 

That felt creepy.

And so it was time to repatriate.

I found, to my surprise, that Bitly makes no provision, via its website, for exporting all the links I’ve shortened with it – I expected, but, alas, did not find a “export all my data” feature on bitly.com.

Fortunately Bitly does have an API that allowed me to do that export myself with a little coding.

I tracked down a handy Python script, py-bitly-exporter, to do the heavy lifting. I had to tweak the code a little to slow the export down, as I kept bumping into Bitly’s rate limit. To do this I inserted this in the head of the script:

from time import sleep

and this in the body of the script, inside the “while offset <= result_count:” loop:

sleep(0.3)

That slowed things down enough that I could export the 17,000+ links without hitting the limit.

The result was a file called links.csv that contained all my Bitly links, in comma-delimited form, like this:

http://l.ruk.ca/1OmlkZ7,"",http://ruk.ca/content/terms-union
http://l.ruk.ca/1QQHiWz,"",http://ruk.ca/content/five-islands
http://l.ruk.ca/1MQgW5h,"",http://ruk.ca/content/reinvented-vinyl

Once I had the links exported, I created a new Drupal site, installed the ShURLy module, and imported my exported data into the Drupal table shurly, putting in dummy values for fields like created and last_used, ending up with a table like this:

The shurly table in Drupal after the data import from Bitly.

With that done and everything working as it should, I simply changed the DNS for the domain l.ruk.ca to point to my new Drupal site and, when I’m logged in, I can create new short URLs via a bookmarklet in my browser toolbar:

The ShURLy UI in Drupal

I’m missing all the Bitly razzmatazz with the migration — all the graphs and charts and other reports — but I never used the information anyway. The only thing I miss now is that Bitly support is burned into products like IFTTT and TweetDeck and these services don’t support roll-your-own link shorteners; so I’ll need to leave them to their own devices to shorten URLs as they like. At least the shortened URLs will no longer live under my domain.

To complete the process I added all manner of “no Google, not index this site nor the links on it” verbiage to the repatriated l.ruk.ca site so that, presumably, over time the links in Google’s search results will wither away and die.

🗓️
Bitly  •  Drupal

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /now, look at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, see things I’ve favourited elsewhere, or get in touch (peter@rukavina.net is the quickest way).

I have been writing here since May 1999: you can explore the 25+ years of blog posts in the archive.

You can subscribe to an RSS feed of posts, an RSS feed of comments, an RSS feed of favourites elsewhere, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email. I also publish an OPML blogroll.

Instagram • YouTube • Vimeo • ORCID • OpenStreetMap • Internet Archive • PEI.art • Drupal • Github.