Ok, it’s not a full location detection as such.. I use my laptop (Ubuntu 9.04) both at home and work, as well as other places.  The problem that I had was related to how SAMBA was configured.  At home I have one workgroup name and at work I want the machine to appear in the company domain.  But also, while out and about in the big bad world I don’t want SAMBA on at all, no need to share anything with anyone.

So, to over come this and correct it at boot time I’ve come up with the simple script below.  The only other thing you need to do is prepare a couple of smb.conf files to suit the locations you’ll be in.   I have 2 smb.conf files, one for HOME and one for WORK.   I run the script from /etc/rc.local so it runs when I should have networking fully up and running. 

Here is the script:

#!/bin/bash
 
HOME=YOUR_HOME_GW_IP
WORK=YOUR_WORK_GW_IP
 
GW=`route -n | grep ^0.0.0.0| awk '{print $2}'`
 
if [ $GW = $WORK ]; then
    #echo "You're at work"
    cp /etc/samba/smb.conf.WORK /etc/samba/smb.conf
    /etc/init.d/samba restart
elif [ $GW = $HOME ]; then
    #echo "You're at home"
    cp /etc/samba/smb.conf.HOME /etc/samba/smb.conf
    /etc/init.d/samba restart
else
    #echo "You're somewhere else"
    /etc/init.d/samba stop
fi

Pretty simple really.  Hope others will find it useful.

Comments 3 Comments »

From the looks of the weather we’ve had it should be a good summer for camping … at least I sure hope so anyhow. Need to get the tent dug out and setup in the garden for to check it for any damage and such .. it’s been put away for 2 years since we last used it .. there was no camping last year.

I’ve been looking at some camp sites and one that has stuck out as looking like a fun place to go (for the kids too) …

River Dart Country Park – http://www.riverdart.co.uk/ Check out the pics of the place on the site.

Also found this place http://www.woodovis.com/cmx/content/view/2/4/ seems all right. Will have to check them out more.

Comments 1 Comment »

It all started a few months ago when someone at my work (www.cbnl.com) was approached by a gentleman from WellChild, a charity that helps sick kids.  The project was to rebuild/make over the sick kids playground/garden just off Ward D2 at Addenbrooke’s Hospital in Cambridge.  Check out the link for Ward D2 to find out more info about the unit and what they do.

Anyhow, the existing garden, while functional, was in need a good cleaning and tidying up of the plants and repainting and what not.  Here are a couple of the before pics (The rest of the before pics can be seen by CLICKING HERE)

garden 053garden 055garden 057

garden 058garden 059garden 063

garden 065garden 066garden 068

After the 2 days we turned it into this (the rest of the after pics can be seen by CLICKING HERE)

090900H_0020DSCN1620DSCN1621

DSCN1624DSCN1628DSCN1635

DSCN1638DSCN1668DSCN1674

garden 177garden 182garden 199

garden 201

This was, to say the least, a very rewarding 2 days of very hard work.  Please be sure to check out the rest of the pics in the gallery.   I would also like to invite folks to consider helping out WellChild either with donations to their cause or by offering your company’s help in some of their projects to help sick kids around the UK.  While my exposure to WellChild has only been a couple of days, it’s clear that these folks are dedicated to helping the children.  Charities like this are often forgotten or perhaps not given the thanks they deserve for the hard work and research they carry out.   I’d personally like to say thanks to them for the opportunity to help with this project and I hope I can help again in the future!

Of course, this project wouldn’t been possible either if not for the generosity of Cambridge Broadband Networks and it’s donation of time, money, people and supplies for the project.  There were a large number of other donations provided by local businesses, and I will update this article with those details shortly.

Comments No Comments »

What a pig hahah no really. I started a 7 day accelerated MS Exchange 2007 course on Monday morning of this week. Well, it actually started Sunday night with a 2 hour intro and welcome briefing. The course so far has been going pretty well, but it’s been a lot of work. The course has been running from 0900hrs until we break for dinner at 1930hrs. Then after dinner it’s either back to the lab or back to the rooms to do self study and work on the lab machines via http://www.logmein.com.

