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:
Bookmark the current page to the bookmarks bar (CMD-D or click the star in the url bar)
Right click on the bookmarklet button below and choose “Copy Link Address”
Right click on the new bookmark in the bar and select “Edit…”
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.
On a page with styling you’d like to duplicate:
Click the bookmarklet
The browser enters inspection mode and a blue bar appears across the top of the page.
Hovering over elements will outline the closest container elements, and show their selector at the top of the screen
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
Enter a name for the style (defaults to the site name) when prompted
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:
(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!
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.
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’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
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
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.
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.
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.
Thanks to Vettery for sponsoring BrettTerpstra.com this week!
Are Mondays starting to feel like a drag? Did someone ask you to reset a random password? Beg you to connect them to the printer? Or perhaps your code just isn’t getting enough love, and you’re tackling the same bugs over and over, only to find…more of the same bugs. If you’re feeling less hurrah and a lot more blah, maybe it’s time for a big career change.
Make Monday something to celebrate. Vettery is an online hiring marketplace that connects top developers, product managers, and user experience designers with inspiring companies. Once you’re accepted to Vettery, companies contact you directly and request interviews. Vettery’s matching algorithm showcases your profile to hiring managers looking for someone with your skills, experience, and preferences. Plus, they’re pretty selective about who’s on the marketplace. They partner with over 8,000 Fortune 500 firms, VC-backed startups, and companies that don’t just set the bar for innovation—but those that regularly exceed it.
Searching for a new job can be a pain, but it doesn’t have to be. Say goodbye to random headhunters, weird LinkedIn messages, and offers that are so off-base that you’d think recruiters meant to send their inquiry to someone completely different. And even if you’re feeling comfortable in your current job, no sweat! Vettery is low-commitment for passive job-seekers, so it’s a great way to see what’s out there. (After all, you never know what the future holds, and interview requests are a nice confidence boost!)
Let your dream job find you. Plus, if you land a job through Vettery, they’ll hook you up with a $500 signing bonus. (Seriously.)
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.
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.
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.
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…