This website recently got a major rebuild; if you're missing something, let Lorna know.

    Category: tech


  1. 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 …

    Read more

  2. Custom OpenAPI Style Rules with Spectral


    Edit: There's a newer post on this topic using Redocly CLI.

    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.

    Read more

  3. The python-is-python2 package on Ubuntu Focal Fossa


    I did a fresh install of Ubuntu 20.04 Focal Fossa on my laptop, and was surprised at what happened when I went to install python:

    $ sudo apt install python
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Note, selecting 'python-is-python2' instead of 'python'
    

    Um, what?

    It …

    Read more

  4. Remove Accidental Content from Git Commit


    When I teach git I try to show loads of good practice about how to inspect what's staged before commit, etc etc. Good practice is good of course, but knowing how to undo a mess you created is better - and mistakes will happen. For example, accidentally including a node_modules directory in your otherwise excellent and useful commit. This post will walk you through how to fix the problem without losing any of your work.

    Read more

  5. Make Thumbnails of PDF Pages with ImageMagick


    All my talk slides are PDF - I use rst2pdf to transform text-based ReStructuredText content into presentation slides. With all these PDFs hanging around, it can be very handy to have them as thumbnails. I use the images both in the printable speaker notes that I produce (and I should blog that too now I've mentioned it), and to share on twitter - especially the resources slide that everyone photographs! My image file is much more readable than your cameraphone picture in terrible lighting :) So here's my script for thumbnails in case you want to do the same; most presentation tools will export to PDF if you're not already working in that format.

    Read more

  6. Grab Annotations from a PDF with pypdf2


    If you've noticed a lot of PDF content around here lately, that's because I work with PDF a lot! Most of all, all my slide decks are in PDF and in the last year or so I've started using speaker notes in my presentations. Yes, this means that if you saw me speak in the first ten years of my speaking career, that was without speaker notes.

    There are some situations where I don't have access to my speaker notes. Usually this is a good reason, such as I have mirrored my displays so I can demo or play a video without fiddling with my display settings in the middle of a talk. Sometimes, it's because something bad happened and I'm presenting from someone else's machine or a laptop that's completely off stage and I only have the comfort monitor. For those situations I use a printed set of backup speaker notes so I thought I'd share the script that creates these.

    Read more

  7. Raspberry Pi SenseHat Night Clock


    I recently upgraded my smartwatch and the new model needs charging daily (whether that's really an upgrade is a separate discussion!) so I drop it on the charger by my bed overnight. As a result, I can't tell the time if I wake up in the night which is only annoying because I don't know if it's midnight or if the alarm is going to go off in ten minutes! So I made myself a colourful fuzzy time clock with a raspberry pi and a SenseHat that were lying around in my office.

    Read more

  8. Counting Duplicate Commit Messages


    When chatting about source control good practice the other day, I got a question about repeated git commit messages. In general, I would always advise that the same commit messages appearing multiple times in a project's history is a definite red flag - and if I'm responsible for that repository I will probably make fun of you for doing it.

    Read more

  9. Ruby for non-Rubyists with Snap


    I'm an Ubuntu user and I enjoy most server-side scripting languages but I haven't done much Ruby and I never get the feeling that Ruby is pleased to see me when I do. Something is always out of date or has an incompatible dependency or ... and since I don't use …

    Read more

  10. Sniglet is a Font for Avoiding Font Loading Mistakes


    I am not a designer, nor will I ever be. Things look perfectly fine to me a very long time before they look OK to anyone else! Along with that, I don't always find it easy to tell fonts apart. I can do serif-ish and sans-ish but if the fixed-width font has serifs on it I sometimes miss that detail if I'm not looking for it - which also means that I have no idea if I've loaded the fonts I was thinking of or not.

    To get around this, I test everything by switching the font to Sniglet from the League of Moveable Type. It's ... umistakable!

    Read more

  11. OpenAPI Description using API key and secret


    I've been working on a few OpenAPI descriptions of APIs lately, and really enjoying the benefits they bring. In particular the ability to import into Postman as a collection I think is a "killer feature" for APIs looking to get developers up and running quickly. The catch? I found that an API that needs an API key and secret, or a username and password/token, is supposed to be described with multiple security schemes - but this does not play nicely with tools like Postman.

    Read more

  12. The First Thousand Blog Posts


    This is the 1000th post on https://lornajane.net. People ask "how do you even do that?" and the short answer is "start in 2006", but the long answer isn't all that long.

    Read more

6 of 40