Archive

All published posts

2518 posts latest post 2026-07-10 simple view
Publishing rhythm
Jun 2026 | 26 posts
![[None]] When setting up a new machine, vm, docker image you might be installing command line tools from places like pip. They will often put executables in your ~/.local/bin directory, but by default your shell is not looking in that directory for commands. WARNING: The script dotenv is installed in '/home/falcon/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. To solve this you need to add that directory to your $PATH. export PATH=$PATH:~/.local/bin To make this change permanant add this line to your shell’s init script, which is likely something like ~/.bashrc or ~/.zshrc.
GitHub - doyensec/wsrepl: WebSocket REPL for pentesters WebSocket REPL for pentesters. Contribute to doyensec/wsrepl development by creating an account on GitHub. GitHub · github.com [1] Very inspiring textual project to check out how they set up the ui. Their intro video has a pretty epic dev experience. References: [1]: https://github.com/doyensec/wsrepl
[1]https://t.co/km5m7k6Pb0 [1] #doyensec #appsec #websockets [2] #burpsuite" loading=“lazy”> Doyensec (@Doyensec) on X Announcing wsrepl, the WebSocket testing tool from Doyensec! This intuitive tool is super easy to use and makes automation around WebSockets simple! Check out our blog for the details and download… X (formerly Twitter) · twitter.com wsrepl is an epic websocket repl built in python on the textual framework. References: [1]: https://twitter.com/Doyensec/status/1681320727465672706 [2]: /tags/websockets/
Filter Data - WHERE - SQLModel SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness. sqlmodel.tiangolo.com [1] When fetching pydantic models from the database with sqlmodel, and you cannot select your item by id, you probably need to use a where clause. This is the sqlmodel way of doing it. Here is a snippet of how I am using sqlmodel select and where to find a post by link in my thoughts database. @post_router.get("/link/") async def get_post_by_link( *, session: Session = Depends(get_session), link: str, ) -> PostRead: "get one post by link" link = urllib.parse.unquote(link) print(f'link: {link}') post = session.exec(select(Post).where(Post.link==link)).first() if not post: raise HTTPException(status_code=404, detail=f"Post not found for link: {link}") return post References: [1]: https://sqlmodel.tiangolo.com/tutorial/where/#filter-rows-using-where-with-sqlmodel
URL Decoding query strings or form parameters in Python | URLDecoder URL Decode online. URLDecoder is a simple and easy to use online tool for decoding URL components. Get started by typing or pasting a URL encoded string in the input text area, the tool will automa... urldecoder.io [1] 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. @post_router.get("/link/") async def get_post_by_link( *, session: Session = Depends(get_session), link: str, ) -> PostRead: "get one post by link" link = urllib.parse.unquote(link) print(f'link: {link}') post = session.exec(select(Post).where(Post.link==link)).first() if not post: raise HTTPException(status_code=404, detail=f"Post not found for link: {link}") return post References: [1]: https://www.urldecoder.io/python/
encodeURIComponent() - JavaScript | MDN The encodeURIComponent() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will ... MDN Web Docs · developer.mozilla.org [1] 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 [2] 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. // Event listener for tab changes chrome.tabs.onActivated.addListener(function (activeInfo) { // Get the active tab information ...
🛠️ Installation | LazyVim You can find a starter template for LazyVim here lazyvim.org [1] 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. References: [1]: https://www.lazyvim.org/installation
[1]@changelog [1]) on X — 🗣️ @kelseyhightower on his demos: That happy path gets people out of their chairs. They’re going back to the computer, like: “Yo, I’m gonna try it right now.” Come on… I’d rather have that. And I’ll take the bit of criticism that comes with it." loading=“lazy”> Changelog (@changelog [2]) on X 🗣️ @kelseyhightower on his demos: That happy path gets people out of their chairs. They’re going back to the computer, like: “Yo, I’m gonna try it right now.” Come on… I’d rat… X (formerly Twitter) · twitter.com Such an inspiring clip from Kelsey Heightower. Make good shit that inspires people rather than fake ppts of how things could be. References: [1]: https://twitter.com/changelog/status/1681306857951084544 [2]: https://changelog.com/podcast
[1]@chriscoyier [1]) on X — I was unaware of `text-wrap: pretty;` I knew about the (new/cool) text-wrap: balance; — but sometimes that's a bit… too much. I feel like it's nice on headers but not smaller type. Here's what I mean." loading=“lazy”> Chris Coyier (@chriscoyier [2]) on X I was unaware of text-wrap: pretty; I knew about the (new/cool) text-wrap: balance; — but sometimes that's a bit… too much. I feel like it's nice on headers but not smaller type. Here's w… X (formerly Twitter) · twitter.com Next time I’m working with large headers on small screens I need to try this. I always truggle to get them to look good for most text and overflow ridiculously long words correctly or at all. text-wrap: pretty; text-wrap: balance References: [1]: https://twitter.com/chriscoyier/status/1681407724993798144 [2]: https://chriscoyier.net
sqlite-utils command-line tool - sqlite-utils sqlite-utils.datasette.io [1] I want to like jq, but I think Simon is selling me on sqlite, maybe its just me but this looks readable, hackable, editable, memorizable. Everytime I try jq, and its 5 minutes fussing with it just to get the most basic thing to work. I know enough sql out of the gate to make this work off the top of my head curl https://thoughts.waylonwalker.com/posts/ | sqlite-utils memory - 'select title, message from stdin where stdin.tags like "%python%"' | jq References: [1]: https://sqlite-utils.datasette.io/en/stable/cli.html#querying-data-directly-using-an-in-memory-database
LZone LZone - Cheat Sheets for Sysadmin / DevOps / System Architecture lzone.de [1] 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. curl https://thoughts.waylonwalker.com/posts/ | jq '.[] | select(.title | contains("python"))' References: [1]: https://lzone.de/cheat-sheet/jq
Looking for inspiration? sqlite-migrate [1] by simonw [2]. A simple database migration system for SQLite, based on sqlite-utils References: [1]: https://github.com/simonw/sqlite-migrate [2]: https://github.com/simonw
The work on textual-paint [1] by 1j01 [2]. 🎨 MS Paint in your terminal. References: [1]: https://github.com/1j01/textual-paint [2]: https://github.com/1j01
Check out wsrepl [1] by doyensec [2]. It’s a well-crafted project with great potential. WebSocket REPL for pentesters References: [1]: https://github.com/doyensec/wsrepl [2]: https://github.com/doyensec
If you’re into interesting projects, don’t miss out on llm.nvim [1], created by huggingface [2]. LLM powered development for Neovim References: [1]: https://github.com/huggingface/llm.nvim [2]: https://github.com/huggingface

Underground Bases with Wyatt

Playing minecraft with Wyatt today he started a server all on his own and had me join. All vanilla, only one rule, underground bases. [1] I spawned into the server and it was already night time. I gathered up some wood on my way down a tree, and was attacked by zombies before I could get any tools, so I ran up another tree and crafted a crafting table. [2] Now to follow the rules, it’s time to head underground to build my base. [3] I made a mistake and died, but look at this view from my respawn point. [4] References: [1]: https://dropper.waylonwalker.com/api/file/eb43e707-ae55-48f8-9916-86321b3b8754.webp [2]: https://dropper.waylonwalker.com/api/file/25a3493a-f08b-4ea8-8535-b03cc7bcbf00.webp [3]: https://dropper.waylonwalker.com/api/file/74fc59aa-f0da-4643-a67a-36dc65480760.webp [4]: https://dropper.waylonwalker.com/api/file/7e852358-a680-460b-88c0-ed31b2a18501.webp
I like maces’s [1] project fastapi-htmx [2]. Extension for FastAPI [3] to make HTMX [4] easier to use. References: [1]: https://github.com/maces [2]: https://github.com/maces/fastapi-htmx [3]: /fastapi/ [4]: /htmx/
The work on interpreters [1] by ericsnowcurrently [2]. a placeholder References: [1]: https://github.com/ericsnowcurrently/interpreters [2]: https://github.com/ericsnowcurrently
Check out coolify [1] by coollabsio [2]. It’s a well-crafted project with great potential. An open-source & self-hostable Heroku / Netlify / Vercel alternative. References: [1]: https://github.com/coollabsio/coolify [2]: https://github.com/coollabsio

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.

“One lone jedi stands in Glowing chains of interconnected network of technological cubes, in the middle of a futuristic cyberpunk dubai city, in the art style of dan mumford and marc simonetti, atmospheric lighting, intricate, volumetric lighting, beautiful, sharp focus, ultra detailed” -s50 -W800 -H350 -C7.5 -Ak_lms -S1657735302

What happened?? #

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 glob.glob uses os.scandir which ignores ‘.’ and ‘..’ directories while Path.glob does not.

https://docs.python.org/3/library/os.html#os.scandir

results? #

Now glob.py from the docs plugin does not even show up in the profiler.

I opened up ipython and saw the following results. For some reason as I hit docs.glob it was only hitting 488 ms from ipython, but it was still a massive improvement over the original.

%timeit docs.glob(m)
# 488 ms ± 3.05 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

%timeit docs.glob(m)
# 9.37 ms ± 90.9 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
I’m impressed by minijinja [1] from mitsuhiko [2]. MiniJinja is a powerful but minimal dependency template engine for Rust compatible with Jinja/Jinja2 References: [1]: https://github.com/mitsuhiko/minijinja [2]: https://github.com/mitsuhiko
I’m really excited about gpt-engineer [1], an amazing project by AntonOsika [2]. It’s worth exploring! Platform to experiment with the AI Software Engineer. Terminal based. NOTE: Very different from https://gptengineer.app References: [1]: https://github.com/AntonOsika/gpt-engineer [2]: https://github.com/AntonOsika
I like s0md3v’s [1] project roop [2]. one-click face swap References: [1]: https://github.com/s0md3v [2]: https://github.com/s0md3v/roop
tidwall [1] has done a fantastic job with jj [2]. Highly recommend taking a look. JSON Stream Editor (command line utility) References: [1]: https://github.com/tidwall [2]: https://github.com/tidwall/jj
I recently discovered elia [1] by darrenburns [2], and it’s truly impressive. A snappy, keyboard-centric terminal user interface for interacting with large language models. Chat with ChatGPT, Claude, Llama 3, Phi 3, Mistral, Gemma and more. References: [1]: https://github.com/darrenburns/elia [2]: https://github.com/darrenburns
The work on cal.com [1] by calcom [2]. Scheduling infrastructure for absolutely everyone. References: [1]: https://github.com/calcom/cal.com [2]: https://github.com/calcom

AUR.">paru is an aur helper that allows you to use a package manager to install packages from the aur.

What’s the Aur #

The Aur is a set of community managed packages that can be installed on arch based distros.

Why a helper? #

paru just makes it easy, no clone and run makepkg. You can do everything paru can do using the built in pacman installer.

Manual Install from the Aur #

You will need to manually instal pacman from the aur in order to get started.

sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si

Installing packages with paru #

Once setup you are ready to install packages from the AUR just like the core repos.

# you can update your system using paru
paru -Syu

# you can install packages from the AUR
paru -S tailscale
paru -S prismlauncher

# even core repo packages can be installed
paru -S docker

Paru in Docker #

Here is a snippet from my devtainer dockerfile. Where I use paru to install packages from the AUR inside of a dockerfile.

FROM archlinux

RUN echo '[multilib]' >> /etc/pacman.conf && \
    echo 'Include = /etc/pacman.d/mirrorlist' >> /etc/pacman.conf && \
    pacman --noconfirm -Syyu && \
    pacman --noconfirm -S base-devel git && \
    groupadd --gid 1000 devtainer && \
    useradd --uid 1000 --gid 1000 -m -r -s /bin/bash devtainer && \
    passwd -d devtainer && \
    echo 'devtainer ALL=(ALL) ALL' > /etc/sudoers.d/devtainer && \
    mkdir -p /home/devtainer/.gnupg && \
    echo 'standard-resolver' > /home/devtainer/.gnupg/dirmngr.conf && \
    chown -R devtainer:devtainer /home/devtainer && \
    mkdir /build && \
    chown -R devtainer:devtainer /build && \
    cd /build && \
    sudo -u devtainer git clone --depth 1 https://aur.archlinux.org/paru.git && \
    cd paru && \
    sudo -u devtainer makepkg --noconfirm -si && \
    sed -i 's/#RemoveMake/RemoveMake/g' /etc/paru.conf && \
    pacman -Qtdq | xargs -r pacman --noconfirm -Rcns && \
    rm -rf /home/devtainer/.cache && \
    rm -rf /build

USER devtainer
RUN sudo -u devtainer paru --noconfirm --skipreview --useask -S \
    bat \
    cargo \
    direnv \
    dua-cli \
    dust \
    fd

Final Thoughts #

There are other options out there, paru seemed to be the most supported at the time I started using arch and there has been no other reason for me to change it. It’s treated me well for nearly a year now.

I took a break

Life comes in waves, and sometimes you need to set down some of your projects to focus on others. For the first part of 2023 I’ve really had a lot of family stuff to focus on, we also are pretty new homeowners and are still trying to get our new to us house cleaned up and modernized. Side Projects # [1] You can see in my growing list of repos [2] that I have poked around on quite a few side projects over the past few months. This has been quite relaxng to me, mostly things that I use to learn from, but also a lot that are tools and things I use that bring me joy. Pydantic # [3] I haven’t wrote about it at all yet, but I have really been starting to lean into pydantic on all of these side projects. I have really been enjoying the type system. A good friend @pypeaday [4] got me hooked and we have been throwing around this phrase that he learned from a math professor “Make it So”. The idea boils down to leveraging pydantic to make all the values you want to exist up front, or fail ...
The work on hardtime.nvim [1] by m4xshen [2]. Establish good command workflow and quit bad habit References: [1]: https://github.com/m4xshen/hardtime.nvim [2]: https://github.com/m4xshen
I’m impressed by trogon [1] from Textualize [2]. Easily turn your Click CLI into a powerful terminal application References: [1]: https://github.com/Textualize/trogon [2]: https://github.com/Textualize
I’m impressed by swenv.nvim [1] from AckslD [2]. Tiny plugin to quickly switch python virtual environments from within neovim without restarting. References: [1]: https://github.com/AckslD/swenv.nvim [2]: https://github.com/AckslD

Playing Star Wars Text Adventure with a 10 yr old

article.blog-post { max-width: 1200px; } The following is a playthrough of Star Wars Text Adventure with a 10 yr old.The following is a playthrough of StarThe following is a playthrough of Star ❯ sw-adventure game run [05/15/23 18:47:42] INFO marvin.marvin: Using OpenAI model "gpt-3.5-turbo" logging.py:50 18:47:42.699 | INFO | marvin.marvin - [default on default]Using OpenAI model "gpt-3.5-turbo"[/] [18:47:42] Starting game game.py:30 generating your character ╭─ Zorin Kreez's Mission Card ─────────────────────────────────────────────────────────────────────────────────────╮ │ Zorin Kreez │ Zorin Kreez was born on Tatooine and grew up in a small farming community. He │ │ health │ 100 │ always dreamed of adventure and excitement. As soon as he was old enough, he │ │ imperial credits │ 5000 │ joined the Imperial Navy and quickly rose through the ranks. He is now a skilled │ │ fuel level │ 100 │ pilot and loyal member of the Empire. │ │ │ │ │ Imperial │ A nimble and deadly starfight...
1 min read
I’m really excited about pylyzer [1], an amazing project by mtshiba [2]. It’s worth exploring! A fast, feature-rich static code analyzer & language server for Python References: [1]: https://github.com/mtshiba/pylyzer [2]: https://github.com/mtshiba

Pydantic and singledispatch

I was reading about pydantic-singledispatch [1] from Giddeon’s blog and found it very intersting. I’m getting ready to implement pydantic on my static site generator markata [2], and I think there are so uses for this idea, so I want to try it out. The Idea # [3] Let’s set up some pydantic settings. We will need separate Models for each environment that we want to support for this to work. The whole idea is to use functools.singledispatch and type hints to provide unique execution for each environment. We might want something like a path_prefix in prod for environments like GithubPages that deploy to /<name-of-repo> while keeping the root at / in dev. Settings Model # [4] Here is our model for our settings. We will create a CommonSettings model that will be used by all environments. We will also create a DevSettings model that will be used in dev and ProdSettings that will be used in prod. We will use env as the discriminator so pydantic knows which model to use. from typing im...
2 min read
I’m impressed by pandas-ai [1] from sinaptik-ai [2]. Chat with your database or your datalake (SQL, CSV, parquet). PandasAI makes data analysis conversational using LLMs and RAG. References: [1]: https://github.com/sinaptik-ai/pandas-ai [2]: https://github.com/sinaptik-ai
If you’re into interesting projects, don’t miss out on frogmouth [1], created by Textualize [2]. A Markdown browser for your terminal References: [1]: https://github.com/Textualize/frogmouth [2]: https://github.com/Textualize
Check out forge [1] by dfee [2]. It’s a well-crafted project with great potential. forge (python signatures) for fun and profit References: [1]: https://github.com/dfee/forge [2]: https://github.com/dfee
I like Slackadays’s [1] project Clipboard [2]. 😎🏖️🐬 Your new, 𝙧𝙞𝙙𝙤𝙣𝙠𝙪𝙡𝙞𝙘𝙞𝙤𝙪𝙨𝙡𝙮 smart clipboard manager References: [1]: https://github.com/Slackadays [2]: https://github.com/Slackadays/Clipboard
I like madox2’s [1] project vim-ai [2]. AI-powered code assistant for Vim. OpenAI and ChatGPT plugin for Vim and Neovim. References: [1]: https://github.com/madox2 [2]: https://github.com/madox2/vim-ai
tabby [1] by TabbyML [2] is a game-changer in its space. Excited to see how it evolves. Self-hosted [3] AI coding assistant References: [1]: https://github.com/TabbyML/tabby [2]: https://github.com/TabbyML [3]: /self-host/
If you’re into interesting projects, don’t miss out on wolverine [1], created by biobootloader [2]. No description available. References: [1]: https://github.com/biobootloader/wolverine [2]: https://github.com/biobootloader
I’m impressed by chroma [1] from chroma-core [2]. the AI-native open-source embedding database References: [1]: https://github.com/chroma-core/chroma [2]: https://github.com/chroma-core
Looking for inspiration? langchain [1] by langchain-ai [2]. 🦜🔗 Build context-aware reasoning applications References: [1]: https://github.com/langchain-ai/langchain [2]: https://github.com/langchain-ai
Check out lm-sys [1] and their project FastChat [2]. An open platform for training, serving, and evaluating large language models. Release repo for Vicuna and Chatbot Arena. References: [1]: https://github.com/lm-sys [2]: https://github.com/lm-sys/FastChat
I came across hatch-aws [1] from trash-panda-v91-beta [2], and it’s packed with great features and ideas. Hatch plugin for building AWS Lambda functions with SAM References: [1]: https://github.com/trash-panda-v91-beta/hatch-aws [2]: https://github.com/trash-panda-v91-beta
I’m impressed by hatch-aws [1] from aka-raccoon [2]. Hatch plugin for building AWS Lambda functions with SAM References: [1]: https://github.com/aka-raccoon/hatch-aws [2]: https://github.com/aka-raccoon
Looking for inspiration? hatch-jupyter-builder [1] by jupyterlab [2]. A hatch plugin to help build Jupyter packages References: [1]: https://github.com/jupyterlab/hatch-jupyter-builder [2]: https://github.com/jupyterlab