Today I Learned

Short TIL posts

1864 posts latest post 2026-06-04 simple view
Publishing rhythm
May 2026 | 29 posts
I’m impressed by shmux [1] from typecraft-dev [2]. the shell-script tmux management you didn’t know you needed. baby References: [1]: https://github.com/typecraft-dev/shmux [2]: https://github.com/typecraft-dev
I like iximiuz’s [1] project awesome-container-tinkering [2]. List of awesome tools to tinker with containers. References: [1]: https://github.com/iximiuz [2]: https://github.com/iximiuz/awesome-container-tinkering
External Link unix.stackexchange.com [1] today I learned that /dev/pts is a pseudo-tty. It amazes me how much linux is still built around things like hardware terminals. Note This post is a thought [2]. It’s a short note that I make about someone else’s content online #thoughts References: [1]: https://unix.stackexchange.com/questions/93531/what-is-stored-in-dev-pts-files-and-can-we-open-them [2]: /thoughts/
GitHub - svenstaro/miniserve: 🌟 For when you really just want to serve some files over HTTP right now! 🌟 For when you really just want to serve some files over HTTP right now! - svenstaro/miniserve GitHub · github.com [1] miniserve is a sweet http server, replacement for python -m http.server. It’s fast, runs off a small binary, but why would I want to use it over something that already exists on most machines, because it includes a bunch of features like qr codes, pretty themes, and uploads. I’ve used python -m http.server many times to transfer files from one machine to another in a pinch, like at a family members house. But what if they have an android, windows, or something not easy to get a python repl running on, you can run miniserve and upload from their device rather than hosting from their device. Note This post is a thought [2]. It’s a short note that I make about someone else’s content online #thoughts References: [1]: https://github.com/svenstaro/miniserve [2]: /thoughts/
Looking for inspiration? miniserve [1] by svenstaro [2]. 🌟 For when you really just want to serve some files over HTTP right now! References: [1]: https://github.com/svenstaro/miniserve [2]: https://github.com/svenstaro
pacman/Tips and tricks - ArchWiki wiki.archlinux.org [1] The arch wiki is always full of good content, and pacman tips and tricks does not disappoint. Today I discovered this command to remove orphaned dependencies on my system. pacman -Qdtq | pacman -Rns - Note This post is a thought [2]. It’s a short note that I make about someone else’s content online #thoughts References: [1]: https://wiki.archlinux.org/title/pacman/Tips_and_tricks [2]: /thoughts/
Inside 22,734 Steam games About a year ago I blogged about games that use curl. In that post I listed a bunch of well-known titles I knew use curl and there was a list of 136 additional games giving credit to curl. Kind of ... daniel.haxx.se · daniel.haxx.se [1] Interesting to see that curl is used in so many places. I often think of things like games being so windows centric and curl being so linux centric I don’t even think of these things crossing paths as much as they do. Note This post is a thought [2]. It’s a short note that I make about someone else’s content online #thoughts References: [1]: https://daniel.haxx.se/blog/2024/06/20/inside-22734-steam-games/ [2]: /thoughts/
wcurl is here Users tell us that remembering what curl options to use when they just want to download the contents of a URL is hard. This is one often repeated reason why some users reach for wget instead of cur... daniel.haxx.se · daniel.haxx.se [1] interesting, seems like such a simple way to completely remove the need of a whole other cli. No offense to anyone working on wget, but generally I use it out of lazyness or something wierd is happening and I am looking for a second opinion. Cool to know that wcurl exists and will start shipping with curl. Note This post is a thought [2]. It’s a short note that I make about someone else’s content online #thoughts References: [1]: https://daniel.haxx.se/blog/2024/07/03/wcurl-is-here/ [2]: /thoughts/
I’ve started leaning in on kubernetes kustomize to customize my manifests per deployment per environment. Today I learned that it comes with a diff command. kubectl diff -k k8s/overlays/local You can enable color diffs by using an external diff provider like colordiff. export KUBECTL_EXTERNAL_DIFF="colordiff -N -u" You might need to install colordiff if you don’t already have it. sudo pacman -S colordiff sudo apt install colordiff Now I can try out kustomize changes and see the change with kustomize diff.
Animal well does not let you remap keys, and really doesn’t even inform you that it is keyboard compatible. I had to play around and discover the keymap, which can be a bit tricky on a 40% board. This is what I found. - wasd - move - space - jump / a - enter - interact / b - x - throw - c - inventory - 1 - left item / rb - 2 - open item menu / triangle - 3 - right item / lb
I recently discovered pydantic-sqlite [1] by Phil997 [2], and it’s truly impressive. Simple package for storing pydantic BaseModels in an in-memory SQLite database. References: [1]: https://github.com/Phil997/pydantic-sqlite [2]: https://github.com/Phil997
Email Address Obfuscation Hide email addresses from bots while keeping them visible to visitors. Cloudflare Docs · developers.cloudflare.com [1] I recently started seeing email-decode.min.js show up on my blog posts, and I wondered what the heck ? I didn’t put it there. Turns out that cloudflare put it there from pages to safely serve email addresses for me. inspecting the page without js running we can see that the mailto email is swapped out for email protected. Neat feature. ❯ curl --silent https://waylonwalker.com/diskcache-as-debounce/ | grep email <a class="decoration-pink-500 hover:decoration-pink-300 hover:text-pink-100" href="/cdn-cgi/l/email-protection#a4ccc1c8c8cbe4d3c5ddc8cbcad3c5c8cfc1d68ac7cbc9" rel="me"><span class="__cf_email__" data-cfemail="630b060f0f0c2314021a0f0c0d14020f0806114d000c0e">[email&#160;protected]</span></a> <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script></body> Looking deeper into this article it looks like this feature comes from Scrape Shield and enabling Email Address Obfuscation. Note This post is a thought [2]. It’s a short note that I make about someone else’s content online...
Background Tasks - FastAPI FastAPI framework, high performance, easy to learn, fast to code, ready for production fastapi.tiangolo.com [1] fastapi [2] comes with a concept of background tasks which are functions that can be ran in the background after a function has been ran. This is handy for longer running functions that may take some time and you want to have fast response times. Here is an example from the docs from fastapi import BackgroundTasks, FastAPI app = FastAPI() def write_notification(email: str, message=""): with open("log.txt", mode="w") as email_file: content = f"notification for {email}: {message}" email_file.write(content) @app.post("/send-notification/{email}") async def send_notification(email: str, background_tasks: BackgroundTasks): background_tasks.add_task(write_notification, email, message="some notification") return {"message": "Notification sent in the background"} Note This post is a thought [3]. It’s a short note that I make about someone else’s content online #thoughts References: [1]: https://fastapi.tiangolo.com/tutorial/background-tasks/ [2]: /fastapi/ [3]: /thoughts/
Client Challenge pypi.org [1] markdown it py running in rust claims to be 20x faster. I’ll definitely look into this if markdown it py is ever a bottleneck in my performance. At first glance it appears that plugins are written in rust not python, and there is no admonition plugin, so I’ll keep my eye on it for now, but I can’t use it. Note This post is a thought [2]. It’s a short note that I make about someone else’s content online #thoughts References: [1]: https://pypi.org/project/markdown-it-pyrs/ [2]: /thoughts/
[1] diskcache has a peekitem method that allows you to lookup the expire_time of a cached item without changing it. I recently used this to implement debounce for fastapi [2] background tasks with multiple workers running. since all the workers I care about are on the same machine, but running in different processes diskcache was a great option. All workers have access to the same disk, but not the same variables in memory. Note This post is a thought [3]. It’s a short note that I make about someone else’s content online #thoughts References: [1]: /static/https://grantjenks.com/docs/diskcache/api.html#diskcache.Cache.peekitem [2]: /fastapi/ [3]: /thoughts/
I’ve been using fastapi [1] more and more lately and one feature I just started using is background tasks [[ thoughts-333 ]]. Seealso basic diskcache example <a href="/python-diskcache/" class="wikilink" data-title="How I setup a sqlite cache in python" data-description="When I need to cache some data between runs or share a cache accross multiple processes my go to library in python is . It&#39;s built on sqlite with just enough..." data-date="2022-03-29">How I setup a sqlite cache in python</a> One Background Task per db entry # [2] I am using it for longer running tasks and I don’t want to give users the ability to spam these long running tasks with many duplicates running at the same time. And each fastapi worker will be running in a different process so I cannot keep track of work in memory, I have to do it in a distributed fashion. Since they are all running on the same machine with access to the same disk, diskcache is a good choice What I need # [3] - check if a job is running - automatically expire jobs Less infrastructure complexity # [4] My brain first went to thinking I needed another service like redis running alongside fastapi for this, then it hit me that...
I’m really excited about homelab-diagrams [1], an amazing project by Doomlab7 [2]. It’s worth exploring! A repository to house diagrams for my homelab [3] References: [1]: https://github.com/Doomlab7/homelab-diagrams [2]: https://github.com/Doomlab7 [3]: /homelab/
learn-pdm [1] by pypeaday [2] is a game-changer in its space. Excited to see how it evolves. A repository for learning and playing with the pdm package manager/system for python References: [1]: https://github.com/pypeaday/learn-pdm [2]: https://github.com/pypeaday