NSKYC Documents the Color of NYC Skyline

NSKYC Screenshot

A camera positioned at an unknown location in New York City documents the change in color of the skyline every five minutes. The average color is computed, and is represented on a grid of hex colors on a website. Presumably this installation art of sorts, accessed through the humble web browser, has been running since June 28, 2011 at 4:00 PM and will be continuous for the foreseeable future.

The code for the site is a minimal combination of HTML5, JavaScript with jQuery, and a PHP backend for getting the most recent photograph and doing the computations necessary for averaging the color and converting it to hex format.

Posted in Uncategorized | Leave a comment

Set up NetBeans to use SVN over SSH

UPDATE: NetBeans 7.0 has much better UI for supporting login credentials using SVN over SSH. The instructions below may prove helpful if for some reason you are stuck with NetBeans 6.9.1. however.

I am liking NetBeans as my PHP/WordPress dev IDE, but I ran into some difficulty recently setting it up to use SVN over SSH. Here’s the solution that I was able to hit upon. If there’s an easier way to do this, please let me know in the comments. These instructions apply to Mac OSX. And, as always, ymmv!

Open up the preferences pane and click on Miscellaneous > Versioning > Subversion.

Make sure to define the path to your SVN executable file. This should be /usr/bin/ on a Mac.

Then click Define Folder > Add with Wizard. Paste the svn+ssh path into the Repository URL, this should be something like: svn+ssh:// Then, for the tunnel command, enter ssh -l yourusername -q.

NetBeans does not natively support the ability to challenge you for your SSH password as part of its UI, so we need to do a little more work. I found an excellent tip here.

You’ll need this script:

#! /bin/sh
# An SSH_ASKPASS command for MacOS X
# Author: Joseph Mocker, Sun Microsystems
# To use this script:
# setenv SSH_ASKPASS "macos-askpass"
# setenv DISPLAY ":0"

DIALOG="display dialog \"$@\" default answer \"\" with title \"$TITLE\""
DIALOG="$DIALOG with icon caution with hidden answer"

result=`osascript -e 'tell application "Finder"' -e "activate" -e "$DIALOG" -e 'end tell'`

if [ "$result" = "" ]; then
exit 1
echo "$result" | sed -e 's/^text returned://' -e 's/, button returned:.*$//'
exit 0

sudo vi /usr/libexec/ssh-askpass
Paste the script, save the file (needs sudo password), make it executable
sudo chmod +x /usr/libexec/ssh-askpass

Now when you try to use Subversion within NetBeans, a dialog box should pop up asking you for your password. It’s not very pretty, but it does the trick!

Posted in Uncategorized | Leave a comment


Update: Writesceen is now included in the WordPress plugins directory. You can download it here and give it a try.

This is my first plugin, so of course I’m eager for any feedback or pointers from the WordPress dev community.

Posted in Uncategorized | Leave a comment

Hello? World?

Watch this space as I delve into WordPress and share my thoughts. I also expect to post occasionally on my (un)hidden obsession: the intersection of music/code/art.

Posted in Uncategorized | Leave a comment