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
Editing long commands
August 18th, 2009 — Technology
Letting users get to (i)Work
August 13th, 2009 — Random Observation
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
Geek distractions
August 7th, 2009 — Random Observation
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
July 16th, 2009 — Technology
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
watchedinstall
July 15th, 2009 — Random Observation
[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:
calling to the shell in python
July 14th, 2009 — Random Observation
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
June 4th, 2009 — Technology
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
Two quick collage assistants
June 2nd, 2009 — Technology
Despite vowing to stay away from Applescript as far as I can – sometimes its the fastest way to save a little time
Will iTunes 8.2 lock out the Pre before it arrives?
June 1st, 2009 — Random Observation
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.
10.5.7 fails to update PPC machines properly
May 21st, 2009 — Random Observation
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.
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):