Welcome to the lab.

The new, improved StyleStealer for Marked 2

[Tweet : nvALT]

I’ve updated the StyleStealer bookmarklet that I published a while ago. In addition to a bit more accurate styling, it can now add styles directly to Marked 2 (2.5.11 or newer) without requiring any file saving or manual adding in Marked’s preferences.

This tool is great if you’re on online writer who wants to see how their work will appear on the destination blog or publication. It’s also great if you like to Markdownify articles and be able to read them later with their original look.

(What it’s not great for is stealing other people’s work and using it to publish your own. Let’s not do that.)


(If you already have StyleStealer installed, it’s already updated. Congratulations.)

To add it to Safari or Firefox, just drag the button below to your bookmarks/favorites bar.

In the latest version of Chrome, you can no longer drag in-page links to the bookmarks bar. This now requires:

  1. Bookmark the current page to the bookmarks bar (CMD-D or click the star in the url bar)
  2. Right click on the bookmarklet button below and choose “Copy Link Address”
  3. Right click on the new bookmark in the bar and select “Edit…”
  4. Change the Name to the bookmarklet name and paste the copied address into the URL field

(StyleStealer may work in additional browsers, these are the ones I’ve tested.)


Note that the bookmarklet is designed for desktop use, because it uses Marked 2’s url handler it won’t be of much use on mobile browsers.


YouTube Video

On a page with styling you’d like to duplicate:

  1. Click the bookmarklet
  2. The browser enters inspection mode and a blue bar appears across the top of the page.
  3. Hovering over elements will outline the closest container elements, and show their selector at the top of the screen
  4. Click a container that holds the entire article but not any sidebars or excess cruft

    Note: The outline may disappear when you’re over a paragraph, but the best bet for getting the right section is actually to just click the first paragraph of text in the article/post

  5. Enter a name for the style (defaults to the site name) when prompted
  6. Click the “Add to Marked” link that appears


The style will appear in Marked’s style picker, as well as in the Preferences->Style->Custom CSS list where you can use the “-“ button to remove it.

When you name the style, it gets written to a file called [name].css in Marked’s application support directory. Using the same name again will overwrite the file, which means if the bookmarklet failed to match the style you can try again and update the existing style. If you have a preview window open and that style selected, Marked will even update the preview live to show you whether it worked or not!

As a technical note, the bookmarklet makes use of Marked’s new URL handler method, addstyle. With this method you can add a style from a url-encoded string or from a file on disk. To add an encoded string, use:


To add from a local file, you can use:


(If no name parameter is provided with file, the filename will be used.)

This url method will make it easier to share new styles, and eventually (hopefully) for me to build a style-sharing site for people to share their favorites. For now, if you have a great style you want to share, feel free to add it here or contact me to have me share it for you!

Web Excursions for October 15, 2018

[Tweet : nvALT]

Web excursions brought to you in partnership with MightyDeals.com, featuring great deals on software, training, and design resources.

Leave no dark corner
Aside from me being enamored with the visual presentation of this story, this is a chilling look inside China’s “Sesame Credit” system. If you’re not already familiar with what’s happening there, you should definitely read up.
A simple CLI to monitor any command and trigger a notification on completion. Works with macOS notifications, HipChat, Pushbullet, Pushover, Slack and more.
Free My Desktop
I wrote about some tricks for automating desktop cleanup before screencasting, but this new (free) app from Valentino Urbano makes it a one-click process to hide your desktop icons, dock, and menu bar.
12 Customizations for the Mojave macOS Login Window
Bet there’s at least one in here you didn’t know…
How to Take Photos and Scan Documents with Continuity Camera in Mojave
Josh Centers over at TidBITS offers a great overview of using your iPhone with the new Continuity Camera feature in Mojave to take photos and scan documents on your Mac.

My new favorite sleep headphones

[Tweet : nvALT]

As you may have seen in the past, I’m a fan of sleep headphones. Headphones specifically designed for wearing in bed, usually with flat speakers and soft bands. In the past I’ve always come back to SleepPhones, but the last pair I bought (the Bluetooth ones) broke quickly. So my search began again, and it’s time for another quick (soft) hardware review.

