Friday, March 18, 2011

linux rpm commands

For help, rpm --help or tar --help from the command line.

Install a package
rpm –ivh packagename

upgrade a package
rpm –Uvh packagename

create a tar file
tar –cvf myfiles.tar mydir/
(add z if you are dealing with or creating .tgz (.tar.gz) files)

standard install from source
tar –xvzf Apackage.tar.gz
cd Apackage
./configure
make
make install

Friday, February 25, 2011

Converting html character to actual character

Source : http://webglimpse.net/docs/howto_uml.html

#!/usr/local/bin/perl


# converts html files into ascii by just stripping anything between
# < and >
# written 4/21/96 by Michael Smith for WebGlimpse
#
# Added code to replace html codes for special chars with the
# characters themselves. 12/19/98 --GB
#
# Also add space in place of space-producing HTML tags
# 12/22/98 --GB

$carry=0;

while(){
$line = $_;

if($carry==1){
# remove all until the first >
next if($line!~s/[^>]*>//);
# if we didn't do next, it succeeded -- reset carry
$carry=0;
}

while($line=~s/(<[^\s>][^>]*>)/&addspace($1)/ge){};
if($line=~s/<[^\s>].*$//){
$carry=1;
}

$line = &fixspecial($line);
print $line;
}


sub addspace () {

$_ = shift;

# Check for tags that should NOT return a space
/(<\/?b>)|(<\/?i>)|(<\/?em>)|(<\/?font)|(<\/?strong)|(<\/?big)/i && return '';
/(<\/?sup)|(<\/?sub)|(<\/?u>)|(<\/?strike)|(<\/?style)/i && return '';

# Otherwise, put in a space
return ' ';

}


sub fixspecial () {

$_ = shift;

s/\ / /g;
s/\ / /g;
s/\¡/¡/g;
s/\¡/¡/g;
s/\¢/¢/g;
s/\¢/¢/g;
s/\£/£/g;
s/\£/£/g;
s/\¤/¤/g;
s/\¤/¤/g;
s/\¥/¥/g;
s/\¥/¥/g;
s/\¦/¦/g;
s/\¦/¦/g;
s/\§/§/g;
s/\§/§/g;
s/\¨/¨/g;
s/\¨/¨/g;
s/\©/©/g;
s/\©/©/g;
s/\ª/ª/g;
s/\ª/ª/g;
s/\«/«/g;
s/\«/«/g;
s/\¬/¬/g;
s/\¬/¬/g;
s/\­/\\/g;
s/\­/\\/g;
s/\®/®/g;
s/\®/®/g;
s/\¯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or type 32 bit or 64 bit

http://support.microsoft.com/kb/827218
http://windows.microsoft.com/en-US/windows-vista/32-bit-and-64-bit-Windows-frequently-asked-questions

Wednesday, March 17, 2010

Adding users to Remote Desktop Users Group

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

To add users to the Remote Desktop Users group

1. Open Computer Management.

2. In the console tree, click the Local Users and Groups node.

3. In the details pane, double-click the Groups folder.

4. Double-click Remote Desktop Users, and then click Add....

5. On the Select Users dialog box, click Locations... to specify the search location.

6. Click Object Types... to specify the types of objects you want to search for.

7. Type the name you want to add in the Enter the object names to select (examples): box.

8. Click Check Names.

9. When the name is located, click OK.

Notes

* By default, the Remote Desktop Users group is not populated. You must decide which users and groups should have permission to log on remotely, and then manually add them to the group.

* To open Computer Management, click Start, click Control Panel, double-click Administrative Tools, and then double-click Computer Management.

Source:
MSDN

Sunday, March 14, 2010

Restoring ipod touch to its factory settings

Hold down the power and home keys down for about 10 seconds each while plugged into itunes. When the screen goes black, release the power button but keep holding the home key until itunes says. We have detected an itouch in recovery mode.

From there you can restore as normal via iTunes.

Source:
Yahoo Answers

Monday, December 14, 2009

Enable remote root login and sshd on Solaris-10 after fresh Solaris-10 installation

Enable sshd on solaris-10

1. Change the file /etc/ssh/sshd_config from PermitRootLogin no to PermitRootLogin yes

2. restart the services
#svcadm restart svc:/network/ssh:default


Enable remote root login on Solaris-10

1. Open file /etc/default/login

2. Comment out line CONSOLE=/dev/console as #CONSOLE=/dev/console

Thursday, November 19, 2009

sys-unconfig on solaris

To change solaris config info like NIS server,
login as root and do sys-unconfig. Provide configuration info as needed.

Friday, October 23, 2009

Java 1.5 Certification resources (310-055)

Online Resources :
-----------------
SCJP Tiger Study Guide (Link)

Javabeat.net Notes (Link)

Examulator.com (Link)

An SCJP 5.0 Certification primer(Link)

How to test a product?

1. Requirements based testing - Test it based on Product Requirements doc
2. Parallel testing - Test it against competitor and peer products
3. Scenario testing - Assume different scenarios for different kinds of end users.
4. Usability testing - Based on usage of the product
5. Function testing - Based on functionality
6. Fault Injection - Inject problems
7. Stress testing - Stress it out
8. Performance testing - metrics
9. Regulations - specs

A blog article on all possible test scenarios for a stapler is available in the following location:
http://www.testingreflections.com/node/view/928

Monday, September 07, 2009

Installing thunderbird on Jaunty Ubuntu Linux

Do:
sudo apt-get install thunderbird

Go to: Applications --> Internet --> Thunderbird

To login as root in Ubuntu Jaunty, do:
sudo bash
enter your user password when it prompts for password. You become root then.

Install vpn client on Ubuntu linux - jaunty

mkdir vpnclient

Change to that directory:

cd vpnclient

* Download cisco-decrypt file which will be used to decrypt the group password from your pcf file:

wget http://www.debuntu.org/files/cisco-decrypt.c

sudo apt-get install libgcrypt11-dev

gcc -Wall -o cisco-decrypt cisco-decrypt.c $(libgcrypt-config --libs --cflags)

chmod +x cisco-decrypt

sudo cp cisco-decrypt /usr/bin

* Download pcf2vpnc to convert pcf files in vpnc configuration format

wget http://svn.unix-ag.uni-kl.de/vpnc/trunk/pcf2vpnc

chmod +x pcf2vpnc

sudo cp pcf2vpnc /usr/bin

* Go to windows vpn profiles directory and convert .pcf files to .conf files

pcf2vpnc cisco.pcf > cisco.conf

Note:replace above cisco.pcf with your own .pcf file.

sudo cp cisco.conf /etc/vpnc/

* install vpnc and connect to vpn

sudo apt-get install vpnc resolvconf

sudo vpnc cisco

Enter username for :
Enter password for :
VPNC started in background (pid: 6092)…

* To disconnect simply do

sudo vpnc-disconnect

Source:
=======
http://www.ubuntugeek.com/how-to-setup-cisco-vpn-using-vpnc-ubuntu-jaunty-9-04.html

Wednesday, August 26, 2009

How to find out if solaris machine is 32 or 64 bits?

# /usr/bin/isainfo -kv
64-bit amd64 kernel modules

# uname -a
SunOS jack 5.10 Generic_137138-09 i86pc i386 i86pc

# cat /etc/release
Solaris 10 10/08 s10x_u6wos_07b X86
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 27 October 2008

Configure FTP for root logins

1. Remove 'root' line from /etc/ftpusers.

2. Edit file /etc/ftpaccess and comment out 'deny-uid' and 'deny-gid' lines. If the file doesn't exist, there is no need to create it.

NOTE: If you are using Solaris 9 or Solaris 10, the ftp* files are located in /etc/ftpd

Configure Telnet for root logins

Edit file /etc/default/login and comment out the following line as follows:
# If CONSOLE is set, root can only login on that device.
# Comment this line out to allow remote login by root.
#
# CONSOLE=/dev/console

Enable ssh root login in Solaris 10

1. Change the file /etc/ssh/sshd_config with PermitRootLogin yes to replace PermitRootLogin no

2. restart the services
#svcadm restart svc:/network/ssh:default

Thursday, August 06, 2009

Booting solaris from CD

Open terminal
Enter command: halt in command line. White screen will appear.
Enter command: boot cdroom

Saturday, July 18, 2009

create and delete a soft link on solaris

To create a symbolic link, enter
--------------------------------
$ ln -s {/path/to/file-name} {link-name}
$ ln -s /shared/sales/data/file.txt foo.txt
$ ls -l foo.txt

To delete a link, enter
-----------------------
$ rm {link-name}
$ rm foo.txt
$ ls -l
$ ls -l /shared/sales/data/file.txt

Friday, July 17, 2009

Idhi chala hot guru!

Listen to Hyderabad Radio Mirchi 98.3 FM Online live streaming in
http://www.voicevibes.net

Monday, July 13, 2009

USCIS - Change of Address rule

USCIS regulations require aliens to notify the Attorney General in
writing of a change of address within 10 days of the change. USCIS has
confirmed that this requirement applies to all immigrants and
non-immigrants in the U.S. The AR-11 change of address form can be
completed online at the following link:
https://egov.uscis.gov/crisgwi/go?action=coa.

Please note, in addition to the online AR-11 form, you must also update
your address online for each pending application with USCIS.
Instructions can be found at the link above. You do not need to submit
address-changes for approved petitions.