My London…

Whilst on my way home last night I was clearing the work brain reading (or more browsing) the Evening Standard, when I found myself reading a section called “My London”. I’ve read it before, I think, but recently I’ve been appreciating where I live and the ease of access I have to things much more than usual.

With such a great respect for how lucky I am to live in such an awesome city, I thought I’d share my favourite parts for others to agree, disagree or add to, in much the same way as the Standard does:

The day starts in…
Greenwich (well actually Deals Gateway, an oddly named pocket between Blackheath, Deptford and Greenwich) – For me ideally situated, close to my favourite areas and with transport links to everywhere

Magical market - Greenwich

The grindstone
CTO @ (Tangent Plc), Great Portland Street, London – I absolutely love my job, enjoying every minute of it. I have the best team and we’re innovating and expanding all of the time!

Coffee fuel
Kaffiene, Great Titchfield Street – Amazing vanilla lattes and laidback atmosphere

Breakfast munchies
Scandinavian Kitchen – Just up from Kaffiene, the staff here are awesome.. They have a kind of boardroom area where I occasionally run our Scrums

Lazy lunch
Roka – It’s just cool

Favourite park
Greenwich Park – The place is tranquil amongst the chaos, and the view from the top by the observatory always impresses

Where I like to wander
Regents Canal – A walk up from Limehouse to Broadway Market on a Saturday, taking in Victoria Park and boating lake on route, endearing

Fun dining
Duck and Waffle, Heron Tower – Partly for the view of course, over-priced food but tasty and with delicious cocktails!

Favourite hotel
The May Fair Hotel – swish and pretentious! Really want to try out the Ace Hotel in Shoreditch though, potential to knock this one off the favourites list

Riding House Cafe – Semi-celebrity hangout, but this isn’t why I like it, it just feels good

Gig venue of choice
O2 Brixton Academy – This proves that size doesn’t matter!

Cinema experience
Everyman, Hamstead – The whole cosy feeling and table service make this an easy choice

Magical market
Greenwich – Again! I know most would say Camden or Notting Hill, but I love the size of this place coupled with the artistic influence and the boutique shops that surround it

Place yet to visit
Dulwich – Always told this is cool place these days, must head over and check it out

London pub
The White Horse, Parsons Green – Unfortunately don’t get over there much these days, but still love the vibe of the place when I do, especially in the summer when the crowds spread to the common

For now, that’s it… Any requests for other topics, let me know and I’ll do a part 2!

How to share your Wi-Fi Internet connection on Mac OSX 10.9

Continuing in my usual vain of writing down things I do as I do them (Tech-related before you say anything!), even though I’ve done this a hundred times, I thought I’d finally list out the steps for others to do this…

Mac Wi-Fi to Ethernet

Connecting to the dusty old computer

  1. Head up to the Apple menu then click System Preferences…
  2. Select the Sharing icon (folder with a yellow diamond icon, no idea why!?)
  3. In the left listbox you should see Internet Sharing, click it
  4. You should now have options to connect from your Wi-Fi connection (if you’re connected via that, I hope so, as it’s the point of this post!). Select whatever you want to connect to, I use my Windows PC (I know, shock horror ok ok!) via Ethernet
  5. This does not automatically start the sharing, so go back to the listbox on the left and click Internet Sharing again
  6. You’ll now be prompted to Start Internet sharing or Cancel, I’ll leave that choice up to you!

Advice: Do not use Windows unless there’s a REALLY REALLY good reason, install Linux (Ubuntu dist is great) or SteamOS (if your machine is powerful enough). I have both, of course :)

Sharing Internet with your Xbox 360

I recently (thanks to the beauty of Facebook’s Groups and a very kind resident on my apartment complex) recovered my old game saves from my hard drive and took ownership of a replacement Xbox 360 after my old baby died a red-ring death early last year. However, since the Playstation has now taken ownership of the living room where the router resides, the poor old Xbox 360 is relegated to the bedroom and in need of some tender-loving Wi-Fi action!

