Fixing an ageing MacBook Pro

This morning while reading feedback on some Stack Overflow and Information Security posts, my MacBook Pro’s screen started glitching and getting progressively worse until it completely seized and everything came to a grinding halt. After attempting to switch if off and on again, I just got a black screen followed by a white screen and then it would power down after a few minutes.

Tried the recommended procedures, recovery mode, startup manager, booting from CD, NetBoot, Safe Boot, Resetting PRAM with no success, none of these options did anything, not even opened a screen where I could select a boot device. Seeing as this is a 2011 MacBook Pro, I was kinda expecting it to be getting close to end of life, but was hoping that I could still squeeze a couple more years out of it.


Back in the days when I was still building PCs, what usually worked for a bricked PC was to take it apart, dust the components, put new thermal paste under heatsinks, resolder any cracked solder on the motherboard and put it back together. Seeing as that would probably take me half a day to disassemble the whole MacBook Pro, I decided to just clean the fans and swap the RAM modules and see if it makes a difference, otherwise take it in for repairs.

Inside of 2011 MacBook Pro before cleaning it.

Inside of 2011 MacBook Pro before cleaning it.


After some cleaning and swapping the RAM modules, I could actually boot back into my OS, but only for about 2 minutes before I started getting screen glitches again followed by an immediate shutdown.

Seemed like it was overheating for some reason. So I left the bottom open, put a big fan underneath it which kept it cool enough for long enough until I could install smcFanControl. Turned up the two fans from 2000rpm to 6000rpm and left it running for about 15 minutes while putting all the screws back in place and closing it up. Gradually decreased the fan speeds back to 2000rpm again and it seems to be rock-solid again.

The fans will probably need replacement in the not so distant future, but until then, at least I can get some work done without having to spend cash on repairs or a new MacBook Pro!


Apple replaced my motherboard free of charge, apparently there was a flaw in the 2011 MacBook Pro range that caused overheating.

Thanks Apple!





Bash Script to enable / disable proxy settings on your Mac

I frequently switch between proxies, mostly SOCKS proxies to force all my traffic through SSH and I usually have to go through the whole process of Click On WiFi -> Open Network Preference -> Advance -> Proxies -> SOCKS Proxy -> OK

Screen Shot 2015-01-30 at 9.47.36 PM

I was wondering if there was a way to automate the whole process, so I did a bit of reading to see if it was possible to do just this … to my not so surprise (since OSX is Unix based), it seems you can control every aspect of your network through the networksetup command.

So to set your proxy settings, you would do something like this:

networksetup -setsocksfirewallproxy Wi-Fi localhost 5673 off

To switch on / off your proxy, you would do this:

networksetup -setsocksfirewallproxystate Wi-Fi on / off

Now to open a connection to your server so that the proxy can actually proxy data, use:

ssh -C -D 5673 user@server

And my final script that will enable the proxy if it’s disabled and vice versa:


# check if proxy is on or off
ENABLED=$(networksetup -getsocksfirewallproxy Wi-Fi | grep "Enabled: Yes")
DISABLED=$(networksetup -getsocksfirewallproxy Wi-Fi | grep "Enabled: No")

# determine if proxy should be turned on or off
if [ "$ENABLED" = "Enabled: Yes" ]
    echo "Proxy Enabled, now disabling";
    networksetup -setsocksfirewallproxystate Wi-Fi off -setsocksfirewallproxy Wi-Fi localhost 5673 off
echo "Proxy Disabled, now enabling";
    networksetup -setsocksfirewallproxystate Wi-Fi on -setsocksfirewallproxy Wi-Fi localhost 5673 off 
    ssh -C -D 5673 user@server

Now if you combine this script with AWS or some other cloud provider, you can build a server and use it as a proxy and shut it down once you are done and at the same time have all your proxy settings taken care of all in one bash script. Combine it with a keyboard shortcut and you can literally build a VM, setup a proxy and have your Mac proxy via that machine all using one command.

If you’ve done anything interesting using the networksetup command, drop me a comment.


Duet Display – Use your iPad as a second screen

iMod mentioned Duet Display a couple of days ago – I have an unused iPad Air and no real use for it, so I took Duet Display for a test run to see if I can salvage the iPad.

You start by downloading the app from, after installing it on your Mac, you need to install the app on your iPad (you can use the same link), on your Mac it’s a free installation, on your iPad, it’s ±R200 you have to fork out for the iPad version of the app.

The first time you plug in the USB cable, it takes ages to startup, the app author also marketed it as lag-free, well, there’s definitely some lag, but not enough to make it unusable. The app starts up its own desktop and OSX sees it as a second screen.

Screen Shot 2014-12-23 at 7.35.06 AM

You can use the iPad the same way as you would use the trackpad, some of the gestures work, others don’t, two finger scroll for example doesn’t work on the touch screen itself, you can control the cursor using the iPad’s touch screen, to right click on your iPad screen, just tap two fingers on the screen.

You can also swipe between your iPad apps and your second Mac Desktop (the second desktop is just the Duet App on the iPad), so if you have iPad apps running, swipe to your iPad app, and swipe back once you’re done to continue using your iPad as a screen.

If you take a full-screen screenshot, it takes two separate screenshots, one for your Mac and one on your iPad:

Screen Shot 2014-12-23 at 7.53.23 AM Screen Shot 2014-12-23 at 7.53.23 AM (2)

In terms of productivity, I can now develop on one screen and have my terminal on a second screen without having to jump around (the same benefits as a second screen, even though it’s a small screen)


Would I recommend it?


I’m already using it and loving it!


