About Me

My photo
Working as Technical Lead in CollabNET software private limited.

Monday, 14 July 2008

Cowon d2 avi file support

I bought a new cowon d2 portable media player and it's sounds great.

I can't play the avi downloaded from the internet. I need to convert this avi using the below command to play it



mencoder Kallai_Mattum_Kandal.avi -o Kallai_Mattum_Kandal_Cowon.avi -ovc lavc -vf scale=320:240 -oac mp3lame -lavcopts vmax_b_frames=0:acodec=mp3:abitrate=128:vbitrate=256

for i in $*
do
mencoder $i -o $i"_Cowon.avi" -ovc lavc -vf scale=320:240 -oac mp3lame -lavcopts vmax_b_frames=0:acodec=mp3:abitrate=128:vbitrate=256 -mc 30
done


The above makes the player to play the file with good video and sound.

Thursday, 3 July 2008

Create master and slave subversion repository setup using svnsync

I've learned the one more svn command svnsync, which I ever tried before. thought sharing this will be usefull for svn buddies.

Basically this command is to replicate the svn repository (i.e) Master to n number of slave repository setup.

How to:

1. Create the slave repository. follow the below steps for creating that.

a. Create an new repository.
b. Then you need to alter somescripts in the newly created repository inorder to accept this setup.
c. Get in to hooks directory of newly created above repository and rename pre-revprop-change.tmpl to pre-revprop-change.
d. Give pre-revprop-change executable permission.
e. Then edit the pre-revprop-change and add exit 0 at the begining of the file.

2. Execute the below commands to point master repository to newly created slave

1. svnsync init slaverepositoryurl masterrepositoryurl
The above command is one time setup command (i.e) pointing the master repository to slave repository.
2. svnsync sync slaverepositoryurl
The above command is invoked when ever you need to sync with master repository.

Similarly you can have n number of slaves for the master repository.

Also heared that this is not the right way to use it in production, but any how Im posting this to get startup.

Monday, 2 June 2008

VIM properties

< snippet >

set shiftwidth=4
set expandtab
set tabstop=4

< / snippet >

post the above snippet on ~/.vimrc and compile it using source ~/.vimrc

Wednesday, 28 May 2008

Making your vi for default settings

If you want your vi editor to load with default settings (i.e) the line number to be displayed and also tabspace to set for 4 characters.

Here the way to do...

create a file ~/.exrc with settings

set nu
set tabstop=3

Then opening the vi will have these settings common for all.

Thursday, 22 May 2008

More about MySQL

MySQL has two types of engine
1) InnoDB
2) MyISAM.

The difference b/w the above two is, former supports the subquery, constraints etc... but the later won't support those. This causes the MyISAM tables relatively faster during retrieval when compared to InnoDB. But the problem is the constraint check and subquery are not applicable in it.

Related to performance engineering.

How to find the total rows processed when executing an query and other infrmation.

use, explain query
(i.e) explain select * from table.

Related to mysql dump

How to see the create table script of an existing table ?

use, show create table &lt table_name &gt
(i.e) show create table &lt table_name &gt

Related to process

How to find the process id executing in mysql when you run a query? (i.e) Executing an query from the java client will create a process in background.

use, show processlist