Unfortunately, those amazing brains (serious sarcasm here) over at Microsoft didn’t include wireless capability when it first released or even on the Elite, and as I like to save a few pennies here and there, paying another £60 on a wireless adapter is unacceptable to me. Thankfully, Mac to the rescue again! Only this time there’s a little more to it…

  1. Connect the Mac to the Xbox 360 with an ethernet cable
  2. Follow the steps above to enable Ethernet
  3. Head back to the main menu by clicking Show All and then select the Network globe
  4. This dialog maybe locked, unlock it by clicking the padlock in the bottom left
  5. Select Wi-Fi in the left pane, and then Advanced in the bottom right corner
  6. Click the DNS tab and take a note of the numbers under DNS Servers (you should only have one set)
  7. Hit OK and then select Ethernet (or Thunderbolt Ethernet) and click Advanced
  8. In the TCP/IP tab, set Configure IPv4 to Off using the drop-down menu
  9. Click OK then Apply and quit System Preferences
  10. Now, switch to your Xbox, locate Network Settings (how you get there depends on the dashboard version you’re on), select Wired Network and then select Configure Network
  11. Set the IP address in the Basic Settings tab to Manual and enter into the field
  12. In the Subnet Mask field, enter; also set the Gateway to and press Done
  13. Select DNS Settings and insert IP address you noted down earlier
  14. Test the connection on your Xbox 360
  15. Play!

Obviously depending on what you are connecting to, you may have some problems. I’m happy to assist as I have most configurations (with various OS’s) at home. Just let me know and I’ll continuing updating the blog post.

The Year Of The Horse.. What Does It Mean?

This morning whilst chatting to my amazing girlfriend, I randomly said that we should be out in Chinatown getting involved in the Chinese New Year celebrations, stating “it’s the year of the horse”, to which she replied (and after agreeing this would be fun to do!) “What does it mean?”. “I don’t know” I returned, with it suddenly occurring to me how uncultured that is! Remembering that I was born in the year of the snake and being someone that loves information, I immediately started researching whilst on my way to the shop for groceries.

ShiraLikesToDraw Chinese New Year 2014 Horse

As I was reading I realised how many horse-related things I’d been involved in over the last 24 hours…

Yesterday morning I was busy sorting through paperwork and filling in some forms for an impending (and life changing) future. One of the things requiring my attention was an update to the Council Tax registration. I couldn’t find the paperwork, but I knew I had saved a PDF of it fairly recently so opened the Mac and searched for “522”. I generally have a good mind for numbers, and knew that this was the last 3 digits of my account number. On seeing returned results, indeed there was the PDF (amongst a hell of a lot of other stuff), but interestingly right next to a photo I took recently of a horse (below)!

Horse in a field

Afterwards, I headed out for some lunch. Whilst wandering around Greenwich market, and being aware of my girlfriends (immediate) need for new shoes, I stumbled across a lovely little shop called The Shoe Embassy, the logo as you can see on their website is of a horse. At the time, I thought nothing of it!

With my delicious market food in hand, I continued my usual meander around the Old Naval College and along the Thames. Plenty of thoughts running through my little head, I questioned whether I would bump into anyone I know on my travels (it often happens) and wondered if this time it could be my lovely ex-colleague Lorraine who lives in the area. I remember thinking strangely and for no apparent reason (other than maybe a subconscious understanding of the Chinese celebrations going on elsewhere) that she once spent a Christmas horse-riding in Croatia!

As I arrived at Waterloo station at the start of a fairly drunken night out with the best mates a guy could have, I was walking through hearing “The next train to leave platform 8 is the blah blah blah to Reading via Ascot” and seeing many guys and girls dressed to the 9’s presumably returning from a day out placing bets on horses!

Following this and whilst being impressively insulted over my choice of beer (lager or piss as he described) by the owner of the The Kings Arms, I noticed the “proper” beers he was trying to persuade me onto all had taps of horses! Of course because the rest of the decor was of hunting… The subliminal messages go on…

This morning, one of the first posts I read on my Facebook wall was by an old school friend and fellow technie now residing out in Melbourne Australia. On what looks like some form of stag do activity, he posted his antics and entitled it “Riding with the boys”. Thankfully this was accompanied by pictures of them all on horses somewhere in the outback!

The meaning…

The year of the horse, is apparently actually the year of the wooden horse. Wooden horses are thought to be strong, stable and possess great social charming skills in their interaction with others. Like our zodiac signs, the years and animals related to the year are birth signs, the children born under these are assumed to grow up with those characteristics. To Chinese people, the horse is a symbol of absolute happiness.

