One of the things Leopard changed from Tiger was who could add printers. In Leopard only admins could manage printers – a change made apparently because schools were complaining that non-admins were adding printers they weren’t supposed to. But then it turned out that there were just as many cases where this caused a problem. Apple tried to fix this in 10.5.7 – but forgot to apply the fix completely for PPC machines.
10.5.7 fails to update PPC machines properly
May 21st, 2009 — Random Observation
Reducing size of iPhoto POI database
April 29th, 2009 — Random Observation
This is probably only of interest to those of you that have to deploy iPhoto over a slower (ie wireless) network.
Screen Juggling
April 9th, 2009 — Random Observation
Ever since I had a Powerbook Duo back in the day – I’ve made a laptop my primary machine. There has never been a sync solution that I have found adequate – and with my current AL macbook – I’m happy with the performance and memory. The only shortcomming is the screen as you can never have too much (spaces help – but its not a solution). At my desk at work I have an older eMac that serves as sort of a utility workhorse (encoding/archiving DVDs, backup ARD admin terminal, iTunes jukebox etc). I’ve always sought a way to make good use of the extra screen. In the beginning I was just using Apple Remote Desktop, but this was always a little klunky as it required switching away from whatever I was doing. I’ve not found a couple pieces that when put together result in close to a perfect setup.
Managing Macs with centralized login scripts
March 19th, 2009 — Technology
Managing a large number of Macs at an institution often requires a hodgepodge of tricks and tools. While Apple packages some useful stuff os OS X server, many of the most useful things are hidden, created by the community, or rely on OS X’s UNIX underpinnings. One of the tricks that I came up with a couple years back that I have found invaluable, is a system where by I can create and manage a set of scripts on a server, that get run on each client at login. Read on for details and some snippets.
setting up denyhosts to block ssh attacks on Leopard
March 11th, 2009 — Technology
Deny hosts is a clever python script that will monitor your ssh log file for repeated failed login attempts, and then add the offending hosts to a system blacklist. While you can disable ssh entirely, or move it to a different port, there are reason you may want to keep it available and on a standard port and this tool will help keep the bad guys out.
- download and unpack tarball
- su as root
cd to the unpacked distribution folder and enter the following in terminal:
python setup.py install touch /etc/hosts.deny cp /usr/share/denyhosts/denyhosts.cfg-dist /usr/share/denyhosts/denyhosts.cfg cp /usr/share/denyhosts/daemon-control-dist /usr/share/denyhosts/daemon-control chmod 700 /usr/share/denyhosts/daemon-control
read on for configuration
Voice to OmniFocus, revisited
March 9th, 2009 — Technology
9/2/2009 Updated to work with now longer Twitter ID numbers
back when Jott was free I was one of several people who were using it to get quick voice notes into OmniFocus (OF). A couple of limitations of the Jott solution was that:
- It sometimes had trouble understanding the recipient of “who I wanted to Jott”
- You never got a chance to proofread or edit the transcription before it got sent
There are just times when I think of something on the go, and firing up the iPhone OF app and tapping it in won’t work, so when a friend told me about vlingo for iPhone and twitter, I thought – hmm I’ve been playing a bit with the twitter API and that might be a good route for me to get stuff from voice into OF.
So here are the steps (updated with more detail):
Time Machine: poor man’s version control
February 23rd, 2009 — Technology
There are a has been a number of version control systems en vogue over time, CVS, SVN, Git etc.
I try to keep up with them, use them where possible, but don’t put EVERYTHING I do in version control. Since I am on a Mac running Leopard, I do have, and use Time Machine and so wanted to see if it would be pretty easy to use that to do some quick diffs between some source files.
The result is a quick and dirty python script. In the unlikely event that I ever have time, this would be a cool pyObjC project, a file browser panel, date versions picker, and a webkit view (with some better css).
The source to the script is below the fold – it will look for the first attached volume that has time machine backups for the current machine. It will not work with network based time machine backups that are on disk images. This script will run on a stock Leopard install without any extra python modules needed.
Getting the Screen Religion
February 20th, 2009 — Technology
After reading this excellent tutorial on using screen, I’ve started to use it more especially when on remote ssh connections. I wanted a way to invoke it automatically whenever I logged in, but only for remote sessions (locally I still have multiple terminal windows…) To do this paste the snippet below into your .bash_profile on the remote machine. Be sure to set up a .screenrc file as described in the above link – it makes a huge difference.
What this does is check to see if you are remote (whoami ends with (0.0.0.0) your IP)
Checks to see if there is one and only 1 screen session running – if so, resume – if more than one, list them. Otherwise create a new one. The reason I start screen with a named screen, in this case “start” is to bypass the intro screen that comes up otherwise.
AMREMOTE=`who am i | grep -c ")$"`
if [ ! -z $AMREMOTE ]; then
SCREENS=`screen -list | head -1 | awk '{ print $1 }'`
if [ $SCREENS = 'No' ]; then
screen -t start
else
SCREENCOUNT=`screen -list | tail -2 | head -1 | awk '{ print $1 }'`
if [ $SCREENCOUNT -eq 1 ]; then
screen -r
else
screen -list
fi
fi
fi
Twitter to Growl Agent in Python
February 13th, 2009 — Technology
While my primary Twitter usage is on my iPhone – I sometimes get behind and would like to not have to catch up with 100 tweets at the end of the day. I’ve had Growl installed on my machine for a while now and figured it would be nice to just have some tweets appear in that.
I’m also always on the look out for reducing the number of apps I need to run, so I didn’t want to run twitterific just for its growl support. A quick search of scripts that would link twitter to growl turned up some working and not working examples in ruby [ 1 2 3 ]
And some overly complex examples in Python which do their own twitter api calling. [ 4 5 ]
I wanted to add some features, and lean on one of the well done twitter modules.
So here is another take on a twitter and growl conduit – done in python. Some of the features not seen in the others:
- Will watch your input devices for when you are idle/away and store up tweets to show you when you return
- Lets you designate certain users as being “sticky” so their tweets stay on screen
- manages a cache of user profile images
- is very lightweight (only about 100 lines of readable code)
Requirements
- You need Growl of course
- You need the Growl Python language bindings that are part of the SDK
- You need the less recognized, but very well done Twitter module from Mike Verdone
Here is the script
Reading Django’s Docs on iPhone
February 10th, 2009 — Technology
I’m trying to squeeze the process of learning Django into my busy life, but keep getting distracted by little projects around making the learning easier, rather than actually messing with Django proper (That should change soon). Anyway, while the official Django docs are readable on the iPhone – I wanted something a bit better. So you can build the docs from the Django SVN source, and then if you want you can run this patch that only affects the CSS files.
cd django-trunk
patch -p0 < path-to-patch
You will also need to remove the file reset-fonts-grids.css from the static folder.
The changes were quick and hacky – but do make the pages a bit more readable (larger font) and prevent the code examples from getting chopped off on the right side. I’ve put up a current snapshot here but don’t plan on keeping them updated. For that I’m using AirSharing on the phone itself.
Broadcasting text to speech with Python
February 3rd, 2009 — Random Observation
Background
As a busy father there are times during the day when I can not be glued to the computer, but am free to listen to something on headphones (ie doing dishes, cleaning the garage etc). Sometimes I listen to podcasts – but sometimes I’m out of interesting ones. I’ve recently been working on learning Django and wanted to be able to lurk on the IRC channel more. Its not something that I always want to have front and center on my screen, but would be interested in listening in on as if it were a conversation. So I thought: “I wonder if I can use the built-in OS X text to speech engine and broadcast that over streaming MP3 to my iPhone”. So began a saturday project during the kid’s nap, with some tweaks over the next several evenings.
The result is several pieces that can be used separately or together:
- a basic IRC bot (basically taken from a python irc library)
- a method of taking a set of strings, converting them to spoken text and then pushing them out as streaming MP3
While I developed the latter to work in service of the former, the basic technique could be used with any number of text sources – such as tailing logs etc, there is some interesting potential.
save compile time on a fresh machine
February 3rd, 2009 — Technology
I had recently done some work on one machine and wanted to install it on a second. The work relied on a number of libraries that I had downloaded and compiled from source and at first I was thinking I would end up redoing that on the other machine. Well this isn’t so much a tip as a realization, just use rsync.
rsync -av -e ssh /usr/local/ user@host:/usr/local/
Done! (Note this assume same architecture etc, in my case both were Intel machines running OS X 10.5)
Purple is the fad
January 25th, 2009 — Random Observation
Here are icons from three apps I use fairly regularly – seems like purple is the cool color right now. Time for iTunes to change its color again.

Raising Octopus from Eggs
January 24th, 2009 — Random Observation
Where would people like this go without the internet?
Â
Fixing PDB and TextMate for files with spaces in path
January 7th, 2009 — Technology