this is totally gonna work… » Mac

1Password To Rule Them All…

May 26th, 2008

I came across a fantastic piece of Mac software thanks to a Merlin Mann tweet. The app is called 1Password and, to paraphrase Mr. Mann’s original tweet, it solves a problem I didn’t even realize I had. Well…that’s not entirely true. I knew that the various passwords I have scattered across the net weren’t as secure as they could be. I had heard of master-password apps but hadn’t really done much research on them. Now I’m not going to bother because 1Password so completely blew me away that I went ahead and bought the license (more on that in a bit).

As you might suspect, 1Password is a master-password application. You can easily generate hard-to-crack passwords (like, ‘81239jsdfj912jlksdf8981′), but only have to remember one master-password. This in and of itself isn’t particularly interesting (though the password-generation feature is really well done). What makes 1Password so compelling is how well it is integrated into your online activities. 1Password works with just about every kind of web browser you can imagine on a Mac.

On Firefox, 1Password can install a toolbar that puts all of 1Password’s features right there. When you navigate to a site for which you stored a password, you can automatically fill out a form with the click of a button. If you haven’t re-authorized with 1Password in a bit (often after waking up my laptop) you have to give your master password again (nice touch boys).

200805261621.jpg

Also whenever you submit a page that 1Password thinks is auth-related, it will offer to remember these credentials for you. When you update your credentials on a site, the app will ask if you want to update your existing credentials. That is absolutely killer. Clearly these guys understand the achilles’ heel to most security systems–people are lazy and are the weakest link. Having such smooth, inline integration makes it difficult for even the lazy user to subvert their own security.

1Password doesn’t just live in your browser, it’s also a nice stand-alone application. You can easily modify and update your secure information as well as import and export it (a handy way for me to sync my work and home machines).

You’re not just limited to passwords either. The app also comes with a notion of identities where you can specify the contact information you might need at various web sites. For myself, I keep both “work” and “personal” profiles. Whenever I have to sign up for something I can simply click the profile I want to use and 1Password fills out as many of the relevant form fields as it can. It also has a “wallet” feature where you can stuff various other secure information like credit card numbers (including the verification number on the back), AWS keys and host of other things. Very very very cool.

Perhaps the most supremely cool feature of 1Password is the ability to sync encrypted javascript bookmarklets with your iPhone that gives you access to those same secret items on your iPhone! 1Password creates two special bookmarklets (synced via iTunes through your Safari bookmarks). One displays your passwords, the other will fill out web forms with with the selected credentials. Both require you to enter a password to unlock the bookmarklet, which you set when you export the bookmarklets from the application. Being able to get that secure information away from my computer makes sure that I don’t set simple passwords for iPhone access just because I can’t get to my secret stuff. Well done, boys, well done.

The features of this app alone are enough to have sold me. But a good part of the impression this tool has made is how nicely it’s been done: no sharp corners, wonderful usability, smooth integration. Even the experience of entering the license key is cool. Your license is an image file (no doubt with some extra steganographic goodies embedded) that you simply drag to a target area. No funny numbers to type. How freakin’ cool is that?

license.png
I’ve got a whole ‘nuther post cooking up about my master-list of indispensable nerd-tools, but I felt that this app was worth a standalone post. If you’re on a Mac, do yourself a favor and check this app out.
P.S. No, I wasn’t paid a dime to write this.

Poor Man’s .mac

January 21st, 2008

The discontent with Apple’s .mac service seems to be growing and growing. I’ve looked at .mac a couple of times but couldn’t really find a good reason to get on board. Oh sure it has some nice features like syncing contacts, but honestly most of the features .mac offers I don’t or can get in other ways. In short it’s hard to imagine ponying up $99 for this service when it can be beaten with other tools.

Let’s start by looking at what features .mac offers. According to the .mac website the features are:

  • Web Gallery
  • Website Hosting
  • IMAP Mail
  • Back To My Mac
  • Sync
  • iDisk
  • Groups
  • 10GB Storage

OK, the first two I can handle easily with my little Linux box. IMAP isn’t a compelling feature as I’ve had a GMail address since its inception and really don’t need another email to watch. Back To My Mac is kind of interesting, but honestly I really haven’t had a need to do this.

