Archive for May, 2010

Combobox On change

If you need to get a value for the selected item in a combo box you can use the following function :

onchange=”alert(this.options[this.selectedIndex].text)

if you need the value then just replace text with value .

For example, if you want to redirect the page based on combobox selection :

onchange=”window.location=”http://someadress”+(this.options[this.selectedIndex].text)

Force Install CPAN Module in Linux from CLI

Force Install CPAN Module

perl -MCPAN -e “CPAN::Shell->force(qw(install HTTP::Cookies));”

Changing the password hashing algorithm to sha-512

change password hashing algorithm to sha-512

# authconfig –test | grep hashing
# authconfig –passalgo=sha512 –update

Redirecting Ports in Iptables

Redirect ports in iptables

iptables -t nat -A PREROUTING -i eth0 -p tcp –dport $srcPortNumber -j REDIRECT –to-port $dstPortNumbe

Installing Perl Modules

Its convenient to install perl modules from command line.


#perl -MCPAN -e shell 
cpan> install PACKAGE NAME

eg.

cpan> install HTML::Template