XAMPP and Windows: How to Create a Symbolic Link

If you have scripts which need to be run in your local web browser but fall outside of your web root or any other declared vhost directory, there is always the option of simply creating symbolic links to these external locations from within your web root folder.

To do this (and I needed to on my Windows 7 environment to get around some Sencha ajax origin restrictions during debugging) follow the following steps:

1. Click the Start button to bring up the start menu.

2. Type cmd in the universal search box at the bottom of the start menu. (You should see at the top of the search results under Programs cmd.exe highlighted)

3. Press the Ctrl + Shift + Enter to launch the command prompt (cmd.exe) as Administrator. If you don’t do this, you’ll get a error saying that there are insufficient permissions to create the symbolic link later on. (You can also right click and select “Run as Administrator” to achieve the same thing.)

4. A box saying “Windows needs your permission to continue” will pop up. Click Continue.

5. Go to the directory you want to create the link in. For example: cd c:\xampp\htdocs\

6. Use mklink to create your symbolic link (or shortcut):

mklink /D externalfolder "c:\Users\username\Documents\My Folder\"

Note: The /D is there because, in this example, we are linking to a directory. “externalfolder” is the name of the symbolic link (change to whatever you want). Finally, the path is where the symbolic link actually resolves to.

Using the example laid out below, we could now point our browser to http://localhost/externalfolder/hello-world.php which would run just fine, with the browser executing c:\Users\username\Documents\My Folder\hello-world.php in reality.

Useful little trick to be aware of.

xampp logo

Why the funny shoulders on a Baby Vest?

Okay, so I just learned something new to me – which would have been handy to know four years ago! If you’ve had a baby in your life before, then undoubtedly you’ll be familiar with the plain old baby vest. Pretty much all babies wear these under their clothes, and goodness knows, I’ve been through more than just a few with both Jessica and Emily.

And then yesterday Chantelle went and dropped a bombshell on me. You know those intricate, funny shoulder designs that all baby vests feature? Do you know what that’s for? (Apart from the obvious of allowing it to easily slip over a baby’s massive head…)

Well neither Chantelle nor I did until now. It turns out that the design is such to allow for folding everything downwards, meaning that you can simply roll the sleeves down over the shoulders and tummy, allowing you to pull the vest off as if it was a pair of pants. In other words, extremely useful in those instances when you want to avoid lifting the vest up over your baby’s head!

Oh My God.

The number of yellow poo stained vests that I unnecessarily pulled over my squirming soiled child’s head now truly frightens me.

keep calm and change my nappy baby vest

Sorry Jessica and Emily. I would seem that I did you both a disservice as a baby.

So my knee gave out again…

So my knee gave out again… in the most public manner possible of course. I can’t really blame my bum left knee (which I heavily damaged via a karate tournament way back in July 2007) though, seeing as I’ve never even once taken it to be reviewed by medical experts in the 7 or so years that I’ve lived with the damage – never mind the fact that I’m anyway carrying far too much weight to ever allow it to heal properly!

It all went down this past Sunday, when we successfully hosted Jessica’s fourth birthday party at the always delightful Mondeor Restaurant in Somerset West. All the friends and family were present and accounted for, and given the surprisingly good weather we experienced, the kids were certainly making the most out of the kiddies splash pool.

Now the circular splash pool is ringed with an elevated wooden boardwalk, and therein lies the problem. The edge of the walking planks go well past the vertical boards holding them up, meaning that should too much weight be applied to the edge of the boardwalk you’ll probably find yourself in a spot of bother.

Which is exactly what happened to me.

jessica lotter at the pool - birthday party at mondeor restaurant

I was carrying Emily in my arms (for pretty much the whole day) and had strolled over to the pool to ask Jessica something or other (I can’t quite remember what). She wanted out, and she needed a towel, so taking her hand with my free hand, I strode off the boardwalk whilst deep in conversation with her – in other words, not paying attention to what I was doing.

There was an extremely loud snap as the board on which I had just stepped snapped in two, sending me and the two kids tumbling down to the ground. Of course, as my foot hit the ground, my knee gave in completely, shooting pain up through my leg and forcing me to neatly deposit both Emily (which from all eyewitness accounts was a pretty impressive feat) and Jessica before continuing with my tumble that had me ended up face first in the dirt.

The kids were crying, fine though, but obviously shaken up, whilst I on the other hand not so much. I could immediately feel that my knee had conked in and that I had possible twisted my ankle, which made pulling myself back to my feet a much more painful mission that what I care to remember.

