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

Update download page

2011-03-10 (92) by Ton Kersten, tagged as blog

I've added some more downloads to the download page and now I'm running into tiny troubles. When I change a script or configfile, this is placed in this blogs download directory. But the blogs database isn't updated, so the file size, date/time and revision numbers are not the same on the download page as they are on disk. Of course it's possible to update all this by hand, every time something changes, but being lazy I created a little script that does this all for me.

This is it:


DIRS=" header makebackup mysqlbackup"

# Top of the development tree
cd ~/develop

# Process all the download directories
for dir in ${DIRS}
    cd ${dir}

    # First install everything
    # The Make file also installs in the blogs download dir
    echo "Processing ${dir}"
    make install
    git push

    # Process all files
    for f in *
        # Get the revision number, date and size
        rev="$(grep '^# $Revision::' $f | awk '{print $3 }'smiley"
        dt="$(stat -c '%y' $f | cut -d '.' -f1)"
        sz="$(stat -c '%s' $f)"

        # Create a MySQL update string
        cat <<- @EOF
            # Update the revision
            update wp_download_monitor_files
            set dlversion='${rev}'
            where filename='/var/www/blog/downloads/${dir}/${f}';

            # Update the file date
            update wp_download_monitor_files
            set postDate='${dt}'
            where filename='/var/www/blog/downloads/${dir}/${f}';

            # Update the file size
                wp_download_monitor_file_meta  m,
                wp_download_monitor_files      f
                set m.meta_value = '${sz}'
                where (
                    m.download_id =
                    and (
                    m.meta_name = 'filesize'
                and (
                    f.filename = '/var/www/blog/downloads/${dir}/${f}'
    cd ..
done | mysql -u root -p blogdb

IE(6) Countdown

2011-03-05 (91) by Ton Kersten, tagged as news

If you are using IE6 Microsoft wants us to put this on our website:

Then, if you click it, you are forwarded to the IE8 website.

Click on the image if you really want to upgrade your browser.

Finally a captcha I can read

2011-03-05 (90) by Ton Kersten, tagged as humor

I found this one on Quantum Random Bit Generator Service. I think they are geniuses.

They do have a lot more of these. Just refresh your browser.

Received my IPv6 T-shirt

2011-03-02 (89) by Ton Kersten, tagged as ipv6

I cleared the Hurricane Electric Sage test way back in August. When you do clear this test, the HE people promise to send you a nice nerdy IPv6 T-shirt. It did take them some time, but today it arrived.

Thanks guys. IPv6 Certification Badge for tonk