FirstClown

firstclown at firstclown.us

Archive for February 9th, 2005

Geektool Scripts

Due to popular demand (I get about two hits a day from web searches looking for geektool scripts) I shall post the scripts I use for my geektool set up.

  1. System Log

    Just your standard /private/var/log/system.log listing.

  2. Calendar

    I have a script that I stole off of somewhere. I can't find it now. But basically I show the current calendar highlighting the current date.

    echo `date "+%d %B %Y"` \
    | awk \
    '{ print substr("          "\
    ,1,(21-length($0))/2) $0; }'; \
    cal | awk '{ getline; print \
    " Su Mo Tu We Th Fr Sa";  \
    while (getline) {\
      print " " $0;\
    } }' \
    | awk -v cday=`date "+%d"` '\
    { fill=(int(cday)>9?"":" ");    \
    a=$0; \
    sub(" "fill int(cday)" ","|"fill int(cday)"|",a); \
    print  a }'
    

    Oh, it's ugly, but it works.

    When I found this script, it was set to show Monday as the first day of the week. Nothing bugs me more. So I switched it around a little to show Sunday as the first day of the week and this is what it shows.

      09 February 2005
     Su Mo Tu We Th Fr Sa
            1  2  3  4  5
      6  7  8| 9|10 11 12
     13 14 15 16 17 18 19
     20 21 22 23 24 25 26
     27 28
    

    How cool is that.

  3. Access Logs

    I download my access logs from the web site everyday and instead of running stats on them like a normal person, I grep out certain information to show on my desktop. Right now I'm really interested in how people are getting to my site from search engines. I set up this script to help me.


    tail -5000 log/access_log \
    | grep q= \
    | tail -25 \
    | cut -d' ' -f4 -f5 -f11

    This gets the latest 25 entries with 'q=' in it and shows the date and referrer line. This is how I know that so many people searching for geektool hit my site.

Now you can be amazed as my scripts have been posted.

I've been looking at GTD lately but I'm not keen on using text files to handle my contexts. But if you are, check out this post by bsag over at but she's a girl... Fancy stuff.

FirstClown is powered by WordPress
Entries (RSS) and Comments (RSS).