Thew Dhanat's Blog

How I update my Twitter cover every sunrise and sunset

April 23, 2022

You may notice that my Twitter cover changes every day and night (in my timezone, of course). The images were from Unsplash and Nasa.

Answer: I developed and deployed it with Docker 😇.

You can look at the source code. It only has 224 lines.

Previously, I wrote it in Node.js, but last week I rewrote it in Go 💨. The docker image size reduced from hundreds of MB to 30 MB, and the idle memory usage went down from 50 MB to 6 MB 🤯.