Creating a Simple OpenAPI Spec

Having API descriptions in your workflow is a game-changer, but how do you get from nothing to a functioning spec in the first place? I recently made a very simple spec for a very simple API, and thought it might make a good example for anyone looking to create a spec for the first time. OpenAPI specs are very verbose so this very tiny API makes quite a manageable example! Continue reading

Using Environments in Postman

I'm using Postman more lately and showing off the Environments feature really often. I really like this feature for giving easy ways to handle values I use frequently, but it seems to be a bit of a hidden gem, so I thought I'd write about when I find it useful, in case you do too! Continue reading

Planets and Webhooks: a simple Flask app

As a Developer Advocate for an API company, I spend a lot of time talking about APIs and webhooks and HTTP in general. Recently I've been focussing on HTTP tools, but I really wanted a very simple example API that I could use that would return JSON but really let me focus on the tools, not the API. So I created a "Planets and Webhooks" API with a couple of GET endpoints to return JSON data, and another endpoint to receive and log incoming webhook data. Continue reading

Neopixel Shelf

In these days of video calling in place of any other social contact, I've seen a lot of excellent video backgrounds. Perhaps I'm old-fashioned but I went the traditional route, and set up my computer close to a wall (so you can't see the mess in the room) and added a nice pinboard behind me. I looked a bit flat against the wall though, so I did what anyone else would do ... and built a handmade wooden shelf with neopixels in it!

webcam's eye view, showing radiator, shelf with blue lights, and pinboard above
Continue reading

Add a Screenshot Button to Streamdeck with Golang

I'm the proud owner of a Streamdeck XL but as an Ubuntu user, the tool support isn't great. There's a Python library that gives a bit of a GUI but I found it hard to use and I'd have needed to put each piece of functionality as a commandline script that this program could call. Instead, I am using go-streamdeck to create a custom application - and I'm having fun! Today's example adds a single button that runs a command to take a screenshot. Continue reading

Accessing Nested Config with Viper

I'm writing a Go application that glues together a bunch of other things, so it has a whole bunch of basically unrelated config, dumped in a yaml file. I was struggling a little with this non-standard use of Viper but actually, it does everything I needed. And, presumaby, more besides. I thought I would put some examples here to show how to handle this. Continue reading

Use a Local Version of a Library in Go

I have a couple of projects in Go where I need to work with a branch that isn't the released version of a library that my code depends on. This happens when I'm the developer of the library and an application to use it, or when I'm a contributor to the library so I have my own fork and will want to check out branches to submit or test patches. Go has a pretty need way to allow this: using the replace keyword in the go.mod file. Continue reading

OBS Studio, Ubuntu 20.04 and a Wacom Tablet

When I upgraded my computers to Ubuntu 20.04, I noticed a weird problem with OBS when using an old Wacom Bamboo tablet (because, have you ever tried to use OBS without a pointing device?). I couldn't actually click anything! The pointer seemed to be ... pointing to the wrong place. After some research (and then some help with my research), I came across this post on OBS forums suggesting that this fixes it:

QT_XCB_TABLET_LEGACY_COORDINATES=1 obs

It does, and I never want to do the research for this again, so I'm posting it here and hoping I remember to look here when it happens!

Custom OpenAPI Style Rules with Spectral

I work quite a bit with OpenAPI specs and with lots of specs and lots of collaborators, keeping the specs all functional (never mind tidy, consistent, or other dreamwords) is a challenge! We use spectral to check our specs, both when we work on them and in the build process. Spectral is great but it has Opinions(TM)!

For most users, running Spectral out of the box gives quite a lot of output even on an otherwise valid spec. I do think the default ruleset for Spectral is pretty good, but every situation is different so having your own ruleset to use is a good idea. This post shows how to use a ruleset and some examples. Continue reading