Author Archives: Lorin Hochstein

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

Getting timestamp from v1 uuid

Getting timestamp from v1 uuid Translated from J.B. Langston’s Converting TimeUUID Strings to Dates Java version to Python: import arrow import fileinput import uuid def main(): for line in fileinput.input(): line = line.rstrip() value = uuid.UUID(line) epoch_millis = (value.time – … Continue reading

Posted in Uncategorized | Leave a comment

Starting a new Minecraft mod

Starting a new Minecraft mod My kids are really into Minecraft, and are interested in mods. Here’s a quickstart to getting an OS X dev environment set up with IntelliJ IDEA. Prereqs You should have the following already installed on … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Testing the Vert.x kinesis module

I needed a simple way to test queueing a Kinesis message with the Vert.x Kinesis module. This Jython script will do it: import vertx from core.event_bus import EventBus from org.vertx.java.core.json import JsonObject from org.python.core.util import StringUtil module = “com.zanox.vertx.mods~mod-kinesis~1.4.13” def handler(_, x): … Continue reading

Posted in Uncategorized | Leave a comment

Using mitmproxy to log Docker API calls

The other day I needed to log the API calls made from my Docker client to debug a difference in behavior between the docker command-line tool and the docker-py Python client. Here’s how I did it. Disable TLS on boot2docker … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Plotting a counting process in an IPython notebook

There are lots of interesting timeseries data in software systems: events that occur over time such as numbers of users signed up, or errors of a certain type. I like visualizing these as a counting process, which is a cumulative count of the … Continue reading

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