(Chantelle says that my face was completely drained of colour for the next while following the tumble, but nevertheless, I limped to a convenient chair and plonked myself down for the rest of the party – which was still thoroughly enjoyable anyway)

Obviously it could have been much worse in that Emily or Jessica could have gotten hurt, but thank the stars that wasn’t the case.

Party done and back at home at last (thanks to Ryan for driving my car and myself home!), it quickly became apparent that I must have put some serious hurt on, because I couldn’t bend my knee at all – meaning an early Sunday evening trip to the pharmacy for Chantelle to pick up some anti-inflammatory tablets and painkillers, whilst Evan, Natasha stayed on to look after Evalynne, Jessica, Emily (and me).

Needless to say, I didn’t drive into work on Monday.

Today we are three days down the line, and I’m happy to report that with each passing day my knee and ankle are doing better and better, and I foresee being back to full mobility just in time for this coming weekend.

Not that I’ll be climbing up any stairs, hills or mountains mind you.

Goodbye my Faithful Rechargeable Battery Pack

microsoft xbox 360 wireless controller rechargeable battery packGoodbye my faithful rechargeable battery pack… you have indeed served me well.

I joined the XBOX 360 game quite late, purchasing my first (and only to date) XBOX 360 console back in December 2009. I very quickly purchased an official Microsoft Charge and Play rechargeable battery pack for my wireless XBOX 360 controller, and this evening as I was about to play some Gears of War 3 online co-op with Ryan, it became quickly apparent that my very long lived rechargeable battery pack has indeed now finally gone the way of the dodo.

I certainly can’t complain though. This battery pack was the power source for my primary controller for just short of five years, an achievement that for some or other reason makes me rather proud, not to mention the further bolstering of my faith in rather purchasing genuine manufacturer-produced add-ons instead of generics whenever possible.

However, that said, I am now in the need of a hasty replacement, and seeing as I’m pretty sure that my XBOX 360 will be upgraded to a new generation console sooner than later, this time around I don’t necessarily need a solution to last quite as long.

In other words, generic solution time.

A year ago (July 2013) my order with Loot.co.za for a Nitho Charge and Play Kit for the 360 was cancelled due to stock shortages, so I guess this time around I’ll need to hold thumbs that they can actually sell me something that they advertise on their site!

microsoft xbox 360 wireless controller

Toys for Boys: 4D MASTER: Spitfire Mk. VB Debden Model Plane

Chantelle had a good chuckle as she handed over a shiny silver-wrapped present to me on our recent 5 year wedding anniversary. Apparently during the present purchase process, the sales lady (about to wrap it) had asked if it was for a little boy, to which Chantelle gleefully answered, “No, it is for my husband!”.

Ha ha.

Anyway, not that it matters whatsoever, because underneath all that very shiny wrapping was something pretty damn cool. A 4D Master Spitfire Mk. VB Debden snap to build model airplane.

4d master spitfire mk.vb debden model pieces to completed

As a boy I was in love with World War II flying machines, and my bedroom ceiling was plastered with all sorts of airplanes precariously dangling from strands of fishing line. Some of the larger ones were known to sometimes escape their prestik bonds and fall to the earth, something my Gran discovered head first during one of her holidays down with us in Bellville.

Anyway, this Hong Kong produced toy from the guys at Fame Master is actually seriously fun for young boys as essentially it is an already painted, snap together, high quality model aircraft for which the goal is to see how fast one can actually put it together. It’s built to be taken apart and put back together again, and I have to say, I was truly amazed at the fantastic plastic machining that has gone into the pieces making up this gorgeous but ridiculously named “4D Puzzle”. (Seriously Fame Master, 3″D” + “D”etails does not equal 4D, no matter how much bolding you add to the font.)

All the pieces snap together perfectly, they are designed so that they can’t really be placed wrong, and the end result is a beautiful 1:72 scale model.

Of course it isn’t quite the same as the classic AirFix or Tamiya scale models which you painstakingly glue together, paint, and place decals on, but it does come with just as much satisfaction seeing the finished product, and to be fair, perhaps looking slightly better than if you had to make the whole thing yourself in the first place! ;)

It’s relatively inexpensive to buy, and this one Chantelle picked up from PNA whilst doing supply shopping for her cakes, meaning it’s easy to come by. In short, definitely a recommended toy for a school-going boy interested in putting things together!

4d master spitfire mk.vb debden model box

