Friday, August 29, 2014

Adding opensearch to your site

What is Opensearch?

Opensearch allows you to specify how queries are formed when searching a website. You can read the documentation at

How to install it?

This is how I have achieve it on my site

First add a autodiscovery link to your site pages

<link rel="search" type="application/opensearchdescription+xml" title="Rabin's blog" href="/opensearch.xml"/>

Next you need to define the open search document which will be in /opensearch.xml file in your website

<?xml version="1.0" encoding="UTF-8" ?>
<OpenSearchDescription xmlns="" xmlns:moz="">
<ShortName>Rabin's Blog</ShortName>
<Description>Search Rabin's Blog: </Description>
<Image width="16" height="16" type="image/x-icon"></Image>
<Url type="text/html" method="get" template="{searchTerms}&amp;submit=Search"></Url>

That’s it. The next time you have loaded the page, you should be able to search your site by pressing tab on Chrome.

Happy coding!

via Rabin's blog

Thursday, July 10, 2014

How to best end the year 2011…. with a Road Trip!!!

First time campers

The year was 2011 and the month was December when we jet set ourselves on to a long road trip down to Melbourne and then to Adelaide. The road trip wasn’t a big challenge for us however, it was the idea of camping all the way that made us a little nervous at the start. The reason being we had never camped out before. As nerve racking it was, it was also exciting as we were pushing ourselves to do things that we have never done before. In the heat of excitement, we went shopping every weekend to find ourselves involved in price checking and then buying most essential camping requirements such as tent, sleeping bags, etc. By December 23, we were all ready with our camping essentials and we also had all our amenities sorted out. We were excited about how the road trip was going to be and how we would survive camping (if we would).

Day 1:

Total Km: 473K

Destination: Eden, NSW

Senset view at Eden, NSW

The morning of December 29, 2011 marked the start of our long road trip. We were too keen for this and probably that’s why we could not sleep properly. We woke up early morning, then started packing up and by the time of 8 AM we had all our belonging in the car. We stopped over for a quick breakfast at Espresso Organica (@ Concord West) for a delicious Bacon & Egg Roll. Honestly, we could not have started the road trip better. It was a great morning, not too many clouds in the sky and the visibility on the road was clear. Our pit stop for the day was at Eden Tourist Park which was 473 km south (approx. 6 hr 32 mins

drive). On the way to Eden, we stopped over at few different places, which included Kiama and then a quick lunch at Milton and then straight on to Eden. Reaching Eden tourist park before sun set was our main goal and we did accomplish it by reaching there at 6:30 PM which gave us enough time to set up our tent properly for the first time. It was a great experience to properly setup the tent and be sleeping in it. We did enjoy all the amenities of Eden tourist park, if you have never camped out before, we would definitely recommend eden tourist park. The tourist park is setup right next to Lake Curalo and across the road you can see the beach so a beach swim in the morning is totally accessible (if you are keen).

Day 2:

Total Km: 587

Destination: Wilsons Promotory

View of Lake Entrance, Victoria

Early morning dip in the sea and a quick breakfast lead us to packing our stuffs and getting ourselves ready for the second day of road trip. The pitstop for today was Wilsons Promotory (in Victoria). By 10 AM in the morning we were already in the car. We crossed NSW and Victorian border within the next 2 hrs. We then stopped over at Lake Entrance to check out what it was all about. Lake Entrance, a water-front town, was amazing. It was so busy with all the tourists coming over to spend their holidays.¬†A walk across the popular landmark footbridge, links the town centre with the sand dunes and coastline of Bass Strait, popular with surfers and swimmers. We enjoyed a bit of beach action here and then afterwards indulged into some fish and chips and beautiful scenario of Lake Entrance. After an hours of resting, we headed on to our journey with a slight detour ahead to see Golden Beach. As the name sounds we were keen on investigating why this particular beach was called Golden Beach. After almost 2 hrs drive and 150 km, we reached Golden Beach. It was a beautiful seaside located near Sale and midway between Gippsland’s Ninty mile beach. Apparently, the whole 90 mile beach features pristine golden sand bordered by sand dunes and coastal vegetation.

Few more hours of driving took us into Wilsons Promotory, which is a peninsula that is situated in the southernmost part of Australia and is a popular camping spot. Due to its popularity, we were not able to find a good camping spot around this area and had to return to sandy point to console ourselves with a camp site.

