Cheaters to launch an SSH Session

I'm a stalwart Terminal fan for my Engineering tasks. I don't understand why so many colleagues prefer a Terminal emulator like SecureCRT when we have native SSH built right into the OS. Something a lot of SecureCRT guys hold over my head is the nested folders with saved SSH sessions.

It dawned on me this morning that I could duplicate that functionality in something I'm already using: Brett Terpstra's Cheaters.

I won't get into an in-depth review of Cheaters, here. Simply put, it's a small app that launches a web view of a locally-hosted set of websites. Brett's suggestion is to use it as a place to keep cheatsheets (hence the name), like a virtual cubicle wall.

I used a little grep and sed on our existing hosts file, and came up with a Markdown list of links to the hostnames of our devices, using the following syntax:


I spent a couple minutes sorting the list into a reasonable hierarchy, then I used this nice little tutorial to create expanding lists using CSS and jQuery. I ran my Markdown list through Brett's own Marked 2, and copied the HTML to a new cheatsheet.

I took the CSS and javascript from the tutorial linked above, and dropped them into the appropriate folders inside of my Cheaters folder. In my new cheatsheet, I linked the specific CSS and javacscript:

<head data-preserve-html-node="true">
    <link data-preserve-html-node="true" rel="stylesheet" href="css/expandolist.css">
    <script data-preserve-html-node="true" type="text/javascript" src="js/expandolist.js"></script>

I didn't need to worry about jQuery, since Cheaters already uses it. I added the appropriate ID's to the div that holds the list, and to the first ul element. That's really all there was to it. Now I have a nice, organized, expandable list that lives in my menubar, which I can use to launch SSH sessions right in Terminal without having to remember specific hostnames. Not bad for 45 minutes of effort.

My Cheaters SSH list

My Cheaters SSH list

The Terminal

Craig Hockenberry put together a really good list of Terminal tips and tricks useful for developers. Many of these require only a little thought to be useful for network engineers, as well. Being able to do stuff like this is a big part of why I've always been a fan of using Terminal directly, in OS X, to ssh to remote devices, as opposed to using a GUI like SecureCRT.

Re-Enabling Folder Actions in Mountain Lion

I'm not a big Folder Actions user; a lot stuff that Folder Actions is designed for, I accomplish with some shell scripting & cron jobs, or Hazel.

I was surpriesd to find that when I tried to set up a new Folder Action in 10.8.2, it wasn't available; "Folder Actions Setup…" wasn't an option in the "Services" menu for any folder. Apparently, it's a pretty common problem for Mountain Lion users. Here's how I fixed it.

  1. Create ~/Library/Scripts/Folder Action Scripts/ & drop the folder action script you want to add in there.
  2. Strangely, open System Preferences → Keyboard → Keyboard Shortcuts, and click the "Reset to Defaults" button.
  3. Scroll up to the "Files & Folders" section, and make sure that the "Folder Actions Setup…" listing is checked.

My guess is that if you were like me and had some custom keyboard shortcuts when you upgraded from 10.7.x to 10.8, it borked up the Keyboard Shortcuts upgrade, which in turn borked up the Services menu. Dumb.

Source: topsites://