Marking all read in Mail.app

I’ve always been annoyed that the only way to mark all as read for a mailbox was with a contextual menu in the sidebar – lets change that.

Continue reading →

Launching OE-Cake

OE-Cake is still expired for OS X – lets work around that

Continue reading →

Making iPhone iTunes remote more useful

The iTunes remote is pretty slick – if only it could turn on the stereo

Continue reading →

Making Google Earth work for us

In our school environment, we had a couple issues with Google Earth’s default behaviors – here are my workarounds.

Continue reading →

simple weak password generator

There are times I need to create some easy to remember weak initial passwords for students – here is a quick script

Continue reading →

Managing mailman on the command line

Even though we moved our email from OS X server to google apps for education – we still manage our lists with a local mailman instance (still on 10.4). However the web based interface for adding new members can be a bit of a pain as it never seems to remember the right authorization when switching between lists – luckily mailman has some great command line tools.

Continue reading →

Editing long commands

Sometimes you get in a situation where you are editing a long command on the command line and you’d kill to be able to use your mouse to select a word or option in the middle. This tip makes it a pleasure

Continue reading →

Letting users get to (i)Work

iLife and iWork can throw up an awful lot of update dialogs and welcome screens for people who first launch them. For users on my network I wanted to prevent those from coming up

Continue reading →

Geek distractions

Tools are getting so sophisticated now – that they can be a distraction for the lightweight or part time coder.

You can get lost in the ins and outs of git vs hg, choosing a database engine (SQL vs Key-Value etc), javascript frameworks, PIP vs Buildout and integrating with virtualenv.

They all have their merit, especially to people who sit in this world all day long, but none of them directly produce work product for you. They are tools – and its best to learn them bit by bit, not all at once, or you will be overwhelmed.

Pre-fetch Apple downloads as dmg files

In my quest to automate the workflow of managing Macs at work, I wanted a way to download disk image files from apple ahead of time – once downloaded the next will be to integrate with my watched install project from the previous post, and then auto lcreate the loadsets. I can then do all my management on the radmind server (picking and choosing loadsets ready to go).

The script monitors http://images.apple.com/downloads/macosx/apple/recent.rss and if it has been updated since last check (stores the last check in a plist file) it will check the feed links for any dmg it can find and download it to /downloaded_dmgs/ (which is easy enough to change in the script source)

The script source is below the fold – or download here

Continue reading →

watchedinstall

[update: project now on bitbucket]

The Problem

There is often the need in a deployment scenario to repackage an installer into some other format. This might be a [radmind][1] transcript, a simple payload only installer package or perhaps just a manifest of what exactly changed on the system.

Apple installer style packages contain simple payloads, but often contain pre or postflight scripts which can make additional and important changes to the filesystem.

There are a couple methods that have been used to try to deduce what exactly was installed:

Continue reading →

calling to the shell in python

This is one of the most frequent utility routines I have in many (most?) of my python scripts. Creating subprocesses in python is very flexble and powerful, but a bit verbose. Sometimes you just want to run a command and set a variable to the output.

from subprocess import Popen, call, STDOUT, PIPE
def sh(cmd):
    return Popen(cmd,shell=True,stdout=PIPE,stderr=PIPE).communicate()[0]

You can then just use this as:

sh('ps -x')

Saving time (and wrists) scripting Illustrator

Sometimes doing tedious layout work in Illustrator is both time consuming and hard on the wrists. In this post I show a quick example of how one can script Illustrator very effectively

Continue reading →

Two quick collage assistants

Despite vowing to stay away from Applescript as far as I can – sometimes its the fastest way to save a little time

Continue reading →

Will iTunes 8.2 lock out the Pre before it arrives?

The iTunes 8.2 update came out today with some curious details that, when you squint hard enough, suggest that Apple is trying to lock out the Palm Pre even before it launches.

Continue reading →