I’m in the midst of a plan to migrate this site to a secure server – https instead of http – and as part of that plan I need to ferret out all the embedded images that are called from non-secure hosts, so as to avoid mixed-content issues

There are 6,953 pages that make up this site — all the blog posts and “about” pages taken together. This bit of PHP code extracts all URLs of all of the images embedded in the body of all of those pages by directly querying the Drupal node table:

$query = "SELECT entity_id,body_value from field_data_body";
$result = $db7->query($query);
while($row = $result->fetch(PDO::FETCH_ASSOC)) {
  $doc = new DOMDocument();
  @$doc->loadHTML($row['body_value']);
  $imageTags = $doc->getElementsByTagName('img');
  foreach($imageTags as $tag) {
      print $tag->getAttribute('src') . "\n";
  }
}

That script identifies 4,325 images in total, ranging from the good old:

/1by1.gif

to images on hosts like Flickr:

https://farm2.staticflickr.com/1603/23977645632_c8b864d187_c.jpg

Some of these images – like 1by1.gif – are 404, and I’ll need to do some manual corrections to the HTML for those mosts; others, like that Flickr example, are perfectly fine to serve on the new secure site as they’re already hosted on a secure server (note the https in the Flickr URL). But there are a lot of images that are served from non-secure hosts that I control, like:

//ruk.ca/sites/ruk.ca/files/media.ruk.ca/email-keyboard-20160124-120123.png

For images like that, I’ll need to change the URL to either:

//media.ruk.ca/images/email-keyboard-20160124-120123.png

or

https://media.ruk.ca/images/email-keyboard-20160124-120123.png

Of the 4,325 images, 3,587 (83%) are from non-secure hosts, 244 (6%) are from secure hosts, and 494 are relative embeds with no host indicated. It breaks down like this:

  • Flickr (non-secure): 1678 images
  • Flickr (secure): 233 images
  • ruk.ca (non-secure): 1011 images
  • media.ruk.ca (non-secure): 632 images
  • Third-party hosts (non-secure): 255 images
  • Relative embeds without host: 494 images

My plan is to move all of these images to a secure server under my control and then to rewrite the embedded URLs to point there.

As an aside, one of the things I found out while I was under the hooking mucking about with the blog was that I’ve written 1,439,497 words here since 1999. That’s Catch-22 times 8 or Fahrenheit 451 times 31. If only mine were such quality words as those.

I’m hosting a Learn to OpenStreetMap table at the City of Charlottetown’s Inspired City event on February 4, 2016 from 7:00 p.m. to 10:00 p.m. at the Delta Prince Edward Hotel. It’s free, and everyone is welcome.

If you’d like to learn how to sign up for a free OpenStreetMap account, and how to use the simple web-based map editor to enhance the map of Charlottetown, please stop by. I’ll have a couple of laptops available for you to use, and lots of stories and map tips to share.

As it says here:

OpenStreetMap is a free, editable map of the whole world that is being built by volunteers largely from scratch and released with an open-content license.

The map of Charlottetown and area has been evolving over the 10 years that the OpenStreetMap project has been running, but there are still many areas of the city that could benefit from greater detail, and there are new horizons to explore — indoor mapping, 3D mapping, micromapping – that can keep us all busy for years.

You can edit OpenStreetMap from your own computer in your own home or office, and the editor is simple and well-documented enough that you don’t need a lot of experience to jump in right away.

Come and seek me out on February 4 at the Delta.

OpenStreetMap Watercolour of Charlottetown

Transit in Charlottetown on OpenStreetMap

Beach Grove Trail in OpenStreetMap

Editing the Delta Hotel in OpenStreetMap

The Delta Hotel on OpenStreetMap

A couple of years ago, just after [[Ethan]] joined our family, [[Oliver]] needed to have a tooth extracted. Ethan came with him. I just found a photo that Catherine took of Ethan and Oliver together in the dentist’s chair, a photo that had gone missing in the interim.

Ethan at the Dentist

[[Olle]] tweeted this morning:

