Week Notes 22#14 (5 mins read).
What happened in the week of 2022-04-04?
Week Notes 22#14 (5 mins read).
What happened in the week of 2022-04-04?
Getting node-canvas to run on AWS Lambda (3 mins read).
Some common issues that occur when using node-canvas on AWS Lambda, and how to solve them.
Parsing the Cookie
and Set-Cookie
headers with Go (2 mins read).
How to parse the value of a Cookie
or Set-Cookie
header to a JSON object.
Generating a Go HTTP Client from OpenAPI schemas (2 mins read).
How to generate a Go HTTP client really quickly and easily, with no manual work, using the oapi-codegen project.
Generating Go structs from OpenAPI schemas (2 mins read).
How to generate Go structs really quickly and easily, with no manual work, using the oapi-codegen project.
Setting up GitLab CI for Go projects (2 mins read).
How to set up a basic set of automated builds for Go projects on GitLab CI, for modern Go projects.
Week Notes 22#13 (9 mins read).
What happened in the week of 2022-03-28?
Introducing tiktok-mf2.tanna.dev
, for converting TikTok video metadata to Microformats2 (1 mins read).
Announcing a hosted service for converting TikTok metadata to a Microformats2 object.
Adding a Non-AWS Hosted Custom Domain to an AWS API Gateway without CloudFront (2 mins read).
How to set up a domain name for AWS API Gateway for a domain that isn't managed through AWS Route 53.
Creating a minimal AWS S3 Bucket Policy for deploying with Hugo via hugo deploy
. (1 mins read).
How to configure an AWS S3 Bucket for hugo deploy
with the minimal access required for a role to write objects to.
Automagically deploying Architect Framework applications to AWS uisng GitLab CI (3 mins read).
How to use GitLab's OpenID Connect support with AWS, to allow deployment using the Architect Framework automagically on GitLab CI.
Week Notes 22#12 (7 mins read).
What happened in the week of 2022-03-21?
Avoiding Spring context issues when parallelising @Nested
Spring integration tests (3 mins read).
Using abstract base classes to reduce risk of Spring context overall issues with Spring (Boot) integration tests.
Providing a basic implementation of Ruby's ARGF.read
in Go (2 mins read).
Creating a Go helper method to read from stdin
or a file, inspired by Ruby's ARGF.read
method.
Integration Testing Your Spring WebClient
s with Wiremock (4 mins read).
How to write integration tests using Wiremock, for use with WebClient
s.
Week Notes 22#11 (4 mins read).
What happened in the week of 2022-03-14?
Accessing the OpenAPI Specification for a Kubernetes Cluster (1 mins read).
How to get the OpenAPI specification for your Kubernetes Cluster.
Solving ConnectException
s with the Kubernetes Java ApiClient
(1 mins read).
How I solved ConnectException
s in my Kubernetes Java client usage, by moving to cluster mode.
Automagically Auditing GitHub (Actions) Security using OpenSSF Scorecards (6 mins read).
How to use the OpenSSF Scorecards GitHub Action to audit your GitHub and GitHub Actions configuration, and a breakdown of some of the issues raised by it.
Introducing opengraph-mf2
a library, and service opengraph-mf2.tanna.dev
, for converting OpenGraph metadata to Microformats2 (3 mins read).
Announcing an NPM package and a hosted service for converting OpenGraph metadata to a Microformats2 object.
Week Notes 22#10 (5 mins read).
What happened in the week of 2022-03-07?
How to fix Failed to load ApplicationContext
in Spring (Boot) applications (6 mins read).
Some common issues with Spring dependency injection and how to fix them.
Week Notes 22#09 (5 mins read).
What happened in the week of 2022-02-28?
Converting an x5c
from a JSON Web Key to a PEM with Node.JS (1 mins read).
How to convert a JWK's x5c
to a PEM-formatted certificate with Node.JS.
Extracting x5c
s from a JSON Web Key Set (JWKS) to PEM files with Node.js (1 mins read).
How to extract the full chain of certificates from a JWKS' x5c
parameter to files.
Generate a running mock server from an OpenAPI specification using Prism (3 mins read).
Using Stoplight's prism
tool to run a stubbed server from an OpenAPI specification, for better testing.
Gotcha: checked and unchecked exception handling from Spring WebFlux WebClient
(2 mins read).
How checked and unchecked exceptions may appear when testing your WebClient
code.
Accessing the response body with Spring WebFlux WebClient
with onStatus
(1 mins read).
How to access the body of an (error) response when using WebClient
's onStatus
method.
Running a command on a visual selection in Vim (1 mins read).
How to pipe the text in a visual selection to a command, either to run it, or to replace the text in the seletion.
Updating the CA Certificate bundle in Chef Installations (3 mins read).
How to update/add new certificates to the Certificate Authority Certificate Bundle in a Chef Development Kit / Workstation installation.
Introducing a Go command-line tool for interacting with Micropub servers (1 mins read).
Announcing the initial release of micropub
, a CLI for interacting with Micropub servers.
Automagically formatting on save, with Neovim and Language Server Protocol (LSP) (1 mins read).
How to use Neovim's Language Server Protocol (LSP) support to autoformat code on a file's save.
Gotcha: Segfault when HTTP headers include newlines with Go (2 mins read).
Why you may be receiving a segfault when using http.Client
with HTTTP headers that include newlines.
Week Notes 22#08 (5 mins read).
What happened in the week of 2022-02-21?
Converting Spring Boot Property Variables to Environment Variables with Go (1 mins read).
A command-line script to convert a Spring Boot property to an environment variable.
Pretty Printing JSON Web Tokens (JWTs) on the Command Line using Go (2 mins read).
How to easily introspect and pretty print a signed JWT (JWS) or an encrypted JWT (JWE) on the command line using Go.
Gotcha: Field casing is important when marshalling struct
s to JSON in Go (2 mins read).
Why you may be missing fields from your struct
s in your Go json.Marshal
calls.
Testing @Scheduled
annotations with Spring (Boot) (2 mins read).
How to test your Spring (Boot) scheduling without waiting for hours.
Creating a "Manual of Me" (1 mins read).
Creating a reference document about how to best collaborate together.
Pretty Printing JSON on the Command Line with Go (1 mins read).
Using Go's JSON module to pretty print JSON objects from the command line.
Reading all of stdin
on the command-line with Go (1 mins read).
How to read the whole of stdin
, up to EOF, with Go.
Week Notes 22#07 (4 mins read).
What happened in the week of 2022-02-14?
Exporting a Git repo as an archive (1 mins read).
How to export a Git repo as an archive format, such as a .tar.gz
or a .zip
.
How to interpolate a property inside Spring Security @PreAuthorize
/ @PostAuthorize
(3 mins read).
How to use the value of a property in a Spring Security authorization statement.
Combining an Audio-only and Video-only MP4 with ffmpeg
on the command-line (1 mins read).
How to use ffmpeg
to combine two MP4 files, where each file contains audio and video separately.
Week Notes 22#06 (2 mins read).
What happened in the week of 2022-02-07?
Adding a Wiretap to a Spring WebFlux WebClient
to Log All Request/Response Data (2 mins read).
How to log all request/response data from a Spring Webflux WebClient
.
Determining if the Spring Boot Application is Running in Debug or Trace Mode (3 mins read).
How to determine if your Spring Boot application is running in debug mode, for instance to selectively enable other features of your application.
Simplifying Spring (Boot) ExceptionHandler
s by extending ResponseStatusException
(1 mins read).
How to drive HTTP response status codes from exceptions by extending Spring's ResponseStatusException
.
Bundling Multi-File OpenAPI Documents into a Single File (2 mins read).
Looking at the options we have for converting a multi-file OpenAPI specification to a single document.