Some usefull Linux Commands

To know the ip address of the machine

To view list of previously typed commands in command prompt
$history | grep <word that need to be searched>

To Know the ip address of the website
$host site-name

To list all the process running in a machine
$ps aux

To kill a process that is running
$kill -9 the process code

To know which process consumes more space

To know how much space the folder occupies
$du -sh .


February 6, 2008 at 9:59 am 1 comment

House for Rent

Ground Floor and First Floor duplex model
Anna Nagar, Chennai, Tamil Nadu
Bedrooms : 3
Land Area : 1200 Sq-ft
Buildup Area – 2000 Sq ft

This flat is located in Vellacherri, chennai with good surroundings, with spacious rooms, with good water supply, with main road approach, with easy access.

Key Features:-
Semi Furnished, Spaceous terrace, Double Car Parking

Contact Person : Mr. Prathab
Contact Number : +91-9944168941

February 5, 2008 at 4:02 pm 1 comment

Display textarea content with line breaks in html page

Let us see how javascript, php, and ruby display the content of textarea with line breaks







January 31, 2008 at 12:21 pm 2 comments

PHP Singleton Object

The singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system.

Here is an example, that demonstrates this singleton pattern: (more…)

January 29, 2008 at 1:58 pm Leave a comment

Take the dump of database from the console

To take dump of whole database:
$ mysqldump -u <username> -p <databasename> > <filename>.sql

To take dump of the (only)structure of the database
$ mysqldump -u <username> -p <databasename> -d > <filename>.sql

To take dump of the (only)data of the database
$ mysqldump -u <username> -p <databasename> -t > <filename>.sql

To take dump of the database with complete insert statement
$ mysqldump -u <username> -p <databasename> -c > <filename>.sql

January 23, 2008 at 8:09 am 2 comments

How to create database using mysql commands

To create database from command prompt. Login to mysql as root user.
To login into mysql prompt in linux machine.
Type the following command in the console

$ mysql -u <username> -p<password>

After entering the mysql prompt follow these steps to create a database
and load the database with sql file.

A CREATE DATABASE statement to create a database.
> create database <databasename>;

A GRANT statement to grant privileges to database.
> grant all on <databasename>.* to <username>@localhost identified by ‘<password>’;

A FLUSH PRIVILEGES statement to tell the server to reload the grant.
> flush privileges;

A USE statement to tell the server to use the given database for further operations.
> use <databasename>;

A SOURCE statement to tell server to load the given sql file in the database.
> source <filename.sql>

January 8, 2008 at 9:39 am 1 comment


Microformats are tiny little markup definitions built on top of, usually, HTML or XHTML.

The available microformats are hCalendar, hReview, hCard, RelLicense, RelTag, XFN Format etc.,

The basic format of hCard is to use vCard object/property names in lower-case for class names, and to map the nesting of vCard objects directly into nested XHTML elements.

For example, Here is a sample vCard

FN:Jeffrey Thomas

and an equivalent in literal hCard:
< p class=”vcard”> < span class=”fn”>Jeffrey Thomas < \span > < \ p>

There are several ruby parser for parsing this microformats to mention a few like mofo, hpricot etc

Check the microformats wiki for further details.

Importance of Microformats

Helps in – Aggregation Sites and Sharing Information with a Specific Community

You can also get more information from this blog about microformats and how websites using this.

December 10, 2007 at 4:29 am Leave a comment

Older Posts Newer Posts


Blog Stats

  • 33,790 hits
May 2018
« Mar    
religion and spirituality