Stuffing bytes into source code
You're writing a test case, or you want to embed an Easter Egg into your app that your PM won't notice. Or whatever. I'm not judging you. You could write a 5-minute Python script, or you could do what I did and waste half an hour trying to understand the hexdump manual. Here's what I came up with:
$ hexdump -v -e '"(byte)0x" 1/1 "%02X" ", "' image.png
This will spit out something close enough to Java or C++ source code that you can mostly copy and paste it.

Leave a comment