Sunday, July 15, 2012

My Girl

The warmth, the smell, the touch
The kiss, The cuddle and the talk
She makes me feel alive
She makes me feel good

The courage, the confidence, the smile
The conduct, the style and the face
She helps me clear my head
She helps me feel confident

The smart, the sweet, the cute
The hot, The bad and the sexy
She makes me feel my manhood
She makes me what I am

The sad, the hate, the worries
The cry, The weak and the sob
She helps me understand the world
She helps me know my limits

The pain, the remorse, the mistakes
The regret, the past and the failures
She makes me forgive everything
She makes me learn from it

The dark, the fear, the unknown
The ghosts, the demons and the devils
She helps me stay alert
She helps me be inquisitive

The lessons, the experience, the feelings
The care, the affection and the love
She has given me everything
That I will live my life with her, for her, only her

Tuesday, July 3, 2012

perl - Identifying who is loading a module

So far I was under the impression that it is difficult to identify who is loading a module since all the use statements are executed even before the debugger prompt appears on the terminal.
Ref: http://perldoc.perl.org/perlmod.html#BEGIN%2c-UNITCHECK%2c-CHECK%2c-INIT-and-END

One can setup a break point when a module is loaded by another module.
b load GT/A.pm # this will set a breakpoint on module load of A.pm

But since use statements are evaluated much before the debug prompt appears on the terminal, we will not be able to identify who has actually loaded the module.

However, we can identify the same via a workaround as follows:

1. Start the debugger
2. set a breakpoint on load of a module (eg: b load GT/A.pm)
3. R # This will restart the debugger session - however, the debug point will be retained
4. T # see the stack trace to identify who is trying to load the module


I will upload the script and module used to experiment this, shortly. Meanwhile, one can take a look at the demonstration of this hack below.


ganesathandavamponnuraj@GT-MBP.local:DebugModuleLoad:>>perl -d useAB.pl

Loading DB routines from perl5db.pl version 1.3
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

A BEGIN
A static
A method print
B BEGIN
B static
B method print
Inside BEGIN block
main::(useAB.pl:8): print "Before function call\n";
  DB<1> b load GT/A.pm
Will stop on load of `GT/A.pm'.
  DB<2> R
Warning: some settings and command-line options may be lost!

Loading DB routines from perl5db.pl version 1.3
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

A BEGIN
'GT/A.pm' loaded...
GT::A::CODE(0x825600)(GT/A.pm:8): print "A static\n";
  DB<2> T
$ = require 'GT/A.pm' called from file `useAB.pl' line 1
$ = main::BEGIN() called from file `GT/A.pm' line 0
$ = eval {...} called from file `GT/A.pm' line 0
  DB<2>

Thursday, March 22, 2012

Mac Address Book and gmail LDAP sync

