Template::Plugin::HTML::BBCode
2005/03/30 filed under /perlWhat started out as some silly idea, now even brought forth: Template::Plugin::HTML::BBCode.
Thanks, Lobanov Igor!
What started out as some silly idea, now even brought forth: Template::Plugin::HTML::BBCode.
Thanks, Lobanov Igor!
I see at lot of shells flying by and usually I stick to good old bash. Today, however, I came across psh, the Perl shell, and I must say this looks very promising!
The Perl Shell is a shell that combines the interactive nature of a Unix shell with the power of Perl. The goal is to eventually have a full featured shell that behaves as expected for normal shell activity. But, the Perl Shell will use Perl syntax and functionality for control-flow statements and other things.
Of course, for most things, there already is a solution (for instance, instead of doing this in psh
ls -al | { print ++$i,": $_" }q, you can type the shorter ls -al | nl), but when you're used to Perl and even dream in Perl, this shell is the bomb :)
Yesterday I released HTML::BBCode version 1.01. Thanks to a patch of physi and a small bug fix by me.
Still it's a horrible module, but oh well, some people seem to be happy with it.
Feel free to play around with in in the HTML::BBCode sandbox.
Lately, the neighbourhood has been plagued by bastards who like to smash windows of cars. Yesterday I was the chosen one and had my car window smashed by a brick. Die bastards, die! I don't see the point in all of it, for they didn't even take my CDs, nor car stereo (and I think the CDs I have in there are pretty good, but not everyone shares that opinion ;). Oh well, let me just catch one of these freaks soon, please.

