You wa SHOCK
Like many Mac Geeks who live in plaintext, Brett Terpstra’s nvALT has probably become my most used app outside of a browser & finder; It’s become my bread and butter for storing notes, and I rely on the usually rock-solid combo of nvALT-markdown-dropbox combo for just about everything I do.
Yet a few months ago, I would search for a frequently edited note, and find that it had vanished, deleted from dropbox completely without my knowledge. This was a problem1; While not one I could fix myself, I could at least do some damage control.
You Are Already Dead
Since the main problem is having multiple instances of nvALT running at the same time, for now the best thing to do is to make sure this doesn’t happen.
My first line of defense is a small shell script that ssh’s in to my home machine and runs a quick killall on nvALT.3
ssh MyComputerName killall nvALT
Since a one-liner script like this is B-O-R-I-N-G, I spiced it up with growl and used platypus to make a little app out of it.
I’ve included the app in my “Workspace Setup” Automator workflow that I run as I come into work.4 Since my “Leaving Work” workflow quits nvALT, this pretty much eliminates any possible conflicts.
Box of the Blue Sky
My second line of defense makes use of my personal Dropbox Events RSS Feed, Yahoo Pipes & IFTTT to notify me of any accidental deletions of any .txt or .taskpaper files.
I’ve also added the pipe to my Google Reader Generic Cloud-Based Feed Parsing Service™, in case I miss the notification.5
Taking Back the Love
As is always the case with data loss, this really is a scary bug, and if it persists much longer, I’ll probably update my little script with some better logic. Hopefully though, this won’t be a problem in the future, and I trust Mr. Terpstra & co. to sort everything out.
-
This problem was acknowledged a few weeks ago by Terpstra himself & mentioned by other mac bloggers ↩
-
A pox on Dropbox! Wait…no I take that back! ↩
-
Note that I have a ~/.ssh/config file, and ssh keychain setup to allow for this simple ssh command goes through w/o any user interaction. ↩
-
Haven’t quite got around to using ControlPlane to apply some proximity logic to my “Arrive at Work” workflow. ↩
-
I could use a better regex to create a tighter sieve, but ever since I enlisted Kenshiro to the cause, I haven’t had any false positives slip through. ↩