Category ArchiveApple

Apple 05 Apr 2006 04:45 pm

MySQL Tool

CocoaMySQL is the nicest app I have found for talking to MySQL databases on the mac. Of course, I didn’t look very hard, but it is decent. The developer(s) did a good job.

Apple 05 Apr 2006 04:42 pm


Another nice utility for the mac, if you are a Unix user, is a Cocoa app that shows Unix man pages, ManOpen, created by Carl Lindberg.

It does exactly what it says and it is easy to print man pages from it as well, say for putting on blogs…

Apple &Application Scripting &Programming Languages 05 Apr 2006 04:17 pm

Say No Evil. Hear No Evil.

OS X of course has speech integrated into everything, and some of the voices even sound OK. I prefer Vicki.

Turns out there is also a commandline utility, called ‘say’, that will speak whatever text you pass to it.

SAY(1) Speech Synthesis Manager SAY(1)


say - Convert text to audible speech


say [-v voice] [-o out.aiff] [-f file | string ...]


This tool uses the Speech Synthesis manager to convert input text to
audible speech and either play it through the sound output device cho-
sen in System Preferences or save it to an AIFF file.

Well, after the fun of my sister and I each using our machines in realtime trying to do rounds of “row row your boat” with poor but hilarious results, I decided to do some scripting of ‘say’ with Ruby.

day ='%A, %B %d, %Y')
%x{say -v Vicki 'Today is #{day}'}

Note: I have upgraded my Ruby installation since Apple’s Ruby 1.8.2 in Tiger is broken. You can still use this if you haven’t upgraded by changing back to #!/usr/bin/ruby. For some reason, #!/usr/bin/env ruby doesn’t work when I bundle this into an application (which comes next).

Anway, this Ruby script executes the ‘say’ command, passing it today’s date.

That’s fun, but then I wanted to bundle it so my mom could use it. The Apple application bundle format is really just a directory structure underneath a directory, called <>.

So, I created a directory structure, called ‘’, inside I put the following folder structure:

I put my ruby script file inside the MacOS Folder.

The file, ‘Info.plist’, tells OS X what to do with the file, so I made it look like so to specify the script as the executable:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">

The important lines are:




These say, “this is an app (APPL) and the executable is “saytime”. That worked great.

Then I wanted to package it into a disk image to make it easy to copy and install since it is a bundle composed of directories.

Inside Applications/Utilities there is an application, called DiskUtility, that will create disk image files for you. This is the standard mac pkg install model.

I created a folder, called, ‘saytime’.
I copied the into it.
I open the DiskUtility and chose File/New Disk Image From Folder.
I chose the new saytime folder.
I saved it as ‘saytime’.
That’s it.

Here’s a copy of saytime.dmg.

Pretty easy. Actually, I am sure there a many easier ways to do this, and I would be glad to hear about them.

Apple 05 Apr 2006 03:35 pm

DIY – Zen Alarm Clock

I often coveted the Zen alarm clocks. The idea of a bell gradually growing louder to bring me out of sleep seemed like a pleasant way to wake up as opposed to the blaring alarm clock.

My wife got me a CD alarm clock last year, and it has been great to wake up to music, though she doesn’t always appreciate my choice. Apparently, the 1812 Overture wakes her up too abruptly.

I was going to use GarageBand to make an audio track of a progressively louder bell. Unfortunately, I couldn’t get any of the built-in synthesizer bells to sound very good (I didn’t try very hard though and it looks like the add-on packs have better bell sounds).

Instead, I found a suitable bell sample on the web as a wav file. Then I brought it into Peak, brought the gain way down, added one second of silence on to the end. Next I selected the whole sample, which is about 7 seconds long, and copied it 4 times. Then I created a snippet out of that whole sound, and copied it. For each copy I brought the gain up about 50%. Eventually, I had about 12-13 minutes of ever-increasing volume bells that normalized to the loudest, non-clipping sound. I saved this off to disk as an aiff.

I tried to burn it straight to cd from Peak, but wasn’t very successful. I’ll have to revisit that.

Instead, I imported it into iTunes, created a playlist, popped in a blank cd, and created an audio cd.