Now the Sync feature is very interesting. Right now my contacts sync (some of the time) between my work and home machines via my iPhone plugging into iTunes. I didn’t intend for this to be a solution to syncing calendars and contacts so I’m not too bummed when it does odd things. Regardless, .mac wouldn’t help me with calendars where the ultimate source of authority for my schedule is Google’s Calendar system. More on this in a bit…

Groups. Uh, unless I don’t get this correctly, isn’t this what Yahoo! and Google offer for free? No thanks Apple, not interested.

iDisk is completely uninteresting to me. I use Amazon’s S3 along with the brilliant JungleDisk tool and, even with a license for JungleDisk, is seriously cheaper (and much bigger) than .mac’s storage options. 10MB is a paltry amount. So let’s start with how I solved this problem…

File Storage

So since I only need a fraction of .mac’s features, I’ve found cheaper ways to get the same functionality. The first is scoring a JungleDisk license ($20). When you fire it up it simply creates a file-like volume on the desktop (and in /Volumes) that adheres to regular file-system semantics. Acting like a real file-system means I can use the rsync utility (which is you can installed via MacPorts) to easily update either my local machine or my S3 account.

I have two scripts to sync files: one to sync from my machine to S3 and one to sync the other way. Both my work and home machines have these scripts on them. So a common usage scenario is using my work machine all day then executing the sync_to_s3 script before I go home. When I get home I can simply run sync_from_s3 and get the latest changes on to my home machine. If I make changes to those files on my home machine, I can run sync_to_s3 once more at home and the next morning run sync_from_s3 on my work machine.

Currently the only files I sync through S3 are all in my ~/Documents directory, though it would be easy to sync other files. However the ~/Documents directories on my two machines have some differences between them. For example my Quicken data is on my home machine which is something I don’t need to sync back and forth between my two machines. So to lock down exactly which files I want sync, I create a little file named sync_files that enumerates which files I want to sync. Additionally the sync_files is also synchronized so that I only have to update it one place.

So here are the scripts. The first is sync_to_s3:

#!/bin/sh
rsync --recursive --size-only \\
  --files-from ~/Documents/sync_files \\
  ~/Documents/ /Volumes/JungleDisk/documents/

The sync_files file is simply a list of matching files and directories to sync. Mine looks like this:

books
cheatsheets
markdown
OmniFocus.ofocus
presentations
resume
screencasts
specifications
whitepapers
work
sync_files

Next is the sync_from_s3 which goes the other way.

#!/bin/sh
rsync  --recursive --size-only \\
  /Volumes/JungleDisk/documents/ ~/Documents/

Note that in the second script I don’t refer to the sync_files file. That’s because the only way files end up on S3 is via the sync_to_s3 script which already limits what files get uploaded. I could use the sync_files file to sync from S3, but if the sync_files were updated on S3 I wouldn’t get the changes until my second sync.

One thing to be aware of is a new feature in JungleDisk that, if enabled, will wreak havoc on this setup. Under the ‘Jungle Disk Plus’ settings, be sure to disable the checkbox marked ‘Only upload changed portions of large files’. This absolutely wrecked the sync-ing process for my OmniFocus document. Given how cheap S3 is, this is an utter non-concern for me.

Calendars

Since I’m unwilling to give up my Google Calendar setup and there is no built-in support for sync-ing with them, I needed some kind of tool that can play in both worlds. Fortunately the Spanning Sync tool does exactly this. It’s not exactly cheap at $60, but does a good job and, up until recently, it was the only game in town. Another tool has emerged in this space called BusySync which claims to do the same thing. Since I have a Spanning Sync license, I haven’t tried this tool out. But it’s about half the cost of Spanning Sync and probably worth a look.

Posted in Mac | 5 Comments »

Yet More RSpec Fun With TextMate!

December 15th, 2007

Why is it that I just can’t leave well enough alone? Here, after several weeks for forehead-impact conditioning, I finally get a working setup with Ruby on Leopard with RSpec and TextMate. Life is good, I have my pretty spec runner window back, I’m a BDD’ing fool. But oh no, I have to keep fiddling with stuff.

