About Productivity, Social Networks and everything else I'm interested in

Tag: Brett

Quick tip: Using 1Password when you can’t use 1Password



1Password is almost always the first app I install on a new machine. It’s my key to opening all of the necessary accounts and it holds all of my software licenses. It’s literally indispensable. I’m going to just go ahead and assume you use it or are at least familiar with it and move along.

You may know this already, but there’s a hidden gem in your 1Password keychain file. If you locate the 1Password.agilekeychain file (PreferencesGeneral, first item) and right click it in Finder, you can view the package contents. Immediately inside you’ll see a file called 1Password.html. It’s a web-based means of accessing all your data without 1Password. Just open it in your browser and go.

Note that Google Chrome as of about v14 is horrible for running local files (and bookmarklets on SSL sites… another story). To avoid this, I launch Chrome with a wrapper script:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-running-insecure-content --allow-file-access-from-files &

If you don’t feel like dealing with command line flags, though, open your 1Password.html file in Safari. Whatever you do, don’t open it in Firefox — because that would mean you’d have to use Firefox. Just trying to keep you safe.

Mike Rose in the comments notes that you can use a Dropbox URL instead of accessing from the local file, avoiding the Chrome issues and alleviating the need to sync the keychain file locally. Smart one, that Mike Rose.

With this feature, you can get to your passwords even when you can’t run 1Password. Accessing your Dropbox-synced keychain file through the web interface is the most practical example. I’ve been setting up a couple of remote machines where I never intend to use the GUI and am trying to avoid installing apps in general. I install Dropbox1, though, and I can get all of the info I need without installing 1Password everywhere.

Second use case: you use really long passwords and/or need to copy extremely long serial numbers when installing apps. You have 1Password on your iPhone, but it’s not doing you much good with things you can’t type, and you don’t have a clipboard catcher on the machine your working on.

Just the serial numbers, please

Don’t want to deal with syncing the keychain file, but need a bunch of serial numbers? Go to your Software folder in 1Password, select all and choose “Export Selected” from the File menu. Check the necessary fields (probably just title, registered email, registered name and license code) and export it as a plain text file. SCP/FTP that to a remote machine or put it on a USB drive.

Now you can just search for the software by name and get the registered name and serial number with almost zero hassle. I use bash function that runs a command like grep -i sublime licenses.txt | awk '{print $4}' | pbcopy to output just the serial number for Sublime Text 2 straight to my clipboard.

I don’t recommend doing this with your passwords. There’s a reason you keep those in 1Password and not strewn about on post it notes or in plain text files.

  1. Pro tip: Use selective folder sync in Dropbox preferences on remote machines to just sync a single folder with things like 1Password keychains and your dotfiles. Alternatively, make a secondary free Dropbox account for your synced items and share the sync folder back to your main account. Just use the secondary account on remote machines and you’ll have all your synced files, without the extra 150 gigs in your account. 

Originally posted on BrettTerpstra.com at Quick tip: Using 1Password when you can’t use 1Password

via Brett Terpstra http://brettterpstra.com/quick-tip-using-1password-when-you-cant-use-1password/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+BrettTerpstra+%28Brett+Terpstra%29

A couple of new TextExpander snippets


I added a couple of simple TextExpander snippets to the Tools set. The first pair grabs the current (foreground) url from Chrome or Safari and inserts it, the second pair does the same but shortens with Bit.ly.

Note that in order to use the bit.ly snippets, you need to create two additional snippets in a “personal” folder. Create a new group if you don’t have one for personal snippets, then add snippets for Bit.ly username and Bit.ly API key. The abbreviations should be #btlyu (username) and #btlya (API key). You can find your API key at http://bit.ly/a/your_api_key.

The bit.ly snippets will pick up your username and API key based on the abbreviations, so make sure they’re correct. Then just put your username and key into the appropriate snippets as plain text and let the Tools snippets do the rest!

If you are subscribed to the Tools url, your set should update with the new snippets automatically ([[PREFIX]]curl, surl, curb and surb). If you downloaded or don’t have the tools yet, grab them here. And, of course, if you don’t have TextExpander yet, you really should.