Arise picked up the instruments and opened the gates, at which At the Gates laid its soul to rest. That's how I'd like to explain Arise's music.
This new album is not much different from the rest. Still melodic, still technically nice, still very well produced, still very nice to listen to. The only thing that frightened me, was the new-style-In Flames-like chorus in the first track ("How long can you pretend?"). Luckily this we-can-sing-clean-so-even-my-mom-likes-it type of chorus stuff can't be heard (too much) later on :)
Thank you Arise; Thank you Spinefarm (yet again)
Label: Spinefarm Records
Evil Google seems to have something cool now: Google Print.
What is Google Print?
Google's mission is to organize the world's information, but much of that information isn't yet online. Google Print aims to get it there by putting book content where you can find it most easily right in your Google search results.
Sounds good, but the interface needs some tweaking, IMHO. Your "search phrase" will be highlighted in yellow (very annoying) and the pages are scanned images (so no copy and paste).
The idea is nice, but then again, poorly performed. I prefer the Project Gutenberg.
At work, spam is a real problem (at home too, by the way). So I've installed some tight regulations, using multiple RBLs and other nice spam filtering goodies. The problem with this is, of course, the false positives these spam filters get; mail that we'd really like to see.
Postfix offers you to keep a whitelist through the check_sender_access option, but I'm really too lazy to type in all addresses I use, and to keep doing that in the future. So I wrote a little bash hack that will scan the maillog every 10 minutes (thanks, cron!) and grabs the none-local, delivered mail addresses. These addresses get dumped (with time stamp for reference) in a whitelist file, and get postmapped
#!/usr/local/bin/bash
DATE_INS=0
DATE=`date`
for LINE in `sed -ne 's/^.*to=<\([^>]*\)>,
relay=[^(local)].*status=sent.*$/\1/p' /var/log/maillog | sort -u`
do
if grep -q $LINE /etc/postfix/whitelist
then
continue
fi
if grep -q $LINE /etc/postfix/autowhitelist
then
continue
fi
if [ $DATE_INS -lt 1 ]
then
echo "### $DATE" >> /etc/postfix/autowhitelist
DATE_INS=1
fi
printf "%-77s OK\n" $LINE >> /etc/postfix/autowhitelist
done
/usr/local/sbin/postmap /etc/postfix/autowhitelist
This post is listed in the Linux category. I use FreeBSD on my servers, but I have no doubt this will work on Linux too ;)
After messing around with several mail parsers (Mail::Box, Email::Simple and others) I've come to like this parser best. It's part of the MIME-tools, which includes a lot of handy example scripts and modules to suit your every day mail parsing.
It's way easier to get around with than say Mail::Box (Email::* modules are easy too, but my previous project's server had MIME::Parser installed already) and saving a bunch of attachments is a breeze this way.
Oh no! Beatallica, the band that played Beatles songs like Metallica would do is no more.
On Feb. 17th, 2005 a cease-and-desist letter was issued by Sony/ATV claiming "substantial and irreparable injury" and threatening legal action if the site was not taken down.
Such a shame, or better: Sad but true...
I've had the Plans Calendar installed for a while and recently really started using it. I believe this is truly a nice project. Of course because it's written in Perl (yeah, I'm a monk) and because it produces a clean layout of a calendar which just seems to work. Last but certainly not least, it's free (both as in "beer" and as in "speech")
Today, Joffie and I finally started to workout our little project which can best be described as "search engine hell" Never ending loops to the same script, providing the search engine (MSN is targeted for being a horrible spider ;) useless info over and over again. Far from finished, but already fun.
So yeah, if you're interested: our "encyclopedia"!
Today, Joffie and I finally started to workout our little project which can best be described as "search engine hell" Never ending loops to the same script, providing the search engine (MSN is targeted for being a horrible spider ;) useless info over and over again. Far from finished, but already fun.
So yeah, if you're interested: our "encyclopedia"!
After the numerous Orkut, Friendster, Hi5 and god knows what else invitations, this is what we need! Introverster.
Introvertster is an online community that prevents stupid people and friends from harrassing you online.
A recent discussion on Perlmonks, mixed with the funny (but currently not working) Lost in Translation script, brought me the idea to convert currency a couple of times with different services (XE, Yahoo and WebserviceX). The idea was to see if you'd finally get the same result again. Apparently not :)
So here it is: Make (or lose) Money!
A website that seems too good to be true: http://www.cs.huji.ac.il/~yweiss/Colorization/. Do I have to take this serious and is it as good as it looks, or is it some kind of hoax and too good to be true?
... might "investigate" it later ...
I've had a negative feeling about Google for a while now and thus am happy to see the growing concerns other people seem to have too.
Also did I like the My Yahoo! stuff for a while, yet I never really saw any direct need for it (I don't use their email, already use bloglines.com for my news and can type `cal` in any terminal). Still it's a nice site, for it does have the currency converter :)
So, time to switch (back? Can't remember) to Yahoo! as "default search engine". The only problem was that my Firefox seems to like Google more than I do and so I had to tweak it a little. Here's how you do it.
As you might know, most options in Firefox can be set through their nifty interface that you can get when you type about:config in your addressbar. There are way too many options, but luckily, you can filter them. You basically want to change two things:
If you set both to "http://search.yahoo.com/search?p=", you will use Yahoo! search from both the address bar, as the search bar (usually right next to it).
So, fight evil Google! ... if only Yahoo! would have taken over DejaNews, and not Google!
Again, Joffie came to me with a nice link he dug up at Freshmeat: the Firefox extension Download Embedded.
Download Embedded does exactly what it sounds like it does. It adds a right-click context menu entry to download all embedded files on a webpage. Its great for grabbing embedded flash animations, movies, music, etc., and a lot easier than digging through the page source or through Firefox's Page Info.
Thanks! Handy for us linux freaks who are too lazy to get plugins up and running ;)

I somehow missed the debut album "Inhumanity" in 2003, but this album is a killer one. A good old nice Gothenburger sound, but then from Finland.
It reminds me of In Flames and Soilwork, when both bands still played nice music (unlike the crappy new albums by both of them), with a touch of Children of Bodom. Melodic death. Nice.
Label: Listenable Records
Honeypots are always fun, and now I've installed the software of Project Honeypot.
What is Project Honey Pot?
Project Honey Pot is a distributed system of decoy email addresses website administrators can include on their sites in order to gather information about the robots and spiders spammers use. We collate data on how addresses are harvested, distributed, and eventually spammed in order to understand the entire spam cycle.
To be fair to good robots, I've also put it in my robots.txt, so a good robot shouldn't get there. Now let's wait for the evil robots and check the (yet empty) statistics
I'm probably so late with this site, but still, it's funny ;) Instead of the TinyURL.com project, now I found HugeURL.com. So, next time you want to get to my blog, just remember this easy-to-remember URL:
Today, I had to hack some simple code up for a client and I ran into awkward problems, delaying my work. The script was supposed to open a log file, say '/home/spam/logfile'. A nasty slurp would do, but problems arose. This little script worked fine on the command line (even as user 'nobody'):
#!/usr/bin/perl use strict; use File::Slurp; my $text = read_file( '/home/spam/logfile' ) ; print "Content-type: text/plain\n\n"; print $text;
As said, no problems from the command line, but through Apache, I got nothing but sysopen: Permission denied. Even a simpler script failed:
#!/usr/bin/perl
use strict;
print "Content-type: text/plain\n\n";
open FH, "</home/spam/logfile";
while(<FH>) {
print $_;
}
close FH;
The file permissions were all fine, like I said, from the command line, even 'nobody' could read the files without a problem. Apache's httpd.conf didn't show much that could prevent opening the file neither.
Even discussing it with the RHCE Joffie had no result (it was on a CentOS machine). But Googling helped out finally ... Security Context. All I had to do was read chcon's manual page and alter the context of the logfile in question.
It looks like security context is very useful, but it would be really nice to see this by default (instead of using `ls --scontext`).
After some radio silence, I recently noticed the BoK being back from the dead. Welcome back and happy blogging (again)!
After struggling for almost a year, the Immigration and Naturalization Service finally granted the residence permit for my girlfriend. A lot of painful waiting and uncertainty is finally over. Yay!
I didn't make it up, it's really someone else who came up with the compliments day. A day on which you can make (have to make) compliments to anyone you can find...
Compliments on your fine taste to read this blog!