5 ms·
Here's how I go from dumb to less dumb: - on Saturday, I wanted to learn how to write a Kubernetes configuration file from scratch, so I decided I'd deploy a s
by amorphid 8y ago
Here's how I go from dumb to less dumb:
- on Saturday, I wanted to learn how to write a Kubernetes configuration file from scratch, so I decided I'd deploy a static web page
- for the static web page, I decided it should return pictures of teapots w/ a 418 status code, and initially tried to return responses using netcat, which I got working on my local machine, but not in a container
- instead of using netcat, I decided that nginx is for people that don't like over-engineering their weekend hack projects, so clearly I needed to write my own web server and hacked out a janky Elixir server that serves up a poop emoji teapot image [1][2]
- then I started working on an overly over-engineered HTTP server, which so far only has date headers [3]
- then last night I randomly wondered how HTTP 2 works, looked for the RFC [4]
- then I remembered working on the date header, and I wondered how headers work in HTTP2, and I learned they use Huffman encoding, and so my next side tangent is to read up on Huffman encoding and add HTTP 2 header support to my HTTP server! [5]
TL;DR -- I made a poop joke and turned it into a learning opportunity
[1] https://imgur.com/a/rZcL0Rw https://imgur.com/a/rZcL0Rw
[2] https://github.com/amorphid/i_am_a_teapot_container https://github.com/amorphid/i_am_a_teapot_container
[3] https://github.com/amorphid/hottpotato-elixir https://github.com/amorphid/hottpotato-elixir
[4] https://tools.ietf.org/html/rfc7540 https://tools.ietf.org/html/rfc7540
[5] https://tools.ietf.org/html/rfc7541 https://tools.ietf.org/html/rfc7541
- kstrauser 8y agoThis is awesomely overengineered and not-invented-here, and I mean that in the best possible way. Well done!