April 2, 2009
Drivel
No Comments
sooo. I have to admit. I am an old school sendmailer. So, when gentoo absconded my native MTA I was a bit perturbed considering that they replaced “mail” with a postfix wrapper. Well like any good hack I rm’ed that bish and installed my tried and true sendmail. Problem solved.
Though I’ve ALWAYS hated the fact that sendmail implement the m4 (wtfever) pre-processor and I’ve always edited the cf files manually. Yeah … so? It made more sense to me. Anyway’s I figured I’d spent enough time bastardizing the cf files and learn how to do it right; which in-turn had me assess how silly it was to have an m4 (wtfever) pre-processor versus a config file and I got to researching postfix.
Soooooo … Here I am; impressed. I like the implementation, the ease of use, the 3rd party plugins (courier, sasl, etc) and I figure, WTF, i’ll give it a whirl.
Here’s the point of the blog. There’s still no “mail” to command line control… d’oh.
Either by slight of hand or by malice its now “sendmail”, which, lexically makes sense; however, the flags aren’t identical. Again back to the point of me blogging about this I thought I would share a very simple perl / postfix cgi wrapper to “send” “mail” via the postfix sendmail wrapper and still be happy that “you got mail”.
my @vars = $cgi->param;
my $email .= 'SUBJECT: blah blah porn' . "\n\n";
foreach (@vars) {
my $val = $cgi->param($_);
$email .= "$_ :: $val" . "\n";
}
$email .= "\n" . '.' . "\n";
my $cmd = "echo \'$email\' \| sendmail foo\@xxx.com";
system("$cmd");
April 2, 2009
Drivel
No Comments
mmmm my precious.
So; I have been coveting this little gem for quite some time now and being that I recently had a birfday I decided to pony up and purchase a new Canon EOS Rebel XS (e1000D).
w00t.
Can’t wait to see the HDR images I can create with this bad boy. Stay tuned!

peemp
March 10, 2009
Code
No Comments
good to go, for a start … I’ll optimize the code later. Ask if you are curious how it works.
sub blogRoller {
use LWP::Simple;
use CMLRSSLite;
# CONFIG
my $url1 = 'http://heartofsin.com/HOSBlogs/feed/';
#my $url2 = 'http://elprez.heartofsin.com/HOSBlogs/feed/';
my $url3 = 'http://johnwu.heartofsin.com/HOSBlogs/feed/';
#my $url4 = 'http://kozy.heartofsin.com/HOSBlogs/feed/';
my $url2 = 'http://foobar.heartofsin.com/HOSBlogs/feed/';
my @preRoll =();
my @sites = ($url1,$url2,$url3);
foreach (@sites) {
my $rp = new CMLRSSLite;
my $xml = get($_);;
unless ($xml) { $error = 'RSS Feed Unavailable'; next; }
$rp->parse($xml);
my %pointer = ();
$pointer{'COUNT'} = $rp->count();
if ($pointer{'COUNT'} == 0) { next; }
$pointer{'TITLE'} = $rp->get(title);
$pointer{'URL'} = $rp->get(url);
$pointer{'DESC'} = $rp->get(description);
$pointer{'HASH'} = $rp->get(0); # HASH contains $HASH{'title', 'url' and 'description'}
push @preRoll, \%pointer; # Passing an array of anonymous hashes
}
$c=1;
foreach $blog(@preRoll) {
my $var = "blogRoll" . $c;
my $postHASH = $$blog{'HASH'}; # dereferencing rp->get() HASH
$$var = ' ' . $$blog{'TITLE'} . '
' . "\n";
$$var .= ' ' . $$postHASH{'title'} . '';
$c++;
push @blogRoll, $$var;
}
return \@blogRoll;
}
my $blogRoll = &blogRoller;
print $$blogRoll[0] . "\n\n";
print $$blogRoll[1] . "\n\n";
print $$blogRoll[2]. "\n\n";
February 19, 2009
Drivel
1 Comment
Cue evil laugh.
Whats the perfect compliment to my beautiful new MacBook?
This wicked item just showed up on my door:

http://www.booqbags.com/Laptop-Bags/Vyper-exo-M
Perfect!
February 16, 2009
Drivel
No Comments
Reading Mama’s blog logs tonight I noticed a cool referrer: http://search.msn.com/results.aspx?srch=105&FORM=AS5&q=HANDPAINTED+ONESIES
oooooo… Guess who comes up as NUMBER 1 in Microsoft’s Live Search results for Handpainted Onesies?!?
HAHAHHAHA
MAMA! http://www.babyluxdesigns.com/
January 5, 2009
Code
No Comments
Google for the letter e. WTF?
August 5, 2008
Drivel
No Comments
I’m stupid. You’re smart. I was wrong. You were right. You’re the best. I’m the worst. You’re very good-looking. I’m not very attractive.
–Happy Gilmore
August 1, 2008
Code
No Comments
So I am working on neat trading application and thought I would share a snippet of Perl code I just wrote. Its usage will be in a BioTech trading application I am authoring for my own profiteering and it currently is limited to only listed stocks, but its a start
# Does not work with OTC or BB STOCKS!
use LWP::UserAgent;
my $ua = new LWP::UserAgent;
my @stocks=('BPUR', 'CGEN', 'CRA', 'CRIS', 'DCGN', 'ENCO', 'EPIX', 'GENR', 'IDMI
', 'SLXP');
$ua->agent('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/20
08070208 Firefox/3.0.1');
foreach $stock(@stocks) {
my $query='http://www.google.com/search?q=stocks%3A'.$stock;
my $response = $ua->get($query);
my $content = $response->content;
my @lines = split /\n/, $content;
foreach (@lines) {
my $m1=$stock.'_l';
my $m2=$stock.'_lt';
if (m!$m1!) {
s/ \;//g;
@breaks=split />, $_;
foreach (@breaks){
chomp();
if (m!$m1\W!) {
m!>(\d+\.\d+)
$stock->{ 'PRICE' }=$1;
}
elsif (m!$m2\W!) {
m!>(.*)
$stock->{ 'DATE' }=$1;
}
}
}
}
print "$stock :: $stock->{'PRICE'} @ $stock->{'DATE'}\n";
}
July 31, 2008
Drivel
No Comments
Science is what we do when we don’t know what we are doing