Groesbeek, view of the 'National Liberation Museum 1944-1945' in Groesbeek. © Ton Kersten
Fork me on GitHub
Archive for July 2011

Update to OS X Lion

2011-07-24 (105) by Ton Kersten, tagged as mac os x

Last Friday I decided it was time to update my MacBook to OS X Lion. So I went to the app-store and donated my 23.99 euros to Apple.

The download was fast, very fast, if you consider how many people where downloading at that same moment.

After the download I first made a copy of the installer files, because I read that the installer throws these files away after installation. And, of course, I made a full backup with Time Machine.

Installation went smooth, but took a very long time. Initially the installer said it would take 33 minutes, but the total time ended up to be closer to two hours.

This is what the system says now: OS X Lion

Everything is working smoothly, but I did have to reinstall VMware Fusion. This had a little USB problem, that went away after the reinstall. Some programs needed to be updated (MacPorts and some others). And, if you are using anything like Photoshop, you need to install Java. Java is not part of the Lion install (due to licensing tricks made by Oracle) but you can still download it from Apple. Just search for 'Java Lion'.

Switching to tmux

2011-07-24 (104) by Ton Kersten, tagged as sysadm

Some time ago I was fighting my .screenrc again. I wanted to change the status line, but it was hardly possible to read and understand what I typed hardly half a year ago. The screen config file is not exactly poetry.

While searching the web to find how to change the status line I ran into tmux and I thought: "Let's give it a try". And after the very simple compile I started configuring it. What a surprise I was in for. This config file could be read, understood and changed. Man, this is good.

One of the first things I changed was the default Prefix key Ctrl-B. I changed it to Alt-A, so I can still use all the control keys with Vim and in the terminal.

Read more »

Blaze blogger emoticons

2011-07-15 (103) by Ton Kersten, tagged as blog

In my original Markdown setup I had some smilies, or emoticons, defined that could be used in the posts. As Python Markdown lacks that I decided to hack it into BlazeBlogger. The only reason being that I can hack Perl and I can't hack Python.

In the .blaze/config I now have an option called smilies that points to the top of the directory containing all smiley images. If this option is not defined the smiley conversion is skipped.

The option looks like this:


and the code hacked into is:

sub convert_smilies {
    # Change the smiley ascii's to picts
    my $text  = shift;
    my $smurl = $conf->{blog}->{smilies} || return $text;
    $smurl = '<img class="smiley" alt="smiley" src="' . $smurl;

    my %smilies = (
        ':-\)',  'regular_smile.gif',   ':-\D',  'teeth_smile.gif',
        ':-\O',  'omg_smile.gif',       ':-\P',  'tongue_smile.gif',
        ';-\)',  'wink_smile.gif',      ':-\(',  'sad_smile.gif',
        ':-\S',  'confused_smile.gif',  ':-\|',  'what_smile.gif',
        ':\'\(', 'cry_smile.gif',       ':-\$',  'red_smile.gif',
        '\(H\)', 'shades_smile.gif',    ':-\@',  'angry_smile.gif',
        '\(A\)', 'angel_smile.gif',     '\(6\)', 'devil_smile.gif',
        ':-\#',  '47_47.gif',           '8o\|',  '48_48.gif',
        '8-\|',  '49_49.gif',           '\^o\)', '50_50.gif',
        ':-\*',  '51_51.gif',           '\+o\(', '52_52.gif',
        ':\^\)', '71_71.gif',           '\*-\)', '72_72.gif',
        '\<:o\)','74_74.gif',           '8-\)',  '75_75.gif',
        '\|-\)', '77_77.gif',           '\(C\)', 'coffee.gif',
        '\(Y\)', 'thumbs_up.gif',       '\(N\)', 'thumbs_down.gif',
        '\(B\)', 'beer_mug.gif',        '\(D\)', 'martini.gif',
        '\(X\)', 'girl.gif',            '\(Z\)', 'guy.gif',
        '\(\{\)','guy_hug.gif',         '\(\}\)','girl_hug.gif',
        '\:-\[', 'bat.gif',             '\(^\)', 'cake.gif',
        '\(L\)', 'heart.gif',           '\(U\)', 'broken_heart.gif',
        '\(K\)', 'kiss.gif',            '\(G\)', 'present.gif',
        '\(F\)', 'rose.gif',            '\(W\)', 'wilted_rose.gif',
        '\(P\)', 'camera.gif',          '\(\~\)','film.gif',
        '\(\@\)','cat.gif',             '\(\&\)','dog.gif',
        '\(T\)', 'phone.gif',           '\(I\)', 'lightbulb.gif',
        '\(8\)', 'note.gif',            '\(S\)', 'moon.gif',
        '\(\*\)','star.gif',            '\(E\)', 'envelope.gif',
        '\(O\)', 'clock.gif',           '\(sn\)','53_53.gif',

    my $tag;
    foreach $tag (keys %smilies)
        $text =~ s!$tag!$smurl/$smilies{$tag}\" />!g;

    return $text;

and add it to the functions generate_posts and read_entry.

This list is already rather long, and I do think it's not a very good idea to make it longer. It will seriously impact the performance.


2011-07-15 (102) by Ton Kersten, tagged as blog

After using John Grubers original Markdown for a couple of years now, I finally ditched it. I kept wanting things that where not in the Perl version and after a while I lost the fun to code them myself. So I started looking around and I found some alternatives, like rdiscount, libupskirt and a lot more. But I also wanted syntax highlighting, without JavaScript if possible.

Digging around I found Markdown in Python in combination with Pygments. I just tweaked a little Python script to run markdown from the command line and configured blaze to use it.

This is the blaze config line

processor=md -x codehilite -x footnotes -x tables %in% > %out%

and the little python script.

#!/usr/bin/env python26

import logging
from markdown import COMMAND_LINE_LOGGING_LEVEL
from markdown import commandline

logger = logging.getLogger('MARKDOWN')

if __name__ == '__main__':

To bad I don't code more Python, people say it's fun. Maybe something for the holidays.

At this moment this seems to be a keeper.

My patched version of MarkDown is still in the download section. Feel free to take a copy home!

Contest is over

2011-07-13 (101) by Ton Kersten, tagged as ham

Last weekend we participated in the IARU HF championship and we where active for the full 24 hours. We used my own call pa1ton.

Being a very small gun (1 transmitter, two antennas and only 100 watts) we decided that we could have a lot of fun not racing for the points, but trying to work stations we never worked before.

In the end we had 384 QSO's, which is'nt that much. But we had a QSO with China b7hq (which was pronounced as blavo seven hotel queen), Bangladesh, Vietnam, the IARU-R1 and IARU-R1 headquarters and a couple of vk and zl.

All in all a very successful weekend.

We will be back next year.

We are ready for it

2011-07-08 (100) by Ton Kersten, tagged as ham

Next weekend it's IARU contest time again.

With pa1pat and Coen we will setup a portable station again, as we have always done.

Using an Icom IC746 and a FD5 longwire of about 80 meters long we try to have lots of fun during the contest. Our goal is to reach over 500 QSO's in the 24 hour long contest using the single TX and only 100W.

The contest starts on 2011-07-09 1200UTC and runs for 24 hours. That's 14:00 localtime.

The running call sign is unknown at the moment, can be mine (pa1ton), Patricks (pa1pat) or the Nijmegen club call (pi4nym). Changes are rather big that it the prefix will be with pa1.

The place where it all happens is JO21xs.

Hope to hear you in the contest.