Begin main content

Work Ethic

In Guy Kawasaki's first book, The Macintosh Way (see below), he ascribes this great quote to Michael Jackson:

Nobody could duplicate Mr. Astaire's ability, but what I never stop trying to emulate is his total discipline, his absolute dedication to every aspect of his art. He rehearsed, rehearsed, and rehearsed some more, until he got it just the way he wanted it. It was Fred Astaire's work ethic that few people ever discussed and even fewer could ever hope to equal.

Being a fan of both Michael Jackson and Fred Astaire this rings true—now to try to emulate!

Guy Kawasaki is also someone who keeps rehearsing and refining what he does (which he does very well). You can get a fun insight into his earlier days and also a great read now that The Macintosh Way is a free* download. Free here means that you have to follow Guy on Twitter. If you lack the patience to filter his feed you can always unfollow later ;)

08:32 PM, 24 Aug 2010 by Mark Aufflick Permalink | Comments (0)

Quickly add PDFs to iTunes/iBooks

Being able to transfer PDFs to iBooks on your iPad and iPhone is really handy. But sometimes it's a pain to either make or track down an actual PDF file. Here's how to do it painlessly.

For any non-PDF document, you can print to PDF and open it in iTunes. But you can collapse that with this neat tip from MacWorld.

If you want to quickly add a document or a web page to your 'Books' collection in iTunes, all you need to do is to create an alias of iTunes and drag it to ~/Library/PDF Services. Now, when you're browsing the web or viewing documents and you decide that you want to read them later on a portable Apple device just hit Print, click the PDF button on the bottom left corner of the window and choose iTunes. iTunes will launch and receive the PDF. Next, sync your device and you're ready to go.Source

But what about when you've got a PDF already open in Preview (say you clicked a PDF download link)? Sure you could save to desktop, drag into iTunes, delete it. Or find 18e3764.pdf in your download folder etc. But if you're any kind of Mac commandline nerd, you will already have DTerm installed (if you don't - do yourself a favour and go check it out).

So you have a PDF open in Preview (or any other PDF app) - just hit your DTerm shortcut key combo (mine is Command-Shift-Enter), then type open -a iTunes then hit Command-Shift-V. (this pastes the path of the current window's file into the DTerm commandline) and hit Enter.

Now your PDF is in iTunes, already highlighted ready for you to change the title if needed.

10:30 PM, 18 Aug 2010 by Mark Aufflick Permalink | Comments (0)

Filtering Growl notifications

Now that I work full time on my Mac I have Skype, Notify and any number of other apps telling me stuff via Growl. One of the great things about having everything centralised through a single notification mechanism is that you can easily choose what notifications you want to see.

Growl already has a great way to choose notifications by turning Apps on or off and notification types as registered by the Apps. But it doesn't have any way to filter based on the content of the notification—e.g. if I want to see when some Skype users log on but not others.

So since Growl is open source I took matters into my own hands. I don't have a UI yet, and haven't forked the repository, but for now here's a quick patch.

The UI is you use Apple's Plist editor to add an array with key "GrowlIgnorePredicates" to com.Growl.GrowlHelperApp.plist in your Library/Preferences directory :) Here are the keys, see NSPredicate docs for predicate string syntax. If you have no idea what I just said you'll have to wait for the UI I'm afraid!

  • ApplicationName
  • NotificationTitle
  • NotificationDescription
  • And here is the patch:

    diff -r 9f9a8561261a Core/Source/GrowlApplicationController.m
    --- a/Core/Source/GrowlApplicationController.m	Sun Aug 01 10:35:51 2010 -0400
    +++ b/Core/Source/GrowlApplicationController.m	Wed Aug 04 13:18:37 2010 +1000
    @@ -592,6 +592,21 @@
     		[pool release];
     		return GrowlNotificationResultDisabled;
    +    GrowlPreferencesController *preferences = [GrowlPreferencesController sharedController];
    +    // Mark Aufflick hack - needs UI    
    +    NSArray *ignorePredicates = [preferences objectForKey:GrowlIgnorePredicates];
    +    if ([ignorePredicates isKindOfClass:[NSArray class]]) {
    +        for (NSString *predString in ignorePredicates) {
    +            NSPredicate *p = [NSPredicate predicateWithFormat:predString];
    +            if ([p evaluateWithObject:dict]) {
    +                NSLog(@"ignoring notification due to predicate: %@", p);
    +                return GrowlNotificationResultDisabled;
    +            }
    +        }
    +    }
     	NSMutableDictionary *aDict = [dict mutableCopy];
    @@ -642,8 +657,6 @@
     		value = [NSNumber numberWithInt:priority];
     	[aDict setObject:value forKey:GROWL_NOTIFICATION_PRIORITY];
    -	GrowlPreferencesController *preferences = [GrowlPreferencesController sharedController];
     	// Retrieve and set the sticky bit of the notification
     	int sticky = [notification sticky];
     	if (sticky >= 0)
    diff -r 9f9a8561261a Core/Source/GrowlPreferencesController.h
    --- a/Core/Source/GrowlPreferencesController.h	Sun Aug 01 10:35:51 2010 -0400
    +++ b/Core/Source/GrowlPreferencesController.h	Wed Aug 04 13:18:37 2010 +1000
    @@ -39,6 +39,7 @@
     #define LastKnownVersionKey			XSTR("LastKnownVersion")
     #define GrowlStickyWhenAwayKey		XSTR("StickyWhenAway")
     #define GrowlStickyIdleThresholdKey	XSTR("IdleThreshold")
    +#define GrowlIgnorePredicates       XSTR("GrowlIgnorePredicates")
     CFTypeRef GrowlPreferencesController_objectForKey(CFTypeRef key);
     CFIndex   GrowlPreferencesController_integerForKey(CFTypeRef key);

11:47 PM, 03 Aug 2010 by Mark Aufflick Permalink | Comments (0)


Blog Categories

software (41)
..cocoa (23)
  ..heads up 'tunes (5)
..ruby (6)
..lisp (4)
..perl (4)
..openacs (1)
mac (21)
embedded (2)
..microprocessor (2)
  ..avr (1)
electronics (3)
design (1)
photography (26) and white (6)
..A day in Sydney (18)
..The Daily Shoot (6)
food (2)
Book Review (2)


Icon of envelope Request notifications

Syndication Feed


Recent Comments

  1. Mark Aufflick: Re: the go/Inbox go/Sent buttons
  2. Unregistered Visitor: How do make a button to jump to folder
  3. Unregistered Visitor: Note I've updated the gist
  4. Unregistered Visitor: umbrello is now an available port on macPorts
  5. Unregistered Visitor: Updated version on Github
  6. Unregistered Visitor: Modification request.
  7. Unregistered Visitor: Accents and labels with spaces
  8. Unregistered Visitor: Mel Kaye - additional info
  9. Unregistered Visitor: mmh
  10. Mark Aufflick: Thank you