Friday, March 02, 2012

GNU screen

http://www.debian-administration.org/articles/34

Wednesday, November 16, 2011

Parse record

#!/usr/bin/perl

# input: string, hash { field1 => length1, field2 => length2, ... }
# output: hash { field1 => value1, field2 => value2, etc }
sub extract2 {
print "extract2 ...\n";
my $str = shift;
my $fieldlist = shift;

# construc matching pattern
my $patstr = "";
while( my ( $fieldname, $fieldlength ) = each %$fieldlist ) {
$patstr .= "(.{$fieldlength})";
} # end while

# match it
if ($str =~ m/$patstr/) {
my @values = $str =~ /$patstr/;

# create the output
my $i = 0;
while( my ( $fieldname, $fieldlength ) = each %$fieldlist ) {
$record{$fieldname} = $values[$i++];
}
return \%record;
} else {
my %record = ();
return \%record;
}
}


$str = "AAABBBBCCCCCDDD";
%header = (
field1 => 3,
field2 => 4,
field3 => 5,
field4 => 4
);
$output = extract2($str, \%header);
print "outside ...\n";
for my $key (keys %$output) {
my $val = $output->{$key};
print "$key , $val \n";
}

exit 0;

Saturday, May 12, 2007

National Geographic wallpapers

http://rapidshare.com/files/30822944/610_national_geographic_images.zip.html

Wednesday, May 09, 2007

Wild South America

http://forumw.org/viewtopic.php?t=116728

Saturday, December 30, 2006

Bash stuff

http://www.gnu.org/software/bash/manual/bashref.html
http://tldp.org/LDP/abs/html/

Friday, November 24, 2006

Fix for acroread in FC6

ACROREAD FIX FOR FC6

--------------------------------------------------------------------------------------------

sudo rpm -ivh AdobeReader_enu-7.0.8-1.i386.rpm

NOTE: There is a problem with v7.0.8 and will not work properly in FC6.
To fix, edit as root:

sudo gedit /usr/bin/acroread

Make the following changes:

Line ~418:
From:
echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g'
To:
echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g'

Line ~643:
From:
MIN_GTK_VERSION="240"
To:
MIN_GTK_VERSION="2040"

More information: http://www.adobeforums.com/cgi-bin/webx/.3bc14512

Acrobat Browser Plugin

The browser plugin is NOT automatically installed. This is optional. To install it:

sudo ln -s /usr/local/Adobe/Acrobat7.0/Browser/intellinux/nppdf.so /usr/lib/mozilla/plugins/nppdf.so

Monday, November 20, 2006

The Adventures of Sherlock Holmes

http://www.projectw.org/viewtopic.php?t=259537