Related Link: http://www.famemaster.com/product_detail-pid-43-id-303

City of Cape Town Tracking Black Bins

I was quite pleased to see a press release coming out of the City of Cape Town saying that essentially they were starting to fit all existing 240-litre municipal wheelie bins with identification tags to ensure more efficient service provision and revenue accuracy.

The tags will allow the City to monitor each bin serviced and to identify bins that are lost, stolen, or illegally serviced without being City property (i.e. someone sneakily bought an extra bin for their property from a plastics shop and now puts double the refuse out whilst only paying for a single load.)

Apparently the City services in excess of 800 000 wheelie bins each week, and this service is provided by means of personnel, trucks and wheelie bins at a cost of almost R1 billion per annum. In rendering the service, virtually every public street in the entire municipal area is traversed each week.

Cape Town City’s Mayoral Committee Member for Utility Services, Councillor Ernest Sonnenberg had the following to say on the matter: “The tagging of bins will allow for the service of each individual bin to be monitored. This will provide the means to improve operational efficiencies and effectiveness in managing labour, vehicles and services because the date, time, and location of each bin lifted will be recorded. This innovative project forms part of our commitment to creating a well-run city”.

Cool, because what that basically means is that we’re getting another large data set to start mining. Truly this is the age of Big Data, which as a software engineer needless to say excites me – however, and this excites me more, the prospect that maybe now my bin will finally stop being stolen is even better. There is nothing more annoying than watching bin pickers strolling around the town pushing bins around when you just know that some hapless bloke is going to arrive home from work that evening to find his municipal bin gone (but not with the wind).

south-africa-municipal-black-wheelie-bin

Anyway, the project will be managed by external service provider RAMM Technologies (a company currently under tender by the City and which provides services to several departments in the Utility Services Directorate) and which has been appointed by the Solid Waste Management Department’s Collections and Drop-offs Branch to perform the refuse bin identification exercise. It will see numerous crews, consisting of RAMM contracted staff, moving throughout the city in various suburbs over the next couple of months. These crews will be tagging each individual refuse bin in order to compile a geo-database of all the City’s mobile refuse bins.

For the public to easily identify these crews, RAMM crew members will be required to carry an identification card containing the following information:

  • City of Cape Town logo
  • Photograph of the crew member’s face
  • Member’s surname
  • Member’s first name/s
  • RAMM operations’ telephone number

For more information, residents can contact RAMM Technologies on 086 111 7266 or send an e-mail to ops@ramm.co.za.

Alternatively, the City can be contacted on 021 444 7127 or via e-mail to HeidiCarla.deBeer@capetown.gov.za.

Pay on Google Play with PayPal – but not in South Africa

Halfway through this year the news broke of an unusual move that saw Google open up payments on its Google Play platform to Google Wallet direct competitor, PayPal. Which makes perfect sense when you remember that PayPal is a lot more mature and widely used than Google Wallet, hence it has the potential to bring in a whole lot more sales onto the notoriously difficult to get users to part with their money platform that is Android.

From around the web at the time:

“To start with, the feature is being rolled out in 12 countries including the US, Germany, and Canada. When you make a purchase on Google Play in these countries, you’ll find PayPal as an option in your Google Wallet. Tap on it, enter your PayPal account login and you’ll theoretically be able to make purchases pretty easily. Google says its goal is to ‘provide users with a frictionless payment experience, and this new integration is another example of how we work with partners from across the payments industry to deliver this to the user’.

While, the news will be pretty welcome to PayPal loyalists, it’s worth noting that you won’t be able to buy physical goods on the Play store using the online payment service, only apps and other digital content.”

Of course this is awesome if like me you have a PayPal account that probably sits pretty unused for 90% of the time. However, six months down the line and if you are like me a good old South African, then sadly, like me, you’ll realize that the damn option to pay on Google Play with PayPal is STILL not available to us living here at the bottom of Africa.

google-play-logo

Which makes sense when you read the original list of territories this PayPal integration is available in, i.e. USA, Germany, Canada, Austria, Belgium, Finland, France, Ireland, Italy, Netherlands, Spain and the United Kingdom, but damn it, it is pretty damn frustrating.

Especially when this is the first time you ever Googled “Pay on Google Play with PayPal” and just learned about this wonderful news today.

Sigh.

(And to think I only found out about this annoying limitation after going the whole hog and learning how to do it!)

Ubuntu Server: How to Install Applications from .deb Files