I’m not going to write about the whole meaning and philosophy behind this here, like me, you can find it anywhere on the Internet, but all of a sudden the year of the horse means a lot to me. The weekend wasn’t perfect, it wasn’t spent with whom I’d have preferred it to be, but it was full of nice little memories, a lot of progress towards a goal and some wonderful conversations, all of which have added to the way 2014 has begun for me. The only thing left to do now is to find a good stable to learn how to ride!

As this is my first post of 2014, Happy New Year in every way, bring on the year of the horse…

Illustration by shira likes to draw, horse photography by Lee McIntosh :)

How to setup Mac OSX 10.9 Mavericks for Apache Multiple VirtualHosts

At the beginning of the month and after 8 years in the financial services sector, I started at a new company. Day one was a surprise and a refreshing change, everything was ready for me and worked! No red-tape, no policy documents to fill in, just a MacBook Pro sat ready and waiting for me to do whatever I liked with it. The new Mac was pre-installed with 10.9 so I thought I’d write down the process for either new Mac users/owners or anyone interested in setting up their local machine for development purposes.

Ideally for this you’ll already have your preferred stack installed. I personally do all this using Homebrew, I previously posted a guide to do this, “How to setup an AMP environment running Laravel And MariaDB“.

The process is easier done in Terminal, so familiarity with that is helpful but not essential here, I’ll try to add helpful tips as we go along. To edit files, my preferred choice is nano, but you may want to use vi or another GUI visual editor. So, pop open Terminal and let’s begin..

Editing the Apache configuration file

Firstly we need to allow the usage of the httpd-vhosts.conf file from the main Apache configuration file httpd.conf.

sudo nano /etc/apache2/httpd.conf

In nano, using the “Where Is” function ctrl+W, search for “httpd-vhosts.conf”, you should find this directly under “# Virtual hosts”. Simply remove the hash at the beginning of the line to uncomment the include and your entry should then look something like this:

# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

Save this (ctrl+X, then Y), now we need to edit that virtual hosts file and define our own domains:

sudo nano /etc/apache2/extra/httpd-vhosts.conf

The default file comes with some basic information and a couple of dummy configs, but for the purpose of learning, we’ll remove all of this and create our own from scratch. Use ctrl+K (Cut Text) to remove the existing lines. Enter the following in order:

# Force Apache to use port 80
Listen 80

Firstly we make sure that Apache is using the correct port, the usual being port 80 but you can use anything else that is unreserved if you prefer.

# Use a wildcard to listen for requests on all IP addresses
NameVirtualHost *:80

We then set the virtual host requests to listen for anything using port 80, if a domain “” for instance, does not match one of the ServerName directives below, it will default to using the VirtualHost.

<VirtualHost *:80>
    DocumentRoot "/Users/username/Sites/"
    ErrorLog "/private/var/log/apache2/error_logs/"
    CustomLog "/private/var/log/apache2/access_logs/" common
    <Directory "/Users/username/Sites/">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all

The main parameter in the above block is the “DocumentRoot”. This defines where your files can be found. As a new PhpStorm fan (previously a SublimeText lover!), I use the default /Sites folder to store my files, you can of course choose whatever you prefer, just make sure you update the “<Directory>” value too.

I also added in an alias for “www” to allow this full sub-domain to also reach the same files, and also some directory permissions, I won’t cover those here, but maybe in a future post.

Next we need to trick your machine into believing that the internet address used “” is actually on your local machine, to do this we simply update our hosts file:

sudo nano /etc/hosts

Add the domain or domains you’ve created above:

Note that I’ve used the alias version instead of the base domain.

All that is left to do now is restart Apache:

sudo apachectl restart

In your browser, simply navigate to your chosen domain, in this example:

How to setup an AMP environment running Laravel And MariaDB locally

I personally find the nicest repo of Laravel to be Chris Borgia’s Radiate package. It nicely pulls together some of the best bits of the web including version 4 of the excellent PHP framework and all the basics you’ll need with tastiest front-end kit like HTML5 Boilerplate, Font Awesome, Sass, Twitter Bootstrap and simple register form.

Note: As you’ll notice with most of my posts, I assume you’re using a Mac. If not, buy one! You’ll also need sudo permissions

So, to get started, let’s prepare the environment…

