Aug
30
Play a Sound in Automator
Filed Under System Administration, Software Development, Computers & Tech on August 30, 2014 | 5 Comments
In a recent Chit Chat Across the Pond segment on episode 484 of the Nosillacast Mac Podcast myself and Allison walked through the process of creating an automator action for generating secure memorable passwords with the XKPasswd 2 perl module (we basically walked through the steps in this blog post). During that discussion Allison mentioned it would nice if Automator could play a sound when it was finished so you could know when automator was done generating the password without installing a third-party notification app like Growl.
At the time I didn’t know of a way to do that, but now I do, and it’s really quite straightforward thanks to the OS X terminal command afplay
which will play an audio file without opening any sort of GUI.
Aug
24
WW1 – The Canals & Railways of Mons
Filed Under History & Geography on August 24, 2014 | 1 Comment
100 years ago today, the British Expeditionary Force (BEF) was involved in its first major engagement of the first world war – the Battle of Mons. The battle revolved around a canal that no longer exists today – the Canal Mons-Condé, a canal that does still exist (though it’s been upgraded significantly) – the Canal du Centre, and the medieval city of Mons near the Belgian-French border.
The British had been tasked with holding the line of the canal around and to the west of Mons, but the big problem for them was that in 1914, the route of the canals involved created a salient around the village of Nimy just north of the city. Looking at the canals that exist in Mons today there is no sign of a significant salient, you need to see the canals as they were in 1914 to understand this battle.
The reason there are many canals in this region is the presence of a big coal seam in the area to the west of Mons and to the south of the original Canal Mons-Condé. This area is known as the Borinage. The coal mines are all closed now, but the Borinage was a hive of industrial activity in 1914. I couldn’t find a good source of opening and closing dates of coal pits. If I had I would have mapped those that were open in 1914, but in the absence of that information I decided to map the railway lines as they existed in 1914. The tangle of lines to the south of the canals shows area that was involved in coal production very clearly. Note that I only mapped the mainline railways (NMBS/SNCB line numbers below 200), the nest of lines you see was surrounded by countless industrial lines and sidings.
Aside: While I wasn’t able to find a good list of pit opening and closing times, I did find a list of the locations of the spoil heaps created by the pits a few years ago, which I mapped and published in this blog post back in 2011.
The map above shows the canals in Mons as they were in 1914 in light blue, the railways as they were in 1914 in dark blue, and the canals as they are now in red. You can download the KML file to view the map in Google Earth.
Aug
22
WW1 – The Railways of Namur in 1914
Filed Under History & Geography on August 22, 2014 | 1 Comment
This post is a follow-on from yesterday’s describing the ring of fortifications around Namur, and the siege that was taking place there 100 years ago today. Along with Liège, Namur is one of just two fortified cities in the east of Belgium. Why were these two cities chosen for fortification? I would argue it’s either directly or indirectly because they’re important transport hubs. Indirectly because the reason both cities grew to be so important was because of their transport connections, initially via rivers, and later via road and rail. And directly because they were (and are) both major railway hubs. In 1914 there were no heavy-lift aircraft, so the way militaries moved large volumes of men and equipment rapidly was by rail.
The short version of why Namur was so important is that in 1914 it had railway connections to Aachen in Germany and Maastricht in the Netherlands via Liège, directly to Brussels, to Paris via Charleroi, to Luxembourg, to Givet in north-eastern France via Dinant, and to the coal-rich north-east of Flanders via Tienen.
The map above shows Namur’s railway infrastructure as it was in 1914 (you can download the KML file to view the map in Google Earth).
Aug
21
WW1 – The Forts of Namur
Filed Under History & Geography on August 21, 2014 | 2 Comments
My previous two WW1 posts focused on the Belgian city of Liège (the Forts of Liège & the Railways of Liège). The Battle of Liège was the first major engagement of the war on the western front, and the ring of so-called Brialmont fortifications around the city held out longer than many, including the Germans, had expected. But, when Liège finally fell on the morning of the 16th of August 1914, after an 11 day siege, it enabled two things to happen 100 years ago today (the 20th of August 1914 – the fall of Brussels, and the start of Siege of Namur. Like Liège, Namur was protected by a ring of Brialmont forts, and they would be the focal points around which the siege revolved.
The map above shows the ring of forts around Namur (you can download the KML file to view the map in Google Earth).
Aug
16
Creating an XKPasswd 2 OS X Service with Automator
Filed Under System Administration, Computers & Tech on August 16, 2014 | 5 Comments
It’s going to take me a few months to re-write the www.xkpasswd.net site so it uses the new XKPasswd 2 perl module. In the mean-time, thanks to the magic of Automator an OSX Services, Mac users can integrate XKPasswd 2 right into their OS with out very much effort at all.
This blog post is intended as a follow-on post to my earlier XKPasswd 2 beginners guide. This post assumes you have followed the installation instructions in the beginner’s guide to install the XKPasswd 2 module, that you followed along with that post and created a script that generates passwords in a format of your choice, and that you have tested that script to be sure it works. In this post I’ll be using the final example script from the beginner’s guide as my pre-written script.
Aug
16
XKPasswd 2 – An Absolute Beginner’s Guide
Filed Under Software Development, Computers & Tech on | 3 Comments
I’ve just released version two of the XKPasswd perl module, the module that powers the www.xkpasswd.net website. At the moment, only the module has been updated, not the website. It’s going to take me a few months to make all the changes I want to on that site. In the mean time you, can use the module directly. The prerequisites are that you have a computer with Perl and GIT installed, and a plain text editor (no difficult on Linux or Mac).
Aug
13
Announcing XKPasswd.pm 2
Filed Under My Projects, Security, Software Development, Computers & Tech on August 13, 2014 | Leave a Comment
It’s hard to believe, but it’s been nearly three years since I released my first attempt at a Perl library for generating secure memorable passwords. The original spark of inspiration came when Steve Gibson released and talked about his Password Haystacks page at around the same time as the now famous correct horse battery staple XKCD comic was released. Take the idea of using words as the basis for passwords from XKCD, add computers to introduce real randomness (we humans are terrible at being random), and season with come well-chosen and intuitively placed symbols and digits to increase the size of your haystack, and voila, passwords are are both human-friendly and secure!
The first version of the library worked, as evidenced by it’s years of service powering www.xkpasswd.net. That’s not a bad start. But, it was a first attempt at solving the problem, and, I was still a Perl padawan back then. Some of my early design decisions resulted in a less than ideal API making the library a lot less developer-friendly than it could have been, and I’ve learned a lot about Perl, and Perl best practices since 2011!
I’ve spent the past half year or so re-implementing the same basic idea from scratch. In terms of functionality very little has changed, there are a few additions, but the big change is in the API. Basically, the old API was a mess – you needed one config hashref to instantiate the object, then a different config hashref to call the password generation function. Nonsense! That’s not intuitive, not obvious, and not efficient! The new API allows you to achieve the same result with less code, and the code you will have will be easier to read and understand.
You’ll find the project page for the new library at the link below – this page provides links for downloading the code, and links to the module’s very detailed documentation.
This module is provided entirely for free, but has taken a considerable amount of time and effort to write, and continues to take time to develop and maintain. Please consider making a small contribution towards the time I dedicate to this project.
XKPasswd 2 Project Page (http://bartb.ie/xkpasswd)
Aug
12
WW1 – The Railways of Liège in 1914
Filed Under History & Geography on August 12, 2014 | 1 Comment
The reason the Germans decided to violate Belgian neutrality was to give them access to France, and the reason Liège was their first major target was because that city’s railroads were a great way to quickly and efficiently move men and supplies from Germany into France. Today Liège is still an important railway city, with international trains calling at its magnificent new station. While much is still as it was in 1914, a lot has changed in the last 100 years all the same, enough that I thought it might be useful to create a Google Earth map showing what Liège’s railway infrastructure looked like in 1914.
Aug
9
WW1 – the Forts of Liège
Filed Under History & Geography on August 9, 2014 | 2 Comments
100 years ago today, my native Belgium was suffering as the Germans illegally invaded the country. Belgian neutrality had been guaranteed by the Treaty of London in 1830. Under that treaty, the Germans (the Prussians to be exact) had actually signed on to be guarantors of Belgian neutrality, along with the British. It was Germany’s invasion of Belgium that brought Britain into the war. Historians argue about the exact scale of German atrocities in Belgium, but there is no doubt that the invading army inflicted terrible suffering on Belgian civilians, including mass executions.
The first major battle of the campaign was centred on the ancient town and prince-bishopric of Liège in the north-east of the country. The Battle of Liège lasted from the 5th to the 16th of August 1914, and centred on the ring of 12 fortifications surrounding the town. Remains of all of these fortifications remain in the landscape, and can be clearly seen on satellite images. When reading about the battle I found myself wanting to better understand the geography of the region, and where the forts fit into the landscape, so I mapped their locations on Google Earth and saved them out as a KML file.
I’ve rendered the file in the map below, and you can also download it here.
Aug
9
Two Plugins to help turn WordPress into a CMS
Filed Under Computers & Tech on | 1 Comment
As described in a post earlier today, I have made some significant changes to this site. The short version is that I’ve started to use WordPress as a CMS (content management system). While the WordPress APIs provide a good range of functions for doing CMS-like things, the web interface is disappointingly lacking in even basic CMS features. Thankfully, WordPress’s plugin architecture has allowed the community to fill in the gaps.