@ruk I use yr Comment fieldset on iPhone. Email input field does not change keyboard layout to the email-positive one. Can HTML5 attrs?

What Olle means is that when he’s entering his email address in the comment form on a post here, he would like the HTML for the email field to have a “type” of “email,” as documented here:

A field for editing an e-mail address. The input value is validated to contain either the empty string or a single valid e-mail address before submitting. 

In other words,the HTML for the email field right now looks like this:

<input type="text" 
       id="edit-mail" 
       name="mail" 
       value="" size="30" 
       maxlength="64" 
       class="form-text required">  

and this results in the iOS keyboard, when focused on this field, looking generic, like this:

iOS Keyboard not in "email address mode"

This isn’t the special “enter an email address” keyboard that would have handier access to the “@” sign, and that would work to ensure that what was entered was, in fact, a valid email address.

How to make this work in Drupal 7?

I installed the Elements module, which defines a new emailfield field type for the Drupal Forms API.

Then in my theme’s template.php I altered the comment form:

function at_ruk_form_comment_form_alter(&$form) {
  $form['author']['mail']['#type'] = 'emailfield';
}

That has the effect of modifying the Drupal comment field HTML to look like this instead:

<input type="email" 
       id="edit-mail" 
       name="mail" 
       value="" 
       size="28" 
       maxlength="64" 
       class="form-text form-email required">

which has the desired effect of rendering an email-address-specific keyboard in the iOS brower:

iOS Keyboard in "email address" mode

Note that handy access to the “@” symbol and the period beside the spacebar.

The effect is similarly positive on the Chrome browser on Android devices:

Email keyboard on Android Chrome.

Thanks to Olle for the inspiration to do this.

My first issue of Cartographica arrived in the mail this week and I was thrilled to see that the cover is an OpenStreetMap of Munich using the Stamen Watercolor tiles, with a Creative Commons license attached. Lovely on so many levels.

YouTube Recommends

Two years ago [[Ethan]], Oliver’s autism assistance dog, joined our family: he and Oliver met each other for the first time in March of 2014, following 10 days of training for Catherine and I at Lions Foundation Dog Guides facility in Oakville, Ontario.

Here’s a photo of their first meeting:

Ethan Meets Oliver

The general plan for new autism assistance dogs working for school-age children is that they spend 6 months to a year with their new client before they start going to school. This time allows for a bond to develop between dog and child, allows the dog to be comfortable with the child and the child with the dog, and ensures that the transition to the complexities of school life will be smooth and positive.

For many logistical reasons beyond our collective control, this transition to school happened a little later in Oliver and Ethan’s case: almost two years from the date Ethan came home with us from Ontario he went to school with Oliver for the first time this week.

We’d been keeping the school up to date on our plans for Ethan and Oliver since Oliver was accepted to receive a dog guide in the winter of 2014, and everyone in the school community was open to the idea and to working with us to make it happen. In the months since then the English Language School Board developed a Service Dog Policy (which we’re quite happy with) and we kept Oliver’s teachers and educational assistants in the loop as we moved closer to the introduction of Ethan to the classroom.

In December of last year we had confirmation from Dog Guides that Tara, Ethan’s original trainer, was available to come to Prince Edward Island this week to help introduce Ethan to the school. And on Wednesday morning Tara arrived.

This is how the week went from there.

We woke up on Wednesday morning at 6:30 a.m. as we usually do. Ethan came into our room and climbed up on the bed, ignorant of the excitement and change to come:

Ethan Starts his Wednesday

I drove Oliver to school, leaving Ethan at home, and then hurried back.

Just after 9:00 a.m., Tara knocked at the door. Ethan’s recognition of Tara was immediate and obvious, and it was all he could do to keep within the bounds of acceptable service dog behaviour when she came in and sat down.  

We spent a few hours reviewing things with Tara, telling her about our adventures with Ethan, about Ethan’s bond with Oliver, and about some of the things we’re apprehensive about. She gave us a briefing on what to expect for the rest of the week.

