Tag: ruby


  • I’ve been playing around with progress bars in the terminal, and I think I’ve created something genuinely useful. Yes, I know there are multiple options already available for this, this is mostly just an experiment for me. I wanted to build a Ruby library that could be used for command-line scripting, with CLI executables that…

  • I’ve published a tiny Jekyll plugin that makes terminal commands in posts runnable with a click (in iTerm, at least). The iTerm tag plugin renders a fenced code block showing a command, and a “Run in iTerm” link that uses iTerm 2’s new(ish) command url scheme (iterm2:/command?c=COMMAND) to open the command in a confirmation box…

  • Spend some, get some

    ,

    I’ve built a paywall system for this blog. It was quite an endeavor to make a home-grown solution that works with my static Jekyll site, but I think I got it. From now on, I’ll be adding bonus content to posts that will only available to subscribers. You can subscribe at any level — the…

  • I’ve released v4 of md-lipsum, my API for generating Markdown Lorem Ipsum. This update introduces expanded source options, new query parameters for enhanced functionality, and is powered by the new ‘random-words’ Ruby gem. Try the new API: https://brettterpstra.com/md-lipsum Share Your Shortcuts! If you use the API to create any Apple Shortcuts, System Services, command line…

  • I made a thing I think is pretty cool. It’s an indeterminate progress indicator for use in your scripts, inspired by the way Cursor indicates it’s working. In Cursor, when it’s generating or thinking, it shows some text that looks like a spotlight is panning across it. I figured it would be easy enough to…

  • I wrote a pretty basic script a long time ago that converts TaskPaper files to Markdown for nice previewing/publishing. I recently updated it with a bunch of modernizations. I originally wrote this script (*goes to check*) — jebus, fifteen years ago. I guess I’ve been doing this stuff for a while now. Anyway, the original…

  • This morning I pushed a pretty large update to the Readwise to DEVONthink script I published yesterday. It adds some important features, so if you’ve already downloaded the script, you might want to update. The previous version worked fine, but there were a couple of things it needed to do better. First, it was failing…

  • Readwise is an awesome power-user tool for reading web articles, newsletters, and even e-books. DEVONthink is an amazing tool for building connected knowledge bases. Today I’m releasing a script that saves Readwise highlights to DEVONthink as annotated Markdown files, bringing the two together. It’s pretty handy. I started trying out Readwise shortly after I started…

  • I often need to strip emoji from strings to prevent them from messing up other handling. I’ve been compiling regular expressions and I think I finally have all the bases covered. This example is in Ruby, but the regular expressions are easy to adapt to any language: [gist bf121c6a199bc20c7f3085c50cd6d175] I’ve already ported this to Swift…

  • I’ve completely switched from Pinboard to linkding for bookmarking. Mostly because Pinboard hasn’t seen development in years, and the creator is getting a little… weird, which makes me wonder about its future. Pinboard still works fine, but linkding is actively developed, has mostly the same features, and can be hosted locally. I have my Web…