Author Archives: Lorin

Unescaping strings of stack traces

I often find myself copying strings of Java stack traces which have escaped tabs and newlines (\t\n). Those aren’t fun to read. Here’s a quick Python script I rigged up to grab what’s on the clipboard and format it properly. … Continue reading

Posted in Uncategorized | Leave a comment

Stripping leading timestamp from GitHub Action logs

GitHub Action logs start with timestamps. To strip them with sed:

Posted in Uncategorized | Leave a comment

Automating Slack status changes on macOS

In these days of everyone working from home, I really liked the approach to setting Slack status that Alex Hidalgo mentioned on Twitter: I wanted to be able to change status from Alfred. Turns out there’s a handy Applescript bundle … Continue reading

Posted in Uncategorized | Leave a comment

Stomping a local git branch with the remote

When somebody rebases their PR, my local copy of that branch gets out of sync: ➜ keel git:(fix-paused-events) git status On branch fix-paused-events Your branch and ‘luispollo/fix-paused-events’ have diverged, and have 8 and 16 different commits each, respectively. (use “git … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

J-Bob from the Little Prover

The Little Prover book references a companion proof assistant tool called J-Bob. I had a hard time getting it running using Racket’s Dracula package, here’s how to do it: Install Racket. Install the Dracula package for Racket. On macOS, I … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Generating Dash cheat sheets

I’m a big fan of the Dash documentation tool for macOS. In particular, I often create my own Dash cheat sheets to help me remember commands I frequently forget. I make enough of these that I created a simple Go app named cheat to generate a … Continue reading

Posted in dash | Leave a comment

Paste as plain text with Quicksilver

I used to use Plain Clip for converting clipboard contents to plain text before pasting, but now I do it in one step with Quicksilver. I created the following custom trigger: Item: Clipbord Contents Action: Paste as Plain Text Shortcut: alt-v Now … Continue reading

Posted in quicksilver | 1 Comment

Lock screen or sleep from Quicksilver

I recently got a new laptop, and I’ve been transferring over all of my settings. I often use Quicksilver to trigger a screen lock or put my laptop to sleep. Here’s how I do it. I use a shell script to put … Continue reading

Posted in Uncategorized | Leave a comment

Spinnaker & Kubernetes on macOS

Recently I was playing with the open-source release of Spinnaker, the continuous delivery tool that we use inside of Netflix. Spinnaker is designed for deploying apps on cloud backends (e.g., AWS, GCE), but I wanted to run everything entirely on … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

Go: Pointer to methods

Go: Pointer to methods Sometimes I need a pointer to a method that is not bound to an explicit object. Method pointers are just function pointers where the first argument is the type. Imagine we have a Pet type with … Continue reading

Posted in Uncategorized | Tagged | Leave a comment