Resolving local networks with Xip.io

I recently stumbled upon a brilliant service. Developing locally always involves editing the /etc/hosts file to resolve a domain to your local host and then having to setup DNS servers to be able to check on my mobile or tablet.
Xip.io seems to have solved this issue by creating a custom DNS service that allows you to resolve a custom domain to an internal ip address so when any other device does a lookup it resolves correctly.

For example; your machine is on 10.0.0.10 and you need to check it on your mobile. You don’t want to upload it to your sever, setup a host, setup the database and all that. If you set the host on your local machine as

www.10.0.0.10.xip.io

when your mobile tries to do a DNS lookup the remote DNS server extracts the 10.0.0.10 from the Domain name and returns that back as the IP.

You can use any precursor to the ip address;

host1.10.0.0.10.xip.io
host2.10.0.0.10.xip.io
shop.10.0.0.10.xip.io

Brilliant idea!

Bash Profile

I find myself working in iTerm a lot. Well to be honest i prefair a terminal over a Finder window any day.
So i find myself running the same commands over and over, {{ git status }} over and over to check if any files have changed.
Checking which branch i’m currently on.

I spent a lot of time altering my bash profile to enable colours by default, changing the prompt layout, setting up aliases etc.
I finally found a brilliant template online by Jacob Tomlinson at Terminal Piperita Theme

The prompt integrates into git, so if git is enabled in the current directory it will add the current branch to the prompt and tell me if there have been any changes made. It’ll give me the user my terminal is logged in as and the hostname of the machine along with the current folder all with some pretty colours that change if i am logged in as root too. Continue reading