This post is part 22 of 39 in the series Taming the Terminal

This instalment is a little breather between the fairly heavy instalments on searching, and the upcoming set of instalments on networking. We’ll start with a look at some tips and tricks for getting the most out of BASH, and then transition to some tips and tricks for getting the most out of the OS X Terminal app.

Read more

Tagged with:

Zeppelin bombing Antwerpen.jpg
Zeppelin bombing Antwerpen” by Ad MeskensOwn work. Licensed under Public domain via Wikimedia Commons.

One hundred years ago today, the siege of Antwerp was underway. It started on the 29th of September 1914, and the city did not capitulate until the 10th of October. Rather than re-tell the story of the siege, which you can read in so many places, I thought I’d share a Google Earth map I’ve spent the last six weeks creating showing the core infrastructure of the Antwerp area as it was in 1914. When reading about large-scale historical events, I like to use Google Earth to follow along with what I’m reading and get a sense of the local geography. The thing is, if you do that with the siege of Antwerp you may find it confusing to follow along because there have been some very significant changes in and around the city in the last 100 years.

In this post I’m going to detail some of the very big changes, but really, for the best experience, you want to download the KMZ file and explore it at your leisure in Google Earth. I’ve also included a substantial area to the west of the city in the map, as far as Ghent in fact, because this is the route along which the Belgian army successfully withdrew from the city as the siege neared its end.

The KMZ File

Download WW1Antwerp.kmz

The KMZ file is broken into two primary sub-folders, one for outlines, and one for labels. The reason for this is that having the labels displayed while zoomed out makes the map too cluttered to get a good overview, so you can check both on or off independently.

On the map, military fortifications that were active in 1914 are shown in red, military inundations in purple, and large recently decommissioned (in 1914) military fortifications are shows in orange. Navigable waterways, be they rivers, canalised rivers, canals, or maritime canals, are shown in blue. Docks which existed in 1914 are shown by blue overlays, and any docks not overlaid did not exist in 1914. Railway lines that were active in 1914 are shown in green, as are important railway stations. Large railway yards are shown as green overlays.

There are details available on all the shown items. For waterways and railways, click on the green or blue line to see the descriptions, for military fortifications, railway stations, locks, and docks, click on the icons.

For the best experience I recommend disabling all the standard layers except for Borders and Labels. The roads and photos in particularly are very distracting, so I definitely recommend turning those off.

Below are some links to various tellings of the story of the siege of Antwerp:

Read more

Tagged with:

At the request of listeners I’m going to be publishing a big list of links with future Let’s Talk Apple shows. The logical format for me to create those notes in is Markdown – it’s plain text, and quick and easy for me to add new items and re-arrange them into logical groupings. for the most part markdown has little to no overhead, but when it comes to links there is a little work. What I wanted was a way of automatically taking a URL, and turning it into a markdown link where the text for the link is the site the story is from with /… after it.

When all is done I want to turn a url like http://www.macobserver.com/tmo/article/every-important-link-from-apples-9-9-event-on-one-page into a link that looks like: www.macobserver.com/…. In other words, I need to take the URL above as input, and turn it into the following Markdown code:

[www.macobserver.com/...](http://www.macobserver.com/tmo/article/every-important-link-from-apples-9-9-event-on-one-page)

My reason for choosing this format is that I want to give obvious credit to the sources of the stories, but not waste screen real-estate on long URLs.

Perl’s URI module can interpret URLs, and easily extract the host part of the URL, OS X Services can take selected text as input and replace it with processed output, Automator can create OS X Services, and Automator can execute Perl code. By putting all these pieces together I was able to solve my problem in just 20 minutes with a few clicks and a few lines of code.

You can just download the service with the link below, or you can read on to see how it’s done.

Download OS X Service …

Read more

Tagged with:

This post is part 21 of 39 in the series Taming the Terminal

This is the third and final instalment on searching. In the first instalment we learned how to search for text within files and streams using egrep. In the second we learned to search for files based on all sorts of criteria with the find command. In this final instalment we’ll start by looking at one last feature of find, its a ability to execute commands on the files it finds. Then we’ll end by looking at an OS X-only alternative to find that makes use of the Spotlight search index to really speed up searches.

Read more

Tagged with:

Fort 8Note: myself and Allison Sheridan had a good discussion around this post on episode 488 of the NosillaCast podcast (starting at 51:34).

Between 1851 and the end of the first world war, the city of Antwerp was Belgium’s so-called National Redoubt. It was decided that it would not be feasible to defend all of Belgium, so, the defence should instead be focused on holding a defensible part of the country until help could arrive from one of the powers guaranteeing Belgian neutrality. The city chosen for this purpose was Antwerp.

The fortifications built around Antwerp were impressive, in scale and design, both from a military and architectural point of view. They are without a shadow of a doubt archeological treasures, especially the late 19th century structures designed by the acclaimed fortification designer General Brialmont. While the later works were all more advanced militarily, they were never as architecturally beautiful as the late-19th century Brialmont forts.

Ultimately, the National Redoubt would never prove a resounding military success, but that doesn’t take away from it’s cultural, architectural, or historic importance. The redoubt had a big impact on the nation as a whole, and much more so on the province of Antwerp. The engineering work was on a scale comparable to that of building a railway network, and while much of that work is, by design, not easily visible at ground level, it’s immediately obvious from the air if you know where to look.

Read more

Tagged with:

This post is part 20 of 39 in the series Taming the Terminal

In the previous previous instalment we looked at using egrep to search for a particular piece of text in a stream or file. egrep is often a great tool for finding a file you are looking for, but only if the file is a plain text file, and only if you are searching for that file based on its content. What if you want to search for files based on other criteria, like the last time the file was edited, or the name of the file, or the size of the file, or the type of the file etc.? For that you need a different command, for that you need find.

Read more

Tagged with:

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.

Read more

Tagged with:

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.

Read more

Tagged with:

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).

Read more

Tagged with:

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).

Read more

Tagged with:

« more recent postsolder posts »