Sunday, February 20, 2011

Physical Data Guard scenario in 10G on Linux

This document has been created with step-by-step instructions on how
to create a Data Guard Physical Standby environment, derived from the
10G documentation. Although, this setup was tested with Linux, the
procedure would be the same for any flavor of Unix.

Creating a Physical Data Guard scenario in 10G on Linux.
1.        Primary host: stdg2
           Standby host: stdg1

           Platform: Linux Redhat AS 
           Kernel: 2.4.9-e.24

           Primary Set up on host stdg2

 Initialization parameters (PRIMARY)
        *. control_files='/u02/admin/v10g/datafiles/control01.ctl'
        *.log_archive_dest_1='LOCATION=/u02/admin/v10g/v10garch/  VALID_FOR=(ALL_LOGFILES,ALL_ROLES)


Friday, February 18, 2011

SVN Administration in Ubuntu and Debian


The first step for using Subversion is installing it. This depends on your system. In Ubuntu and Debian, it a matter of running the following command:
$ sudo apt-get install subversion
Subversion has packages for many systems, Linux (Gentoo, Debian, Fedora, ...), Mac OS X, FreeBSD, Windows, ...

Creating the Repository

The first Subversion tool we will use is svnadmin. This tool is for administration tasks, like creating repositories, making backup dumps, and the like. To create a repository, open the command line, change the current directory to where you want to create it, and run svnadmin:
$ cd /home/myrepo
$ svnadmin create svn
(I created my repository under my home directory: /home/myrepo)
I called my repository svn. You can call it whatever you like. Subversion uses this directory to store information about your projects, like file revisions. You won't need to directly deal with this directory, so I suggest keeping it in a safe place and not tinkering with its contents unless you know what you're doing.

Importing Projects

Setup SVN in Unix system

Subversion is a version control system that is widely used by many Open Source projects such as Apache and GCC. Subversion started as a project to implement features missing in CVS. Some of these features are:
  • Subversion tracks structure of folders. CVS doesn't have the concept of folders.
  • Subversion has a global revision number for the whole repository. CVS tracks each file individually. A commit that represents one logical change to the project code may change a group of files; in Subversion, this commit will have one revision number instead of separate revision numbers for every changed file in CVS.
  • Subversion commits are atomic.
  • Subversion retains the revision history of moved or copied files.
Subversion commands are very similar to CVS. It's very easy to switch for CVS users. Most of the time it's a matter of replacing cvs with svn. The following is a tutorial and cheat-sheet to help you get up and running in Subversion quickly.

Creating the repository

Run the command :

Thursday, February 17, 2011

Backup and Restore Mysql database

It is very important to backup databases to prevent any loss of data. The easiest way backup the database is Mysqldump and we can restore it with mysql command...

Backup Syntax:
#mysqldump -u [username] -p [databasename] > dumpfilename.sql

Ex: assume that you want to backup a database called users and with username root, then the command would be....
#mysqldump -u root -p users > users.sql
In the above example "-p" will prompt for password, and if your mysql doesnot have any password then no need to use "-p".

Restore Syntax:
Mysqldump file can easily be restored by using the following command
#mysql -u root -p [databasename] < [mysqldumpfile.sql]

EX: #mysql -u root -p users < users.sql

How to create SVN repository 10 steps

Creating SVN repository on linux machine is easy......

1. Install the subversion
#yum install subversion ( RHEL , Fedora, Centos)
apt-get install subversion (ubuntu,debian)

2. Install open-ssh for secure connection (If repositoy on remote system)

# yum install openssh-server openssh-client (RHEL, Fedora, Centos)
# apt-get install openssh-server openssh-client (ubuntu, debian)

3. use svnadmin command to create the repositorty.....
# svnadmin create
ex: svnadmin create /var/www/repo

4. Now change the directory to /var/www/repo

# cd /var/www/repo

5. Edit the configuration file
# vi /var/www/repo/conf/svnserve.conf
uncomment the following lines
anon-access = none
auth-access = write
password-db = passwd

6.create the users
# useradd -s /sbin/nologin user1

7.set the password for user1
# passwd user1

8.Now edit the passwd file
# vi /var/www/repo/conf/passwd

add the following line and save the file
user1 = password

9. Import your Project to repository

# svn import
ex: # svn import /home/sourcecode/project1 file:///var/www/repo/project1

10.Check out the data to you system
# svn co svn+ssh://user1@

Check Date and Time in mysql

Sometimes we may need to check the time when we are working with mysql.
To do this login to mysql and use the following command

mysql> select now();
| now() |
| 2010-09-28 14:49:57 |
1 row in set (0.06 sec)

Tuesday, February 15, 2011

Static Twitter Follow Me Badge For Any Web In 5 Easy Steps

Twitter is large social networking site and has a million's of users. Many Bloggers/Webmasters are using twitter to promote their blogs. So here i'm sharing how to include Twitter follow me badge in easy 5 steps for blogger user, but it doesn't mean this post is not useful for other webmasters , even for them its very easy ( Please follow only 4,5 step). 

