Welcome to the lab.

Web Excursions for July 28, 2014

[Tweet : ADN : nvALT]

jtmarmon/ColorMime
And suddenly I’ve been doing it wrong.

ColorMime is a simple plugin for Sketch which allows you to quickly duplicate any Colourlovers palette in your sketch project.

ramonpoca/ColorTools
I usually use ColorSchemer Studio to gather my palettes, but these command line tools are really handy for grabbing Adobe Swatch Exchange (ASE) files and converting them into palettes for Apple’s color picker (CLR).
ttscoff :: COLOURlovers
Since this excursion seems to be mostly about colors, I might as well link to my COLOURlovers page, right? It’s not terribly active these days (I don’t do a lot of design work anymore), but COLOURlovers is my favorite place to go for palette inspiration.

Also…

sdegutis/hydra
A really amazing-looking system for automating and hacking OS X that’s been pointed out to me a couple of times. I wish I had more time to explore it. Soon.

An unsolicited GeekTool showcase

[Tweet : ADN : nvALT]

Why does Snoop Dogg carry an umbrella? Fo’ Drizzle.

Given that I spent too much of my Sunday fooling around with my GeekTool setup and did very little of any use, I figured I’d at least show off the results.

Left to right, top to bottom. It’s the only way I know.

  1. Time Machine progress indicator
  2. Sidecar
  3. Top Mem and RAM processes
  4. 5-minute load average (from w)

That’s just too much stuff. Boy ain’t right.

  1. A CPU chart using the Arc font (two-layers, system and user)
  2. Weather Icon from my homemade set, info fed by Weather Underground
  3. The Dark Sky current conditions
  4. My last 3 doing entries
  5. Basic date output
  6. The Dark Sky summary forecast. Because I don’t like leaving the house if I can’t put the top down.

This is where I blew over 90 minutes…

Number 1 is my real fun for the day. I’d been using my command line bar chart to amuse myself with some analytics, but decided I could do better. GeekTool lets you put transparent images on the desktop, and Google Charts Image API can make transparent images, so it seemed natural. I spent most of my time figuring out all the nasty abbreviated and unintuitive parameters for the deprecated image API, but it worked.

Number 2 is a bandwidth test, download on the left (top number is last test, bottom is average over last 15), upload on the right. It was pinging to my own controlled speedtest server, but that stopped working. Now I just set a permanent target server on the speedtest network to get more accurate tracking.

Number 3 is my old Weather Underground full forecast. That’s transitioning to Dark Sky shortly, I just already had that one worked out…

As an aside, I made this post in the Clarify beta, which can export to Markdown. It’s really cool for documentation and image annotation.

Hope you had a more productive Sunday. I shouldn’t be so hard on myself. I worked out a cool new retina image solution, finished a draft of the children’s book I’m working on, caught up on customer support, fixed some Marked bugs… I guess it’s been a pretty good weekend.

Web Excursions for July 24, 2014

[Tweet : ADN : nvALT]

Hermit: a font for programmers, by a programmer
I really dig this monospace font for coding and terminal use. It looks great with my custom version of Twilight in Sublime Text. 

: Via Wes Bos. See his post for more options, though notably missing Meslo
Using Tables With Ulysses and Marked
A good introduction to Ulysses 3 and Marked 2 integration.
Together for iPad and iPhone 1.0
I’ve been a fan of Together for a long time, and it’s finally available on your iOS devices. Sync with Mac requires the MAS version of Together.
BestPig/cv
A command line tool for showing the progress of long-running coreutil functions like mv and cp.
ROKODING: Video Encoding for the Roku
Via MacDrifter, this site contains Handbrake tips for encoding video for Plex and Roku, which I’ve just recently started using. A very handy reference.

A Sublime Text selection primer

[Tweet : ADN : nvALT]

Text selection shortcuts make editing code (and even prose) much faster. Learning the selection shortcuts in any editor you choose to work in is paramount to saving time and effort. I currently do most of my coding in Sublime Text 3, so I’ve been practicing some of my lesser-used shortcuts. Here’s a basic cheat sheet.

Forewarning: I customize so many aspects of my editor that I may have forgotten that some of these aren’t defaults. If you run into conflicts or problems, let me know and I’ll either update this post or show how I modified my config to get the shortcuts working.

Text Selection

  • ⌘D: Expand to word

    Note that you can define word separators in preferences, so underscores and dots can be included in a “word” selection.

  • ⌘L: Expand to line

    This is different from doing a ⌘←, ⌘⇧→ in Cocoa text fields. It selects what OS X refers to as the current “paragraph,” meaning the first character to the next line break, instead of just the current screen line.

  • ⌘⇧A: Expand to tag

    Handy in XML formats such as HTML and PLIST files. It selects the text inside the current tag pair, and pressing again selects the tags (open and closing) surrounding it.

  • ⌘⇧J: Expand to indentation

    If your code is properly indented, this command is really handy for grabbing everything inside, say, an if block.

  • ⌘⇧␣ (Space): Expand to scope

    Expand to scope is a great way to create selections, and it can progressively increase the selection with repeated presses. Select the text inside a quoted string, then the next time you press it, it will add the quotes themselves. Press again to select to the nearest surrounding brackets, and again to include the brackets themselves, and so on.

    Combine this with other selection commands and you can do things like select the current scope, and then select everything at the same indentation within the current block with just a couple of keystrokes.

  • ^⇧M: Select to brackets

    This is another extremely handy selection technique. It’s just like “Expand to scope,” but skips directly outward to the nearest square or curly brackets. On the first press it will select inside the nearest brackets, pressing again will select the brackets. Subsequent presses will select the next pair outward, including the brackets themselves.

  • BONUS: ⌘U will undo movements and selections, and ⌘⇧U will redo them.

    Known as “soft undo,” use this if you accidentally lose a selection and want to get it back.

