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).
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.
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.
A huge thanks to Backblaze for once again sponsoring BrettTerpstra.com.
Don’t lose your work. Back up all your data with Backblaze online backup. It’s unlimited, unthrottled, uncomplicated, and at $5/month per computer, it’s a no-brainer.
Backblaze natively backs up your music, movies, photos, and whatever you’re working on or editing for just $5/month. Backblaze continuously and securely backs up all the data on your computer and external hard drives. It’s easy.
Accessing files is easy. Download and share your files with the iPhone app or use any web browser to download your data or have Backblaze FedEx you a flash key or USB hard drive. Data loss happens all the time. Protect yourself. For $5/month, Backblaze will back up all the data on your Mac or PC. Stop putting it off. Start your free trial, and get your backup started today.
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…
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.
⌘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.
⌘-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.
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.
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.
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.
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!
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!
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!