Not mine, and not a true solution as it violates rule #2, but it has a very interesting story that led me here:
# With apologies to XKCD #149
me:
@:
a:
@:
sandwich:
@[ "$$(id -u)" -eq 0 ] && { echo "Okay"; touch sandwich; } || echo "What? Make it yourself!"
So, where this came from?
I was just messing with the cloud-init script /boot/user-data
in Ubuntu 22.04 Server image for Raspberry Pi, when I came into this example snippet:
## Write arbitrary files to the file-system (including binaries!)
#write_files:
#- path: /etc/default/console-setup
# content: |
# # Consult the console-setup(5) manual page.
# ACTIVE_CONSOLES="/dev/tty[1-6]"
# CHARMAP="UTF-8"
# VIDEOMODE=
# FONT="Lat15-Terminus18x10.psf.gz"
# FONTFACE=
# FONTSIZE=
# CODESET="Lat15"
# permissions: '0644'
# owner: root:root
#- encoding: gzip
# path: /root/Makefile
# content: !!binary |
# H4sICF2DTWIAA01ha2VmaWxlAFNWCM8syVBILMjPyU/PTC1WKMlXiPB2dlFQNjSx5MpNteLi
# dLDiSoRQxYl5KeWZyRkgXrSCkoqKRmaKgm6pppKCbmqhgoFCrIKamkK1QmpyRr6Ckn92YqWS
# NdC80uQMBZhOa4VahZoaqIrwjMQSewXfxOxUhcwShcr80qLi1Jw0RSUuAIYfEJmVAAAA
# owner: root:root
# permissions: '0644'
That binary blob caught my eye... was that an executable? A binary Makefile? It made no sense. Assuming this was plain text with base64 encoding, I tried in a terminal:
$ txt='H4sICF2DTWIAA01ha2VmaWxlAFNWCM8syVBILMjPyU/PTC1WKMlXiPB2dlFQNjSx5MpNteLi
> dLDiSoRQxYl5KeWZyRkgXrSCkoqKRmaKgm6pppKCbmqhgoFCrIKamkK1QmpyRr6Ckn92YqWS
> NdC80uQMBZhOa4VahZoaqIrwjMQSewXfxOxUhcwShcr80qLi1Jw0RSUuAIYfEJmVAAAA'
$ printf "$txt" | base64 -d
]�MbMakefileS�,�PH,���O�L-V(�W��vvQP64���M���t��J�Pʼny)��� ^�����Ff��n����nj���B����B�BjrF���vb��5м��
�Nk�Z�������{���T�����Ң�Ԝ4E%.���
Ouch, a true binary indeed! What the hell..
Oh, wait... encoding: gzip
. Hummm...
$ printf "$txt" | base64 -d | gunzip
Ta-da! The Makefile
above appears!
What a convoluted Easter Egg from... well, I have no idea! And, what was that all about?
So I read the comic, experimented a bit with that Makefile, finally understood the joke, then googled for "make me a sandwich", and finally arrived here!
make
. \$\endgroup\$