You’ll need Xcode install, so if you haven’t got it, go grab it from the Apple Store, then install the command line tools:

$ xcode-select --install

If you don’t already have it, install Homebrew (I prefer to curl it)

$ ruby -e "$(curl -fsSL"
$ brew doctor

If you do, simply update

$ brew update

Then grab the tap where the dependancies are

$ brew tap homebrew/dupes
$ brew tap homebrew/versions
$ brew tap homebrew/homebrew-php

Brew up your preferred flavour of PHP (I’m going with 5.4 here as 5.5 isn’t stable apparently!)

$ brew install php54

Some extra libraries are required to get this to work…

$ brew install php54-mysqlnd_ms php54-memcached memcached
$ ln -sfv /usr/local/opt/php54/*.plist ~/Library/LaunchAgents
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php54.plist

Now that you have your own custom compiled version of PHP installed, we need to update OSX’s Apache configuration to use the new PHP module as opposed to the native OSX version.

$ brew info php54

Take note of the LoadModule line in the ‘Caveats’ section

$ nano /etc/apache2/httpd.conf

Search for ‘LoadModule php5_module’. Change to use the new php54 library by adding # on the old one and adding new one on the next line

#LoadModule php5_module libexec/apache2/
LoadModule php5_module /usr/local/opt/php54/libexec/apache2/

Save and close the file, then you need to install mcrypt

$ brew install mcrypt php54-mcrypt

Restart the Apache

$ sudo apachectl restart

Now create a new folder for your project (I use PhpStorm to set this up)

$ cd /Users/leemcintosh/Sites/
$ mkdir myproject

Now let’s configure Apache to run your website…

To make things easier where permissions are concerned, I would recommend running Apache as your local user. This will allow you to set your VirtualHost to point to your local project without encountering permission issues).

$ nano /etc/apache2/httpd.conf

Search for “User _www” and replace ‘_www’ with your Mac username (mine being “leemcintosh”.

Then search for “vhosts” and uncomment the line so it looks like this

# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

VirtualHosts make it easier to run your projects locally and there are a number of ways to set up a VirtualHost environment in Apache, I’ll show you how to add multiple websites using the “sites-available” folder…

At the end of the file, add the following

Include /private/etc/apache2/other/*.conf
Include /private/etc/apache2/sites-enabled/*

Save the file

$ cd /etc/apache2/
$ mkdir sites-available

We’ll add “sites-enabled” shortly, once we’ve configured your new site first

$ cd sites-available

Create a new site in here using the name of your new project

$ nano

Now we need to enter our VirtualHost configuration information

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /Users/leemcintosh/Sites/myproject
    <Directory /Users/leemcintosh/Sites/myproject/>
          Options Indexes FollowSymLinks MultiViews
          AllowOverride None
          Order allow,deny
          allow from all
    ErrorLog /var/log/apache2/myproject-com.error.log
    CustomLog /var/log/apache2/myproject-com.access.log combined

Save the file (ctrl+x then Y), and now copy that to the “sites-enabled” folder, on Linux distributions you can use the a2ensite command, but on a Mac you have to do things manually using a symbolic link (symlink)…

$ ln -s sites-available/ sites-enabled

Now that we have our site configured, we must trick our browser into believing that the website is on the Internet, we do that by forcing an entry in our hosts file…

$ nano /etc/hosts

At the bottom of this file, add your new project

Save the file, clear the dns cache and then restart Apache

$ dscacheutil -flushcache
$ apachectl restart

You should now be able to visit (obviously replace myproject and name with your own) and it will load the web application under /Users/leemcintosh/Sites/myproject/.

If you don’t see the website, check Apache

$ apachectl configtest

From that you should be able to see any errors that have occurred. Simply rectify and restart Apache. If problems still persist, either tail the logs as defined in the VirtualHost configuration, or contact me!

Download the Laravel framework and components…

Clone Radiate into your new project (you’ll need an ssh key mapped to github for this part)

$ cd /Users/leemcintosh/Sites
$ git clone myproject

Inside your project root (myproject/), install composer

$ composer install

Start Artisan server, and create a new key

$ php artisan serve
$ php artisan key:generate

Install MariaDB (MySQL variant)…

$ brew install mariadb

Start MySQL

$ mysql.server start

For additional MySQL configuration, check back for new posts! Have fun :)