Posted by dacc
on October 13, 2009
Ever wish you could go back several saves in a document or piece of code? You can mount Subversion repositories using WebDAV to generate a new revision each time you save a file!
I run into this during exploratory programming a lot. I’ll break something while hacking away, and not have a means of going back should I lose my undo buffer, etc. My exploratory code changes rapidly as I thrash out the API or technique I’m trying apply, and so explicit version control would be a real drag.
Enter Subversion! If you flip on SVNAutoversioning in your Apache config, you can mount your repository as a WebDAV share, and a new revision will be created for each file save:
Continue reading…
Posted by dacc
on October 05, 2009
While developing BikeJibe, I wanted to do exploratory programming from IPython. Googling “appengine ipython” turns up a cool post on a modified version of the Django “manage.py shell” for the AppEngine environment, but nothing for those using other frameworks.
Here is a script I wrote called “gae-env-setup.py” Basically I culled code from the nosetest project and stuck it in a script you can pass to IPython to setup your app for exploration from the shell.
Continue reading…
Posted by dacc
on September 26, 2009
I released the first iteration of a project called BikeJibe last week. The first feature is an interactive Google Map of popular cycling corridors based on rides people have posted to the web. Check it out!
http://bikejibe.org
Posted by dacc
on September 21, 2009
Snow Leopard contains slideshow style screen savers like “Forest,” “Beach,” and “Cosmos.” These present really beautiful images, which, frustratingly, aren’t immediately available as wallpaper. Here’s how to make them so.
Run the commands below in Terminal to copy the images into your “Pictures” folder.
mkdir -p ~/Pictures/Slide\ Savers/;
find /System/Library/Screen\ Savers/*.slideSaver -name "*.jpg" -exec cp {} ~/Pictures/Slide\ Savers/ \;
Now under “Desktop” in the “Desktop & Screen Saver” prefs, click the “+” at the bottom of the list and add “Pictures/Slide Savers.” All the images should be available.
Enjoy!
Posted by dacc
on April 04, 2009
Update: Check out the interactive version of this map at http://bikejibe.org!
Ever wonder which cycling routes through the city are the most popular? I gathered 2000+ Seattle area routes submitted by riders, and loaded them up in PostGIS. The image below is a screen capture from viewing the data in uDig.
Continue reading…
Posted by dacc
on March 24, 2009
Problem
We’re working on a project at Rieke Lab that has some staunch video timing and reliability requirements. We need to deliver frames without any underruns, and to know the exact moment they’re actually displayed on the screen. This requires that our rendering code runs strictly between refreshes, and that the back buffer is swapped in at the right moment.
Cocoa, OpenGL, and CoreVideo are the tools we picked, and it’s been tricky setting them up and understanding their roles. Hopefully this post will save someone the effort of getting them working together.
There is a CoreVideoOpenGLView subclass of NSOpenGLView attached to this post that I believe achieves our aims while drawing full-screen 2D animations.
Read on for details…
Continue reading…
Posted by dacc
on February 27, 2009
I wanted to make an status indicator bar in Cocoa that I could switch between green, yellow, and red. Here’s how to do it with the NSIndicator control.
First add the control in Interface Builder and configure it as so:

Now you can use a call like the one below to change its color:
[statusIndicator setIntValue: 1]
Here is each value you can use and the corresponding status bar:
Posted by dacc
on February 25, 2009
I’ve been struggling to make the XML build logs in our CruiseControl Dashboard legible, and finally ended up going with an XSLT transform via Greasemonkey.
Even this took a little doing, and so I thought I would share how to perform an arbitrary XSL transform on a loaded XML/XHTML document with a userscript.
Continue reading…
Posted by dacc
on February 20, 2009
I needed to get mod_xslt working under Leopard to pretty up some raw XML CruiseControl logs, and it took a while to get things to build. We’re pretty married to the system Apache, as we use Apple’s groupware and authentication facilities. I ended up having to install some deps, add an include, and hack some Makefiles.
Here’s how…
Continue reading…