December 23, 2008

Blind Men and the Cloud


It was six men of Info Tech

To learning much inclined,

Who went to see the Cloud

(Though all of them were blind),

That each by observation

Might satisfy his mind



The First approached the Cloud,

So sure that he was boasting

“I know exactly what this is…

This Cloud is simply Hosting.”



The Second grasped within the Cloud,

Saying, “No it’s obvious to me,

This Cloud is grid computing…

Servers working together in harmony!”



The Third, in need of an answer,

Cried, "Ho! I know its source of power

It’s a utility computing solution

Which charges by the hour.”



The Fourth reached out to touch it,

It was there, but it was not

“Virtualization,” said he.

“That’s precisely what we’ve got!”



The Fifth, so sure the rest were wrong

Declared “It’s SaaS you fools,

Applications with no installation

It’s breaking all the rules!"



The Sixth (whose name was Benioff),

Felt the future he did know,

He made haste in boldly stating,

“This *IS* Web 3.0.”



And so these men of Info Tech

Disputed loud and long,

Each in his own opinion

Exceeding stiff and strong,

Though each was partly in the right,

And all were partly wrong!


[Source: http://www.appistry.com/blogs/sam/the-blind-men-and-cloud]

November 16, 2008

Apache configuration journal - I

Redirect all requests for any resource to single file

Steps 1: Requires mod_rewrite

Steps 2: Add following line to <APACHE_HOME>/conf/httpd.conf if it doesn't exist.

LoadModule rewrite_module modules/mod_rewrite.so

Steps 3: Add following lines to .htaccess file in the root directory of your WEBROOT

We are asking apache to redirect all requests which don't have an existing source code to "index.php". This could have been any other existing file in the WEBROOT. This will also prohibit browsing of files in different folders. If you want to enable browsing for folders in your WEBROOT, modify the above .htaccess configuration to

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php [L]
</IfModule>

PS: This will however expose all the existing directories for browsing by others

However if you want to restrict access to particular type of files, use regex and following kind of configuration in .htaccess

<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>

The configuration above says don't serve any file starting in name with ".ht"

To enable php's default compression while delivering any content (Saves bandwidth)

<IfModule mod_php4.c>
php_value zlib.output_compression 16386
</IfModule>

November 15, 2008

Sunscreen by Baz Luhrman



Probably one of the best videos on Youtube i've seen.

Here are the lyrics http://www.icdc.com/~dnice/sunscreen.html

October 22, 2008

Something i wrote on my birthday eve

Sometimes ago,
I was at 26th floor.
It was all shinning,
even though i saw few people whining
I gave them no care,
coz i had my cookies and change to spare

I had this guide
always by my side
he showed me the floor
we visited most of the stores

it was all so good
i'd a lot of good food
made couple of good friends
always ready with their helping hands

there was music and then there was drama
lots of fun and lots of karma
but hell!! the clock was ticking
and the escalator was moving
it reached the next floor
without even my knowing
the machine greeted me
in a human voice
I'd reached 27th floor
it suddenly was different, I didn't feel nice

hey where is the guide?
where are those cookies?
I find myself lost here
without clear skies

There are few stars
but no moonlight
I see dark clouds
giving a very bad fight

stores are there
and i've the money
but the cookies are different
that i don't like
new people new ways
i'm waiting for this floor to pass away...

October 15, 2008

updated vimrc

In my last post, i explored couple of basic features about VIM. Here is an updated version of my .vimrc. It had some issues with the "hiding tabs" settings as well which is cured in this version (well it wasn't working on my office PC where i had vim 6 instead of 7)

""""""""""""""""""starts here
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim As Editor Settings
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" To enable syntax highlighting
syntax on

" come out of vim compatability mode, why go to old vi when we have vim
set nocompatible

" Detect type of the file
filetype on
" Load filetype plugins
filetype plugin on

" How many lines of history to remember
set history=1000

" To enable a color scheme that is pleasant to eyes
:colorscheme delek

" To convert tabs to spaces; use :retab to convert all tabs to current
" settings
set tabstop=4
set shiftwidth=4
set expandtab

" To catch hiding tabs
set list listchars=tab:>-,trail:-

" makes the backspace key treat the four spaces like a tab (so one backspace
" goes back a full 4 spaces)
set softtabstop=4

" enable line number
set number

" have mouse on vim all the time
set mouse=a

" load .vimrc whenever it is edited
autocmd! bufwritepost vimrc source ~/vim_local/vimrc

" Don't indent while pasting
set pastetoggle=<f3>

" Remove indenting on empty lines
map <f2> :%s/\s*$//g<cr>:noh<cr>''

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim UI
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" set title of the xterm to the name of the file
set title

" set the height of command bar to 2
set cmdheight=2

" Enable folding
set foldenable
" fold lines with similar indent (collapse feature) or manually in insert mode
" using CTRL-T (indent) CTRL-D (dedent)
set foldmethod=indent
" Don't autofold anything (but can be done manually)
set foldlevel=100
" Don't open folds when you search into them or undo
set foldopen-=search,undo

" show matching brackets
set showmatch
" how many tenths of a second to blink matching brackets for
set mat=5

" do not highlight searched for phrases
"set nohlsearch
" BUT do highlight as you type you search phrase
set incsearch

" show filename and other details about the buffer
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
" keep showing the status
set laststatus=2

"allow backspace (b), space(s) and arrows to move the cursor to
"previous/next line
set whichwrap=b,s,<,>

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Auto-complete
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"set complete-=i

" Turn on wild menu which shows auto-complete options in the command mode
set wildmenu

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PHP
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let php_sql_query=1
let php_htmlInStrings=1
let php_noShortTags=1

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" HTML
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" HTML entities - used by xml edit plugin
let xml_use_xhtml = 1
"let xml_no_auto_nesting = 1

"To HTML
let html_use_css = 1
let html_number_lines = 0
let use_xhtml = 1

""""""""""""""""""ends here

September 28, 2008

Orkut showing vulgar ADs and cutting them off using Firefox

So this morning i login to my orkut a/c and guess what... i'm greeted with annoying vulgar ads [see below].

Well i appreciate free services provided by these companies (including Google) and do allow ads from online sites at times but that doesn't mean you will show any bulls**t to me.

And then i added orkut as well to my ads filter. Here is how you can avoid these ads using Firefox.

1. Install latest firefox release from http://www.mozilla.com/en-US/firefox/
2. Open firefox and install latest release of AdBlock Plus Plugin from http://adblockplus.org/en/installation
3. Select one of the Filter subscription (this is a default blacklist contributed by the community and helps you combat with many generic Ads) [I'm subscribed to EasyList]

Now you are ready to block any unwanted Ads whenever you encounter them while surfing. Just right click on the area where AD is appearing; a menu like below will appear


Select "Adblock IFrame" or "Adblock Frame" (whichever is the case). You will see something like below appear.


We will edit that to further block any ADs like this.


Thats it. Say "OK" and you are done. You won't see any further ADs on orkut. Say cheese.... :-)

September 22, 2008

And i will remember.. (perhaps forever)

[PS: i was going through bunch of yahoo services i'm subscribed to, and bumped onto my good old briefcase folder. I'd not visited briefcase since last 2-3 years until now, but found couple of good old memories in it. This is the farewell poem i wrote for my classmates at KGP. Well i did forget to include couple of guys in the poem, i still feel sorry for it. Sorry to all of them for this was written in one night, that too post midnight when i just woke up and thought to write something with all the senti wenti stuff]


Here comes the end of one life
and all those fantastic years five

will miss those lemmas corrollaries and theorem
but thanks GOD, i wont have to prove any more of them

those classes and lectures, where sometimes we slept
and those horrible assignments which gave us no rest
those examination nights that we never slept
and those "help each other" promises that we always kept

those mischiefs of aaloo, those shoutings of BK
that crying Tiwari and cracku Pinaki
and let me recall fundoo mustu,
the guy with microsoft and DR 2

Yup giri is tough and mansi too sweet
sheetal is smart and banarsi broken heart
remember mr psycho and his unworldly thoughts,
and those teasings on Anjan and some small small fights

Nath, thanks for those treats back at your home
i'm still looking forward for few more of them

Had a great time with all you guys,
its now time to say you all good byes.

I wish i could speak more and more
but the time is limited and my heart getting sore
not because i've nothing more to add
but because i'll be leaving KGP and i'm a little bit sad

Love you kgp, dont forget me sweatheart,
coz you will remain alive forever in my heart

September 01, 2008

My .vimrc

Well, promised myself long back that i will post technical articles here as well but have been really lazy for quite sometime now. It hits me again and again because i had to look for similar things multiple times. So here i make yet another promise to myself to post those stuffs which i can re-use again and again. Hope some of this would be helpful to others as well.. ahh someday!

This one is my .vimrc settings i configured couple of days ago. Comments inlined for better reading :-)

"---------begins here----------
" To enable syntax highlighting
:syntax enable

" To enable a color scheme that is pleasant to eyes
:colorscheme delek

" To convert tabs to spaces; use :retab to convert all tabs to current
" settings
set tabstop=4
set shiftwidth=4
set expandtab

" To catch hiding tabs
set list listchars=tab:»·,trail:··

" makes the backspace key treat the four spaces like a tab (so one backspace
" goes back a full 4 spaces)
set softtabstop=4

set title

" fold lines with similar indent (collapse feature) or manually in insert mode
" using CTRL-T (indent) CTRL-D (dedent)
"set foldmethod=indent
"---------ends here----------

PS: I will keep updating this post as and while i explore cooler stuffs on VIM. As of now i'm loving it.. :)

August 20, 2008

3P Mantra for product startups

Mr. Kiran Karnik, former President of NASSCOM, speaking at recently
concluded NASSCOM product conclave had given 3P Mantra for the Product
Startups.


Patience:

It's said that patience is a virtue and this certainly holds true in
practice. It is even truer in this fast-paced society where rush-a-holics and
hurry addicts are in the majority and companies seem to believe that faster
is better. Although patience is sometimes mistaken for sloth, it's the
patient ones who are the most effective time managers. They tend to think
things through before they act and focus more on results than activity.
Following are the few characteristics of patient enterprises.

1. Patient companies fully intend to accomplish all their goals but they
don't expect it to happen overnight. These companies recognize that time is
their ally, not their enemy, and that all goals can be accomplished, given a
realistic time frame. They will not hurry to go to a VC or taking the
company to public
2. Patient enterprises are not thrown off balance by momentary delays. These
enterprises utilize idle time by working on other tasks or new innovations
3. Although patient enterprises utilize idle time and waiting time rather
than get frustrated by the delay, they seldom perform two activities at the
same time if both activities require their attention. So they don't do sales
on a marketing platform.
4. These enterprise plan before they act. Consequently they make good
decisions, wise choices and sound judgments, achieving above average
results.

Persistence:

Know that persistence is the name of the game...and plan accordingly. Those
entrepreneurs that meet success do so because they had the ____ to push and
prod and coddle their business into existence.

They found a way to keep their business moving forward in a strategic and
precisely aligned manner. If something wasn't working for them, then they
changed the way it was done. They looked at their business from many angles
and found a way to proactively design their business to work the way they
needed it to.

"Energy and persistence conquer all things."- Your Entrepreneurial
Predecessor, Benjamin Franklin.

It is very important in sales. Today's "no" doesn't mean, No forever. You
have to keep calling your prospective to customers. It is better to revisit
your sales tracking once in a month and give hello calls to everyone in your
list.

Passion:

Passion but passion is most important for every entrepreneur. Passion is a
beautiful thing. Passion is what keeps you awake at night because you are so
excited about what you are building. Passion is what makes you work on
weekends. Passion is what blinds you to imaginary hurdles. Passion is what
makes you deaf to destructive criticism. Passion more than makes up for lack
of money. Passion attracts talent. Passion attracts customers. Passion
brings pride in what you are doing. Passion sells your product. Passion
sells your dreams. Passion makes you think differently. Passion makes you
less greedy. Passion is what helps you get up after a bad fall. Passion is
what builds great companies. Passion is the only hope for a startup.... and so on! One can go on writing about PASSION!

Thanks to kesava for sharing this

June 10, 2008

Free Internet @ Changi Airport, Singapore

When i arrived at Singapore i saw couple of guys sitting here and there and using the internet. I had heard from Bajaj as well about free Wi-Fi access at the airport but when you connect to the free Wi-Fi first, it redirects you to a Q-max page for every URL. The catch is you need to login before you can actually access Wi-Fi.

Just below the login page, there is an account creation page. It asks you couple of details including your phone number, passport number and email id. I mention these three because this is what you can use to obtain your access password. By default, they send your new a/c password to your email id and phone number and for most of the people like me, the phone is NOT on international roaming.

Once registered, you don't know the password but you can go to "Forgot password" link. They will re-ask your passport details, phone number and email id and allow you to reset. Thats it. You are ready to go. Apparently this registration is valid for next 3 years and allows you to access free Wi-Fi from many airports having the same service provider. A small trick helps you access free Wi-Fi and internet and you feel back home. :-) After i went through the work-around, i helped couple more guys who were coming back with me from SFO to India.

June 02, 2008

My first visit to U S of A - Part I

Well i wasn't as excited as Borat was during his first visit but still there was a thought in mind of exploring what a lot of people consider an achievement of lifetime. Believe it or not; when people return from U S of A, they sometimes cook a lot of stories that would make you feel sorry if you haven't been there. Be thankful to me, cause i'm not going to glorify anything like that :-) Here is my "balance sheet" about U S of A and the silicon valley (yup i went to San Francisco Bay Area in California).

I left on 17th midnight on a Singapore Airlines flight. RPG had suggested to leave atleast 3 hrs before the flight's time to be sure that immigration check etc. get done fast and i had obliged. Luckily i was among the first 10 passengers (guests :D) to reach for that flight. So i had more than 2 and a half hours to kill at bangalore airport (the old HAL one). If you have a company (unfortunately i had none and found none in the waiting area), it probably makes sense to get done fast with the documentation and wait in the seating/waiting area. For me, i got bored; though watching different kind of people(well that includes cute girls!!) waiting in the queue and then reaction from the first timers when they get their immigration done is something you can watch for sometime. :D

My flight was scheduled late night at 11:00PM and i entered the flight around 10:15PM or something. There was a looong queue at the boarding gate, couple of people watching IPL; some food joint nearby and then again some people waiting in nearby seats. The interior of the flight was good and i didn't really know before that this flight would be so big. Their were 3-4-3 seats each row. At the entrance of the gate, two air hostesses would great you: one chinese/singaporean and one indian (well this happened for all the connecting flights on my way from BLR to SFO and vice versa). The idea is good, they have more than 5 female attendants on the flight, atleast one being indian and then couple more male attendants. And useless to mention, all the attendants were good looking and charming :-P

After boarding they served some juices and then i thought to take my regular sleep. Damn, right at 1:30 or 2:00 AM they woke me up for dinner when i was deep in sleep. I felt like hitting that air hostess, but then in sleep i did oblige. :-) When i started, another shock! Somehow my travel agent thought i would be a hardcore veggie that too south indian, she had made special "South Indian Veg Meal" request on my behalf to the airlines. WTH!! Anyway, once served, you can't really do much; that too when you are awaken from a deep sleep; had i started it would have been a fight; so i preferred eating whatever was served. [Moral: Make sure you know what your travel agent is doing with your itinerary before you leave]

I reached Singapore at around 4:00AM IST(Singapore time some 6:00AM). At the transit they will stick a sticker with SFO written on your shirt (well thats mandatory) and give you a transit card like thing. I was told my gate number and that i need to catch some skytrain to reach the next terminal. At first i thought WTH is skytrain, something again that will fly me to the next terminal. Took me sometime to figure that out, but there were "Information Center" counters in my boarding terminal and they were really helpful in finding out where to get this "UFO" (my terminology may not sound appropriate, but thats something i was expecting it to be; something that will fly me to the next terminal and i didn't know what the heck it is, so UFO :D). BTW the "Information Center" counters that i talked about are a great thing for first timers like me. You can wander anywhere with in the airport and if lost, just show your ticket/boarding pass and they will direct you to right way. And the attendants at these counters were all good looking and charming chinese girls [;-)](counting them for couple of my friends).

At my nearest skytrain station, the big display told me that the next one would be coming in a minute. And in exactly a minute a metro like train arrived with two boggies. It was spacious and not crowded at all. Skytrains run from one terminal to another with six minutes frequency. Thats really cool, so if you find a skytrain getting crowded, just wait for the next one. Its all programmed and runs automatically. A loud announcement will tell you before the train doors are going to close. I liked the concept very much. I was dropped at my boarding terminal in a minute or so. I started looking for my boarding gate which seemed quite far from where i had got down on the terminal. Anyways, after walking sometime i reached there. The ambiance at the terminal was really cool. I had kept walking on the floor though there were walking escalators at every regular gaps. And btw you have free wi-fi access at the airport; slight trick gets it working. I wasnt sure about it on my onward journey, explored it while returning to BLR at the lounge. More on this here.

I found free internet terminals at the boarding lounge, every time you login, you have a 15 minute session before the terminal automatically kicks you out. I sent a mail to my friends about my journey so far. Till then i had had my experience with the paper and that was hurting my bum for sometime. I tried making a call from the phone boxes kept in the airport terminal but a human voice responded and asked for my credit card number. I did take risk of revealing my card number but that guy on the other side was real dumb. I repeated the number of couple of times and then hung up. Sincere advice-"Sign up to www.airtelcallhome.com for smaller amounts" and use the toll free numbers to call India from anywhere in the world. I hear couple of my friends also use www.relianceindiacall.com Whatever you choose to use, do create an a/c for smaller amounts (min 5$) before you leave India.

When i reached Singapore, I was feeling like an alien in a new place; but after i left Singapore, i was feeling more comfortable and confident and the later part of journey until SFO was almost unhappening and boring (nothing new). I had to break my journey at Seoul(Korea) before reaching SFO and Seoul was nowhere as compared to Singapore though it was all clean, less crowded and all that. All so boring more because of the south india veggie food, dozing aunty ji sitting in the next seat and my tired mind. You can estimate my boredom if i tell you that i watched Om Shanti Om en tour and i actually liked parts of the movie... :D I know couple of you would be laughing out loud.. thats what happens when you are alone and bored and have no good company. Whatever!!!! I finally reached SFO. Wait for the next part of my travelogue...

January 30, 2008

Thought of the day

Every age has its own issues and problems; its just that as we move on, the nostalgia about the past hides the bad and worse and tends to highlight the goods more than its actual worth. Remember the "bad" is always there even if you don't see it; because if its not, there is no way the "good" even exists.