Steps are
  1. Login into your account first.
  2. After successful login you are at Dashboard, now select Design 
  3. Now select tab Edit HTML.
  4. Find (Ctrl + F) "</head>" tag.
  5. Paste the code Just before it, Now in place of "UID" ( second line of code )write your twitter User Name ( ie webgeektutorial ) let others be same and save your work,  its Done !
<!-- HTML Codes by -->
<a href='' rel='nofollow' style='display:scroll;position:fixed;top:250px;right:5px;z-index:10' target='_blank' title='Follow Us On Twitter'>
<img alt='by' src=''/>

If you like my post. Please do not remove Html comment line.  

Sharing is Caring :) So keep sharing.

Monday, February 14, 2011

Photoshop CS5 Changing Hair Colour

Nice tutorial here on how to change the color of hair on a person in a photograph using Photoshop CS 5. What's really nice about this is that it also shows how to apply streaks of color to the person's hair. Have fun!

Friday, February 11, 2011

How well you know Interactive Ruby Shell?

The Interactive Ruby Shell, more commonly known as IRB, is one of Ruby's most popular features, especially with new developers. You can bash out a one-liner, try a method you've just learned about, or even build a small algorithm or two without going the whole way to writing a complete program.
I've started learning ruby, so while I've been digging through some of the best content I can find on IRB learning all about its internals and ways to get more out of it and big thanks to all of those guys who contributed great knowledge on web, thought I should share some of best contents gathered :

Try out some trick in your IRB console:

irb> Kernel.methods.each do |method| puts method; system "/usr/local/bin/ri --no-pager Kernel##{method}"; ch = STDIN.getc; break if (ch.chr == 'q') end

Once you enter this just keep hit enter until you want to quit, at that point hit ‘q’ and enter.

How to clear IRB console ?

On Mac OS X or Linux you can use Ctrl + L to clear the IRB screen. But in windows i don't know how but yes i know the dos command 'cls' which clears screen. so simply i'm calling this command using system.

HTML5 Canvas Cheat Sheet

The HTML5 canvas element uses JavaScript to draw graphics on a web page. A canvas is a rectangular area, and you control every pixel of it.The canvas element has several methods for drawing paths, boxes, circles, characters, and adding images.

<canvas> was first introduced by Apple for the Mac OS X Dashboard and later implemented in Safari. Gecko 1.8-based browsers, such as Firefox 1.5, also support this element. The <canvas> element is part of the WhatWG Web applications 1.0 specification also known as HTML 5.

There are cheat sheets for just about anything out there but I couldn't find one for the HTML5 canvas element, so I decided to do something about that, mostly for my own sake but if other people find it useful that's just all the better. 

Part 1 ( Click on image to enlarge)

HTML5 Visual Cheat Sheet

HTML5 is the new language of the web. This reference lists the various tags available to the web designer, as well as a selection of useful character entities, attributes and events.
The HTML5 cheat sheet is a printable document, designed to provide a quick reference for HTML5. A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size HTML5 cheat sheet.

PART 1  ( Click on image to Enlarge )

Thursday, February 10, 2011

Photoshop Glass Text Effect

How to create a glass text effect? Its a simple effect using the Blending Options.
This tutorials is divided into two parts. Big thanks goes to the up loader.


How to Create Magical Effects

HD video to assist how one can create magical effects using Photoshop.

3D text in Photoshop CS5

How to create 3D effects within PhotoShop CS5. Though not as indepth as say a strictly 3D modeling program, this works fine for print and web purposes. The Process is fairly simple to learn, here are some good video resources.

With Photoshop CS5 Extended, you can create 3D logos and artwork from any text layer, selection, or layer mask with new Adobe Repoussé technology. Twist, rotate, extrude, bevel, and inflate these designs, and then easily apply rich materials like chrome, glass, and cork to explore different looks. And take your designs even further by leveraging the Adobe 3D Forge engine for advanced editing of your 3D models.

Monday, February 7, 2011

Developing iPhone app using Ruby on Rails

This article focused on the structure needed to support separating content for iPhone and iPod touch users, very well written by Noel Rappin. It covered how to manage the viewport to display Mobile Safari content at the right size and scale, and started to discuss what to place in the basic layout of your mobile site.
Part 2 covers how to display your content in a Mobile Safari browser. It also looks at the UI guidelines for managing iPhone content and explores how to make those guidelines come to life in your own Rails application.

Follow these links :
Developing iPhone applications using Ruby on Rails Part 1
Developing iPhone applications using Ruby on Rails Part 2
Developing iPhone applications using Ruby on Rails Part 3

Noel Rappin is the vice president of the Rails practice at Pathfinder Development (, and has a decade of experience with web application development. He has a doctorate from the Georgia Institute of Technology, where he studied how to teach Object-Oriented design concepts. He is the author of Professional Ruby on Rails, and the co-author of wxPython in Action and Jython Essentials. Read more at and