Grabbing the MAC address on RHEL

At work I deploy Red Hat Enterprise Linux VMs, for a variety of reasons, mostly by hand.

One of the steps I loath is setting up the network, it’s almost the only thing that truly requires manually tapping each character out. I have, however, learnt this bash one-liner such that I type it out without thinking:

Simply replace “eth0” with whatever interface you want the MAC address from and redirect it into the relevant ifcfg- file, edit said file with your favourite editor and prepend “HWADDR=” to the line with the MAC address on.

3rd Party iCloud Apps?

At home I use an iMac.  When I’m away from my desk I use an iPhone 6.  At work, I’m forced to deal with Windows (though use Linux/BSD VMs where possible).

I have a lot of software on my Mac, a number of apps are “document based” though manage those document internally.  Some of these apps talk really nicely across many of the platforms I use (e.g. Evernote), other software works incredibly well within the Apple ecosystem (e.g. OmniFocus).   Lots of the software I use is “document based” in the real sense of the term, you click “save” and it spurts out a document that resides on your file system and these can be accessed on multiple platforms with various syncing services (e.g. ownCloud, or Dropbox). Then there is iWork.  The trio of apps can save a file to your desktop, or shove it in iCloud.  It works really well on OS X, and on iOS, and a host of other platforms thanks to

In 2013, Apple release iWork for iCloud beta.  Users with supported browsers (officially Safari 6.0.3+, IE 9.0.8+, Chrome 27.0.1+) on (I presume) any platform can get access to any of their iWork documents which live in iCloud.  How cool is that!?  So now I can have a look over my budget on my work computer while trying to sort out car insurance in my lunch hour, or give a presentation put together on my Mac on someone else Linux workstation.

At WWDC 2014, Apple announced CloudKit.  CloudKit gives developers some server side infrastructure so that they can think about programming the application, and not get caught up thinking about server logic.  CloudKit provides:

File Recovery

Over the past few years I’ve needed to recover files from various USB sticks and SD cards using my Mac.  I’ve recently needed to do this again, and every time I’m asked I always forget the application I use!  So I’m created a blog post so it’s easy to search for!

The application I use is TestDisk.  It’s a command line application and can recover files from a number of different  file systems.  It’s fairly easy to use once you’ve read the website, and being CLI based it has the advantage that you can SSH into your friends machine and work with them over a phone/Skype/FaceTime call along with a shared screen or tmux session!

DeGoogling my life

I have mixed feelings about Google.  On the one hand their search engine is next to ubiquitous, most browsers come with it as the default, and they also have some pretty excellent services.  On the other hand, and perhaps this is my Apple synapse firing, I see them as a new enemy, and one that isn’t doing much to try and win me over.

In the past few years a few Google services that I have used (and some that I didn’t) have been axed.  The likes of ReaderLatitude, XMPP, CalDAV (actually it appears they have revised this), and ActiveSync for rival platforms have all been killed off or rolled into Google’s social networking site: Google Plus.  They’ve forked WebKit into a new project (Blink), to which there are pros and cons.  We’re even seeing services and applications being built solely for Google Chrome (OK, “More browsers coming soon”…), which is damaging for an open internet. My biggest issue here is email: if Google decided to turn off IMAP/SMTP I would be forced to use whatever app Google wanted me to use - be that the GMail app for iPhone, webmail, etc.  I’d have to stop using what I wanted in order to keep using my email.

Although Google services are free, we all know that they aren’t really.  Google (and others) collect data about you and sell it on - hence they can afford to keep making cool stuff and give it away for ‘free’.

The problem with using for a ‘free’ service is that you haven’t invested any money into the service, the provider owes nothing to you.  The other problem is what data is being collected about you, who is that data being sold to, and what might that data tell them (rightly or wrongly!)

Given the above, I have decided the distance myself from Google.  Some of the services that Google offer are still of use to me and there aren’t the same, ubiquitous, services available elsewhere (e.g. translate).  I have cut away from Chrome, Gmail, and even Google Search.

