January 05, 2009
Thought of the day
Its about change, the only constant in life. You know its coming, every second and the very next second is different (there is a change). With time and experience, you may be able to identify few changes when and why they are coming; and then there will be few others which you won't be able to. Ask or not, they will come, for good or for bad. And by the human nature, you would resist. Either resist to hold the good times or try to run away from the bad times. But then you will realize, they are already there and the only thing you can do is hold onto yourself and let time flow like a cold breeze. Because when that breeze is gone there will be a new sunshine with new rays of hope. And when you look back on what the bad times have given you, you will see-"Things were not so bad after all."
January 03, 2009
My Present State of Mind...

Well yeah.. very confused state of mind. But as Neo states it - "The problem is choice". We make many conscious/unconscious decisions on these choices; few are right and few others are wrong. But our present and future both depend on these choices we make at different points of time. I own all my actions and choices i made for whatever reasons i made, after all those choices were my own and its me, only me responsible for it. [:)] No i've not committed anything wrong, its just an illusion between what could be and what can be good for me that confuses me at times. And since i've already made that decision, its time to own it and move on, in a new direction, for a new challenge. For you don't know what lies ahead until you begin the journey... only when you reach there, that you know whether that choice, your own choice that you made in past, was the right one or not... and so i keep walking, on and on and on...
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>
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...
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
""""""""""""""""""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
Subscribe to:
Posts (Atom)