Just before 11:00 a.m. Tara followed us to the school and we sat down for a meeting with the Principal, Vice-Principal, Autism Consultant from the English Language School Board, Resource Teacher and Oliver’s classroom teacher, along with the Principal and Resource Teacher from Colonel Gray High School, where Oliver will be next year.

We had a positive, wide-ranging conversation covering everything from Ethan’s role as an autism assistance dog to who would pick up the dog poop should the need arise. The two years of discussions we’d been having with everyone paid off here, as all were already on board and ready for Ethan’s introduction; most of what we discussed was the logistics for a smooth transition.

After a break for lunch, Oliver joined Catherine and I, his educational assistants and homeroom teacher, along with Tara, in the unused classroom that’s been set to be a home for Ethan’s crate (where he’ll go when, for one reason or another, he needs to be apart from Oliver; gym class, for example) for a crash course in service dog handling.

Ethan's Home away from Home

Oliver has the benefit of some fantastic, open minded, generous educational assistants and teachers at Birchwood, and they gamely jumped into the training process with both feet, learning the basic commands Ethan responds to – stay, down, leave it, forward, wait – and practicing walking around the classroom and the hallways with Ethan. Lots of questions were asked, and all were answered. You could see the collective comfort level grow by the minute.

The school day was over by the time training was over, and it was time for Oliver and Ethan to jump into the deep end together: they headed off to Minecraft Club, where I found them an hour later when I returned with a mat for Ethan:

Ethan's First Day of School

Ethan did exactly what he was supposed to do, sitting patiently at Oliver’s side as his time in Minecraft Club continued on as it ever was.

On Thursday morning Tara showed up at our doorstep just before 8:00 a.m. to walk to Birchwood with Oliver and I. When we arrived at the school I handed over Ethan to one of Oliver’s educational assistants, turned around and walked home.

By myself. For the first time in a long, long time.

It wasn’t until that moment that it hit me that this was all happening, and that my daily routine – drop Oliver at school, walk to my office with Ethan, hand Ethan over to Catherine at the noon hour – was done, and that I was going to be making a cold, lonely walk to the office from then on (I may have to get myself a dog!).

Catherine and I returned to the school just before 10:00 a.m. for a school-wide assembly hosted by Tara. She showed a DVD introducing the Dog Guides program and then went over the rules about Ethan in the school for students and staff:

  1. Don’t call Ethan by name, or try to get his attention.
  2. Don’t feed Ethan.
  3. Don’t pet Ethan.

These rules are designed to keep Ethan safe, and to ensure that his sole focus is Oliver.

The assembly was an emotional time for me too, both because the DVD reminded me how powerful dog guides can be for all their clients, regardless of the program they’re in, and also because I got to see the community of students and teachers that Ethan will be immersed in, gathered all at once, and to witness their attention to the proceedings and their helpful questions for Tara (if you’re sharp you’ll be able to spot both Ethan and Oliver, apart for the moment, in this photo):

Ethan's Assembly

At the end of the assembly the students repaired to their period 4 classes, Oliver and Ethan with them, and Ethan’s life at the school formally began.

We returned to the office for a brief follow-up, a final review of the Service Dog Management Plan, and for thanks and goodbyes.

And then Catherine and I got in the car and drove home, Ethanless, confident that everything was going according to plan.

This morning, Friday, Oliver and Ethan and I walked to school as we usually do, I handed Ethan over to another of Oliver’s educational assistants, and Tara spent a last morning shadowing them to make sure everything was working. Our new routine becomes routine.

At the end of this week I’m more convinced than ever of the valuable contribution to Oliver’s well-being and education that Ethan is going to play at school, more impressed than ever at the professionalism and thoroughness of Dog Guides’ programs and trainers, more grateful than even to Lions Foundation and Lions clubs across the country for supporting Dog Guides, and more satisfied than ever that Oliver’s attending school in a community of flexible, caring, dedicated educators.

Thank you to everyone who helped to make this happen.

Back in December, the Green Party released its Office of the Third Party expenses for the first two quarters, and asked for feedback about the format and presentation, which I was happy to provide.