It’s pretty seldom that you have to install packages that aren’t part of the official repositories (for which apt-get is king), but every now and then you will be presented with a .deb application installer file and told to install it on your server.

Luckily this is pretty painless, so long as you know the correct command, which is exactly why I’m noting it down here for future reference.

Packages are manually installed via the dpkg command (Debian Package Management System). dpkg is the backend to commands like apt-get and aptitude, which in turn are the backend for GUI install apps like the Software Center and Synaptic.

To install a .deb file, run:

sudo dpkg -i myInstaller.deb

If dpkg reports an error due to dependency problems, you can run:

sudo apt-get install -f

Running this should download the missing dependencies and configure everything automatically. If however this step reports an error… well let’s just say that you’ll have to sort out the dependencies yourself, something often referred to as “dependency hell” in the support forums!

Conversely, to uninstall a package, run dpkg with -r:

sudo dpkg -r myInstaller

Noted.

ubuntu-logo-banner

Ubuntu Server: How to Extract a .tar.gz Archive File

An old one, but for my own reference purposes, worth noting down here in these pages. In order to extract the contents of a .tar.qz archive file, turn to the tar command (“man tar” for options as per usual):

tar -xvzf archivefile.tar.gz -C /home/craig/downloads

In this example we’ve extracted the contents of archivefile.tar.gz to the /home/craig/downloads directory. (If we left out the -C directive then the operation would simply have extracted the archive contents to the working directory.)

To explain the archivefile.tar.gz file itself, essentially tar collected all the files into one package followed by a call to gzip which then compressed the tar file. (This is often referred to as a tarball in the Linux world.)

To extract the files making up this tarball, we used the following parameters in our call to tar:

x: tar can collect files or extract them. x does the latter.
v: makes tar talk a lot. Verbose output shows you all the files being extracted.
z: tells tar to decompress the archive using gzip
f: this must be the last flag of the command, and the tar file must be immediately after. It tells tar the name and path of the compressed file.

Obviously -v isn’t necessarily, but it is helpful to see what is going on. So in summary, to extract a .tar.gz file, run:

tar -xvzf [archiveFile].tar.gz

Noted.

ubuntu-logo-banner

Stream English and Afrikaan South African Music with Rdio

These days streaming music from the Internet is actually a workable solution here in South Africa, which basically translates into a whole lot more music choice for you and I, the end user. I’ve been using a particular music streaming service for a while now, and seeing as it is pretty much perfect as far as what I’m concerned, I thought it high time I give it the plug it so richly deserves.

From Wikipedia, Rdio (damn it, stop dropping perfectly good letters to come up with hip names Internet service people!) is an online music service that offers ad-supported free streaming service and ad-free subscription services in 60 countries. It is available as a website and also has clients for the iPhone, iPod Touch & iPad, Android, BlackBerry, and Windows Phone mobile devices, which can play streaming music or cache songs for offline playback. There are also clients for the Roku and Sonos systems. The web-based service also offers a native desktop client application for Mac OS X and Windows. Its library has content from the four major record labels, as well as the Merlin Network and the aggregators IODA, INgrooves, The Orchard, CD Baby, IRIS Distribution, BFM Digital, Finetunes, and Catapult. Rdio also offers social networking, allowing users to share playlists and follow others to see what music they listen to.

I primarily use it on my laptop to listen to music whilst I work, and I have to say, the interface is clean, snappy, and makes for easy use. What is particularly nice is their station algorithms that essentially automatically builds custom playlists based on the type of music you listen to. So for example, if you listen to a Jack Parow album, don’t be surprised when immediately following its end, you’re blasted with Dutch rap tunes. I’ve given it a fair spin and the station algorithm has yet to let me down!

However, the biggest plus in my opinion is the localisation. Because it is officially launched in South Africa, you all of a sudden have full access to a plethora of South Africa artists, which in my case means instant access to both English and Afrikaans rockstars, be it the classic Springbok Nude Girls, Sugardrive or Fokofpolisiekar, to maybe something a little newer like Van Coke Kartel or the excellent Woodstock Mafia.

Hell, I can even give good old Robbie Wessels a spin if I feel like a chuckle.

And to top it all off, their selection of obscure, difficult to find musicians is also pretty top notch I have to say.

Rdio a subscription based model, but to date I’m still running under the free plan after a couple of months with absolutely no restrictions at all. Have to say, I’m liking this one a lot!

rdio logo strip

Related Link: http://www.rdio.com/