So I’m finally putting some foundation work into a nifty little webapp that a (childhood) buddy of mine and I are working on. “Hey”, I think to myself, “why not make it a Rails 2.0 app? Better yet, why not get yer RSpec on too?” Brilliant. Why not? What could possibly go wrong? Well after installing the trunk versions of the RSpec plugin for Rails (of course) my beloved RSpec bundle stopped working. :-(

After a little digging around (including the OS X equivalent of printf debugging, Growl) I realized that I’m probably facing incompatibility issues with the TM bundle and the version of RSpec. Now keep in mind that I’ve got two different RSpec-based projects that I’m using the bundle with. One is a straight-up lib-and-spec directory app (the Programming Collective Intelligence port), and the other is this new Rails app. The former was using version 1.0.8 of the gem, while the latter is using the plugin code that I installed.

So I go back to the RSpec bundle that the RSpec folks put out and lo and behold it works like a champ for my Rails app…but not so much for the standalone project. Oh dear. Now what? Like Doug Flutie vs. Miami I chuck a Hail Mary and run sudo gem update rspec

Updating installed gems...
Attempting remote update of rspec
Successfully installed rspec-1.1.0
1 gem installed
Installing ri documentation for rspec-1.1.0...
Installing RDoc documentation for rspec-1.1.0...
Gems: [rspec] updated

Yayyy! A new version! Now the RSpec bundle for TextMate works in both projects. So, the final recipe goes a little something like this:

  1. Install the latest bleeding-edge RSpec plugin for Rails
  2. Install the RSpec version of the TextMate bundle
  3. Make sure the latest gem (1.1.0) is installed.

OK, now has anyone seen my productivity around here? I’d swear I saw it just before Halloween…

Posted in Mac, Ruby | No Comments »

Putting Leopard Back Together

December 14th, 2007

RSpec and TextMate

Ever since I upgraded to Leopard my wonderful RSpec TextMate bundle simply stopped working. This may not have been a result of the Leopard upgrade per se, but things went seriously south about the same time. Between the day after Leopard was released and now I’ve been tearing my hair out trying to figure just what went wrong. Finally, last night, I capped off several weeks of frustrating exploration by getting the damn bundle working again.

My big “A-Ha” moment was figuring out that there are, apparently, two RSpec bundles for TextMate. One is hosted at RubyForge by the rspec guys and another that is hosted at Macromates. I had installed the one from RubyForge which gave me a host of odd errors. When I finally realized that there were two parallel projects and I installed the Macromates one, I was back in business. Also, another problem that I think I had was upgrading to the latest rspec version (1.0.8), though downgrading didn’t seem to help.

So to get this working I first had to troll around for any existing RSpec bundles that I had installed. All of the HOWTOs I read had me install the bundle (via subversion) into ~/Library/Application Support/TextMate/Bundles. My original RSpec bundle wasn’t there but was installed in ~/Library/Application Support/TextMate/Pristine Copy/Bundles. Another location to check for is /Library/Application Support/TextMate/Bundles (note the lack of ‘~’).

RubyGems and RDoc

My other outstanding irritant in the post-Leopard world was the sudden disappearance of the RDoc of the gems I’ve installed from my beloved gem_server. I love the ri command and use it extensively, but being able to search around and expand the source from within a browser is extremely useful for me. For example, I’m still in the process of gaining fluency with RSpec and to be able to browse around to see what’s available is absolutely crucial to any kind of productivity while I’m still in a steep learning curve.

After trolling around it appears that once you’ve taken the step to upgrade RubyGems (the dreaded sudo gem update --system) it’s all about setting up the GEM_HOME and GEM_PATH variables. There seem to be a couple of ways to do this: you can set this up in the shell configuration file of your choice (e.g. ~/.bashrc for bash users, ~/.zshrc for zsh users, etc.) and/or you can do this (on Mac) by entering these in the ~/.MacOSX/environment.plist.

My environment.plist looks like this:

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  ...
    <string>/opt/local/lib/libtidy</string>
    <key>GEM_HOME</key>
    <string>/Library/Ruby/Gems/1.8</string>
    <key>GEM_PATH</key>
    <string>/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8</string>
</dict>
</plist>
Posted in Mac, Ruby | No Comments »

Ruby and Leopard

December 6th, 2007

I’ve spent the bulk of this week trying to dig myself out of Ruby/Leopard hell. I’m surprised that things were as borked as they were. So much so, that I’m inclined to believe that there was something special happening on my machine. I got my shiny new Leopard install the day after it came out. I did an upgrade (not a clean install) with no hiccups and was happy with all of my shiny happy new Leopard features. I knew that first-class Ruby support was coming so I figured I would abandon my MacPorts install and go with what Mr. Jobs deigned to give me.

At first things seemed to go well. But as I was spooling up again on my “Programming Collective Intelligence” project, autotest with rspec was just flat-out broken. When I ran autotest I would get an error like the following:

/Library/Ruby/Gems/1.8/gems/rspec-1.0.8/lib/autotest/rspec.rb:80:in spec_command': No spec command could be found! (RspecCommandError)
    from /Library/Ruby/Gems/1.8/gems/rspec-1.0.8/lib/autotest/rspec.rb:10:in initialize’
    from /Library/Ruby/Gems/1.8/gems/ZenTest-3.6.1/lib/autotest.rb:123:in new'
    from /Library/Ruby/Gems/1.8/gems/ZenTest-3.6.1/lib/autotest.rb:123:in run’
    from /Library/Ruby/Gems/1.8/gems/ZenTest-3.6.1/bin/autotest:48
    from /usr/bin/autotest:16:in `load’
    from /usr/bin/autotest:16

After lots of digging, I figured out that autotest uses the built-in Config class which defines a bindir that rspec (with autotest) uses to derive possible locations for the spec command. On Leopard the default ‘bindir’ for Leopard was /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin which was not where the spec command was installed. With a little help from a blog post I simply symlinked spec into that impossibly long path and things seemed to work.

For now I’m sticking with the Leopard install. I’ve fiddled a little bit with the Scripting Bridge stuff and it’s pretty nifty so I’m hesitant to abandon the Apple install. I just hope that Ruby support doesn’t rot the same way Java support has.

Posted in Mac, Ruby | No Comments »

Happy Mac Day To Me, Happy Mac Day To Me

October 28th, 2007

This weekend has been one of the best birthday weekends I’ve had in a while. First, I got to see my Oregon Ducks beat the USC Trojans to put themselves right in the hunt for the BCS. Second, I scored a couple of copies Leopard which I’ve installed on my laptop. And lastly, I joined the ranks of happy iPhone owners.

When the iPhone was first announced I thought it would be a success, but I wasn’t particularly interested in having one myself simply because I’ve felt that the U.S. wireless industry has had a very difficult time coming up with a compelling product for me. I had a Crackberry from work, which was kind of fun to check scores with or play Sudoku. But if I had to pay for it? No way buster. I wouldn’t pony up for that. Simple telephony would be plenty for me.

Well, that was until a couple of co-workers bought iPhones and I finally got to put my hands…er fingertips…on one. Oh man, I was in love at first touch. The screen is gorgeous and the feel of the interaction is brilliant.

So I waited and waited until my actual birthday came along. Today I walked into my local AT&T store and five minutes later walked out with a brand spanking new iPhone. When I got home I plugged it right into my Mac, iTunes launched and in twenty minutes I had a working iPhone.

What I Like So Far

Google’s announcement of IMAP support for GMail support couldn’t have come at a better time. Setting up IMAP in the iPhone was a snap following Google’s updated instructions. They’ve also done a nice mapping of standard IMAP actions to GMails behavior. Check out this page for details.

I had a mail in my inbox in which someone sent me a link to a YouTube video. I simply clicked the link and -poof- the built-in YouTube player fired up with the video. When I finished watching the video I clicked the “done” button and I was right back in my inbox. Slick…very slick.

I like the multi-document support for Safari. You can have several Safari instances running which is nice when you want to maintain a couple of different browsing contexts. This is utilized by the mail application when links are opened. Opening a new link won’t trounce whatever you were last looking at.

Did I mention it’s just plain beautiful to look at? The screen is glorious. The icons are bright and crisp. Video looks fantastic.

What Gives Me Cause For Pause

I have a pretty long password for my wireless access point and not having the ability to see what I typed in was a little tricky. You do get feedback from the virtual keypad as you hit a particular letter, but it’s not as handy as viewing the field.

The synchronization via iTunes is a little goofy as you can only do it through playlists. Of course the solution is to simply create an iPhone-specific playlist and synchronize things that way. Not a big deal, but it seems a little crufty to me.

Overall

Maybe I’m just in the honeymoon phase and that two-year contract will feel like a ball and chain. But right now I’m very excited to be the proud owner of a new iPhone.

Posted in Mac | No Comments »