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

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:

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.

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 duetdisplay.com, 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.

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:

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.

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:

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 …

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.

What to do when you have a 7 hour stopover at Dubai … the place is massive, frickin metro rail between 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 …

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”

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!

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

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

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)