Update: I found a settings button that allows you increase the Frame Rate from 30 FPS to 60 FPS which makes it slightly less laggy.

Screen Shot 2015-01-02 at 8.40.50 AM


What it’s like driving in a Tesla Model S

I’m a HUGE fan of Tesla, both the model S and the model X and since we don’t have Tesla in ZA yet, I was hoping to test drive a Tesla while in Brussels …

I contacted the Tesla Club Belgium asking if there’s anyone that would be willing to give me a test ride in a Tesla … Byron, the President of Tesla Club Belgium said, sure, I’ll take you for a spin (Tesla Club Belgium is apparently the biggest Tesla Club in the world).

If I have to describe the experience in one word, it would be insane! As you approach the car, the door handles come out, it feels like an alien car that came from the future making all other cars feel like they’re still using 100 year old technology.

Boot space there’s plenty, both in the front and in the back, all my luggage fitted into the rear boot with plenty of space to go and the front boot was still available for more luggage:

DSC_0152 DSC_0154

Whether you’re driving 10km/h or 160km/h, it feels exactly the same, the speedometer on the dashboard feels like it’s just a number that runs up and down since there’s no correlation between that number and how your experience changes (except for when you accelerate and the Tesla leaves you gasping for air – best feeling ever!). Inside the car, it’s dead quiet – there’s no engine roaring over your conversation, so whether you’re driving at a snail’s pace or racing, you can continue your conversation after you’ve regained your breath from the insane acceleration (0 – 100km/h in under 4 seconds with no engine noise)

In order to not get flooded with speeding tickets, Byron has a dashboard cam / GPS that warns him of incoming speed cameras. The centre console is pretty much a giant iPad where you can browse the web, set the music, check your calendar, let Google Maps show you directions, adjust features in the car (instead of having a gazillion knobs, you can adjust anything in the car via the console), set the temperature, adjust the suspension, peek at what’s going on in the rear cam, etc


Either the road was very smooth or the air suspension is brilliant, this must have been the softest ride I’ve ever had!





I’m sold, all of the marketing you hear about Tesla is true. I’ll be waiting patiently for Tesla ZA …

Thanks Byron!!!

“Slow Internet” First World Problems

For a lot of people in ZA, fast ADSL internet is considered 10 megabit (and unless you are amongst the lucky few who have access to fiber or VDSL, it’s also the fastest you’ll get from a Telkom line), so at checkin in Brussels, it was quite amusing hearing the receptionist apologise for their slow internet.

Screen Shot 2014-11-11 at 3.28.30 PM

Download speed more than twice my fastest download speeds and upload speed 5 times as fast as my fastest upload speeds … definitely first world problems :-)

Dying terminals at Dubai

What to do when you have a 7 hour stopover at Dubai … the place is massive, frickin metro rail between boarding gates and lifts at each boarding gate subsection, each with their own waterfall …

Quarter past one in the morning and my feet are finally on the ground.


My last proper meal was 6am the previous morning and the only place that has anything vegan and edible seems to be Burger King. A vegetarian burger with no cheese (vegan junk food) should keep me alive for another half a day until I can get to proper food …


So to get from the gate where you exit the airline to your boarding gate, you take a train …

At the lifts they have these enormous waterfalls with coloured lights:

Then there’s window shopping for super expensive stuff (those mobile phones have price tags of $10000+) and super cars to be won on every corner – I’m surprised that their shops, especially their pubs are open in the early morning hours

After getting bored with the shopping malls, I started playing on the touch screen terminals … it seems that all, if not most of them are running windows 7 and are very unstable …

Then the long wait till almost 8am for the next flight …





Tibetan Tea House and their amazing Vegan Chocolate Cake!!

Tibetan Tea House, also known as Sophea Gallery is a lovely spot to relax and enjoy some good food while enjoying the view over False Bay


Besides their delicious vegan meals, they also have mouthwatering chocolate cake which I can actually eat without getting sick … hallelujah!!



Like Arnie says, I’ll be back! 





CentOS wants me to sacrifice the child.

I had a runaway process on my CentOS box that was killing the box.
After managing to log in, I was presented with the following message:
“Out of memory: Kill process 30902 (soffice.bin) score 416 or sacrifice child”


Danny Macaskill riding the Cuillin Mountains

Apparently this is a dangerous mountain, even for seasoned hikers. Danny Macaskill cycles it and effortlessly jumps from rock to rock and in one place even jumps over a fence as if it wasn’t there. RESPECT!

Taking Russian giant Yandex for a test drive

Yandex, the Russian version of Google has almost everything to offer that Google has to offer, maps, drive, mail, news, etc etc. I just signed up for a Yandex mail account to see what it’s like …
Besides struggling with the Captcha during signup (my keyboard doesn’t have Russian characters, so I had to use an online keyboard to type those characters), it’s otherwise fairly similar to Gmail with the added benefit of being able to schedule sending emails right out of the box.

Further there are plenty of themes and the mobile app for Yandex Mail is right there in the Play Store

Screen Shot 2014-09-14 at 8.13.09 PM

Screen Shot 2014-09-14 at 8.16.40 PM

Screen Shot 2014-09-14 at 8.17.25 PM

If all that Russian is a bit much, you can switch to English at the bottom

Screen Shot 2014-09-14 at 8.31.06 PM

Screen Shot 2014-09-14 at 8.33.08 PM

Over 200 search results when searching for Yandex in the Google Play Store …




I’m going to try these services for a bit and see how it goes, I’ve already mostly switched to DuckDuckGo for my internet searches (DuckDuckGo is built on top of Yandex Search, but highly refined)