Archive for System Administration

Safari Extension To Remove URL Referers

I often need to wrangle web pages for publication and quite often copy/paste is littered with referer info and session junk. Luckily, many websites can generate a clean url by just stripping everything after a ? in the url. This Safari Extension does just that, opens a url in a new tab with everything to the left of the ? symbol retained so you can check if your new url is usable for publication. The extension is installed as a context menu used while hovering over an anchor link.


Comments off

Zipping files by type and date range from OSX command line

I needed to zip some flash files that had changed in the last 3 days across a set of subdirectories. This is the one liner that I came up with. This is mainly for future me as this comes up all the time.

find /in/directory/ -mtime -3 | grep fla | xargs zip foundFiles

find /in/directory/ -mtime -3 finds all of the files changed in the last 3 days. -mtime has a nice set of options.

grep fla finds the flash files. Regular expressions can get really complicated. This one isn’t, so it’s possible that it might match unintended files. Run up to this part to see if it will grab your files of interest so you don’t zip a bunch of unnecessary files.

xargs zip foundFiles xargs is a handy utility that takes arguments from a pipe and hands them to another program – in this case zip.

After you run this you should have a zip in your home directory named or whatever you chose to call the files.

Comments off

64 bit issues running osascript from terminal

If you use osascript to run applescript from the command line, you may have run into errors looking something like:

Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: ... no matching architecture in universal wrapper

This is due to osascript running in 64 bit mode and being unable to load a 32 bit addition. A quick fix is to force osascript to use i386 architecture, like so:

arch -i386 osascript path/to/applescript

In addition, you can now eliminate the error referenced above by downloading the latest 64 bit Adobe Unit Types.osax from the Adobe site.

Here’s hoping the 64 bit transition goes smoothly for all involved. I’m thinking the performance payoffs will make these little workflow snags worth the effort.

Comments (1)

Automator Action: Final Cut Pro XML to Tape Log via Markers

I’ve never spent much time with Apple’s Automator technology. Which is a little strange, considering how interested I am in automation and workflow technologies. I think some of it is a sense that it seems inaccessible, it doesn’t seem clear how to make things generalizable enough to be useful, and at least part of it is my aversion to Applescript as a scripting language That said, it’s clear that there is a lot of power available with Automator and I’ve started to dip my toe in the water and seeing If I can learn a few things and maybe create something useful.

This is the first fruit of my experimentation. I often need to make a tape log of a sequence in Final Cut Pro, and a quick way to get the sequence details into a text file could be useful. The most approachable way to address the problem seems to be with markers. You can store all of the values I need for a tape log in a marker – item number, name, description, length and the starting timecode. So, that’s how we’ll approach it.

Read the rest of this entry »

Comments (21)

Retrospect Orphaned?

Around Macworld time this year, there were rumors floating around that there were problems at the company that produces a pretty key piece of software for a lot of Mac production shops. The product? Retrospect. Retrospect is back up software. I’ve had a long 17 year love-hate relationship with Retrospect and my opinions have had the resultant peaks and valleys, so I wasn’t sure what to think of the rumors. There were initially some denials of problems with the program but now, it looks like Larry Zulch, the founder of Dantz the orginal parent company of Retrospect has left the company.

I’ve been here before, with an investment in a technology that seems to be going away. I tend to take a pragmatic approach as much as possible. Things usually don’t fall apart right away, but as each new software update is added to the puzzle you start to lose functionality. So you have to start your migration strategy early. I first do an inventory of the current technology landscape and what options are available. If there is a clear migration path (hint to backup vendors: If you can read a Retrospect catalog , reverse-engineer the tape format and make it seemless I’ll be the first in line) I’ll take that path. If not, it usually involves some sort of dual platform support until the first technology platform fades into the background. This path is less ideal because that first platform becomes so archaic, Jazz Disks anyone?, that you end up having ancient workstations dedicated to that format taking up valuable studio space. If the data is important, I’ve found that it makes sense to bite the bullet and migrate to the new format.

Either way, none of this is fun. I don’t have any definitive answers of what is the right direction to take, but I’ll be posting some of the information I find out as I do the research and see what’s out there. Feel free to leave comments about any information you have about good options for small and medium sizes businesses with the heavy back-up requirements that digital studios face.

Comments (3)

Using the Spotlight Importer to Extract Text from a PDF

Ever have a PDF that you need to grab a bunch of text from and don’t want to spend a lot of time selecting and copy/pasting? You can use the Spotlight Importer command-line utility to extract the text on OS X.

/usr/bin/mdimport -d2 /path/to/pdf/file.pdf >& pdf.txt 

It’s the raw text that Spotlight is using to index the file, so you’ll need to do some clean up, but your mouse hand will thank you.

(via Borkware Quickies)

Comments off

Choosing optical media formats for archiving

There was a recent thread on the ae list about backup and archiving. For a large organization like Primal Screen, it’s still really hard to beat tape backup for compact physical storage and cost per gigabyte, but for individuals it’s really common to use optical media for backup.

An equally common question is, “What media should I use?”. There are a ton of manufacturers, OEM’s, and generic media on spindles. Luckily, Patrick McFarland has done most of the research for you in his article How To Choose CD/DVD Archival Media. He gives a history of different flavors of optical media and recommendations on which flavor to use as well as specific manufacturers he recommends. Very useful stuff. Hopefully, he’ll take the time to breakdown his recommendations on Blu-ray and HD-DVD once the dust settles there.

Comments off

Analyzing access logs to find patterns, or “Just how many bots are out there anyway?”: In which we give a gentle introduction to command-line tools.

You find the most interesting stuff in access logs. I spend a fair amount of time digging around in web analytic software. Looking at who is referring to us, analyzing traffic patterns, figuring out peak usage times…you get the picture. Sometimes though, you just need to get right down into the raw logs to figure out what’s going on, and that situation happened to me a while back.

Around the middle of last year a security exploit was found in the implementation of the XML-RPC protocol in PHP. PHP is obviously a very popular web scripting language and dozens of content management systems, including the blogging software I use for this blog, utilize the language. Now an open security hole in such a popular language is just an invitation for the underground to attempt to exploit the situation, and try to exploit they did.

It started out as just a trickle, but before long it became obvious that the underground was attempting to exploit the security hole. How’d we know? By analyzing our logs.

Read the rest of this entry »

Comments (7)

Diagnosing an OSX slowdown

Most of the hacks I post here are about getting things done. Today I’m going to write about avoiding obstacles that might stop you from getting things done. Namely, I’m going to case-study debugging a sluggish OSX machine.


My boss approached me about a weird slowdown he was having where his machine was slowing to a crawl. Trying to move the cursor was taking a lifetime to move a couple of inches. There wasn’t a beachball cursor indicating an application was sucking up resources and I was able to launch programs, just very S L O W L Y.

So, what did we do?

Read the rest of this entry »

Comments (4)