Archives - Show All
- 2009
- 2008
-
2007
- December
- November
- September
- August
- June
- April
- March
- February
-
January
-
My patch to parselog Parse.pm
01/26/07
--- /usr/src/parselog-0.09/lib/Log/Parse.pm 2005-07-07 06:52:49.000000000 -0700
+++ /home/vincent/code2007/Parse.pm 2007-01-26 15:27:51.562065760 -0800
@@ -485,13 +485,9 @@
line => '',
@_,
);
+ #Oct 23 03:57:51 star amavis -
My patch to add average spam/clean email rate to parselog.cgi
01/26/07
--- /usr/src/parselog-cgi-0.04/bin/parselog.cgi 2005-07-20 05:53:27.000000000 -0700
+++ parselog.cgi 2007-02-01 09:49:27.000000000 -0800
@@ -29,6 +29,7 @@
my $base = $ENV{SCRIPT_NAME} || '';
my $path = $ENV{PATH_INFO} || shift(@ARGV) || '';
$ -
Perl one-liner to check if OS is big endian or littel endian
01/18/07
perl -MConfig -e '($Config{byteorder} == 1234) ? print "$^O is little endian\n" : print "$^O is big endian\n"
linux are in little endian (right to left)
Network byte order,Darwin is big endian (left to right) -
Perl multi pattern grep
01/08/07
Here is my little Perl multi pattern grep script modifed from <<Advanced Perl Programming>>
#!/usr/bin/perl
use strict;
use warnings;
open my $fh, '<', pop(@ARGV) or die "Could not open $ARGV[-1]:$!";
my $code = 'whil -
mrt to show ip route and packet loss
01/03/07
Lately, because of Taiwan earth quake, the fabric cable broke between North America and South East Asia, mrt it a good tool to show route and network traffic jam for this case:
# mtr --interval=5 www.chinaunix.net
Host Loss -
Perl one-liner caculator
01/03/07
perl -e 'while (defined ($s = <>)) { $result = eval $s; $@? print "invalid string: \n $s" : print $result, "\n"; }'
-
My patch to parselog Parse.pm
- 2006