After trying a few different types, I found I liked the kind with a combo eye mask. It took a few tries to get it right, though. Some models make up for thicker speakers by thickening the padding around them, resulting in enough lift to change the angle of my neck. Hated those. Some models didn’t get either the headphones or the eye mask quite right, like old TV/VCR combos where neither component was up to par and you couldn’t swap out either.

Then I found a generic set that checked all the boxes for me. It’s sold by multiple vendors under different names, but the pair I got was from Topoint. They cost $25, so not too bad in the grand scheme of available options.

They’re thick enough to completely block light, but not enough to shift my neck position against a feather pillow. They’re tall enough to surround my nose and block off light from the bottom, and quite comfortable on the face. The speakers are thicker and harder than what you find in SleepPhones, but they’re well padded and I’ve had zero earaches since I started using them a couple weeks ago.

The control placement is decent. They’re located on your cheek when wearing them, and not super easy to use blind (i.e. wearing the sleep mask). I don’t push a lot of buttons on any sleep headphones, though, and it hasn’t bothered me.

Having tried a few bluetooth sleep headphones, one thing that I really like about these is the charging cable tucks into the side and extends for connection. On some models you actually have to disconnect and pull out the whole bluetooth module and plug it in. These are the easiest to charge I’ve tried thus far, and the battery can last for a week at a time with nightly use.

I’m currently working my way through the audio version of Artemis. It’s read by Rosario Dawson, who rocks it, and it gets a bit too exciting to fall asleep to. So I usually end up switching to something about Norse mythology or overly-detailed histories of rock and roll when I’m ready to actually turn on the sleep timer. All in all, I’ve put about 13 hours of comfortable listening on these thus far, with no complaints about sound quality.

If you’re in the market for some nighttime audio options, check them out.

Shell Tricks: Toggling Dark Mode from Terminal

[Tweet : nvALT]

If you’ve upgraded to Mojave, you’ve probably tried out Dark Mode. Maybe you love it. I got over the whole idea years ago, back when you had to run hacks just to change the menu bar background. I like my light interface.

I’m not grumpy about it, but it means I have to test any UIs I create in both modes now, so obviously that needs some automation.

Dark Mode can be toggled with AppleScript via System Events.

tell application "System Events"
	tell appearance preferences
		set dark mode to true
	end tell
end tell

You can use the read value of “dark mode” as a condition (negated boolean) to create a toggle, turning it off if it’s on, on if it’s off.

tell application "System Events"
	tell appearance preferences
		set dark mode to not dark mode
	end tell
end tell

All of this can be condensed to a one-liner for use with osascript from any script or as an alias for your shell:

osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to not dark mode'

With these examples you can include a Dark Mode switcher in a script, an automated test, an Alfred/Launchbar action, a Keyboard Maestro shortcut, or create a Script Editor applet for a double-clickable mode switcher.

I’m assuming normal citizens won’t have a need to toggle between the two modes frequently, but for those who do, enjoy.

Web Excursions for September 21, 2018

[Tweet : nvALT]

Web excursions brought to you in partnership with MightyDeals.com, featuring great deals on software, training, and design resources.

Botwiki offers a large catalog of bots for Twitter, Facebook, Reddit, Slack, and more, as well as resources for building your own.
The best FTP Clients for Mac Compared
BinaryNights, creator of ForkLift, did a comprehensive speed test of all of the major FTP clients for Mac. Taking into account that this was performed by the developer of one of the apps, it’s worth it as they go into solid detail about the testing procedure and parameters, and the results are (presumably) verifiable. And, as I would have guessed, in most cases every client except for Cyberduck performed pretty closely, but with some surprises in handling multiple-file transfers.
A plain text task manager for iOS with agenda, tasks and an outliner. I use TaskPaper formatting for my todo lists, but if you prefer something closer to Emacs Org Mode, this app will suit you nicely. From the same developer as Trunk Notes, a personal wiki app I have great respect for.
Timing: the best automatic Mac time tracker for productive professionals and freelancers
My favorite automatic time tracker for Mac has updated with MailPlane, Bear, Dash, and Opera, as well as a ton of improvements. Here are the full release notes.
Linux 4.19-rc4 released, an apology, and a maintainership note - Linus Torvalds
As you may know, the creator of Linux is a legendary asshole. As far as I know, this is Linus’s first humble recognition of that. I hope that “I need to take a break to get help on how to behave differently” is a sincere statement backed by action.

