Tuesday, June 22, 2010

Leech Attack! - How to avoid those little bloodsuckers

Leeches are pretty common to the Nilgiris. Since I suffer from an advanced case of Bdellophobia (a smug bastard's way of saying Fear of leeches), I have compiled a list of things which will help fellow sufferers in keeping the bloodsuckers away.

Note that Leech bites are pretty harmless. Since the leeches use a powerful anesthetic in their saliva, you will feel no pain when you are bitten. Also it contains a strong anti-coagulant, which means you will continue to bleed for a while after the leech drops off (on its own, or if you pull it away). Leech bites can also leave a mark on the skin. You might get some allergy to leech bites too.

Before we start off, I heard that some species of leeches in kerala can actually jump from trees. I dont know how to avoid them, and I dont care since I trek in karnataka mostly. Anyway for normal leeches, the below techniques can help a lot.

Leeches hate the smell of tobacco, so I use tobacco flakes (ghutka) to keep them away from my feet. I also wear 2 layers of socks with tobacco flakes in between each layer, and also spread it over the shoe. You can also rub some on the lower extremities of your pants. I also stuff my pant in between the two layers of socks to prevent any from creeping up the leg.

Finally if you see those blood suckers on your shoe/clothes/bag, how do you remove them? Since I am scared to death of even touching them, I use a pain spray like Moov, and apply it on the leech. This makes the leech drop off after 2-3 seconds. I heard that other sprays like deodorants also work, but never tested them myself. Also I dont think it is a very good idea to use a deodorant on a break in the skin.

After any trek in a leech infested area, I suggest taking a bath and examining the body for any signs of leeches. Also avoid keeping the bags or shoes near the beds, since leeches might climb onto the bed resulting in untold sleepless nights interspersed with nightmares!

Tuesday, April 20, 2010

Fixing high pitched audio in youtube video

An hour ago, I was trying to watch a couple of google IO videos on youtube.com, but they are all about an hour long, which means it takes about 1.5 hrs to download on my "broadband" connection. So I decided that the best way would be to download them and save to disk. (Google seems to have enabled a download option on youtube, but it is available only for US... wtf?)

Anyway, I used the Download Helper plugin of firefox to download the video. But when I tried to play it with mplayer, the guy giving the lecture sounded like a chipmunk. I was unable to understand what he was saying since the voice was very high pitched and was like a tape being forwarded, but when I played it on youtube, it sounded fine.

So after checking out a number of other players at my disposal (which was none :), I decided to google to figure out what the problem was. A guy on the mplayer forums had the perfect solution - use the opensource project scaletempo's audiofilter like below

mplayer -af scaletempo

This worked like a charm, and the videos are playing great now.

Saturday, April 10, 2010

Google DNS server

Now-a-days my airtel DSL connection's DNS servers fail to resolve some DNS addresses. I dont have an idea about what the problem is, but frequently I see many domains unable to be resolved and sometimes pretty slow too. So I decided to move to using the Google Open DNS Server. The IP is also a beautifully easy to remember - 8.8.8.8 . 8.8.4.4 is another DNS server of google which can be used as an alternate.

To keep this IP from being overwritten on my Fedora 12 Box, I figured out that the best way to do it would be to write a new file in /etc/NetworkManager/dispatcher.d/ which I names as 25-setdns with the following contents

#!/bin/sh
if [ "$2" = "up" ]; then
cp -f /etc/resolv.conf /etc/resolv.conf.BAK
echo nameserver 8.8.8.8 > /etc/resolv.conf
echo nameserver 8.8.4.4 >> /etc/resolv.conf
fi

This will ensure that the Google DNS will always be used to resolve my domain names.

Do note that I took a very crude, but simple approach here since I dont use any VPNs. If you do use VPN software, then you should make sure that the google DNS is the next entry. since your VPN's local DNS will resolve your VPN internal domains, which are unknown to outside world!

For the paranoid, this is yet more information you are pushing to google! :D

Tuesday, March 16, 2010

32 bit build environment on 64 bit Linux machines

Generally we come across many application which were designed only for 32 bit operation. Although any 32 bit program can be compiled in a 64 bit environment, sometimes the makefile design makes this a huge pain to do. So sooner than later, we end up with a program which just would not compile in a 64 bit environment.

For those extreme cases, you can create a 32 bit chroot environment on your 64 bit box. To do this, first decide on which environment you would like based on the .cfg files in /etc/mock/. Then create a softlink to the particular config to default.cfg . Then just run mock init.

ln -s /etc/mock/fedora-12-i386.cfg /etc/mock/default.cfg
mock init

mock init will use yum to download the required environment. After it completes, then you can run

mock shell

to enter the 32 bit environement. To install any additional packages use the command

mock --install package-name

Note, this can be used simulate build environments other than x86 too, and is used for testing packages on various environments without the cost of physical machines or the pain of virtual machines.

Tuesday, January 5, 2010

Google Calender

I have become a fan of Google Calender, and have been using it non-stop to help me remember the list of things to do etc. I previously tried to use offline stuff like M$ outlook etc, but they are well - offline. So unless I am in office I cant use them.

Since I check my mail all too often, I realized that the Google calender is a very valuable resource for me. I added all stuff like people's birthdays, renewing my passport (about an year away) to weekly team meetings in office to getting my bike serviced or meeting an acquaintance.

Google calender is the next best thing after a blackberry kind of device for these alerts. Since I do not have anything close to a blackberry, I am relying on Google calender.

Hail Google! :)