Originally posted on BrettTerpstra.com at A couple of new TextExpander snippets

Related posts:

  1. TextExpander Tools updated
  2. TextExpander tools for AppleScript editing
  3. New TextExpander tools for bitly and CloudApp

via Brett Terpstra http://brettterpstra.com/a-couple-of-new-textexpander-snippets/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+BrettTerpstra+%28Brett+Terpstra%29

External linking for nvALT notes 2: nvWikiLinker


Continuing yesterday’s foray into linking nvALT notes to any application, here’s the universal script that makes any text linkable to nvALT without extra urls.

It’s best run as a Service, and one is included in the download. If you add a hotkey to it in System Preferences, you’ll be able to select text you’ve written in any app, hit your hotkey and open a related note. If it’s the first time you’ve used it on that text, it will create the initial note for you.

It works using wiki-style linking, both with [[square bracket style]] and WikiLink style, where the beginning of each word is capitalized and there are no spaces. If a square bracket link exists in the text, it takes priority over any WikiWords found, and only one note can be linked with the selected text (the first title it finds is what it will link to).

When you run the Service/script, it looks for the wiki words in the text passed to it (as a script you want to pass the input to STDIN; the Service does this automatically with any selection). If one is found, it checks your notes folder for the closest matching note with a fairly low threshold. If nothing (almost) perfect is found (there’s a little leeway), it will create a new note based on the wiki word and add the entire selected text to it.

Once you’ve created the note for the text, you can run the service on any selection that contains that wiki word and the original note will be opened.


Say, in a mind map you had a topic node that was just [[Project X research]]. Selecting that text and running the Service would create a new note called “Project X research” and open it in nvALT. You’d add your notes for that node to nvALT and then go back to your mind map. Next time you select that text and run it, your notes pop back up.

You can also use a larger block of text:

These are the notes for Project X. My ProjectXResearch has shown that there is no basis for the claim that “[any particular nationality, socio-economic or social behavior group] do it better.”

If you select that text for the first time and run the Service, the “Project X Research” note will be created with the text in it. Next time you run it, it will open the original note and you can add/edit the contents. From that point on, you just have to select the word ProjectXResearch, and you can use that link again in any other application.


For both the script and the Service, there is only one line to edit. It’s right after the intro credits, and simply points to your notes folder where you keep plain text versions of your nvALT notes (not database storage). If you’re running the System Service, add a hotkey for it and save yourself some time.

It’s possible to use the script with other apps which can pass plain text to it. Alfred and LaunchBar should both be able to do it, but it might take some adjustment. Personally, I’m quite happy with running Services, so I haven’t fully explored the possibilities.

Also note that this system could easily be modified to work with any plain text notes system. If you’d rather open your files in a text editor or other notes application which reads files on disk, just adjust the osascript commands in the script. A little regex work can adjust the way it detects wiki links as well.


The code is up on Github, including the Service. Download the bunch and install the “.workflow” file in [HOME]/Library/Services. It will show up immediately in the Services menu accessible when you have text selected and right click on it (or pull down the application menu in the menu bar).


This is a work in progress, you may find that it chokes on some characters or doesn’t detect a note that should already exist. Please report these as an issue on the repo so I can try to figure out how to improve it. I think this could be a handy tool, and I’d like to polish it up. Also, because I don’t think I have enough to occupy my time1.

  1. If you’ve ever been curious as to whether or not I have psychological issues, I present Exhibit A, a.k.a. “what happened to 40 minutes of my time yesterday.” The script wasn’t even finished yet. I had to run a regex cleanup just to be able to edit it. I scare myself.

    I would, however, like to point out that I resisted creating a “humorous” header for this post. I didn’t even open Acorn up. Self control. 

Originally posted on BrettTerpstra.com at External linking for nvALT notes 2: nvWikiLinker

Related posts:

  1. External linking for nvALT notes: Part 1
  2. nvALT 1.0.8 progress
  3. Unwrap Paragraphs for the Markdown Service Tools

via Brett Terpstra http://brettterpstra.com/external-linking-for-nvalt-notes-2-nvwikilinker/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+BrettTerpstra+%28Brett+Terpstra%29