Given that majority of the people on this planet, who have a web-mail account, have a gmail-id, it's natural that almost all of our contacts are residing on gmail's address book. But there are obvious advantages associated with using a desktop client for tracking your mails. (http://familyemailhosting.com/advantages-of-using-an-email-client.php)
But it becomes a pain when your Address book on the Mac OS X(Snow Leopard) doesnt contain all the addresses you have on the gmail address book.
( To the contrary, I found this article on the web that hotmail and yahoo mail have a larger user-base when compared to gmail - Incredible!, I say http://www.cbsnews.com/8301-501465_162-20022793-501465.html )
Inorder to access the gmail address book en masse on your Apple Mail client, do the following.
http://www.techrepublic.com/blog/mac/syncing-macs-address-book-and-ical-with-google-apps/266
1. Open Address Book App; Accounts tab - Enable Google Sync
2. Then force sync, for the first time alone by choosing the sync icon from the Finder Bar.
Now you should be able to see the contacts in your gmail address book, from your Apple Mail client!!!

PS: mrplow pointed out that this doesnt work on OS X Lion, and so I have edited the post accordingly. Thanks mrplow for pointing that out. (I havent tried it myself, I am trusting mrplow to be a Lion user, here :) )

Edit 2:
[Update] Kara Moss pointed out (in the comments section) that the solution mentioned here works on OS X Mountain Lion too. \m/. Looks like it doesnt work only on OS X Lion, AFAIK. It works like a charm on both OS X Snow Leopard and OS X Mountain Lion.

GT

Saturday, December 31, 2011

HowTo Install molokai on MacVim

HowTo Install molokai on MacVim Heard about the Molokai theme for vim editors from one of my friends. But the challenge I had was in knowing where to install this .vim file for the MacVim RunTime to detect this theme.
Useful Pointer: Its about knowing the $VIMRUNTIME (intuitive variable name FTW) value. Once you know this, you know where to install the molokai.vim file.

After some search I was able to install using the following steps:
Download molokai.vim and place it in $VIMRUNTIME/colors folder and you are all set.
MacVim lets you use this theme in 2 ways: 1. Traditional vim way of saying :color molokai 2. Edit->Colorscheme->molokai

Happy Molokai. (one of the reasons i like molokai - dark theme)
PS: Also you might need to Enable usage of Experimental Renderer in MacVim.
Preferences-> Advanced -> enable experimental renderer

Monday, August 15, 2011

Be smart, be professional! (In defence of the Indian Cricket Team)

I guess this post is in a way influenced by the fact that I am a big-time supporter of the Indian cricket team. People may find it really odd and might even go to the extent of tagging me as a jobless fellow and all, but still why I felt the need for such a post is because, this experience has taught me the importance of being a smart, professional cricketer. It applies not just for cricket, and this is the biggest take-away here, but for each and every profession, in each and every point in our lives.

Coming to the core-idea, I guess the Indian players have got it all wrong in prioritizing the matches. After having won the world-cup, after a grueling 45 days of cricket, they "Ideally" should have taken some time off to enjoy, relish, cherish the moment of glory. Instead what followed, in just 5 days time after the finals, was the big IPL dhamaka. With it came the injuries, along with the big-bucks and attention.

Looking at the turn of events, I think, the players thought was to take some time off during the WI tour so that they could have a nice time, infact have time to think about the WC glory; and they wanted to come back and play their part in the English tour. Meanwhile, the English were licking their lips and were waiting for their opponents to come home to face some music. In strange waters, Indians found the going tough. To add to the lack of preparation and match-practice is the fact that not many were even match-fit, courtesy taking time-off the WI tour to bask in WC glory; Waist-lines of Harbhajan, Yuvraj and Zaheer is a testimony to this fact.

And so here is the moral of the story: Ideally Indians should have skipped the IPL and should have come all guns blazing for the English series, and who knows the results could have been slightly different. But, its easier said than done. So, the Indians failed to be smart, failed to show professionalism, which cost them the No 1 ranking.

And the problem I guess is deep down in Indian mentality. I always had a feeling that we are emotionally attached to so many thing that we come across in our lives (atleast majority of the people that I have come across in my life, so far) that we fail to act smart in most critical of the times. I believe it is going to take some time for the Indians to overcome this emotional hurdles and to display some smartness during tough times. Ofcourse, I am not saying we are not being smart at all, always. But however, I do think that we could be much better off controlling our emotions and display our smartness instead!!!

(May be I am talking to myself :D, I don't know honestly!. This post came out of the chat I had with my brother over the weekend. Felt like making a blog-entry out of it.)

(Added "In defence of Indian cricket team" in the title, to grab the attention of the casual-onlookers :) )

Saturday, July 30, 2011

Why Kindle is compelling a Gadget!

Oh Ya it is bragging rights! I am a Kindle 3.0 Owner! It has been a week since I started using the gadget, and I must say that I am really impressed!; there is value for each and every penny paid for it!.

The Interface:

With all the smart phones and Tablet PCs thronging the markets these days, the interface of the Kindle reader, I must say, is not that compelling. In fact it takes time to get used to it; but once you get used to it, I can guarantee you a blissful reading experience. I spent some quality time with the kindle3.0 User Guide that my reader had pre-installed, and it is pretty comprehensive indeed. The best part of the interface is how effective it is, once you get used to it, and it does not eat out on the battery as well. So overall the design of the interface is well thought-out and effective cum efficient.

Highlights:


e-ink. http://en.wikipedia.org/wiki/E_Ink, Need I say more

Dictionary -> using the 5 way key (Amazon calls the key used to move the cursor while reading a book, as the 5 way key) As you read, you can move the cursor to a word, and the dictionary automatically pops up either at the bottom or at the top, depending upon the cursor position so as not to hide the line that you are reading, with the meaning. I found this to be a compelling feature; for word/vocabulary buffs, who are lazy, it is a blessing :)

Read the book aloud feature!: Best part is you can listen to the native english speaker pronounce the words and there by you can learn not just the meaning, but also the pronunciation. double treat eh :)

Making PDFs kindle ready:

Mail Books to the device via registered mail-id to username@kindle.com : Awesome feature; also the mail server is intelligent enough to convert PDF files to kindle ready MOBI formats, when the subject line of the mail, via which one is trying to mail a pdf to the device, reads "Convert". Smart huh! :)

http://calibre-ebook.com/ -> heard it is a very good tool to make some pdf books kindle-ready; although I haven't tried it myself yet.

Experimental Features:

Songs: We can have a bunch of songs in the Device to enrich the reading experience. (But one annoying factor here is that we cannot shuffle the order in which the songs are played. You put in a bunch of songs, and listen to them in the same order in which they are added to the reader)

Rudimentary Web-Browser: Can be handy sometimes, especially when wi-fi is available. I did not buy the one with the 3G option, since I thought when wi-fi is available why 3G. (Atleast I thought I would not be needing 3G access)

Friday, July 1, 2011

TeamViewer FTW

Easy to use UI - Need to know just the ID of the person at the other end



One of the common tasks of geeks these days is to enlighten people around them, who are not that tech-saavy, to share a few tips with them. It becomes a day-to-day task when the people you are trying to educate are your parents; you get to see them ask some interesting questions every day. However, it becomes a problem when you are not living with them, which is the case typically with most of the Indian geek-youth (If I may call the group that), that you need a simple solution to access the remote PC so as to help your parents out with. This is why I love Team Viewer so much; not just because it is free, but because it offers just what one wants.

Very easy-to-use UI makes it all the more compelling solution.

Click here to download for free. (Free for non-commercial use)

Its enough we know the ID of the person at the other end. The ID generated is the same across sessions, so it is like knowing the ID one time and saving it. The UI remembers the recently used IDs as well for us. The password that the UI generates keeps changes on a session basis. However, we could tweak it slightly and setup any password of our choice so that we could easily connect to remote-pcs knowing user ID and password before hand. Caveat: I could set up this non-secure access only on Windows OS version of the software. I am not able to do the same on my macbook pro running OS X 10.6.8