The expenses for the third quarter have now been released by the office, and I’m happy to report that they have incorporated all of my feedback into this release:

  1. The format of the CSV version of the expenses data is much more amenable to data analysis as it’s been structured to be machine-readable spreadsheet, not human-readable.
  2. Abbreviations and short forms have largely been eliminated from the descriptions of expenses: there are now descriptions like “Visual Studios Creative Digital Media: Video production for Well-Being Measurement Act = invoice #1493” which are descriptive and helpful, not cryptic and inside-baseball.
  3. The expense reports are now hosted on the Legislative Assembly website where they stand a much better chance of being permanently archived.

The party deserves recognition not only for continuing to release its expenses regularly and openly, but also for both asking for feedback and acting on it.

After all, when’s the last time you saw a political party include an honest “PEI Liquor Control Commission: Box of wine” on its expense reports!

I’ve thrown my hat into the ring for a Bodleian Libraries project to memorialize the 400th anniversary of Shakespeare’s death by having his 154 sonnets hand-printed by printers the world over.

I’ve requested Sonnet Nº 55 and I’m awaiting confirmation that it’s not otherwise spoken for. Once I get the go-ahead, I’ll have until September 30, 2016 to design, set and print the sonnet. There’s considerable flexibility offered: postage stage up to poster size, tweeted the organizers.

The process of selecting a sonnet led me to the 2002 album When Love Speaks, where Sonnet Nº 55 was read by the late actor Richard Briers.

I found the album on Spotify, and was excited to see that Sonnet Nº 145 was contributed by Mississippi John Hurt:

Spotify Screen Shot

When I pressed “play,” however, the voice that came out of my headphones sounded suspiciously not like one would expect the Yoda of the Blues to sound like.

A metadata issue, it turns out: further research revealed John Hurt, no-Mississippi, as the reader.

While no-Mississippi John Hurt did an excellent job on Nº 145, I’d give anything to hear a rendition by the with-Mississippi John Hurt​.

Sonnet 55

The first two stanzas of Sonnet Nº 55 from here.
Creative Commons Attribution-Share Alike 4.0 International license.

For the five years, 1995 to 2000, that [[Catherine]] and I lived on the Kingston Road, Clow’s Red & White in Hampshire was our lifeline. Bobby and Verna and Norman and their staff were a daily part of our lives. 

The store is still there – one of the last few rural general stores left on the Island – and I make a point of gassing up my car there whenever I’m in the area. Even though I haven’t lived nearby for 15 years, and am only in the door once or twice a year, they still call me by name at the cash.

Coming up on Saturday, February 6th, from 1:30 p.m. to 3:30 p.m., Verna Clow will present “The History of Clow’s Store” at the Riverview Community Centre in Clyde River as part of the Clyde River Lectures for 2016:

Country stores were an important part of the fabric within Island communities over the years. Many did not survive, but Clow’s Store in Hampshire is still thriving. Verna will talk about the history of their store from the early days when Albert Clow first founded it. Her presentation will include photos of the store over the years and how they changed with the times while maintaining strong customer loyalty. She will share some of her favourite stories.

The inclusion of Hampshire in the Clyde River Lectures is part of a broadening for this year:

…this year, we decided to go a little beyond the boundaries of Clyde River and move up Hampshire and Emyvale way and down to North River. It only makes sense considering how closely knit our communities have been over the years. Just check any of your ancestors’ diaries and inevitably you will find that they were visiting some sort of relations in those communities. Their visits could very well have been documented in The Guardian under “Clyde River Notes.”

It promises to be an interesting talk by Verna; I’ll be there and I encourage you to attend as well. There is promise of “warm hospitality with coffee/tea and homemade treats along with tours of our large collection of artifacts and photos highlighting the history of the community,” which makes it simply too good an opportunity to refuse.

As proof-positive of the suggestion that Clyde River Notes was a repository that in part documents the connections between the community and those, like Kingston and Hampshire, that are nearby, here’s a snippet from the April 10, 1929 edition of The Guardian:

Clyde River Notes from April 10, 1929 in The Guardian

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 /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, 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, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search