Multiple selections

  • -click/drag: add cursor/selection
  • ^⇧↑/^⇧↓: add previous/next lines as multiple cursors, then use ⌘←/→ to select sections/lines.
  • ⌘⇧L: break a block selection into lines

    If you want to edit multiple lines at once, you can select the block of text and hit this shortcut to turn each line into a selection in a multi-selection. Then move the cursor and hold shift as needed to create selections within each line. When you type, you’ll affect all cursor locations and selections.

  • ^⌘G to select all instances of the word currently under the cursor
  • Search (⌘F or ⌘I), then use ^⌘G to turn results into multiple selections

    If you want to act on multiple selections based on a search, use this to turn every instance of the result into a selection. It’s faster than dealing with Search and Replace. You can also grab a package from Package Control that will allow you to quickly do the same with regular expression searches.

My keybindings

I override a few keybindings, but just want to mention a couple that I think are handy.

  • ⌘⌥↑: Expand selection to scope.

    I added this because it matches similar commands in some of my other editors.

  • ⌘⇧M: Expand selection to brackets

    I added this just for continuity with the other selection shortcuts.

Add-ons

Open Package Control and search for “select.” There are a lot of packages available for extending selection options. Some standouts for me:

  • SuperSelect makes it easy to add search matches to the current selection one at time, selectively.
  • Select Quoted
  • Expand selection to function (JavaScript) lets you assign a key combination to select a full JavaScript function(){} definition in various forms.

I’ll probably get around to making a Cheaters sheet and Dash docset for these soon, but right now it’s just a note in nvALT for me.

A big update to Shawn Blanc’s ‘Delight is in the Details’

[Tweet : ADN : nvALT]

Shawn Blanc’s multimedia book, ‘Delight is in the Details,’ has received a major update today. Shawn describes the book as:

Delight is in the Details is packed with practical advice, tips, encouragement, inspiration, and insight to teach you how how best to reach for excellence and resist the prevailing tide of “good enough” work that leads to forgettable products and a dissatisfaction in your work life.

The update includes new chapters, more videos, extra resources and much more. It’s also 25% off right now ($29). Go check it out. Nice promo video, too!

The Polymo winners

[Tweet : ADN : nvALT]

The winners of the Polymo giveaway are:

  • Harshil Shah
  • Adrian Katz
  • Loris Kronov
  • Juan González
  • Skye Matthews
  • Marco
  • Roland Belényesi
  • Chris Marquardt
  • Rick Bola
  • Nuri Karamollaoglu

Congratulations to all of you! If you don’t hear from the Giveaway Robot shortly, let me know.

For everyone who didn’t win, be sure to check out the Polymo camera app with built-in tagging on the App Store!

Tower 2 is twice the Git power

[Tweet : ADN : nvALT]

Git fans are often command line nuts. I know I am. But complex git operations can often be tedious, no matter how experienced you are. I fell in love with the Tower git client some time ago, and it makes using Git easy whether you’re an old pro looking for a fast solution for complex operations, or a total newbie with no command line experience. It makes complex merges, chunking and cherry picking, rolling back changes, etc. a breeze. Tower 2 is out today, and it’s a complete re-imagining of the tool.

The visual conflict wizard is a godsend when you run into heavily conflicted merges. That, in combination with the latest version of Kaleidoscope make it (nearly) painless to fix up those merges.

If you’ve been using git-flow, that workflow is now built into Tower. It’s a great way to keep a development branch, feature branches and a master “release” branch organized, with shortcuts for the necessary merging and rebasing procedures.

Automatic background fetching, service account manager, multiple window support, and direct display of unsynced commits round out a very full new feature set. Check out the Tower website for more info.

A single-user license is available for $59 US (and includes all future 2.x upgrades). Owners of a Tower 1 license get an upgrade price of $29 US, and customers who purchased Tower 1 on or after June 1, 2014 can get Tower 2 for free. See the store for purchase details.

I’d recommend that any Git user (or anyone interested in getting started with Git) check out Tower 2!

Custom export options for Marked 2

[Tweet : ADN : nvALT]

Here’s a trick for Marked 2 that allows you to keep a custom export format updated every time you save your file and update the Marked preview. I designed it specifically for updating a Lyx file, but you can use it with any secondary processor that doesn’t necessarily output HTML.

Marked’s Custom Preprocessor functionality allows you to do some work with the Markdown file after Marked has compiled any includes and custom syntax, but before it runs the Markdown processor (or other Custom Processor). All the preprocessor has to do is return plain text ready for conversion, so anything else that happens between is fair game.

If a script returns “NOCUSTOM” on STDOUT (as the one below does), Marked ignores the output entirely, so you don’t even have to echo the original back out. This is especially handy with custom processors as it allows them to check for certain conditions before processing a file, and cancel the operation if it’s not needed.

This code will take the open file and determine its directory path and filename, creating a compiled Markdown version and Lyx companion file every time the source file or any included files update. Save it as a script, make it executable, and then put the path to it in the Custom Preprocessor field in Marked’s Behavior settings.

You’ll need the latest MultiMarkdown binary installed, so grab it if you don’t, and make sure it ends up in /usr/local/bin/multimarkdown.

Here’s the script:

If you don’t have Marked 2 yet, it has a lot to offer. I’ll be posting more tips and tricks soon!