Shifted My Blog

Hi,I have shifted my blog to so please check out my latest posts at

Tuesday, November 18, 2008

Ignore unwanted files to appear in SVN Status list

You can set ignore property for directories under SVN to ignore specific file or a group using wildcard.

Here are few examples:
svn propset svn:ignore '*' .
Run this command inside a directory to ignore all the files inside it. It is best suited for cache directory where you want the cache folder to be inside SVN since it is a part if the structure but do not want unwanted files and directories in it.

svn propset svn:ignore changelog.txt .
This will ignore changelog.txt file to appear in svn status list.

svn propset svn:ignore “*.tmp” .
Ignore all file with tmp extension.

svn propset svn:ignore -R 'Thumbs.db
Thumbs.db:encryptable' .
Thumbs.db & Thumbs.db:encryptable are files that gets created when you open a directory in windows machines and it has few images in it. These files always come up in your svn status list and create problem. The command will solve the problem. The -R Option is to set the property recursively down to all the directories.
Note: Multiple file name must be inside quotes and should be separated by new line.

Backup your Firefox Extentions and bookmarks.

I generally take a backup of the extensions and bookmark of my Firefox to synchronize the setting between my home computer and the computer at my work place.

You will need to install an extension FEBE(Firefox Environment Backup Extension). This extension after installation will create a menu under tools and provides you with lot of backup options, in those options you have extension backup and bookmark backup.

Here is a link where you can download the latest version of

There is another extension CLEO(Compact Library Extension Organizer) that can be used to combine all the extension and make it as a single extension file. it can also be very help full if you have your own custom made extension.

Here is a link where you can download the latest version of CLEO

Wednesday, November 12, 2008

Shifting my computer application settings

Recently I had to to reinstall OS on my computer. It is a time taking task and every time I do it I always forget to take backup of few application settings. So I had to create a check list of application whose settings I need to save before reinstalling the OS.

Here is the list I prepared.
1. Firefox bookmarks and extensions.
2. Putty configurations.
3. Webdav configurations.
4. Desktop and Documents.
5. Copy Favorites directory under you profile.
6. Copy all important files from the OS installation drive.

Webdav has a backup option which will backup all the setting in a reg file.

Wednesday, November 05, 2008

Screen Command - Default Key Bindings

Using Screen command you can create multiple pseudo-terminals. It becomes very convenient when you are working on a remote server and need to do different thing simultaneously. I always keep forgetting the keys to operate the screen , so I am posting a reference to recall.
C-a '
C-a "
(select) Prompt for a window identifier and switch.
C-a 0...9 (select 9) Switch to window number 0...9.
C-a C-a (other) Toggle to the window displayed previously.
C-a a (meta) Send the command character (C-a) to window.
C-a A (title) Allow the user to enter a title for the current window.
C-a b
itemx C-a C-b
(break) Send a break to the tty.
C-a B (pow_break) Close and reopen the tty-line.

C-a c
C-a C-c

