Archief

Archief voor oktober 2006

WAN IP address to clipboard (KDE only!)

30 oktober 2006 Reacties uit

Often I want to copy/paste my WAN IP address, here is a shellscript for it (warning: kde only, requires wget and sed, no error detecting whatsoever!)

  1. #!/bin/bash
  2. ip=$(wget -q -O – http://checkip.dyndns.org/ | sed ‘s/.+ (([[:digit:]]{1,3}.){3}[[:digit:]]{1,3}).+/1/’)
  3. dcop klipper klipper setClipboardContents $ip
  4. echo $ip
Categorieën:Linux Tips & Trics Tags:

Mailsplitter

28 oktober 2006 Reacties uit

We use Spamassassin as anti spam tool with Bayes learning. If I want to feed spam massages to the sa-learn tool, I have to get individual messages from my Thunderbird Mailfolder which stores all mails together in a text file.

First I move alle spam massages to the Thunderbird Junk mail. Thunderbird has a build in learning tool to fight spam, so most spam messages are moved to the junk folder automagically. Make sure there are no messages in this folder that are already marked as spam by Spamassassin!
Split a Thundebird mailfolder into individual Mails:

  1. targetfolder=/tmp/spam
  2. if [ ! -d "$targetfolder" ]; then
  3. echo "targetfolder $targetfolder does not exists";
  4. exit 1;
  5. fi
  6. m=0
  7. find ~/.mozilla-thunderbird -type f -name Junk|while read junkfile; do
  8. i=0
  9. for line in `grep -n "From – " "$junkfile" | cut -d: -f1`; do
  10. if [ $i -gt 0 ]; then
  11. head "$junkfile" -n $(echo $line-1|bc) | tail -n $(echo $line-$cl|bc) > $targetfolder/msg$(printf "%09d" $m).eml
  12. fi
  13. let i=$i+1
  14. let m=$m+1
  15. cl=$line
  16. done
  17. done
Categorieën:Linux Tips & Trics Tags:

ING Amsterdam Marathon 2006

28 oktober 2006 Reacties uit

Trots en erg koud
I did it! Ik heb m’n eerste marathon gelopen: de 31e edititie van de Amsterdam Marathon op 15 oktober 2006. Het viel me niet tegen, ondanks de erg zware laatste 8 à 10 kilometer. Ik was erg blij met de support van mijn familie die me op diverse plekken langs het parcours stonden aan te moedigen: allemaal erg bedankt! M’n eindtijd was 3:39:06, vooral dankzij de laatste 7 kilometer langzamer dan ik gehoopt had.

filmpje van mijn finish (na ong. 44 sec., meer filmpjes hier ):


Categorieën:Hardlopen Tags: