Today I Learned

Short TIL posts

1834 posts latest post 2026-04-18
Publishing rhythm
Apr 2026 | 20 posts

In order to turn url encoded links back into links that I would find in the database of my thoughts project I need to urldecode them when they hit the api. When anything hits the api it must urlencode the links in order for them to be sent correctly as data and not get parsed as part of the url.

Here is a snippet of how I am using urlib.parse.unquote to un-encode encoded urls so that I can fetch posts from the database.

In order to send data that includes special characters such as / in a url you need to url encode it. You have probably seen these many times in urls with things like %20 for spaces.

I’m working on a chrome extension to make quick blog posts, like thoughts or a persistent bookmark tool with comments. The backend is written in fastapi and when I check to see if I have a post for a page I need to url encode it.

curl -X 'GET' \ 'https://thoughts.waylonwalker.com/link/?link=https%3A%2F%2Fhtmx.org%2Fextensions%2Fclient-side-templates%2F' \ -H 'accept: application/json'

curl example generated from the fastapi swagger docs.

Here is how I used javascript’s encodeURIComponent to turn my chrome extension into a notification when I already have a post for the current page.

Lately in 2023 I have been leaning on lazyvim for my new setups where I am not necessarily ready to drop my full config. It’s been pretty solid, and comes with a very nice setup out of the box, the docs are pretty fantastic as well.

A nice cheat sheet for jq. jq looks so nice, but it so quickly gets overwhelming on how to select what you want. I was able to make a jq contains query.

The next version of markata will be around a full second faster at building it’s docs, that’s a 30% bump in performance at the current state. This performance will come when virtual environments are stored in the same directory as the source code.

I was looking through my profiler for some unexpected performance hits, and noticed that the docs plugin was taking nearly a full second (sometimes more), just to run glob.

| |- 1.068 glob markata/plugins/docs.py:40 | | |- 0.838 <listcomp> markata/plugins/docs.py:82 | | | `- 0.817 PathSpec.match_file pathspec/pathspec.py:165 | | | [14 frames hidden] pathspec, <built-in>, <string>

Python scandir ignores hidden directories #

I started looking for different solutions and what I found was that I was hitting pathspec with way more files than I needed to.

len(list(Path().glob("**/*.py"))) # 6444 len([Path(f) for f in glob.glob("**/*.py", recursive=True)]) # 110

After digging into the docs I found that...

...