jarrodwhaley.com

I make films. I'm also a nerd.

Posts Tagged ‘mac’:

Get a List of the URL Schemes Supported on Your Mac

From a post on Macworld’s hint forums comes this very helpful tip: paste the entirety of the block below into a terminal window and get a full list of URL schemes on your machine, with each entry prepended by the app to which the handler is registered.

find /Applications /System/Library/CoreServices -not \( -name '*.lproj' -prune \) -name '*.app' |
while IFS= read app; do
    apps="${app//\//\\/}"
    plutil -convert xml1 -o - "$app"/Contents/Info.plist |
        sed -nEe '/<key>CFBundleURLSchemes<\/key>/,/<\/array>/ s/^.*<string>(.+)<\/string>/ \1:'" $apps/p"
done |
sort

Super handy.

How To Use Ruby 1.8 on OS X 10.9 Mavericks

The upgrade to 10.9 Mavericks has been mostly free of headaches for me, with one notable exception–Apple quietly updated Ruby to version 2.0, which has unfortunately resulted in some broken scripts that I depend on every day. Even more unfortunately, I don’t really know much about Ruby. I’ve tweaked other people’s code to my liking here and there, but there are a lot of things about it I just haven’t yet had the time to learn about. This combination of circumstances left me with a bunch of broken workflows and no idea how to fix them.

I got a chance to do a little searching this weekend, and I finally found the tip I was looking for thanks to a search on app.net; all one has to do in order to use Ruby 1.8 is to employ the following shebang in one’s scripts:

#! /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

Problem solved.

Thanks, Charles Parnot.

A Small Hack to Improve My Drafts/Hazel/DayOne Workflow For MacBook Users

Lorenzo of 24 Empty Bits has adapted my means of writing DayOne entries from directly within Drafts to his own needs, in a way which I thought my readers might find interesting. Rather than requiring an always-on Mac1, as my original solution does, Lorenzo’s version uses an AppleScript to send new entries into DayOne when a Mac wakes or is booted–thus preserving the proper timestamps for entries written while the Mac wasn’t running.

I’m sure this is a welcome hack for those who only have laptops. Thanks, Lorenzo.


  1. Well, not really, but it is true that the timestamps on entries written while your Mac is asleep will be wrong with my version. 

Easily Send Text To a Mac’s Clipboard With Drafts

I just came across Nathan Henrie’s method for sending text from Drafts.app on iOS to a Mac’s clipboard. It involves a Dropbox action and a shell script which is executed by Hazel–similar in setup to my simple means of quickly sending Journal entries to DayOne from Drafts. As Nathan notes in his post, there are other ways of skinning this particular cat, but his method seems to fit in with my own setup pretty neatly.

The script also allows for sending text to Quicksilver, but since I’m an Alfred user, I’ll just use that app’s clipboard history feature.

Quick DayOne Entries on OS X

In a previous post, I outlined my method for rapidly firing off a DayOne entry using Drafts for iOS. I’d like to follow up with a couple of methods I’ve devised for doing what amounts to the same thing when I’m sitting at my Mac. Sure, it’s not that big a deal to open up DayOne, wait for the app to load, enter a passcode, hit the ‘new entry’ button…but all of that takes a little longer than I’d like it to when I just want to jot something down quickly and then get right back into what I was doing. So I’ve come up with two solutions to this problem: one is a very simple workflow for Alfred 2, and the other is an OS X System Service.

more »

Super-Fast Journaling With Drafts And DayOne

I have an incredibly geeky need to log information about my life–for my own uses, mind you–and a big part of how I address that need is in journaling with DayOne, an app with variants on both OS X and iOS. It syncs flawlessly across devices and (Apple’s) platforms, and has a well-designed interface which makes it a joy to use. The act of writing stuff in DayOne is great for me, which is why I have to find some problem with it.

Sometimes I just want to dash off a thought really quickly–without launching DayOne, waiting for it to open, entering my passcode, tapping to begin a new entry, and so on and so on. I decided I’d find a quicker way to add entries to my journal[1]. Luckily, the developer of DayOne has implemented a pretty handy (if basic) command-line interface, which means that it’s easy to script and automate the app. What I ended up with is this: I type my markdown-formatted entry in Drafts, fire a Dropbox action, and…that’s it. It doesn’t open another app. It just adds the entry to my journal in the background. It takes a little bit of work to set it up, but it’ll save you a lot of time over the long haul. It’s awesome.

more »

FoldingText Is Badass

I admit when I first heard about FoldingText (via Brett Terpstra, I believe), I had no idea why it might be something I’d want to use. On the surface it’s a Markdown editor with foldable headers, but underneath it’s a lot more than that. You can easily drop to-do lists and timers into your document using plain-text only–in other words, you type “todo.timer” on one line, hit return, type “write for 15 minutes,” and bingo, you have a timer.

It’s still in beta, but I recommend it anyway. It’s probably the best, most efficient productivity app I’ve ever tried. If you use a Mac and find it useful to organize your work, go grab FoldingText.

It’s Actually a Full-Size, Professional Violin

Don’t get me wrong–I like John Gruber. I think his opinions are pretty spot-on almost all of the time. I’m not sure that’s the case, however, with his takedown of iFixit’s complaints about the non-upgradability of the new Macbook Pro with Retina Display:

Do you hear it? That’s the world’s tiniest violin, playing a sad song for the third-party repair and upgrade industry. And that violin was made by Apple and can’t be disassembled.

His point about this being Apple’s prerogative is taken; I agree with him there. But this isn’t just about third-party repairs. Lots of us want to be able to futz with our own hardware. A nerd like me ought to be able to add RAM to his “pro” computer, at the very least. A fixed, non-upgradable computer makes sense for a consumer-targeted product, but I’m not sure it makes quite as much sense for a “pro” model. I really don’t think this is a particularly whiny complaint.