Today I surf the web using Safari at home and Firefox at work,  I use DuckDuckGo to search the web, and for email I’ve subscribed to Zoho which allows me to use my own domain name.  My mapping needs are adequately met using Apple’s Maps.  Apart from Google Translate, I’m not sure there is much I use Google for anymore.  It’s been a fairly long road, and there is further I can push it, perhaps by taking what I’ve learnt to sacrifice and further distancing myself from companies that do/may gather personal data (anonymised or otherwise).

There are likely some usages that are either out of my control, or where I’d have to more deeply customise my computer setups, where various services pull/push data to/from Google behind the scenes, but for the time being I’m not going to let that worry me.

Bootnote: This blog post was drafted back in 2013 when I started to “deGoogle” my life.  I’ve quickly zipped through and updated a few bits.

My frequently used bash commands histogram

Taken from Small Labs Inc., here’s a histogram of my most used commands:

cd 289 ############################################################ ls 282 ########################################################### git 158 ################################# hi 76 ################ vim 75 ################ for 72 ############### ssh 70 ############### sudo 52 ########### java 48 ########## rm 46 ########## cat 38 ######## brew 38 ######## man 35 ######## less 34 ######## find 26 ###### scp 23 ##### ps 23 ##### “hi 17 #### lorem 16 #### top 13 ### Have a try at making your own with the code from the Small Labs Inc. website!

An eight year old laptop

Technology moves so fast, doesn’t it?  I mean who would want such a battered looking laptop?

It doesn’t look like much, does it?

This first generation MacBook has been in my possession for eight years today.  Setting me back just a little over £900 at the time for 1GB RAM, a dual core (32-bit) CPU running at 2GHz, and OS X 10.4 Tiger.

I bought the MacBook for two main reasons

  1. I wanted a laptop
  2. I wanted a Mac The third point - which is what made me justify it at the time - was that I would be taking it to University with me.  My only real requirement at the time was that it last, and it has - mostly.

The problems I’ve had

Overheating (~6 months in) - a fault with the original design (or so I was told) was that one of the heat sensor wires based too close to the CPU.  When the CPU warmed up enough, it could melt the wire, this could trigger the logic board to think it was overheating and just shut everything down.  With advice from an Apple Retailer and certified engineer, I was able to get a little fix done for free under warranty, which was good as the logic boards weren’t available in the UK yet.

Dead hard drive (~18months in) - a horribly inevitable situation, though I didn’t think it would strike this soon.  Apple eventually noted that there was a problem, but it was after I had fixed it myself, at a cost of £80.

Melting power cable (~24 months in) - I noticed which on a great to Scotland that the power kept current out while charging.  After some inspection it turned out that the cable on the MacBook side of the power block had melted through its casing, and was shorting!  As the linked article describes, I fixed the issue myself, though in 2012 it started to melt right up hear the MacBook, and I ended up throwing it away and using the one I bought on eBay.

Overheating (~5 years in) - Simple problem, the fan died, and this caused the MacBook to overheat.  The fan cost a couple of quid off eBay and it was down for only a couple of days.

