by http://webgeektutorials.blogspot.com

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
           ORACLE_SID=v10g

 Initialization parameters (PRIMARY)
 ==============================
        *. control_files='/u02/admin/v10g/datafiles/control01.ctl'
        *.log_archive_config='DG_CONFIG=(v10g_stdg2,v10g_stdg1)'
        *.log_archive_dest_1='LOCATION=/u02/admin/v10g/v10garch/  VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
       *.db_unique_name=v10g_stdg2'
       *.log_archive_dest_2='SERVICE=v10g_stdg1
  VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
  DB_UNIQUE_NAME=v10g_stdg1 LGWR ASYNC REOPEN=10'
               
        *.log_archive_dest_state_1='enable'
        *.log_archive_dest_state_2='enable'
        *.db_unique_name='v10g_stdg2'
               
        *.FAL_CLIENT='v10g_stdg2'
        *.FAL_SERVER='v10g_stdg1'

        *.standby_archive_dest='/u02/admin/v10g/v10garch'
        *.standby_file_management='auto'
        *.remote_login_passwordfile='EXCLUSIVE'


Friday, February 18, 2011

SVN Administration in Ubuntu and Debian

Installation

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@192.168.1.10/var/www/repo/project1

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 !
CODE: 
<!-- HTML Codes by http://webgeektutorials.blogspot.com -->
<a href='http://www.twitter.com/UID' rel='nofollow' style='display:scroll;position:fixed;top:250px;right:5px;z-index:10' target='_blank' title='Follow Us On Twitter'>
<img alt='by http://webgeektutorials.blogspot.com' src='http://lh5.ggpht.com/-8Xqx0M1nTtE/TVojY0ertuI/AAAAAAAAAOI/epr7mxPaljo/s104/twitter_fm.jpg'/>
</a>

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.

Part-1


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 (http://www.pathf.com), 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 http://www.pathf.com/blogs and http://10printhello.blogspot.com.