(screen) Create a new window with a shell and switch to that window.
C-a C (clear) Clear the screen.
C-a d
C-a C-d
(detach) Detach screen from this terminal.
C-a D D (pow_detach) Detach and logout.
C-a f
C-a C-f
(flow) Cycle flow among `on', `off' or `auto'.
C-a C-g (vbell) Toggle visual bell mode.
C-a h (hardcopy) Write a hardcopy of the current window to the file "hardcopy.n".
C-a H (log) Toggle logging of the current window to the file "screenlog.n".
C-a i
C-a C-i
(info) Show info about the current window.
C-a k
C-a C-k
(kill) Destroy the current window.
C-a l
C-a C-l
(redisplay) Fully refresh the current window.
C-a L (login) Toggle the current window's login state.
C-a m
C-a C-m
(lastmsg) Repeat the last message displayed in the message line.
C-a M (monitor) Toggle monitoring of the current window.
C-a n
C-a C-n
(next) Switch to the next window.
C-a N (number) Show the number (and title) of the current window.
C-a p
C-a C-p
C-a C-h
C-a BackSpace
(prev) Switch to the previous window (opposite of C-a n).
C-a q
C-a C-q
(xon) Send a ^Q (ASCII XON) to the current window.
C-a r
C-a C-r
(wrap) Toggle the current window's line-wrap setting (turn the current window's automatic margins on or off).
C-a s
C-a C-s
(xoff) Send a ^S (ASCII XOFF) to the current window.
C-a t
C-a C-t
(time) Show the load average and xref.
C-a v (version) Display the version and compilation date.
C-a C-v (digraph) Enter digraph.
C-a w
C-a C-w
(windows) Show a list of active windows.
C-a W (width) Toggle between 80 and 132 columns.
C-a x
C-a C-x
(lockscreen) Lock your terminal.
C-a z
C-a C-z
(suspend) Suspend screen.
C-a Z (reset) Reset the virtual terminal to its "power-on" values.
C-a . (dumptermcap) Write out a `.termcap' file.
C-a ? (help) Show key bindings.
C-a C-\ (quit) Kill all windows and terminate screen.
C-a : (colon) Enter a command line.
C-a [
C-a C-[
(copy) Enter copy/scrollback mode.
C-a ]
C-a C-]
(paste .) Write the contents of the paste buffer to the stdin queue of the current window.
C-a { (history) Copy and paste a previous (command) line.
C-a > (writebuf) Write the paste buffer out to the screen-exchange file.
C-a < (readbuf) Read the screen-exchange file into the paste buffer.
C-a = (removebuf) Delete the screen-exchange file.
C-a _ (silence) Start/stop monitoring the current window for inactivity.
C-a , (license) Show the copyright page.

Tuesday, May 01, 2007

Building a video sharing site.

Videos are the best way to express. With the popularity of sites like Youtube, Google Video, Jumpcut and lot other we see a beginning of online video sharing/editing Era.

Eg: YouTube,Google Video ,Jumpcut ,Grouper ,Revver ,vsocial,vimeo , Videoegg

With all these big players around it is difficult for any other site to come and compete. Innovation is the key to success. If you can put something extra that is really different and innovative - who knows, your site can leave YouTube and other big sites behind. So here I am explaining you how to build a basic video sharing site.

How does a video share site work?

A video sharing site perform three basic tasks

  1. Allows a user to upload video files.
  2. Convert the uploaded files to a common format that can be played on a browser (generally the format is flash video FLV)
  3. Embed a player in your site to view the video.

I . Uploading Video files.

You will find lots of open source application for file uploading available on web. You can use any of them .I have used “Uber Uploader” and it is really good .It has got AJAX Progress Bar which show you how much file is uploaded.

You can down load the file from

Note : To use this script you should have CGI-BIN Access enabled.

II .Converting the Uploaded video to Flv format.

The uploaded file needs to be converted to FLV format. To convert video file to FLV format you need additional packages installed to your linux server.

You need to install:-

GD Library 2 or higher,
FFmpeg, Mplayer + Mencoder ,
Flv2tool, Libogg + Libvorbis,
LAME MP3 Encoder

PHP Configuration:
safe_mode = off
register_globals = on (recommended)
open_basedir = (no value)
output_buffering = on
upload_max_filesize = 100M )
post_max_size = 100M

You can install the above package using YUM (recommended). The packages are available in DAG repository, so you need to add DAG repository to yum.

After you have installed the packages you just need to run few commands through php using exec command.

Following is the command to convert video file to FLV.

Note : check the path of mencoder using whereis command( whereis mencoder ) and if it is not '/usr/bin/mencoder ' then change it with the correct path in the command below.

exec("/usr/bin/mencoder testvideo.mpeg -o testvideo.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -srate 22050");

You need to file Meta data using this command

Note : check the path of flvtool2

exec("/usr/bin/flvtool2 -Uv testvideo.flv newvideo.flv");

You can even create thumbnails by the following command

Note : check the path of mplayer

exec("/usr/bin/mplayer testvideo.mpeg -ss 1 -nosound -vo jpeg:outdir=./thumb -frames 2");

III .Embed a player in you site to view the video:-

Once you have created the FLV file the only task that is left is to display the video, for that you need an FLV player. So we need to find and download a FLV player.

Here is a link to a free FLV player Download.(

Note: But read the license before you use.

Now embed the player and specify the FLV file path.

Thursday, April 19, 2007

Installing and updating packages in linux.

I have always had difficulty in installing packages in Linux/ UNIX system. But after doing lots of googling and studying about it I found out that it is not so difficult indeed .I would like to share the knowledge.

There are three ways by which you can install a package.

1. Through a package manager like YUM/APT.

2. Using an RPM package.

3. Installing from source.

I will take up each method one by one.

I. Installing using package management utility-

Note: You should have you computer connected to net.

Installing packages using package management utility is the easiest of all the method.

YUM /APT fetches the files related to the package from a repository and installs it to your computer.


1. Easy option to install, uninstalls, update and maintain packages.

2. You get the latest package.

3. All the dependent modules/packages can also be installed

Commands for installation using YUM.

Lets try to install mplayer

1. we will check if the package is available .

# yum list mplayer

This will list information about the packsge iff available.

2. Install Packages

# yum install mplayer

You can also use wildcard to install all mplayer packages.

# yum install mplayer*

Will install all the dependent packages also.

3. Uninstall Packages

# yum remove mplayer

It completely removes the package.

Commands for installation using APT.

1. We will check if the package is available.

# apt-cache search mplayer

This will list information about the package if available.

2. Install Packages

# apt-get install mplayer

You can also use wildcard to install all mplayer packages.

3. Uninstall Packages

# apt-get remove mplayer

It completely removes the package.

II. Installing from RPM file-

1. Download the RPM file of the package.

For ex-

# wget

2. Install package.

# rpm -ivh mplayer-1.0-0.20.pre7.0.rh9.rf.i386.rpm


# dpkg -i [Package] (for debian linux)

3. Upgrade package.

# rpm -Uvh [Package]

Command will upgrade the package if it is already installed or install it if it is not

To perfrom only upgrade if the package is curently installed, use,

# rpm -Fvh [Package]

4. Remove package.

# rpm -e [Package]

Will remove the package completely

III. Installing from Source-

Installing packages from source file in the most difficult of all instalation process and should avoid it.

1. Move to src directory.

# cd /usr/src

2. Get the source code.

# svn checkout svn:// mplayer


download and unzip

3. Move to the source directory.

4. Check configuration options

# ./configure -help

5. Configure with appropriate options

# ./configure --enable-jpeg

6. Compile

# make

7. Install

# make install

8. Uninstall

# make uninstall

Saturday, March 31, 2007

First post

Hi all ,
I am Prabhanjan Panigrahi, a new member of the ever growing blogging community . This is my first but have nothing to write . I will share all my experiences good and bad through this blog.
Bye for now .