Latest articles

When Good Code Goes NaN: How mismanaging Java's Unorderable NaN Value led to a bug

Friday, March 24, 2023

I recently encountered a bug which was caused by a NaN value in my Java code. NaN, short for "Not a Number", is a valid value for a float or a double. NaN is a tricky value because (1) it spreads like a virus and (2) it is unorderable.

Dumping a binary file with od(1)

Tuesday, November 08, 2022

I was recently working on an embedded device that provided a limited CLI interface and was looking for an utility to dump a binary file.

I was aware of hexdump(1) but alas, it was not available on my platform. That is how I discovered od(1).

Reducing PDF filesize with the Command Line using Ghostscript (gs)

Wednesday, April 13, 2022

I use the following command line to reduce the PDF filesize:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

This command line can be used to reduce the PDF filesize on Linux.

Emacs #filename# ???

Friday, December 25, 2020

Sometimes Emacs saves a file under #filename# instead of filename. That's because of auto-save. To disable this behavior while keeping the benefit of auto-save enable auto-save-visited-mode.

How to check ssh public key fingerprints?

Thursday, February 15, 2018

The authenticity of host (' can't be established.
ECDSA key fingerprint is SHA256:v7u4albDUtGH1EXWEwlt0KnzY9GDY5EqodUymKSbiSw
Are you sure you want to continue connecting (yes/no)? 

If you have ever used SSH, you have encountered this prompt. If you often SSH to new machines and you are like me, you probably type 'yes' without thinking about it.

In this article I describe how you can check your SSH fingerprints.