xchat notifier

In a previous post I mentioned I wanted an IRC notifier; I got the notifier working but can't really plug it into xchat.

As far as I can tell (and I didn't look that much, the only way I can get the notifier to fire when xchat matches my username in a message is to use the sound infrastructure. Each event can have sound play, and you can specifiy the program to play the sound. Thus I use this with a bogus filename like " You've got a message" ... the only problem is the box has the full path to the filename in it.

xchat must have a better way to handle this sort of thing ...

gnome-notify

IRC is a great way to communicate, but unless you sit around all day watching the screen or have headphones in to ping a sound when someone talks at you, it's easy to miss conversations. What I wanted was some way to pop up a notifier box at the bottom of the screen saying something like "you've got a new message". google searches for "gnome-notifer" didn't turn up anything great; except for a blog entry by Miguel de Icaza.

Looked like what I wanted but firstly it had a few bugs and by default left the message for 5 seconds then made it disappear. I wanted something that would leave the message until I indicated for it to disappear.

So I updated it to iron out some bugs and made it so that the message stays until you mouse over and out of it (the border changes so you know which messages are about to clear : screenshot).

Jazz Piano Comping for the Beginning Jazz Improvisor

Jazz Piano Comping for the Beginning Jazz Improvisor - Tom Anderson

I got this book on Amazon.com because I wanted to learn more about how to comp chords, thinking it might give me more of a harmonic framework when soloing.

It's not quite what I wanted ... I think I missed the "beginning jazz improvisor" and thought it was "beginning jazz piano comper". I'm no expert but I know my way around the basics; it starts right at the beginning and goes through chord theory, starting with majors and moving on to sevenths etc. At the end of each chapter is a written out song with voicings of mainly the type of chord the previous chapter talked about (I think they've done the same thing as the Jerry Coker "Improvising Jazz" book where the changes are for common songs but the title and written melody is different to avoid copyright).

That said, if I can find more time to learn the voicings in the chapters and make my way through the book it will be useful. If you do actually fit the title, it's probably to a bad, cheap buy.

unlimited-space.com

I've been through my fair share of cheap webhosts, and for the most part you get what you pay for. Since most of my sites are for hobby, downtime isn't too much of an issue for me.

However, I can so far say that unlimited-space.com has been a fantastic cheap webhost. They offer a full control panel so you can do most everything yourself, "unlimited" disk space, suitable bandwidth limits, and good features standard features like email, ftp users, mysql and an add-on domain. I've never even had to call on them for service, which for mine is a good sign. However last time I signed up an account it was ready in just a few hours.

You can also pay in $AU which is great. The only downside is the upfront payment -- often with the cheaper reseller based hosting services you pay upfront and never know how much service you're going to get. I have however had no problems with service quality and now have at least three sites running with them.

hnb - bad code

for an example of how not to do things, hnb is pretty good. it's a shame, because it looked like a handy, console based todo list with an xml backing. I don't mean to trash opensource work, but here's some constructive critisim

  • the code follows no known standard coding convention.

    indent(1L)
    

    can help you there

  • whenever you use the magic cast operator in C, be really really sure you know what you are doing.

    Node *pos=(Node *)data;
    ...
    return (int)pos;
    

    The code does this at least a hundred times! Obviously some code that was copied from somewhere but renders the program usless on any 64 bit machine, where sizeof(int) != sizeof(pointer). This also says something about abstraction, since it does it so many times this really hints it should have been broken out.

  • If someone says "XML", think Python, Perl, Ruby ... anything but C

weex

weex is an ftp synchronisation tool. It is fantastic. Here's my weexrc

[blog]
        HostName = ftp.wienand.org
        IgnoreLocalDir = CVS
        DestDir = /public_html/technovelty/
        LoginName = login_name
        Password = password
        SrcDir = /home/ianw/programs/junkcode/blog
        IgnoreRemoteFile = {
        *.py
        *.pyc
        *.html
        *.css
        *.cgi
        .htaccess
        .ftpquota
        }
        IgnoreLocalFile = {
        newentry.sh
        *~
        }
        IgnoreRemoteDir = {
        Pyblosxom
        plugins
        }
        IgnoreLocalDir = {
        *CVS*
        }
[default]

Then I just run

weex blog

and we're updated! In fact I might just do it now ...

junkcode repository

i've started my junkcode repository, storing it in CVS. this is less than ideal, as I can see me having work in three locations -- my laptop, my work machine and my home machine. the cvs repository lives on my house server, which should be accessable via internet at any time which should aleviate most of the issues. as i have full access to the canonical respository I can clean it up if things go astray too (something you can't do with sourceforge for example). what i would really like is the ability to push and pull between trees without having to learn arch. I'm not the only one, and Martin Pool has just started work on it.

In the mean time, if I'm getting into issues where I know I'll be with the laptop and want to check stuff into the repository with no net, I'll probably set up something that replicates the junkcode cvs root and modifies

CVS/Root

and uses rsync or something

setting up pyblosxom

i've used blosxom before, and seeing as all the cool people use pyblosxom and I'm much more familiar with python than I am with perl, I've got it all going. I've had a few issues that I've got workarounds happening for.

Firstly is the redirects so that you can't actually see the pyblosxom.cgi file that is doing all the work. My naive first attempt at writing a global catch all rewrite rule was just

RewriteRule ^(.*)$ /pyblosxom.cgi/$1 [L]

But I think the issue with that is that it ends up recursevly matching and you end up with a 500 error. The solution (for me) was to modify this to break out when it matches the cgi file, so my .htaccess looks like

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /pyblosxom.cgi/$1

this seems to work quite well

Then there's the issue of only being able to upload to wienand.org (where technovelty.org lives) via ftp ... since pybloxsom relies on timestamps things were going to get tricky. luckily there is a hardcodedates.py plugin already written by Nathan Bullock. So now I can create entries with a little scripts like

#!/bin/bash
if [ $# -lt 1 ]; then
    echo usage: ./newentry.sh path/to/filename.txt
    exit 1
fi

ENTRY_DATE=`date '+%Y-%m-%d-%H-%M'`

#make directory heirarchy
NEWFILE=$1

if [ ! -d "`dirname $NEWFILE`" ];then
    echo making `dirname $NEWFILE` ...
    mkdir -v  -p `dirname $NEWFILE`
fi

emacs -nw $NEWFILE

echo $ENTRY_DATE $NEWFILE >> timestamps

and upload them with which is a poor-mans ftp rsync.