The “noisy neighbor” approach to meditation

[Tweet : nvALT]

I don’t claim to be good at meditation, but I’ve come to understand the benefits of it, especially for someone with ADHD. I’m also probably bad enough at it that I wouldn’t dream of telling anyone how to do it. That said, I figured something out today that I think is worth sharing; maybe it will be of use to others, especially ADHD folks with a meditation practice.

A common thread through just about every meditation style that I’ve been exposed to is letting thoughts go. Letting them exist, acknowledging them, and then letting them pass. I’ve always viewed it as a front to back process, and taken that literally. My conscious thoughts exist in my frontal lobes, and I’m trying to clear those out, visualizing the thoughts passing to the sides or to the back of my brain.

This morning my yoga instructor misspoke and suggested letting conscious thoughts stay in the foreground instead of the background. I knew it was a slip-up, but, as is my way, I immediately wanted to know what would happen if I looked at it backwards. Magic, that’s what.

The front of my brain is always awash with thoughts. A constant buzzing. It’s probably common to more than just ADHD sufferers, but it’s something I’ve accepted I’ll always need to deal with. Today I found that I can acknowledge individual thoughts, but rather than consciously try to let them go, I can let them stay. Right there in the front, instead moving my focus to the background. I became aware of all the buzzing in my frontal lobes, but from the outside of it, separated from it. It became just a noise, not individual thoughts I needed to process. I visualized it as a noisy neighbor to my empty chamber, and one that I could ask to quiet down, or simply begin to tune out.

As a sleep aid I’ve often visualized my brain like a radio tuned to static. Let the static override conscious thoughts, and then slowly turn down the volume. It’s generally worked, and this little exercise had the same effect, but with a mindfully awake result.

Like I said, I’m no expert. This reverse in my visualization is a surprise to me, but it’s probably actually what I was supposed to be doing all along. Or at least another way of getting there. It just struck me that maybe others for whom meditation seems like an uphill battle might benefit.

Feel free to use the comments to share your own experiences, or just to tell me I’m unqualified to be opining about this stuff publicly. It’s ok, I can take it.

Web Excursions for September 11, 2018

[Tweet : nvALT]

Web excursions brought to you in partnership with MindMeister, the best collaborative mind mapping software out there.

Font Flipper - Find Free Fonts
If you’ve ever trolled through Google’s web fonts collection, you know how tedious it can be to pull the best font out of the large collection. Font Flipper turns it into Tinder… upload an image and add text, choose what types of fonts you want to view, and then start swiping right and left to build up a favorites list, ready to download. Nifty.
A really slick service for sharing files. Sign up with a password and get a link to which you can add multiple files and share with someone else to download. I have no idea what the security is like, so I’m not using it for anything sensitive, but if you want to share one or more large files with someone, this is great.
The Best Ways to Use 3D Touch on Your iPhone
In case you missed it, I’ve been writing for Lifehacker as of recently (another reason posting has slowed down here lately, but I’m working to balance that back out). I thought this post on the myriad ways you can use 3D Touch on iPhones worth sharing. Now that 3D Touch looks likely to be removed, I’m taking as much advantage of it as I can. I don’t care what anyone says, it is (was) a useful innovation.
MacSparky Field Guides
David Sparks is moving all of his content from Vimeo and iBooks to his own Teachable site. If you haven’t checked out the macOS tips series that I did with him, you can find 60 Mac Tips Volume 1 and Volume 2 on the new site, along with his guides for Hazel, Workflow, and more.
I keep talking about this Chrome extension in various places, but it really has revolutionized my browsing/tab habits. A tab manager/session manager in one, and definitely worth checking out. It might even convince non-Chrome users to switch…

Check out MindMeister and start brainstorming, collaborating, and boosting productivity.