Blogging

Glom of nit

Oliver Brown
— This upcoming video may not be available to view yet.
As an Amazon Associate I earn from qualifying purchases. See here for more information.

I have four blogs running the same theme that each feature a letter as the favicon. I hoped they would spell out a word.

glom

This is of course the motto of the Ankh-Morpork Post Office.

Neither rain nor snow nor gl om of ni t can stay these mes engers abo t their duty.

If you’d like to more consider Going Postal by Terry Pratchett.

Importing old posts from my first blog

Oliver Brown
— This upcoming video may not be available to view yet.

I have now imported posts from my very first blog, which was in fact the very first content I hosted on OliverBrown.me.uk.

It is almost entirely personal content with evidence of some of my early attempts to make money online.

As with the LiveJournal content, it is available in its own section I decided to call phpdiary. I didn’t really give it a name at the time but it was implemented as a bunch plain text files for each post rendered with a PHP script called diary.php.

Somewhat awkwardly the posts did not have titles and Hugo (or at least this theme) does not work well without them. So they are titled after the date of the post (and often the time since I tended to post several times a day).

I don’t think I have any more older posts to add, so it seems this post from December 2003 will stay my oldest post, meaning I now have over 20 years of content.

Importing old posts from LiveJournal

Oliver Brown
— This upcoming video may not be available to view yet.

Before I hosted my own content in various forms, I maintained a LiveJournal which is still available at https://galaxiaguy.livejournal.com (although I warn you, when I looked at it today it was full of Russian Bitcoin related ads).

I have finally imported the missing posts from this.

There weren’t many so I just did it manually. I even went to the effort of updating my theme to include “mood” and “music” in my post front matter and it add it to theme (these were very important to LiveJournal back in the day).

The posts are all part of the normal flow (and currently start around page 56). There is a bit of duplicated content as I posted some content to both places for a few days. Either way, the imported content is available in isolation in the LiveJournal section.

One interesting consequence is I have changed the copyright start year for the blog from “2005” to 2004".

Fixing some blank posts

Oliver Brown
— This upcoming video may not be available to view yet.

My blog has been through a lot. At some point I may try and make a coherent timeline, if only for my own benefit.

Content has been migrated from platform to platform, and format to format. Some of it got broken along the way. This resulted in some of the posts just being blank. I finally went back and found them all and manually reinstated the content.

I doubt this will be of any interest to anyone except me or people who know me, but it may be nostalgic for anyone else who was doing web development in 2005.

Personally, my writing style from back then makes me uncomfortable, and it is not helped by the fact I’ve left some of my spelling errors intact.

Date Post
2005-04-14 It’s-a me!
2005-04-15 Reborn progress
2005-04-19 Exams soon…
2005-04-22 Should Galaxia use Ajax?
2005-04-22 Upcoming features for XHTML friends
2005-04-25 Silly .htaccess
2005-04-28 Agregating me in XHTML Friends
2005-05-08 Objects
2005-05-09 XHTML Friends is now about people
2005-05-09 Things you notice
2005-05-25 Gary Lineker in bad taste?
2005-05-18 Odd PHP problem
2005-06-05 Proof of the existence of Albinaaaaaaaghs
2006-05-05 Explaining the Matrix

Added Wayback Machine links

Oliver Brown
— This upcoming video may not be available to view yet.

After realising that I’ve been blogging for nearly 19 years, and that I have lot of old content with many broken links, I decided to add support for Wayback Machine links.

The Wayback Machine (part of the Internet Archive) archives web pages for posterity, and importantly, tries to archive many versions over time.

At the bottom of each my posts is now a section that links to the archived version of the page, as of the date of the post. This will attempt to show the latest archived version of the page before that date.

In practice many pages did not get archived, or the archived version may not contain the exact content on the day I wrote the post, but it is better than nothing.

To keep this service alive (along with other activities of the Internet Archive), please consider donating.

Migrated another site from WordPress to Hugo and Azure Static Web Apps

Oliver Brown
— This upcoming video may not be available to view yet.

Some time ago I migrated my blog from WordPress (hosted on WordPress.com) to Hugo (hosted on Azure Static Web Apps). Over the past week I did the same for my wife’s blog.

