How to reach your host machine from VirtualBox

Say you are doing local development for your site (e.g. http://spokefire.dev) and you want to start IE testing using some virtual machines. Only you can’t because you have to set up the hosts file to point to your host machines IP address, which constantly changes due to DHCP servers changing your IP.

This gets really old, so a solution (if you are using a VM other than VirtualBox, YMMV) then add a rule for the following into your hosts file.

10.0.2.2 spokefire.dev

Then, from your virtual machine, simply go to http://spokefire.dev in your browser (IE I’m guessing) and it should tunnel back through to your host machine!

Hope that helps someone out, took me ages to track down.

Published on Thursday, 12 April 2012

Handy Rails string functions

Recently I’ve been making my first custom library at work, and I’ve needed ways to turn strings into classes and classes into strings, I found some helpful methods for doing so by digging around a bit!

Published on Tuesday, 28 June 2011

Time to learn: Behaviour Driven Development

I’ve been using Rails on and off for about a year now. I built my site quickly in it to see how it handled, and now I’ve started a major project with it at work. What better time to learn about Behaviour Driven Development.

Published on Thursday, 31 March 2011

Getting up and running with Cucumber and Test::Unit

It took me a little while to figure out how to get Cucumber working without its rspec dependancy. Maybe it was me being stupid but hopefully this can help others out too!

Published on Monday, 21 March 2011

My HTML Toolkits

Recently I’ve updated my personal HTML Toolkit, and in doing so I’ve also created a basic responsive toolkit for myself too.

Published on Wednesday, 16 February 2011

First networking meeting

Last thursday I went to my first networking meeting. I thought I would share my thoughts and feelings about how I got on and what I came away with.

Published on Thursday, 2 December 2010

Using php.activerecord with Zend Framework

Recently I’ve been learning Ruby, and at the same time Rails, with it I’ve learnt alot of good standardised ways of things to do, but without a doubt the most powerful part of Rails, for me, was ActiveRecord. So I had a search around the net and came across this fantastic little ActiveRecord implementation in PHP, called php.activerecord. In fact its so amazing I thought I would write a little guide for you to get up and running quickly with it.

Published on Monday, 12 July 2010

How to create a Zend Controller Plugin

Ever wondered how to create a nifty little Controller Plugin for Zend Framework that will build your navigation for you and automatically send it down to the view for use in your view and layout scripts? Well here is something you might find handy. It shows how to register your controller plugin, and a basic overview of what a navigation controller plugin might look like.

Published on Monday, 19 April 2010

JavaScript CDATA

Just for my own sanity (because I always forget this for some reason).

Published on Thursday, 11 February 2010