Updates from August, 2008

  • go juggle — an attention callback

    mike 7:31 pm on August 28, 2008 | 3 Permalink
    Tags: script utility productivity

    Sometimes progress on a project for me consists of a few short bursts of activity in between stretches of waiting for some long-running thing to complete so I can figure out what I need to do with it next.

    Because I always have more than one project going, I don’t actually wait much. I just switch workspaces and try to make progress on the next thing. If I can’t make progress on anything immediate, I’ll end up checking email or looking up something for a side project.

    This kind of multitasking is inefficient, but inevitable when I might have to wait for 20 minutes or more for a compute job or a compile to finish.

    The problem with this approach is that the things I’m waiting for often finish while I’m off doing something else, and if I get too involved, the low-priority research or emails will eat up my day while the high-priority work sits waiting for me.

    I’ve attacked this problem in the past when using OS X with growl, but I can’t call growlnotify from remote systems. However, I just found dzen for X Windows, a lightweight notification display utility that compiles easily on every system I’ve tried, and works remotely with ssh X forwarding.

    I wrote a simple script called go, which just executes its arguments and runs dzen when it’s done. Now I type (for example) go make and I can switch over to something else, confident that I’ll see a big popup window letting me know when I can get back to working on my highest priority project.

    Here’s basically the entire go script:

    !/bin/ksh

    echo $@ $@ echo $@ completed on hostname \ | dzen2 -p -h 64 -bg darkblue

    It’s simple but it’s working great for me. I’ve tried some improvements like randomizing window placement to avoid overlapping notifications, but the simple version above really does all I need.

    Finally, a couple of details. zsh always seems to want to spell-check ‘go’, so I really named it ‘~/bin/executeAndNotify.sh’ and just aliased ‘go’ to that. Also, I’ve found it can mess with shell quoting as is, so sometimes I have to do 'somecommand ; go echo done'. If someone has a tip on getting the quoting right in the script, I’d love to hear it. The problem crops up when you try something like ‘go make CC=”cc -g”‘ – the quotes don’t make it through.

     
  • Twitter Stats in SVG using gnuplot

    mike 1:15 pm on January 2, 2008 | 4 Permalink

    Damon Cortesi just shared a handy script for grabbing your tweets and compiling some stats about when you post to twitter and who you reply to.

    His script generates a list of numbers and included a Numbers template to paste them into. Since I don’t have Numbers, I’ve modified his script to write a file that can be read by gnuplot, and wrote a basic gnuplot script to output an SVG file version of the stats.

    While I was at it, I changed it so it no longer counts “@someone” separately from “@someone:”.

    Both scripts are right here – gnuplot_twitterstats.tgz

    It uses gnuplot 4.2, which you can get on OS X with macports using port install gnuplot +no_x11'. (Or it’s a pretty easy build on its own, see the gnuplot download page )

    Here are my stats: Sorry, it looks like your browser doesn’t support SVG. You’re really not missing much. Click here for a full-screen version.

     
  • A script for text placeholders in VoodooPad

    mike 10:59 am on March 28, 2007 | 4 Permalink

    Last year I wrote about my new page template for VoodooPad. I still use something like it – I like the uniform look and the built-in navigation starters I get in every page.

    I got tired of all the clicking around it took to fill in the navigation every time I put in a new page, so I decided to write a script to mimic XCode’s “Select Next Placeholder” command. In XCode, if you use code completion, you might get something like this: [dict setObject:<# (id) anObject #> forKey:<# (id)key #>] Then pressing Control-/ cycles the selection through those placeholders so you can replace them with whatever you want quickly.

    That’s really handy for code, and it’s great for VoodooPad templates too. I wrote the script as a Python script plugin for VoodooPad, and it maps Command-/ to select the next placeholder, wrapping the search at the end just like XCode does. Now my new page template in VoodooPad has a few placeholders in it, and I have a lot fewer pages with default template text sitting in there making me look lazy.

    Download it here. (Note, it needs the VoodooPad Python Plugin Enabler )

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
esc
cancel