It works really well, and I awake to the pleasant sound of a bell every morning. I haven’t yet checked to see how many volume levels it progresses to before I wake up, but it always seems like it just breaks into my consciousness. This is apparently appreciated by my wife too.

Here is the Zen Alarm AAC sound file(~5mb)(might need to right-click to download) if anyone is interested. It could also be used with iCal or the autowake feature certainly to make the computer an alarm clock.

Apple &Application Scripting &Software 05 Apr 2006 03:07 pm

Omni Group Tools

I have probably blogged about Omni Outliner or Omni Graffle in the past, but it bears repeating that these are really useful tools and they are well-built. The Omni Group has been building Cocoa apps for a long time. To the point where they have released toolkits for Cocoa programmers of the foundations that they extracted from their applications.

Omni Graffle is great for those quick little diagrams that you need to make to show someone a design idea. The only drawback is that they look so stylish that you end up having a conversation about the tool as much as the design idea.

It provides several stencil sets and there are many third party stencils available as well.

Ryan Davis of the Seattle Ruby Brigade has a presentation on automatically generating Rails model schemas with OmniGraffle and AppleScript. He hasn’t released the source, but it shouldn’t be too much to recreate, and it might be even easier using the migrations facilities in rails.

As for Outliner, I use it for creating all kinds of lists, and use it as my day planner as well. It also has third party extensions. There are even extensions to setup a Getting Things Done planning system, though I have not ventured to try it yet as my little setup works pretty well.

I like the sense of humor of the Omni Group as well. Here’s one sample, the description for a set of AppleScript extensions states:

Useful Scripts is a collection of AppleScripts for OmniOutliner that will really help you perform certain actions much more quickly. They also serve as a great way to familiarize yourself with OmniOutliner’s AppleScript interface in case you’d like to write a script to help with your evil plan to conquer the universe, or something.

With the Applescripts you can supposedly pipe your lists into OmniGraffle and make diagrams as well. Nifty.

Apple &Muzak 05 Apr 2006 02:31 pm

Audio Editing

I have been using an audio application called Peak LE for some time now, and it really does a great job for wave form editing and cleanup of mp3s, wavs, and other assorted files.

Mostly I like it for the digital signal processing tools. GarageBand does a lot of nice stuff in general for creating multi-track recordings, but it is elementary in this respect.

Another handy tool from the same people is SoundSoap. It is great for removing clicks and other random noises from recordings.

FOLLOWUP: Bias just announced that they will have Universal binaries for Peak in the second quarter and that upgrades will be free.

Apple 03 Apr 2006 09:04 pm


MailScripts are a handy set of AppleScripts for doing things with the Apple

FOLLOWUP: Well, trying this out on the macbook, I am not sure if I have too many messages or what the problem is yet, but the archive mail script seems to have some sort of deadlock with Mail, so use that script with caution.

Apple 03 Apr 2006 08:03 pm

It’s Here!

Darwin segovia.local 8.6.1 Darwin Kernel Version 8.6.1: Tue Mar 7 16:55:45 PST 2006; root:xnu-792.9.22.obj~1/RELEASE_I386 i386 i386

Yay! It is fast. Very fast. and the screen is very bright. Eclipse is about 800000000% percent faster.

Everything else was already fast, but it seems faster too.

Office, which is still a powerpc binary seems to be ok for gigantic powerpoints so that is good.

The built-in isight also is very cool. Fortunately, it tells you when it is on, so you don’t have to worry about computing in your pajamas.

Apple &Muzak 03 Apr 2006 07:57 pm

Time Shift Music Streams

I like to listen to online radio broadcasts of local programming, like Philosophy Talk on KALW, and some remote programming, like KCRW in LA.

Unfortunately, I can’t always be online when the audiocast happens, so Audio Hijaak is the answer. It allows me to time shift recordings so that I can listen to them later.

It takes advantage of the Hardware audio abstraction layer in the mac to be able to launch pretty much any audio application and capture it’s stream.

Apple 03 Apr 2006 07:51 pm

Google maps in Address Book

Address Book plugin for Google Maps

Pop it in, and then right click on any addressbook entry and get a map or directions from Google Map. How slick.

« Previous PageNext Page »