Welcome to the lab.

Share all your browser tabs at once

[Tweet : ADN : nvALT]

Rick Martin left a comment on my “Write Better Markdown” post that reminded me of a relatively simple amalgamation of projects I’d had in the back of my mind for a couple of years now. I knocked it out as an Automator workflow today.

Borrowing from the Markdown Service Tools browser commands and the original Dropbox Collection Service I made a few years ago, “Share Tab Collection” is a useful tool for anyone who collects in browser tabs during meetings, brainstorming sessions, podcasts, or any time you have a browser full of tabs and want to distribute them.

Run it, and whatever tabs are open in the front window of your browser (Chrome or Safari) will be collected into a web page and a Dropbox public URL will be placed on your clipboard for sharing. Like the original “Collections” Service, it includes an “open all” link that will restore the entire session with a single click.

The output page has updated styling (compared to the original Collections Service) and works on small (mobile) screens. Other than that, it’s very simple.

HTML files are stored in ~/Dropbox/Public/LinkCollections (it will make the folder if needed) and named with a timestamp. You can remove them from public view by deleting or moving those files at any time. You can also go in and edit them manually if you’re industrious and need a quick fix.

Download at the bottom.


The only setup you need to do is to open the workflow in Automator and edit the USERID variable at the very top of the Run Shell Script action. This should be set to the portion of a Dropbox url for a file in your “Public” folder. Here, I made you a picture.

Save the workflow and it’s ready to run. You can also hold down Option in Automator’s File menu and choose “Save as” to convert it to an Application bundle. Workflows are easy to trigger with tools such as EventScripts, BetterTouchTool, LaunchBar, Alfred and others, but an Application can be more convenient if you just want to double click or Spotlight-launch it.


  1. Bring the browser window with the tabs you want to collect to the front
  2. Run the workflow
  3. Optionally enter a title for the collection (provides a default title if left blank) and hit Continue
  4. The tabs will be collected, a page generated, and a Dropbox public URL placed in your clipboard
  5. Lastly, it will ask you if you want to open the URL immediately, clicking OK will load it in a new browser tab

If Chrome is running, it’s prioritized as default browser. If it’s not and Safari is, then it will use Safari’s front window instead. If no browsers are running, it will curl up and die.

Hacking Around

There are a few optional parts of the workflow you can remove or modify as desired.

The “Ask for Text” action that prompts for a collection title can be deleted if you want to always use the default date-based title format.

The last three actions (Ask for Confirmation, Get Value of Variable, and Run Shell Script) can be deleted if you never want to open the url, or…

You can remove the Copy to Clipboard action and the Ask for Confirmation command to only open the URL, without asking and without copying to the clipboard.

You can also add a “Display Notification” action if you want additional feedback.


Share Tab Collections v1.0

Share a URL with a collection of all tabs in your browser window

Updated Thu Sep 03 2015.

More info…

Post-vacation Dropzone 3 Giveaway!

[Tweet : ADN : nvALT]

You may have noticed a record zero posts here this last week. I have an explanation.

I went on my third real vacation in the last 10 years. My wife and I headed out to New Hampshire and Maine for a bit of East Coast flavor. We had a great time, thank you for asking.

As a productivity aside, I made use of a SaneBox feature I didn’t know about until now: the @SaneVacation mailbox. By moving emails to that folder, they disappear until the day I told it I would be back home, at which point they return to my inbox as unread messages. I replied to maybe 2 emails all week. It was very nice.

I also decided to do this trip without a laptop, relying instead on my iPhone 6+ and my WiFi-only iPad1 with an external keyboard (the Logitech K480 is awesome, by the way). I’ll write more about that adventure as I get time, though I’m so late to the “working on an iPad” game that I don’t have that much new to say2.

Anyway, to the point. Dropzone developer John Winter has been awesome enough to sponsor my blog the week I’ve been on vacation, and he’s taken it further by offering five promo codes for Dropzone 3 ($4.99US) to BrettTerpstra.com readers. Sign up below! Entries will be accepted right up until Saturday, September 5th at 12pm CST, at which time the Giveaway Robot will decide your fates by randomly selecting five (5) winners.

Thanks again to John and Dropzone 3!

Giveaway ends in…

One entry per person, valid email required to win. Giveaway ends on 09/05/15 at 12:00 PM. I will never sell or misuse your email address.
  1. Turns out if you save money on hotels and AirBNB stays, you end up with either bad internet or no internet. In the AirBNB case, we had an entire colonial house, which was beautiful, but had no cable, no internet, and no cell signal on Verizon. So that was rustic…

  2. I also saw the new F-Terminal bathrooms at the MSP airport, which I can’t stop talking about. I do actually plan to write an airport bathroom review post.

Web Excursions for August 26, 2015

[Tweet : ADN : nvALT]