Thursday, December 31, 2009

An iPod Saga - or how I nearly went mad trying to use it


My sister recently gifted me an iPod Nano. I tried to use iTunes to load some mp3s onto it... seemed like a simple enough task given the "user-friendliness"/"coolness" (depending on if you are a fan/fanatic) of Apple. First of all, it says it needs to delete everything existing on the iPod. Hmmm, ok... WAIT! WHAT THE FUCK! why do you need to delete the existing stuff, Cant you just "add" to it? Apple's Steve Jobs makes an appearance on the iPod nano's screen and lists Apple's Official Policy - "Itz my product damn it, I can make it shit on you - if I wish to".

So, I deleted the existing songs, and wrote new mp3s onto it - using iTunes on my office laptop which had windoze I-REALLY-promise-not-to-crash-XP with Service Pack I-NOW-REALLY-REALLY-promise-not-to-crash. (Never mind it BSODs once a day on "heavy usage", But I digress) Now, I wanted to shutdown the damn iPod and there is no "off" button... hmmm, so I had to google the controls on how to shutoff the damn thing. Score one for "user-friendliness"!

All is well for one single goddamed day, when I decided to add a couple more songs. I start up iTunes and connect iPod, and iTunes crashes. ok maybe I connect ipod before starting iTunes? still crashes. maybe I reboot iPod? crashes. maybe I reboot Windoze? crashes. maybe I reboot both? crashes. maybe I update software? crashes. crashes. crashes.

OK, screw it. I would rather listen to my 12 songs already loaded for the rest of my entire life, than put up with another second of this i-Piece-of-CRAP-Tunes. So disconnect & Play. What is it? oh, when i-fucking-stupid-Tunes crashed - it corrupted the song DB and said I have to reset the device with iTunes. and guess what happens when I try to connect the iPod with iTunes?

At this point, I would have taken a comically giant mallet and bashed the evil incarnate out of existence, if it were not a gift. So, I thought therez got to be a way out from the dark side, and sure enough I found out about GTKPOD for Linux (and win-fucking-doze), which kicks iTunes's ass anyday and we lived happily ever after. The battle against the evil machinations of iTunes was over.

But i-will-be-back-Tunes wont give up so soon. I might see it striking back with the i-am-so-DAMN-cool-that-you-bow-to-me-right-fucking-now-Phone. I am counting on Google Phone to kick its ass then :)

Monday, July 20, 2009

Trekking in The Himalayas - Where the earth meets the Sky...

Himalayas had always been a trekking destination which eluded me. Sometimes it was my fitness level, sometimes the cost, sometimes the professional commitments - but whatever the reason, it was not happening. So when I saw the BMC posting for a Himalayan trek, I immediately knew I could not miss it. Thus started my tryst with the Himalayas...

After taking a flight to Delhi from Hyderabad, followed by a disastrous bus journey to Manali, we landed at the Hotel on Sunday Evening. Monday morning we started to Solang Valley by Sumos, where I did Zorbing. We then moved on to Rohtang Pass, where we played by sliding on the small patches of snow etc. Then towards evening we moved to the the Base Camp at 14 mod (at 3250m) in heavy rain, and retired for the night.

The next day we began our trek to the next camp at Ravalikoli at 3750 m. Initially the trek passed through the forest, but soon we were above the tree line in beautiful grasslands. we reached the Ravalikoli camp, which was surrounded by mountains on 3 sides, with small rivers originating from them - and combining to form a big stream which snaked past the camp, and distant snow-covered peaks on the 4th side. After having some hot soup, we played Dumb charades and then proceeded to rest for the night.

The next day we started our trek to the sacred Brighu Lake located at 4250m above sea level. After a couple of hours of climbing through grassland, rocky areas as well as some snow, we reached the majestic lake Brighu. We rested for half an hour near the lake and then ate packed lunch before starting our descent. On the way back, a couple of us, played in the snow by throwing snow balls as well as sliding in it. By the time we reached the camp at Ravalikoli, there was a heavy fog and visibility was reduced to less than 10ft. I then climbed the nearby mountain for a view of the camp, but had to return soon due to a lot of rain. We played song & dance for some time before retiring for the night. However, unlike the previous nights, it never rained, which was a big surprise, given the downpour that used to hit the tents on earlier nights.

The next day the sky cleared up completely resulting in a bright and sunny day. This made the return trek one of the most pleasurable experiences of my life. We enjoyed a lot by singing, dancing and plain freaking out on the way down. We walked through big meadows filled with exotic flowers, while sheep and horses were grazing peacefully. We reached the road, where we were picked up by Sumos and headed back to Manali.

I did some basic shopping that night, as well as visited the Manu temple. The next day we did white water rafting on the Beas River which was very exciting, especially when a couple of us, jumped into the river. In the evening we boarded the bus back to Delhi. After staying at my cousin's place in Delhi for a while, I reached Hyderabad sunday evening by flight.

This trek is easily the best among all the treks I had ever done due to the sheer beauty of the Himalayas coupled with the very diverse backgrounds and intellects of my team mates. I look forward to doing more such treks in the Himalayas.