Dead WiFi (~7 years in) - I think due to excessive heat, the WiFi chip died :(  Now I have to use an external WiFi dongle…

Obsolescence - Since 2011 I have been unable to update the OS past 10.6 (Snow Leopard) due to the 32-bit CPU.  For a long time this didn’t hinder me, and it’s only in the last year or two that I’ve come across some 64-bit only apps, or apps that rely on an OS newer than 10.6. 2014-05-27 14.24.05

But despite all of this…

It has been an awesome laptop.  Costing around £1000 over its lifetime (currently working out at about £125/year) I still use it most days, and not just for hopping around the web - just this past Christmas I was firing up Windows 7 virtual machines with VirtualBox to get train logs analysed (which took some fairly serious number crunching).  The apps that I need to run do, and for features that are missing (e.g. bookmarks in iCloud) I use other services (e.g. XMarks).

I had said to myself, eight years ago, that this laptop would have to last me seven years - the ‘arbitrary’ length of time an old-time Mac user told me a Mac would last - and it has outdone itself.  True it’s not been without problems, but it is still here to tell the tales (unlike some other laptops, both cheaper and more expensive).  When the MacBook Pro with Retina display was announced, I longed for one and I still do, but due to the fact that these things aren’t cheap, and this little fellow is trooping along, I can’t really justify it now.

Long live Faegilath (forgotten elvish meaning)!

Throw off the dust covers!

Sunday, 11 May 2014 11:30:53 · 1 minute read · Comments · General

Well it’s been a long time since I’ve been here.  After a quick update it all looks very shiny again.  What happened to 2013!?  Mostly full of work, friends, and reading in the ruins of Aberystwyth castle.

Since the last post in 2012, I have moved from Aberystwyth to Frome in Somerset.  I no longer work with ERTMS, or indeed on the railway at all, for the last month and a half I have been an employee at Ntegra where I have been working with one of their clients to configure many virtual machines running Red Hat Enterprise Linux.

All of the ERTMS stuff seemed quite secret, and so bespoke at the moment that few people would find the ins and outs interesting.  Now I’m back working with computers, I hope to post here more - mainly with things I’ve learnt so I have an easy place to come back to, but hopefully others will find such information useful.

How many railway sleepers are there in the UK?

Saturday, 27 Oct 2012 19:23:15 · 2 minute read · Comments
Railway / sleepers / impossible questions · Trains

A few of weeks ago, I was sitting in a local café with my good friend Adam Blackburn.  I can’t quite recall how we got onto the topic, but Adam turned to me and asked “How many sleepers are there in the UK?”, not being able to tell him, he decided it would be my ‘homework’.  We laughed about it a bit, and somewhat forgot about it, but I was left pondering.  A couple of weeks later, questioning a couple of people at work, and using my Google-fu I was able to give Adam an answer.

My first source was a colleague, a man who has been working on the railway for many years.  He had no idea when I asked him, but helpfully said that in one chain there were roughly 22-23 timber sleepers.  So, with there being 80 chains to one mile, all I multiplied 22.5 by 80, with the result of 1,800 sleepers per mile. My second source was the Office of Rail Regulation.  They publish a Current National Rail Trends yearbook (downloadable here).  During the period 2010-2011, it claimed that there was 15,777km of track open to both passenger and freight traffic, this equates to roughly 9,803 miles of track. Armed with these figures, I multiplied 9,803 miles by 1,800 sleepers per mile to give me an approximation of 17,645,400 sleepers on open railway in the UK. I presented my findings to the surprised but seemingly impressed Adam last Thursday, stressing that it is only an approximation, it doesn’t cover sidings, depots, etc. it also assumes that all terrain is the same, that all the sleepers are made of the same material, and that they have all been installed 100% accurately.

A surprising fun research exercise, it was good to get Googling for answers to seemingly impossible questions!

Looking forward at iOS hardware

Saturday, 21 Jul 2012 15:47:14 · 2 minute read · Comments · iPad / iPhone / iOS

Over the last five years the iPhone has gone through numerous designs, both physical design and hardware design.  Here is a quick look at the specs of each iDevice (Note that the iPhone CPUs are underclocked):

[table id=5 /]

So, what can we draw from that?  My guess is that we need to establish whether the iPad or the iPhone is Apple’s lead device.  Although the iPhone was launched first, it has recently been revealed that the iPad was conceived earlier.  Also, since the iPad launch in 2010, it has set the way for the hardware specs of the iPhone later that year.

I think with the launch of The New iPad we will see a New iPhone.  My estimation is that this years iPhone will drop numbering in the name and it’s specs will possibly be as follows:

[table id=6 /]

I think we’ll see a switch to the iPhone leading the hardware specs.  The last iPad/iPhone release was around seven months apart, making the tech inside the iPhone 4S roughly seven months old, if they flip the leader then that would make the iPad have five month old tech.  I would certainly be disappointed if The New iPhone gets an Apple A5X chip. So what other fun things might be included in The New iPhone?  Contactless communications?  I’m not sure we’ll contactless payments, but something like programmable RFID might be an interesting partner to iOS 6s Passbook feature.  Perhaps enhanced position hardware for mapping features?  Who knows…

So, when could we see this new iPhone?

[table id=7 /]

NOTE: This post was originally written in late July.  This is being published before the Apple Special Event today (12/09/12) where it is widely rumoured that the New iPhone will be launched.

Looking forward at Mac hardware

Thursday, 19 Jul 2012 18:19:47 · 3 minute read · Comments
Apple / Mac / macbook / imac / Retina / Mac Mini / MacBook Air / MacBook Pro / Hardware · Mac Hardware

Last month at WWDC, Apple announced a new MacBook: The MacBook Pro with Retina display.  Specs can be found in my WWDC 2012 post or on the Apple Specs page.  But what could we broadly expect Apple’s behaviour on future Mac hardware design to be?

Until recently, Apple’s portable range have been mostly like other laptops.  Open them up by unscrewing screws and unclasping plastic clips.  Inside you’d find the battery, hard drive, optical drive, and logic board.  You could reasonably identify the CPU and RAM too.  This is true of the old PowerBooks and iBooks, as well as the white MacBooks and MacBook Pros. Apple’s desktop range was similar.  The Power Mac/Mac Pro are tower computers where you can see everything that most other computers have.  Even the Mac Mini looks familiar inside.

Nowadays Apple hardware is somewhat different.  Trying to get inside it is the first hurdle.  I guess it really started with the iPod, a device that was not a computer, merely an MP3 player.  The most obvious first example, though, was the MacBook Air. The Air has its RAM modules soldered onto the logic board, the battery is non-replaceable, it lacks an optical drive and many ports.  If you can get it open, the inside is quite alien, with the battery modules taking up a fair chunk of the machine.  The flash modules for storage aren’t in a conventional chassis, and the RAM modules could easily be missed amongst the other chips scattered about the logic board.  There is a lack of an optical drive and it is sparsely populated with ports. Looking at the new “The next generation MacBook Pro”, dubbed the Retina MacBook Pro,  Apple has acted using the same, integrated approach.  Everything that needs to be there is there, somewhere!

From its creation, the iMac has been an unconventional form factor (though you can definitely see the roots from the original Macintosh).  The current iMac squeezes an awful lot of power into a beautifully thin box.  Access to the RAM modules is through a small hatch in the bottom, access to the rest of the machine is through the screen which is fastened to the case using ultra strong magnets!  That said, once you are inside you can spy the optical drive, the hard drive, RAM modules, and so on.  The same is true of the Mac Mini.

I believe Apple are moving away from making computers, they have never liked too much hardware variation (not compared to the Windows market).  Apple want to create appliances.  Think about it, most people don’t mod your washing machine to go faster, or your oven to cook hotter, or attach LEDs to the inside of a fridge to make it look cool(er), these appliances are not usually maintained or repaired by their users, a person competent in the appliance will come and look at it.  Computers are similar, many people don’t mod them, many people require a helping hand to maintain and repair them.  Apple is catering for these people.  The people who don’t want to be bothered by hardware, who only care about how long their apps will run on the kit.  These are the people who buy Apple gear.

With that in mind, I expect that the Mac Mini, and probably the iMac will follow suit.  The MacMini will lose the swivel base and user upgradable RAM.  The hard drive will become flash storage which will be soldered onto the logic board for space saving reasons.  The same thing could happen with the iMac. While this would severely reduce user customisation, if Apple pitch upgrades at the right price, I don’t think it will be an issue.  People have lapped up the MacBook Air, and people will do the same with the new Retina MacBook Pro.