Blog
-
Is this certificate DER or PEM encoded ? It turns out, both at the same time
Written on March 15, 2025X509 certificate can be encoded either as
DER
orPEM
.DER
encoding is an efficient binary format, whilePEM
encoding is a wrapper around the Base 64DER
encoding of the certificate.Usually, when dealing with a specific certificate, you know beforehand whether it's encoded as
DER
orPEM
. For example, in theopennssl
CLI, you can give it the-inform
parameter, which accepts eitherDER
orPEM
.However, what if don't know the encoding of the certificate, can you figure it out on the fly?
-
Using bevy for the 2024 GMTK game jam
Written on August 20, 2024I used bevy to build a small game for the 2024 GMTK game jam. Having no prior experience with game development, this was a fun ride!
-
How to work with !Sized types in Rust
Written on January 21, 2024Sizedness in Rust is a peculiar topic. I recently found myself having to work with unsized types when trying to reduce the use of
const
generics in theheapless
crate. Here I will document the approaches I considered and the pros and cons of each of them. -
Disabling IPv6 when an IPv4 only wireguard config is up
Written on June 01, 2023On linux, when using a wireguard VPN that only supports IPv4, the wg-quick scripts and NetworkManager will not do anything regarding IPv6, which will simply go through the default gateway and "leak".
It's not easy to reliably prevent this. Here is how to do it with NetworManager.
-
How to disable a CSS stylesheet with JavaScript
Written on September 27, 2022Contrary to what every website out there is saying, the proper way to disable a remote stylesheet imported with
<link rel="stylesheet" type="text/css" href="/url">
is not to usestylesheet.disabled = true;
, it's rather to usestylesheet.media = "not all";
. Usingdisabled
on<link>
element is not standard and should be avoided. It doesn't seem to even work properly in chrome. -
Resolving merge conflicts when introducing formatting to an existing codebase
Written on September 22, 2022If a project doesn't use any formatting tool, introducing them can be a headache, and is almost guaranteed to cause merge conflicts with any ongoing PR. Here's how to fix them.