Today, at 1700hrs, is our first exam. It’s the 70-237 exam (http://www.microsoft.com/learning/en/us/exams/70-237.mspx).

We will have the second exam 70-238 (http://www.microsoft.com/learning/en/us/exams/70-238.mspx) on either Friday night if we can manage or more likely on Saturday morning some time.

The course is scheduled to finish around noon on Sunday after the final exam, the 70-236 (http://www.microsoft.com/learning/en/us/exams/70-236.mspx) sometime Saturday evening.

More on the results of this as they come out.

– UPDATE –

Well, the first exam ended in tears … needed 700 to pass only got 583.  I can resit the exam again between now and the end of June for free.  Depending on how the final exams go I may resit this weekend but we’ll see.

– UPDATE – 8/May/2009 –

The plan now is that Saturday I’ll do the 70-236 exam in the evening at 1700hrs, and if I can get enough time to study more for the one I failed, the 70-237, I’ll re-sit that exam Sunday morning then come home.  I’ve decided that due to the level of knowledge required for the 70-238 exam coupled with the fact that only 3 of the 9 people that wrote the exam today actually passed, sod that.  I’m not even going to waste a free shot at doing that one.  I’ll plan to come back in a month or so to sit the 70-238 exam.

Comments No Comments »

The Cottenham Yesteryear Road Run happens annually all in the name of charity (MAGPAS) and good fun.  We were coming back from the swimming pool in Histon last Sunday (Apr 19, 2009)  when we noticed the parade staging up for it’s last leg of the road run, enroute to Cottenham.  We quickly got ourselves home and then walked back to the village green to see all the cars and the small fun fair that was setup for the kids.

Here are some pics from the green, there are far more in the gallery.

img_9320img_9322img_9327

img_9330img_9331img_9350

img_9335img_9341img_9344

There were so many cars there.  Be sure to check out the other pics CLICK HERE.

MAGPAS

Support MAGPAS today! Donate through the widget in the left column.

Comments No Comments »

Right, well Easter is actually over, but I’m doing a blog posting now really just to put the pics of the kids online more then anything.  The day was good, it started way to early though.  Man the kids were up at the crack of dawn, if only it were the crack of dawn in the UK and not for say India .. shesh.

 

Thankfully, Yuki’s dad is here staying with us and he was looking after the kids.. Yuki and I managed to sleep in until nearly 9am, which was nice.  In fact, we managed to sleep in until nearly 10am Friday and Saturday.   I can’t even begin to recall sleeping in that late when vast amounts of alcohol was the direct cause of it.  So can’t really complain much.

 

Anyhow, the day started with breakfast as usual.. then we sent the kids up stairs with their lao ye (grandfather in Chinese, it’s more specific then that, but trust me, you don’t want me to open that can of worms here and now :) ).  Yuki and I took to hiding all the stuff for the kids.. candy, chocolate eggs, bunny’s, all sorts of rubbish haha.  Then it was time to unleash the kids..

First, here is a quick tour of the hiding places of all the candy

Here’s a video of the “hunt” under way .. I love Emma’s comment at one point “I’ve got so many…”

Here are a few pics…

img_9173.jpgimg_9191.jpgimg_9192

img_9197img_9204.jpgimg_9205.jpg

img_9207.jpgimg_9208.jpgimg_9209.jpg

You can see all the pics and videos taken today by CLICKING HERE.

Enjoy the pics and videos.  I hope to do more blogging in the future.. I’ve been pretty slack at getting out updates, but life has been full of upheavals that… well… frankly made blogging a chore. 

Besides, I’m booked to attend WordCamp UK in July.  It’s the second year for the event and the first year I’m going … it’s a weekend full of meeting other bloggers, some who do it for a living but most because they enjoy it (I assume anyhow).   With enjoy luck this event will encourage me to blog more, or even just give me loads of ideas to make my blogging better (which frankly wouldn’t take much, I know I suck at blogging).

wordcampuk-2009-graphic

Comments No Comments »

Looking for a change in where we take the girls to play, I got on Google and starting searching for alternative indoor play areas for kids in Cambridgeshire.  Normally we go to either Funky Fun House or Cheeky Monkeys.  They’re both great fun the kids love them, but sometimes you just want to mix it up a little bit.  So while searching for places I came across Activity World in Peterborough.  It’s not too far and was a nice day so the drive was pleasant. 

This place was an incredible size!  The actual play area was easily 5 times bigger then Funky Fun House .. And so much more to do there.  You can see from clicking on the link for Activity World they have more pics and videos on their site which is why I decided to go there and check it out.

Here are some pics I took on the day, there are more in our Flickr Gallery ..

 click here to see them all.

img_9123.jpgimg_9120.jpgimg_9118.jpgimg_9117.jpgimg_9112.jpgimg_9109.jpgimg_9106.jpg

Click the thumbnails to see the bigger images.

Comments No Comments »