Day 3:

Total km: 250Km

Destination: Melbourne, Victoria

Graffiti art fille Alley in Melbourne

Had a rough start on the Day 3, with the issue of going to the bathroom early morning. We headed out to the nearest town, Foster for bathroom operation in the morning. We then enjoyed breakfast (bacon and egg) from one of the shops at Foster and continued our journey towards Venus Bay and Iverloch. The only time where we actually swam and soaked up the sun was at Venus Bay. It was a beautiful day and the water was cold and it was good to find a beach that was long enough to accomodate that much of crowd. Few hours later, we found ourselves lagging behind schedule so we made our way toward Melbourne City. The closer we got to Melbourne city, our GPS started to struggle with positioning. At one point it started giving direction to keep left when actually it was a left turn ahead and also there were couple of situation where it showed us on wrong road and quite a lot of ‘Turn around when possible’ messages. Anyways, its all a part of city driving we thought and kept patience and got to our hostel in Melbourne. ‘The Nunnery’ seemed to be popular with tourists who share rooms with bunk beds and that’s what we did. However, we did have a room for us and all our roadtrip companions. After a quick shower and light nimble we went out to see the city light and the fireworks around in Melbourne City.

Day 4: 

Total Km: 150Km

Destination: San Remo, Victoria

Refreshment drinks

The start of this day was marked with a bit of hangover in the morning and rush to checkout from the hostel which we did manage to do on time. Thenafter, headed out in search for a breakfast place. It was new years day and almost everything was closed in Melbourne. We did manage to find a cafe and had some quick breakfast and then headed over for a quick tour of quiet Melbourne. It must have been one of hottest days of this summer and we were roaming around in this brutal heat. We bared the heat for few hours and when it felt like we could not take it any longer we then decided to drive down to our destination ‘San Remo’ and get prepared for out first ever encounter with Penguins. Phillip island is a popular destination for tourists to come and see penguins (fairy penguins). Fairy penguins are really small, about 30-40 cms in height but its their whole movement that mesmerised and entertained us and not to forget how cute they look. After few hours of penguin action, we headed back to our campsite at San Remo which this time again was a Holiday Park situated right at the start of the bridge that joins Phillip island.

Day 5: 

Total Km: 225

Destination: Torquay, Victoria

The Great Ocean Rd

Another hot day and we headed our way back to Melbourne. But this time it was meant for some snitchzel hunt. Our companions of road trip had scoped out a great schnitty place for lunch which we were heading towards. Upon arrival at this place, we were surprised to see it closed on 2nd of January and also a little bit disappointed. However, we carried on our journey and finally found one of its outlets open in Melbourne Central. The meal was tasty and delicious and made it worth all the walking in the hot sun. Then after, we headed towards our next destination the beachfront town of Torquay, the start of ‘The Great Ocean Rd’ . Torquay is a popular destination for Victorians and the beach has a long grass front and shady trees that line the coast. I slept that night with an excitement of driving on ‘The Great Ocean Rd’.

Day 6:

Total Km: 372 

Destination: Mt Gambier, South Australia

The Blue Lake, Mt Gambier

It was the excitement to drive ‘The Great Ocean Rd’ that woke me up early morning. Had a quick shower and we were all set to hit the road. It was one of the best drives that i have ever had in my life. All those winding road and ups and downs added to the excitement along with the view of the ocean on your left hand side. It was just amazing. I must admit the drive was exciting still it didn’t make me forget about food so at the end of the drive we were too hungry and stopped at ‘Appollo Bay’ for some fish and chips. We did pretend to swim in the beach too. After a bit of play in the beach and stomach full of fish and chips we head off to our destination Mt Gambier, South Australia. At Mt Gamvier, we were a bit surpised when we checked in to our caravan park. We were so used to seeing a lot of people in the caravan park however, this time, there was only few people who were camping out. The caravan park was situated right on the ourskirts of the Mt Gambier city and so we had the luxury of eating chinese food and then roaming arond the city before we went for a quiet sleep in our cozy tent.

Day 7:

Total Km: 452

Destination: Adelaide, South Australia

The Big Lobster Hotel


