-
The python-is-python2 package on Ubuntu Focal Fossa
24 April 2020
Read moreI 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 …
-
Remove Accidental Content from Git Commit
15 March 2020
Read moreWhen 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.
-
Make Thumbnails of PDF Pages with ImageMagick
16 February 2020
Read moreAll 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.
-
Grab Annotations from a PDF with pypdf2
15 January 2020
Read moreIf 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.
-
Raspberry Pi SenseHat Night Clock
28 December 2019
Read moreI 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.
-
Counting Duplicate Commit Messages
16 December 2019
Read moreWhen 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.
-
Ruby for non-Rubyists with Snap
07 October 2019
Read moreI'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 …
-
Sniglet is a Font for Avoiding Font Loading Mistakes
16 September 2019
Read moreI 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!
-
OpenAPI Description using API key and secret
15 August 2019
Read moreI'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.
-
The First Thousand Blog Posts
30 April 2019
Read moreThis 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.
-
Handy Beanstalkd Admin Console
08 April 2019
Read moreI've been building apps with queues lately and mostly using beanstalkd as my queue because it is very simple, very fast and on my platform it is [apt install beanstalkd] -easy to install. I have also been using a handy web interface for beanstalkd which I like so much that I felt I ought to share! It's beanstalk-console, which is a PHP-based web interface to one (or many) beanstalkd servers.
-
HTTP Toolbox
27 February 2019
Read moreAs Web Developers, we need to know how to work with HTTP from every angle. I gave a 2-hour tutorial at PHP UK that included some of my most trusted tools - but it was sold out and a bunch of people asked me if there was video (there wasn't, tutorials make little sense when videoed). Instead, I thought I'd try to set out a self-study version of the workshop (I rarely teach these days so I'm unlikely to deliver it anywhere else).
There's a slide deck, some exercises and a sample repo on GitHub ... let's dive in!