tips and tricks, examples,code snippet and links about Java, JavaScript, jquery, css, html, unix/linux, oracle, mysql, php and web designs that related to my interest
Thursday, October 6, 2011
Thursday, September 29, 2011
svn commands to dump and load project
testing host
-------------------------------------------
url = http://192.168.214.31:5000/svn/
path = c:/repositories/
-------------------------------------------
//look at the latest revision number in the existing 'factory' project to be dumped
svnlook youngest C:/repositories/factory//dump 'factory' project
svnadmin dump C:/repositories/factory > C:/temp/factory.dump
//create new project in the repository called 'testing321'
svnadmin create C:/repositories/testing321
//1.load dumped project to the new project
svnadmin load C:/repositories/testing321 < C:/temp/factory.dump
//2. load into a subdirectory , e.g. testing321 /loadhere
//2.1 create subdirectory called 'loadhere'
svn mkdir [url/path]/testing321/loadhere , e.g.
svn mkdir http://192.168.214.31:5000/svn/testing321/loadhere
//2.2 load dump file into the subdirectory 'loadhere'
svnadmin load c:/repositories/testing321 --parent-dir loadhere < c:/temp/factory.dump
//3.load into a subdirectory in a subdirectory, e.g. testing321/loadhere/loadnow
//3.1 create subdirectory 'loadnow'
svn mkdir [url/path]/testing321/loadhere/loadnow, e.g.
svn mkdir http://192.168.214.31:5000/svn/testing321/loadhere/loadnow
//3.2 load dump file into the subdirectory 'loadnow'
svnadmin load c:/repositories/testing321 --parent-dir loadhere/loadnow < c:/temp/factory.dump
Tuesday, September 20, 2011
Wednesday, April 6, 2011
htaccess for redirection
htaccess for redirection. so when user enter http://www.mydomain.com or http://mydomain.com it will redirect to http://www.mydomain.com/mysubfolder.
Below is the .htaccess code to be put in the public_html directory.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^/?$ "http\:\/\/www\.mydomain\.com\/mysubfolder" [R=301,L]
htaccess to display subfolder as the domain name
inside the public_html directory, we want to use the subfolder for example named 'mysubfolder' but in the url shown as http://www.mydomain.com or http://mydomain.com instead of http://www.mydomain.com/mysubfolder.
Below is the .htaccess code to be put in the public_html directory.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteCond %{REQUEST_URI} !^/mysubfolder/
RewriteRule ^(.*)$ mysubfolder/$1 [L]
Monday, February 14, 2011
Tuesday, February 8, 2011
Some Oracle commands
1.set the oracle xmltoollite instance (windows cmd)
e.g. set ORACLE_SID
>set ORACLE_SID=xmltoollite
2.login to sqplus as dba in xmltoollite instance
>sqlplus sys/mypassword as sysdba
3.stop db : force shutdown
e.g. shutdown
SQL>shutdown immediate
4. start db
SQL>startup
5.logout from sqlplus
SQL>quit
check connectivity (windows cmd)
--------------------------------
e.g. tnsping
>tnsping XMLTOOL_
listener (windows cmd)
---------------------
e.g. lsnrctl
1. see services attached to this listener
>lsnrctl services LISTENER
2. see status of services attached to this listener
>lsnrctl status LISTENER
3. start the listener
>lsnrctl start LISTENER
4.stop the listener
>lsnrctl stop LISTENER
how to setup multiple listeners
-------------------------------
http://blogs.sun.com/rtsai/entry/how_to_configure_multiple_oracle
e.g. set ORACLE_SID
>set ORACLE_SID=xmltoollite
2.login to sqplus as dba in xmltoollite instance
>sqlplus sys/mypassword as sysdba
3.stop db : force shutdown
e.g. shutdown
SQL>shutdown immediate
4. start db
SQL>startup
5.logout from sqlplus
SQL>quit
check connectivity (windows cmd)
--------------------------------
e.g. tnsping
>tnsping XMLTOOL_
listener (windows cmd)
---------------------
e.g. lsnrctl
1. see services attached to this listener
>lsnrctl services LISTENER
2. see status of services attached to this listener
>lsnrctl status LISTENER
3. start the listener
>lsnrctl start LISTENER
4.stop the listener
>lsnrctl stop LISTENER
how to setup multiple listeners
-------------------------------
http://blogs.sun.com/rtsai/entry/how_to_configure_multiple_oracle