The day started with waking up to no noise from other campers and no rush to checkout from the camping site. We slowly got ourselves ready and packed our belonging, headed for a quick breakfast in the main city. Then we went up to see the famous ‘Blue Lake’ which was amazing. It was so bright blue, apparently the lake turns Blue in summer and grey in winter. It was a great sight and no wonder there were so many people around. Right after this, we headed straight on to our destination in Adelaide with a brief stopover at Beachport where we enjoyed some delicious donuts and then off to Adelaide¬†where luxury was waiting us. Upon arriving at Adelaide city, we drove straight to Rendezvous hotel where we had our booking, however, they had blackouts the whole day and transferred us to Hilton Hotel. We weren’t too sad about it, in fact we were kind of happy to be transferred. After all that travel during the day, i must say we did enjoy the luxury a bit more that we would have done.

Day 8: 

Total Km: 485

Destination: Robinvale, Victoria

Camping companions

Day 7 marked the start of our journey back to Sydney. We had to get back to work from the 9th so we had to made a decision to start driving back or else we would not have enough time to rest before we get back to work. And there it started the long hours of driving and this time it wasn’t a coastal drive which made it even worse as there weren’t any beach that we could stop and relax. The best part about this day was we did briefly stop over at Coopers Alehouse in Adelaide to indulge ourselves into some Coopers ale and few of our companions enjoyed the humoungous schnitzels. We did see few towns and briefly stopped for some food or petrol but apart from that all was just drive. Finally, we reached Mildura where we teamed up with our roadtrip companions and then headed to our campsite which was 1 hr drive from Mildura. The campsite was right on the edge of Murray River (on Victorian side). Because we got to the campsite at around 9:30PM , it was all dark and we could not enjoy the great views on that night and were eagerly awaiting for the sunrise so we could have a good look at the¬†scenery.

Day 9: 

Total km: 932

Destination: Sydney, NSW

Murray River

Bank of Murray River

This was the last day of the trip however, we were excited to see the sunlight and got out of the tent and appreciated the view. The campsite was great, bank of Murray River with trees all around and quietness everywhere. We captured some of that scenary in our cameras and then packed up and headed to our destination. We knew were had a lot of drive that day so we started driving as early as we could briefly stopping for food and petrol again. However, this time, the towns were too further from each other which left us no choice but to wait till we got to the other town. We did make it to Sydney before dark and there after enjoyed a bit of Syndey air and beverages to relax ourselves marking the end of our Road Trip.

In summary, after 4066 Kms of driving along 3 states of Australia, the road trip was a hit with a lot of fun and exicting things done, new experiences gathered, new places known and tried different things some of which we are proud of and some we are not proud of :)

via Rabin's blog

Thursday, June 12, 2014

Git rebase vs merge

I have been thinking about this for quite a while now. I have been doing merge and it always keep adding the merge commit which is good to keep track of the project history. However, I am more lenient towards git rebase as it keep the history flat and clean.

A typical git rebase example:

Lets say you start working on a feature enhancement

#Start a feature branch
git checkout -b feature
git commit -a -m "Feature added"

Now there is a sudden need to do a bug fix

#create bug fix branch
git checkout -b bugfix master
git commit -a -m "bugfix"
#merge back to master
git checkout master
git merge bugfix
git branch -d bugfix

Now that bugfix is merged with master, we rebase feature branch to keep our repo history flat and clean

git checkout feature
git rebase master

This will put the feature branch changes to the tip of master so we can do a standard merge from master once we are ready to commit feature changes.

Do you prefer git merge? and why?

via Rabin's blog

Friday, June 6, 2014

Reina’s second trimester

The second 3 months of Reina’s life. How they went along and her milestone achievements. You can view the timeline at Reina’s timeline

via Rabin's blog

Reina’s first Trimester

The first 3 months of Reina’s life. How they went along and what she achieved :) View Reina’s second trimester You can view the timeline at Reina’s timeline

via Rabin's blog

Wednesday, May 28, 2014

Reliably copy files from a folder

A simple bash script that uses rsync to copy files from a folder. The advantage of this script is when you have a brief network timeout or connection issue, it will still resume until MAX_RESTARTS is exhausted.

via Rabin's blog

Thursday, May 22, 2014

Log viewer

A simple log viewer which will be used in conjuction with sudo command to allow users with limited priviledges to view/read log files.

via Rabin's blog