How to survive working at home
Daniel Jalkut (one of my favorite indie devs) shares his mistakes and triumphs from over 10 years of being his own boss and working at home. I still need to figure out the keeping-up-hygiene-and-appearances part.
An iOS app that lets you create single site browsers (a la Fluid) to maintain separate cookies and local storage for various sites. Hat tip to [@Anodigital](https://twitter.com/Anodigital].
How the Apple Watch Has Changed My Behavior for the Better

I now snapshot my work, look away, drink some water, walk to the kitchen to refill my cup, glance around to see if anybody needs me, and then get back to work.

This post encapsulates my own experience well.

Use Markdown in Evernote
An update (with fix) to an older Evernote-watching script from Dan Rosenstark for integration with Marked.
Pinboard Pro - Google Chrome extension for Pinboard.in
An alternative to the official Pinboard Chrome extension. It has essentially the same features, but the one thing I wanted very badly for Chrome was a shortcut for Tab Sets, and this offers it.

Write better Markdown

[Tweet : ADN : nvALT]

As John Gruber stated in his original introduction of the Markdown project:

The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.

I work with many different “flavors” of Markdown that have branched off since Markdown 1.0. Some add syntax to accomplish more advanced output control, but the design goal typically remains the same.

The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.

Well-formatted text is not only more readable, it’s more future-proof, and following a set of rules derived from the original spec means better portability.

The CommonMark project aims to clarify a lot of the things I’m about to mention. Its goal is stricter handling of ambiguities in the syntax, and it’s a justifiable one. The negative reactions to the idea seem primarily summed up as “you’re not my real dad.” People seemed more offended by the approach than the spec.

I’m on both sides. As a developer whose primary application is Markdown-based, at least 50% of my customer support involves explaining Markdown syntax and differences between flavors. A common knowledge of what’s standard is useful. Many users learn a syntax particular to a specific processor, and then face disappointment when their documents don’t render properly elsewhere.

However, I love that Markdown has been extended and tweaked for specific purposes, and I take a “personal responsibility” stance on the syntax. As long as users are aware of potential compatibility issues, they can decide for themselves how much of a mess to make when working with any given processor.

This post isn’t about proposing any standard or new flavors, it’s just about common sense guidelines that allow you to work with any processor.

Messes happen because some processors are more lax than others about formatting (preserving line breaks, allowing 2-space indentation, different interpretations of unescaped emphasis markers, etc.), or provide a syntax for elements which aren’t universal (e.g. centering with ~, fenced code with backticks or tildes, strikethrough characters). It’s fine to make use of the latter, as long as you’re aware of what won’t work elsewhere. Ambiguous formatting without recognizing the general rules, though, is just shooting yourself in the foot.

The following guidelines will serve writers well across any flavor of Markdown, and provide portability between them.

mdless: Better Markdown in Terminal

[Tweet : ADN : nvALT]

Here’s a side project that got out of hand.

I wanted to be able to view Markdown README files quickly and pleasantly from Terminal. More often than not, I’m working in an iTerm2 visor window, so opening any app—including a simple qlmanage -p—will make my current view slide away. Not a big deal, of course, but it seemed like it could be easier.

I created mdless for this. It’s a little utility that colorizes, cleans up, and pages Markdown documents. You can use -s SECTION to spit out just a single section of the document (use --list to show available sections).

Markdown is pretty easy to read just as a text file, but some README files are really long and have a lot of cruft that only looks good when rendered. So this tool cleans it up. It also fixes table formatting and highlights it, among other goodies.

If you have Pygments installed, fenced code blocks will be highlighted. And if you’re running the latest iTerm2 (beta), you can even view images inline.

You can install it with gem install mdless (you may need to use sudo gem install mdless depending on your setup). It’s been tested on systems with Ruby 1.9 through 2.1. It should work on non-Mac systems, but I haven’t tried it out.

mdless is a work in progress, but it’s doing everything it was supposed to do already. Check the project page for more info.

A Jekyll plugin for animated GIFs

[Tweet : ADN : nvALT]

I put together a Jekyll plugin called GifTag which turns local gif references into a styled placeholder with play/pause and preloading. This allows a page to finish loading before transferring heavy animated gifs, and adds user control as to when they start playing (as well as allowing them to stop).

In use, the syntax is simply:

{% gif path_to_gif %}

You can pass in either a path to a JPEG or PNG poster image, or the GIF path, as long as both exist. If it’s a GIF file, it will search for a JPG or PNG image with a matching path (but different extension). If neither of those are found, it can generate a poster frame for you with the ImageMagick package.

Here’s what it outputs:

<figure class="animated_gif_frame">
	<img src="/uploads/2015/08/autobook.jpg" data-source="/uploads/2015/08/autobook.gif" width="800" height="450" />

There’s some JavaScript and CSS you need to include (along with jQuery, unless you want to rewrite the click handler in something else) in order for it to work on the front end. Easy enough, though. Full details in my JekyllPlugins project on GitHub.

Web Excursions for August 19, 2015

[Tweet : ADN : nvALT]

Better BibTeX Cite As You Write
Integration for Zotero++, Scrivener, and Marked 2.
Shell Integration - iTerm2
The latest beta of iTerm2 (version 3) has some awesome new features. Nightly builds available.
Unsplash It
A service from Unsplash to generate placeholder images automatically with a simple url structure. Great photos. I think Placekitten might have broken, so this is my new go-to…
Tufte CSS
I love Tufte. This CSS, along with some basic classes and markup formatting, provides Tufte-compliant formatting for your text.
Browser Fairy
I’ve been a Choosy user for a long time, but it’s a dead project and I’ve been watching for a replacement. This is working well for handling multiple web browsers based on user rules. Hat tip to TJ Luoma at MacStories.
Take Control Books - Back To School Sale
For all your Mac learning, Take Control Books are written by some excellent authors, and until August 24th, the entire catalog is 50% off.

Marked 2.5 Sneak Peek

[Tweet : ADN : nvALT]

I’ve been heads down on a few projects for a while now, but I’m getting close to the release of the next update to Marked 2 (free to current users). There’s been a lot of refactoring, refining, and some new features I think you’ll like.

I’ve improved memory management and threading for faster rendering and statistics processing on long documents, as well as better stability for OS X 10.11 (El Capitan). You can also disable Readability and other advanced statistics generation when you don’t need it.