The process went well. The Hugo site has pretty good docs for migrating to Hugo from various other platforms. The exact steps I took were:

  1. Export content from Wordpress.
  2. Generate Hugo content from the export using blog2md.
  3. Upload to GitHub.
  4. Create an Azure Static Web app (which as detailed before creates a build pipeline and deploys to an autogenerated Azure domain).
  5. Browse the site and fix any broken content.
  6. Add any custom functionality desired to the theme files.
  7. Update the domain to point at the Azure instance.

The new blog is available at www.luliriisi.me.uk (the original is still available at luliriisi.wordpress.com).

Sharing themes

That “custom functionality” is of course optional, and a potential rabbit hole depending on your exact needs. In the case of my wife’s blog, because she is a hand-knitting pattern designer I added some templating for sharing her patterns easily.

And, because the core theme is shared with this blog (and Games with Gravitas), that functionality is also available here - which is why I can easily add one of her patterns to this post.

New site for my music YouTube channel

Oliver Brown
— This upcoming video may not be available to view yet.

I created a new website to go with the music visualization YouTube channel I launched.

There is not much content there yet, besides details of everything that is on the channel. But those details are probably the most interesting part.

I created a tool using the YouTube data API that generates Hugo content based on the channel.

The process started simple and got more sophisticated over a few days. First I generate a page for each video. Then I get a list of all the channel playlists, and add a tag to each video page for each playlist. I also create a page for the tag that links to the actual YouTube playlist. Finally, for each video I parse the description adding YouTube chapter links where appropriate.

It highlights another interesting advantage of static site generators. It is really easy to create content with external tools. You don’t need to access any kind of API, you just generate text files.

Interacting with this video is done so under the Terms of Service of YouTube
View this video directly on YouTube

Blog moved to Hugo

Oliver Brown
— This upcoming video may not be available to view yet.

After spending most of its time on Wordpress (initially a self-hosted version and then Wordpress.com), the blog is now a static site generated with Hugo and running as an Azure Static Web App.

Ever since I created the Tic-tac-toe Collection site on Hugo I’ve wanted to move the blog, but I never had the time. The recent events related to COVID-19 have, however, given me random bits of free time, so here we are.

Tic-tac-toe Collection is being run as a static website on Azure Blob Storage, which is a way of connecting various bits of Azure together to host a static site. The new Azure Static Web App Service joins them all for you in a much more straightforward fashion.

Under ideal circumstances, the minimal steps to set up a static web app are:

  • Upload your site to Github.
  • Create a new Static Web App pointing at your Github.

And, if you’re lucky, that’s it. It generates a GitHub action for you that does the actual building, and it’s based on Microsoft Oryx. Oryx is a slightly magical, slightly scary tool designed to auto-detect and then build static web apps using a range of different technologies.

Unfortunately, for me, the auto generated Hugo script did not actually work. I ultimately used the GitHub action from here.

It's alive

Oliver Brown
— This upcoming video may not be available to view yet.

After languishing on a badly maintained Amazon EC2 instance for so long, I’ve finally made an effort to resurrect this blog and moved to Wordpress.com.

Moved to Amazon EC2

Oliver Brown
— This upcoming video may not be available to view yet.

I’ve just moved the blog over to Amazon EC2 and so far everything seems to be going well. I’d been considering the move for a while and a new feature (well I’m not sure how new it is but I only just noticed it) is a new smaller instance type.

The virtual servers Amazon offer used to come in three sizes, small medium and large starting at $0.10*. Pretty quickly they added some bigger sizes (going all the way up to $2.00 per hour for quadruple extra large) as well as some more specialized types like GPU clusters. But it still meant the minimum price per month for a server always on was about $74/month which is expensive for simple web hosting. Now however, their new micro instances are available at a pretty cool $0.02/hour (about $15 a month). For the performance you’re likely to get it’s still probably not the most cost effective solution for plain web hosting, but for having complete access to a server with high availability (and the extra features hosting on Amazon’s infrastructure provides like being able to clone a whole server with one click) it’s pretty good. One final note is to remember that these numbers are not the final costs you’ll have to pay. You still pay for storage and data transfer which in my case look like they’ll be about an extra 10% extra.

Since then the price of the small instance has come down to $0.085/hour or about $63/month.