-
tailwind aspect
I've been back to putting some images on my blog lately and thinking about making them a bit thinner through the use of aspect ratio for simplicity. I
-
markdown it attrs with slashes dont work
Attrs does not like '/' characters in its classes, so to use some tailwind classes with custom values we must make new classes in our tailwind input c
-
vim date
When I want to put a date in a document like a blog post from vim I use !!date from insert mode. Note that entering `!!` from normal mode puts you in command m
-
setting up nvim-manager starship prompt
I built out a tool for myself to manage my nvim configuration, and I wanted to quickly see which one I am running in my starship prompt. Here's the config
-
emoji in headless chrome in docker
I recently noticed that my og images were missing emoji. They were taken using headless chrome in a container. I fixed it by adding an emoji font in the conta
-
postiz-file-upload
Today I learned that the docs in postiz are a bit behind, (fantastic docs btw, they are to the point, and cover almost all of what you need). The docs state th
-
Links rely on color to be distiniquishable
Today i got hit by this accessibility issue on my site. Low contrast links are not distiniquishable. I had not seen this error title before it was new to me,
-
urllink
Today I discovered the `Urllink` function in bash from the ujust tool from [ublue.it](https://ublue.it). Seems like a cool trick, but might not work everywhere
-
debug cloudflared tunnel
I've been debugging a cloudflared tunnel issue in my homelab all day today, and getting really frustrated. My issue ended up being that it was running twi
-
setup cloudflared tunnel on ubuntu
I run a cloudflared tunnel on my ubuntu server to expose applications running on the server to the internet. I'm setting up a new server and running cloud
-
price an stl print on slant3d
I've been playing with 3d printing some items through the slant3d api. I've been pricing out different prints by running a slice request through thei
-
k3s config after first install
-
Trying-n8n
Today I gave n8n a try using podman, their docs gave me docker commands, but it ran fine on my machine using podman.
-
Obsidian-new-file
Wikilinks are a core concept within obsidian to link to documents by [[slug]] wrapped in double square brackets. These are commonly used within wiki site gener
-
Slug
A slug is the part of the url that comes after the domain. Commonly matches the file name of a markdown file many blogging systems. These are typically human
-
Vim-gq
Vim has a handy feature to format text with `gq`. You can use it in visual mode, give it a motion, or if you give it `gqq` it will format the current line. I u
-
Obsidian-go-to-definition
It was not obvious to me, but if you have a wikilink such as [[trying-obsidian]], you can jump to the file in obsidian, just like you can with lsp go to definit
-
Obsidian Using Templater Like Copier
I've long used copier to create all of my posts for my blog, and it works really well for my workflow. I think of a title, call a template, and give it a
-
Obsidian Image Converter
I'm giving obsidian a go as an editor for my blog and one of the main things I want to fix in my workflow is the ability to quickly drop in images. on fir
-
convert mp4 for twitter with ffmpeg
I've had a couple of uploads to twitter fail recently and has been a pain. I tried some online converters for convenience, but none of them worked. I rea
-
arch remove orphaned packages
-
k8s kustomize diff
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 comman
-
animal well keyboard
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,
-
diskcache as debounce
I've been using fastapi more and more lately and one feature I just started using is background tasks [[ thoughts-333 ]]. !!! seealso basic diskcache e
-
Install sealed-secreats via manifest
Yesterday I realized that I have overlooked the default installation method of the sealed secrets controller for [[ kubernetes-kubeseal ]] this whole time an ju
-
playerctl fixes arch media keys
I've long had issues with my qmk keyboard media keys on my arch install, I always thought it was on the keyboard end. Today I learned that playerctl fixes
-
tailwind post template
Today I am playing around with tailwind, flexing the css muscle and learning how to build new and different layouts with it. I created a new post template that
-
tailscale ssh
Tailscale allows you to ssh into all of your tailscale machines, it busts through firewalls and accross networks without complex setup. If you have used tailsc
-
Latest Page in Markata
I just implemented a latest blog post link in Markata by asking for the first post slug from the blog feed. The implementation uses the jinja_md plugin to rend
-
just picker
[`just`](https://github.com/casey/just) has been by go to tool for saving commands in a way that I can replay them and have team members replay them without rel
-
showmount-e
TIL how to display the list of nfs mounts on your network. You can even look for mounts of other machines on your network.
-
control minio token access
To allow access only to the <bucket>, you can pass add the Resource field to the User Policy when you create a new token.
-
How to List Sqlite tables
You can inspect sqlite tables with the sqlite shell. note that you get into the shell with `sqlite3 database.db` I also learned that `.tables`, `.index` and `.s
-
Redka Runs on SQLite
With the liscense changes to redis there are several new forks out there. One that I am particularly interested in is [redka](https://github.com/nalgeon/redka)
-
Am I vulnerable to the xz backdoor?
The main system that I am concerned about is my arch BTW machine. I found a great [article](https://archlinux.org/news/the-xz-package-has-been-backdoored/) from
-
arch dependencies
paru has some nice features that I rarely use, and hav to look up when I need them. Here are two commands to help with dependency management. You can check all
-
copier trust
I recently had to update my copier-gallery command to trust my own templates because some of them have shell scripts that run afterwards. Be warned that this c
-
ipython f2
Today I accidentally ran f2 in ipython to discover that it opens your $EDITOR! I use this feature quite often in zsh, it is bound to `<c-e>` for me, and s
-
sqlmodel indexes
I've really been enjoying using sqlmodel for my projects that need a database. One thing that I definitely lacked on for too long was indexing my database.
-
python inline snapshot
`inline-snapshot` is a new tool that I am trying out for python testing. It takes snapshots of your outputs and places them inline with the test. Here is the m
-
sqlite vacuum
Today I learned how to VACUUM a sqlite database and cut its size in about half. It's a database that I have had running for quite awhile and has some decen
-
Tailwind Animations
I learned that tailwind animations are pretty easy to add only needing a few classes. For some reason though my brain broke, thinking that I could dynamically
-
How to kill ollama server
I recently updated [ollama](https://ollama.com/), and it now installs a systemd service that I was not expecting. Seems like a great option, but I hadn't
-
Composing Typer clis
Typer makes it easy to compose your cli applications, like you might with a web router if you are more familiar with that. This allows you to build smaller app
-
tailwind arbitrary values
I learned not to fear the arbitrary size feature of tailwind. While building out [reader.waylonwalker.com](https://reader.waylonwalker.com) I kept getting cont
-
fix npm global install needs sudo
Each time I go to set up npm I am frustrated by the errors saying that I don't have permission to `npm i -g <package>`, and it's frustrating. A
-
darkmode scrollbars
If you are designing a website in dark mode the scrollbars can be finicky to match the theme. Here is a pretty sane default that looks nice without being obnox
-
Udating Cloudflare Pages using the Wrangler cli
Before deploying to cloudflare pages with wrangler you need a cloudflare api token. You can get one at [dash.cloudflare.com/profile/api-tokens](https://dash.cl
-
scheduling cron jobs in kubernetes
For my reader app I am using cronjobs to schedule my a new build and upload to cloudflare pages every hour. In this example I have built a docker image `docker
-
jinja macros
I am working on a page for [htmx-patterns](https://htmx-patterns.waylonwalker.com) and I ran into a situation with lots of duplication. Especially when i am us
-
jinja loop variable and htmx
jinja has a loop variable that is very handy to use with htmx. Whether you want to implement a click to load more or an infinite scroll this loop variable is v
-
fastapi jinja url_for with query params
Out of the box Starlette does not support url_for with query params. When trying to use url_for with query params it throws the following error. In my searchin
-
setting up a kind cluster with argocd installed
Kind (Kubernetes in Docker) is a tool that makes it easy to create and tear down local clusters quickly. I like to use it to test out new workflows. Argocd is
-
kubernetes kubeseal
In my homelab kubernetes cluster I am using kubeseal to encrypt secrets. I have been using it successfully for a few months now wtih great success. It allows m
-
nvim stupid gf bind
So after months of fighting with gf not going to template files, I finally decided to put in some effort to make it work. This was the dumbest keybind in my con
-
cli auth
Authentication from cli tools can be a bit of a bear, and I have to look it up every time. This is my reference guide for future me to remember how to easily do
-
Hiding Form input During htmx Request
I am working on fokais.com's signup page, and I want to hide the form input during an htmx request. I was seeing some issues where I was able to prevent sp
-
Stripe Cancellations in FastAPI and SQLModel
Today I am working on fokais.com, trying to get to a point where I can launch by workig through stripe integrations. This is my first time using stripe, so ther
-
Still Loving Tailwind
![](https://images.waylonwalker.com/img-c8Fom5UqPWT6IzLefZ3YKU68.png) I've been using tailwind for a few months now and I can still say I'm loving it.
-
jpillora-installer
jpillora/installer is the install script generator I have been looking for. It downloads binaries for your machine from GitHub releases and unzips them for you.
-
how to host static content with fastapi
I wanted to host some static files through fastapi. Typical use cases for this might be some static web content like html/css/js. It could also be images or som
-
Set up minio bucket entrypoint
I recently se tup minio object storage in my homelab for litestream sqlite backups. The litestream quickstart made it easy to get everything up and running on l
-
Setup Tailwind for Jinja
I've recently given tailwindcss a second chance and am really liking it. Here is how I set it up for my python based projects. [https://waylonwalker.com/a-
-
Python scandir ignores hidden directories
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 per
-
Getting Started with Pydantic
Pydantic is a Python library for serializing data into models that can be validated with a deep set of built in valitators or your own custom validators, and de
-
setting up paru | installing from the AUR for the ...
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 packa
-
Releasing a New Version of Your Python Package Jus...
Quickly and easily create new versions of your Python package with the `gh release` command. Get the version number, changelog, and Releasing a new version of y
-
Arch Linux Randomly Rejecting Passwords
Fix Arch Linux randomly rejecting passwords with one command. Try 'faillock --user $USER' to reset login counter and regain access. Quick solution for
-
dash e your github docker actions
Give github actions the -e flag in the shebang `#!` so they fail on any one command failure. Otherwise each line will set the exit status, but only the last one
-
ssh copy id
I recently setup some vm's on my main machine and got sick of signing in with passwords.
-
ssh key permissions
I just shared some ssh keys with myself and ran into this error telling me that I did not set the correct permissions on my key. I changed them with the followi
-
formatme
-
nvim navic
With the latest release of version of nvim 0.8.0 we get access to a new winbar feature. One thing I have long wanted somewhere in my nvim is navigation for pai
-
pipx textual devtools
I really like having global cli command installed with pipx. Since textual `0.2.x` (the css release) is out I want to be able to pop into textual devtools easi
-
textual app devtools
I am working through the textual tutorial, and I want to put it in a proper cli that I can pip install and run the command without `textual run --dev app.py`. T
-
caching python virtual environments in GitHub Acti...
-
Markata GitHub Pages
11ty https://www.rockyourcode.com/how-to-deploy-eleventy-to-github-pages-with-github-actions/ hugo puts it in the base url https://gohugo.io/getting-started/con
-
obs virtual camera on boot
For far too long I have had to fidget with v4l2oloopback after reboot. I've had this happen on ubuntu 18.04, 22.04, and arch. After a reboot the start vir
-
localstack status permission
I ran into an issue where I was unable to ask localstack for its status. I would run the command and it would tell me that it didn't have permission to rea
-
running aws cli commands with localstack
Upon first running an `aws` cli command using localstack you might end up with the following error. Easy way The easy easiest way is to leverage a package calle
-
Markata Supports Jinja Plugins 0.5.0.dev2
Markata now allows you to create jinja extensions that will be loaded right in with nothing more than a `pip install`. From the Changelog The entry for 0.5.0.de
-
Using Django Rest Framework inside react
-
Getting Started with Django REST framework
In my adventure to learn django, I want to be able to setup REST api's to feed into dynamic front end sites. Potentially sites running react under the hood
-
Markata now uses hatch
Markata now uses hatch as its build backend, and version bumping tool. `setup.py`, and `setup.cfg` are completely gone. !["An astronaut working in a lab, t
-
django create superuser
My next step into django made me realize that I do not have access to the admin panel, turns out that I need to create a cuper user first. !["cybernetic so
-
django disallowed host
I am continuing my journey into django, but today I am not at my workstation. I am ssh'd in remotely from a chromebook. I am fully outside of my network,
-
django polls app
![creating a new app called polls](https://screenshots.waylonwalker.com/djangopolls-startapp.png)
-
Trying out django
I have no experience in django, and in my exploration to become a better python developer I am dipping my toe into one of the most polished and widely used web
-
how to escape variables in jinja templates
While updating my site to use Markata's new configurable head I ran into some escaping issues. Things like single quotes would cause jinja to fail as it w
-
I've made my ipython config too complicated, let's...
When I am developing python code I often have a repl open alongside of it running snippets ofcode as I go. Ipython is my repl of choice, and I hace tricked it
-
markata extend in configuration
![Astronauts stunting some stylish color explosion](https://stable-diffusion.waylonwalker.com/000172.2339173599.webp) A long needed feature of markata has been
-
Create a new Python Project with the Hatch Cli
I'm really getting into using hatch as my go to build system, and I am really liking it so far. I am slowly finding new things that just work really well
-
GitHub Actions Delete all Workflow Runs
Today I ran a bunch of actions, but I wanted to clean up all the runs that I used to get it setup so that I had a good clean history to refer back to later. I f
-
Versioning Python Projects with Hatch
Hatch has an amazing versioning cli for python packages that just works. It takes very little config to get going and you can start bumping versions without wo
-
From Markdown to Blog with Markata | lightning tal...
Markata is a great python framework that allows you to go from markdown to a full website very quickly. You can get up and running with nothing more than Markd
-
I spoke at Python Web Conf 2022
I spoke at python webconf in March 2022 about how I deploy this blog on a continuous basis. Building this blog has brought me a lot of benefits. I have a set o
-
I turned on 2FA for all of my pypi packages
I got all the pypi packages that I own behind 2 factor authentication. 💪 Recently this really made it's rounds in the python news since pypi was requiring
-
use vim to remove duplicates
I just love how some features of vim are so discoverable and memorable once you really start to grasp it. Sorting and uniqing your files or ranges is one of th
-
Highlighting text ranges with Rich | python
Today I've been playing with [py-tree-sitter](https://github.com/tree-sitter/py-tree-sitter) a bit and I wanted to highlight match ranges, but was unable t
-
Highlighting text ranges with Rich | python
{% for year in markata.map("date.year", filter='published')|unique %} {{ year }} {% for post in markata.map('post', filter="p
-
vimgrep open buffers
How to vimgrep over hidden files. I needed to delete all build pipeline steps that were named `upload docs`. I currently have about 60 projects running from th
-
markata 0.3.0 is 15-20% faster
![image from Dall-e](https://images.waylonwalker.com/DALL%C2%B7E%202022-08-21%2015.03.04%20-%20An%20expressive%20oil%20painting%20of%20a%20sprinter%20edging%20o
-
How to Disable Kedro Viz | or any kedro hook
-
Gpu Stats in my linux statusbar
![polybar gpu stats](https://images.waylonwalker.com/polybar-gpu-stat.png)
-
get the version of any python package | python api
A common meta thing that I need in python is to find the version of a package. Most of the time I reach for `package_name.__version__`, but that does not always
-
arch Fonts
https://gist.github.com/YoEight/d19112db56cd8f93835bf2d009d617f7
-
Manage your displays with xrandr manager
![a stable diffusion done with a111 web ui](https://images.waylonwalker.com/9cd8d65495366b8d57d805ca0faf5fd5.webp) xrandr is a great cli to manage your windows
-
Get better at jq interactively | ijq
[[jut]] [kedro-node](/pages/blog/kedro-your-first-nodes.md) [[kedro-pickle]]
-
Two new shell aliases for git
![Astronaut doing a mic drop with explosion](https://stable-diffusion.waylonwalker.com/000172.3260819219.webp) Recently I added two new bash/zsh aliases to make
-
IPython q to exit
So many terminal applications bind `q` to exit, even the python debugger, its muscle memory for me. But to exit ipython I have to type out `exit<ENTER>`.
-
Copier Slugify | python templating | using cookiec...
It's no secret that I love automation, and lately my templating framework of choice has been copier. One hiccup I recently ran into was having spaces in m
-
gh repo create
I love getting faster in my workflow, something I have recently added in is creating GitHub repos with the cli. I often create little examples of projects, but
-
Textual has devtools
Textual has devtools in the upcoming css branch, and its pretty awesome! It's still early Textual is still very early and not really ready for prime time,
-
Python atexit
totally guessed at this post's date I'm still trying to understand this one, but this is how you force a python object to stop atexit.
-
The one pip config you need to have
Whenever you are installing python packages, you should always use a virtual environment. pip makes this easy to follow by adding some configuration to pip. re
-
pyenv no module named '_sqlite3'
I've been trying to adopt pyenv for a few months, but have been completely blocked by this issue on one of the main machines I use. Whenever I start up ip
-
git merge ours
Sometimes you have a pretty old branch you are trying to merge into and you are absolutely sure what you have is what you want, and therefore you don't wan
-
vim plugged snapshot
A few of my friends and I all just borked our neovim configs during a plug update, and because none of us were using `:PlugSnapshot` it was painful to recover f
-
qutebrowser clean up all status bars
I really like the super clean look of no status menus, no url bar, no bookmarks bar, nothing. Don't get me wrong these things are useful, but honestly the
-
convert your qutebrowser config to config.py
When you first start qutebrowser It will create some config files in your home directory for you, but they will be empty. Config As far as I know qutebrowser wi
-
Bash function to edit scripts faster
I am often editing my own scripts as I develop them. I want to make a better workflow for working with scripts like this. Currently Currently I am combining `nv
-
List all git commits with GitPython
I am getting ready to do some timeseries analysis on a git repo with python, my first step is to figure out a way to list all of the git commits so that I can a
-
GPG signing commits over ssh
I was editing some blog posts over ssh, when I ran into this error. gpg was failing to sign my commits. I realized that this was because I could not answer to
-
Review Pull Requests with git worktrees
Sometimes you get a PR on a project, but cannot review it without wrecking your current working setup. This might be because it needs to be compiled, or a new
-
Using Git from Python
`GitPython` is a python api for your git repos, it can be quite handy when you need to work with git from python. Use Case I recently made myself a handy tool f
-
pipx on windows
Python, click install Edit the System Environment Variables Environment Variables button Add the following path to your users Path Variable
-
Python sys.excepthook
Sometimes you just want python to do something else when you hit an exception, maybe that's fire a text, slack message, email, or system notification like
-
A TTY Can Save Your Bacon
I recently was unable to boot into my home Linux Desktop, it got stuck at diskcheck `fsck`. I found that I was able to get in to a tty through a hotkey. https:
-
pygame events are queued | Don't make this mistake
pygame events are stored in a queue, by default the most suggested way shown in all tutorials "`pumps`" the queue, which removes all the messages. sta
-
Display Sprites in Pygame | Load and Blit
One of the most essential concepts of pygame to start making a game you will need to understand is loading images and blitting them to the screen. **blit** stan
-
Mixing Colors at the Command Line
From the same Author that brought us command line essentials like `fd` and `bat` written in rust comes [pastel](https://github.com/sharkdp/pastel) an incredible
-
Dunk is my new diff pager
[Dunk](https://github.com/darrenburns/dunk) is a beautiful git diff tool built on top of [rich](https://github.com/Textualize/rich). Browsing through twitter th
-
Pygame Boilerplate Apr 2022
I'm poking a bit into gamedev. Partly to better understand, partly because it's stretching different parts of my brain/skillset than writing data pip
-
Unzip minecraft mods to their directory from the c...
This morning I was trying to install a modpack on my minecraft server after getting a zip file, and its quite painful when I unzip everything in the current dir
-
Did my site build just go down?
My personal Site build went down last week, and I was unable to publish a new article. This is the process I went through to get it back up and running quickly
-
Don't inherit from python BaseException, Here's wh...
I ran into a PR this week where the author was inheriting what BaseException rather than exception. I made this example to illustrate the unintended side effec
-
How I make cache-keys from python objects
When I need a consistent key for a pythohn object I often reach for `hashlib.md5` It works for me and the use cases I have. diskcache Yesterday we talked about
-
How I setup a sqlite cache in python
When I need to cache some data between runs or share a cache accross multiple processes my go to library in python is `diskcache`. It's built on sqlite wi
-
Cache a python function with lru_cache
The easiest way to speed up any code is to run less code. A common technique to reduce the amount of repative work is to implement a cache such that the next t
-
Set User Agent on pandas read_csv
I keep a small [cars.csv](https://waylonwalker.com/cars.csv) on my website for quickly trying out different pandas operations. It's very handy to keep aro
-
Get Webpage with python requests
Python's requests library is one of the gold standard apis, designed by Kenneth Reitz. It was designed with the user perspective in mind first and impleme
-
Ease into htmx with htmx-get
I recently attended [python web conf 2022](https://2022.pythonwebconf.com/) and after seeing some incredible presentations on it I am excited to give [htmx](htt
-
Style Lookatme Slides a bit more Personal
I recently gave a talk at python web conf 2022, and one of the things I did when I should have been working on my presentation was workig on how my presentation
-
How I load Markdown in Python
I use a package [eyeseast/python-frontmatter](https://github.com/eyeseast/python-frontmatter){.hoverlink} to load files with frontmatter in them. Its a handy p
-
Python's Dict Union Operator | Pep 584
Today I was watching the python web conf 2022 and saw [@davidbujic](https://twitter.com/davidvujic) use the new Dict Union Operator Live on stage during his [Fu
-
How I Present Markdown Slides from the Terminal
I love the freedom of writing in markdown. It allows me to write content from the comfort of my editor with very little focus on page style. It turns out that
-
How I read Files in Python
When I need to read contents from a plain text file in python I find the easiest way is to just use `Pathlib`.
-
Automatically Generate a list of Markdown Links in...
Let's make a vim command to automatically collect all the links in these posts at the end of each article. Regex confuses the heck out of me... I don'
-
Create a Swapfile on Your Linux Machine
If you ever end up on a linux machine that just does not have enough ram to suffice what you are doing and you just need to get the job done you can give it som
-
How I glob for Files in Python
A very common task for any script is to look for files on the system. My go to method when globbing for files in python is to use pathlib. Setup I setup a dire
-
Set Your Git Pager Config
Setting up your git pager to your liking can help you navigate diffs and logs much more efficiently. You can set it to whatever pager you like so that your key
-
Configure Git to Autocorrect Your Fat Fingers
If you have ever mistyped a git command very close to an existing one you have likely seen this message. Automatically run the right one What you might not have
-
Install yq | A light weight yaml parser cli
`yq` is a command line utility for parsing and querying yaml, like `jq` does for json. This is for me I love that all of these modern tools built in go and rust
-
pytest-mock Basics
Last Thursday I learned about `pytest-mock` at a local python meetup. The presenter showed how he uses `pytest-mock` for his work, and it was kinda eye opening
-
Python Walrus Inside List Comprehension
Python 3.8 came out two and a half years ago and I have yet to really lean in on the walrus operator. Partly because it always seemed like something kinda sill
-
Make Kedro Runs Beautiful
Kedro rich is a very new and unstable (it's good, just not ready) plugin for kedro to make the command line prettier. Install kedro rich There is no pypi p
-
Git Worktrees are not so Scary
So worktrees, I always thought they were a big scary things. Turns out they are much simpler than I thought. Myth #1 _no special setup_ I thought you had to be
-
Configure Git to Always Push to the Current Branch
Has no upstream branch errors in git can be such a damn productivity killer. You gotta stop your flow and swap over the branch, there is a config so that you do
-
Setup SSH from chromebook to home desktop
I write many of these posts from a 10 year old desktop that sits in my office these days. It does a very fine job running all of the things I need it to for my
-
Mermaid Highlight
Mermaid gives us a way to style nodes through the use of css, but rather than using normal css selectors we need to use `style <nodeid>`. This also appli
-
Open Files with Nvim Remote
I recently found a really great [plugin](https://github.com/mhinz/neovim-remote) by [mhinz](https://github.com/mhinz) to open files in neovim from a different t
-
Grouping Mermaid nodes in Subgraphs
Mermaid provides some really great ways to group or fence in parts of your graphs through the use of subgraphs. Here we can model some sort of data ingest with
-
Dedupe your shell paths
If you have ever ran `which <command>` and see duplicate entries it's likely that you have duplicate entries in your $PATH. You can clean this up wi
-
Simple Plain Text Diagrams in HTML
Since GitHub started supporting mermaid in their markdown I wanted to take another look at how to implement it on my site, I think it has some very nice opportu
-
Bash mktemp
There is GNU coreutils command called `mktemp` that is super handy in shell scripts to make temporary landing spots for files so that they never clash with anot
-
Recover a lost git branch with checkout
Once you give a branch the big D (`git branch -D mybranch`) its gone, its lost from your history. It's completely removed from your log. There will be no
-
git find deleted files
It's nearly impossible to completely loose a file if it is commited to git. It's likely harder to fully remove the file than it is to recover it, but
-
git diff-filter
Git commands such as `diff`, `log`, `whatchanged` all take a flag called `--diff-filter`. This can filter for only certain types of diffs, such as added (A), m
-
Textual Popup Hack
As I am toying around with textual, I am wanting some popup user input to take over. Textual is still pretty new and likely to change quite significantly, so I
-
Install obs flatpak
Big announcement recently that obs studio now builds out to a flatpak, hopefully making it easier for all of us to install, especially us near normies that don&
-
GitHub Markdown now Supports Mermaid Diagrams
Mermaid diagrams provide a way to display graphs defined as plain text. Some markdown renderers support this as a plugin. GitHub now supports it. example You c
-
Git rebase to the beginning of time
Git has a built in way to rebase all the way back to the beginning of time. There is no need to scroll through the log to find the first hash, or find the tota
-
Glances can watch docker processes
Glances is a system monitor with a ton of features, including docker processes. I have started using portainer to look at running docker processes, its a great
-
Revive files from the dead with git
Git reflog can perform some serious magic in reviving your hard work from the dead if you happen to loose it. caveat You must git commit! If you never commit t
-
Glances webui with pipx
Glances has a pretty incredible webui to view system processes and information like htop, or task manager for windows. The nice thing about the webui is that it
-
Git reflog is an alias for git log -g
Right inside the git [docs](https://git-scm.com/docs/git-reflog#_description), is states that the `git reflog` command runs `git reflog show` by default which i
-
Run glances without install with pipx
Glances is a fully featured system monitoring tool written in python. Out of the box it's quite similar to htop, but has quite a few more features, and ca
-
Nested requirements.txt in python
python requirements text files can in fact depend on each other due to the fact that you can pass pip install arguments right into your `requirements.txt` file.
-
Modded Minecraft in Docker
In my adventure to put more homelab in docker, I moved our modded minecraft setup to docker. Getting Mods So far I have found all of our mods from [curse forge]
-
View AWS event bridge rules with visidata
Reading eventbridge rules from the command line can be a total drag, pipe it into visidata to make it a breeze. I just love when I start thinking through how to
-
Vim remaps use cmd in place of :
Anyone just starting out their vim customization journey is bound to run into this error. I did not get it I'll admit, in hindsight it's very clear wh
-
A better copy-mode bind for Tmux
The default keybinding for copy-mode `<prefix>-[` is one that is just so awkward for me to hit that I end up not using it at all. I was on a call with my
-
Python string of letters is a string of letters, b...
In python, a string is a string until you add special characters. In browsing twitter this morning I came accross this tweet, that showed that you can use `is`
-
Bluetooth at the command line on Ubuntu
One thing about moving to a tiling window manager like awesome wm or i3 is that they are so lightweight they are all missing things like bluetooth gui's ou
-
Read stderr from python subprocess.Popen
I often run shell commands from python with Popen, but not often enough do I set up error handline for these subprocesses. It's not too hard, but it can b
-
Simple Samba Share Setup
Samba is an implementation of the smb protocol that allows me to setup network shares on my linux machine that I can open on a variety of devices. I think the h
-
ag silver searcher look ahead and look behind
A super useful tool when doing PR's or checking your own work during a big refactor is the silver searcher. Its a super fast command line based searching
-
Running a Minecraft Server in Docker
I've ran a Minecraft server at home since December 2017 for me and my son to play on. We start a brand new one somewhere between every day and every week.
-
Installing Rust and Cargo on Ubuntu 21.10 using An...
Installing rust in your own ansible playbook will make sure that you can get consistent installs accross all the machines you may use, or replicate your develop
-
Using a Python Markdown ast to Find All Paragraphs
In looking for a way to automatically generate descriptions for pages I stumbled into a markdown ast in python. It allows me to go over the markdown page and g
-
Neovim Config for Git
Creating a minimal config specifically for git commits has made running `git commit` much more pleasant. It starts up Much faster, and has all of the parts of
-
python dict get
For an embarassingly long time, til today, I have been wrapping my dict gets with key errors in python. I'm sure I've read it in code a bunch of time
-
Nix Versions By Commit Count
I was listening to [shipit37](https://changelog.com/shipit/37) with Vincent Ambo talking about building fully declaritive systems with nix. Vincent is building
-
Find all Headings with BeautifulSoup
BeautifulSoup is a DOM like library for python. It's quite useful to manipulate html. Here is an example to find_all html headings. I stole the regex fr
-
Lambda Function as a Kedro Node
I keep my nodes short and sweet. They do one thing and do it well. I turn almost every DataFrame transformation into its own node. It makes it must easier to
-
How to Properly Simulate Stow
-
A Good Use for global .gitignore
I've never found a great use for a global `.gitignore` file. Mostly I fear that by adding a lot of the common things like `.pyc` files it will be missing
-
Squoosh cli
Today I discovered a sweet new cli for compressing images. [squoosh cli](https://github.com/GoogleChromeLabs/squoosh/tree/dev/cli) is a wasm powered cli that su
-
Add New Dependencies to Your Kedro Project
As you work on your kedro projects you are bound to need to add more dependencies to the project eventually. Kedro uses a fantastic command `pip-compile` under
-
Practice making pipelines with kedro
I am a huge believer in practicing your craft. Professional athletes spend most of their time honing their skills and making themsleves better. In Engineering
-
Tmux and Vim Clipboard for Ubuntu
One of the first things I noticed broken in my terminal based workflow moving from Windows wsl to ubuntu was that my clipboard was all messed up and not working
-
nix rescues modded minecraft night
With the latest version of minecraft it requires a very new, possibly the latest, version of java. Lately we have been getting into modded minecraft and I main
-
Tmux hotkey for copier templates
I have added a hotkey to my copier template setup to quickly access all my templates at any time from tmux. At any point I can hit `<c-b><c-b>`, th
-
Markata Filters as Telescope Pickers in Neovim
I often pop into my blog from neovim with the intent to look at just a single series of posts, `til`, `gratitude`, or just see todays posts. [Markata](https://m
-
Copier Tasks | Python templating post run task
Copier allows you to run post render tasks, just like cookiecutter. These are defined as a list of `tasks` in your `copier.yml`. They are simply shell commands
-
Gradual Typing in Python
I've referenced a video from Anthony Sotile in passing conversation several times. Walking through his gradual typing process has really helped me underst
-
Python Reverse Sluggify
In order to make an auto title plugin for markata I needed to come up with a way to reverse the slug of a post to create a title for one that does not explicitl
-
fuzzy wallpaper with fzf
I really appreciate that in linux anything can be scripted, including setting the wallpaper. So everytime I disconnect a monitor I can just rerun my script and
-
Get Python docstring with ast
Getting docstrings from python's ast is far simpler and more reliable than any method of regex or brute force searching. It's also much less intimida
-
Python Respect the .gitignore
Many tools such as ripgrep respect the `.gitignore` file in the directory it's searching in. This helps make it incredibly faster and generally more intui
-
Rename Python Variables with nvim
I don't use refactoring tools as much as I probably should. mostly because I work with small functions with unique names, but I recently had a case where
-
Python Find Available Port
When running a python process that requires a port it's handy if there is an option for it to just run on the next avaialble port. To do this we can use t
-
python functools total ordering
functools.total_ordering makes adding all of six of the rich comparison operators to your custom classes much easier, and more likely that you remember all of t
-
Implement --pdb in a python cli
Adding a `--pdb` flag to your applications can make them much easier for those using it to debug your application, especially if your applicatoin is a cli appli
-
Converting markdown to pdf with pandoc on linux
Converting markdown posts to pdf on ubuntu takes a few packages from the standard repos. I had to go through a few stack overflow posts, and nothing seemed to
-
Python Enum
Python comes with an enum module for creating enums. You can make your own enum by inheriting importing and inheriting from Enum. auto incrementing Enum values
-
Installing Pipx on Ubuntu
I recently paired up with another dev running windows with Ubuntu running in wsl, and we had a bit of a stuggle to get our project off the ground because they w
-
2 minutes to stow
Stow is an incredible way to manage your dotfiles. It works by managing symlinks between your dotfiles directory and the rest of the system. You can then make
-
Using Copier Answers to rerun templates quickly
The copier answers file is a key component to making your templates re-runnable. Let's look at the example for my setup.py. Inside of my `[[ _copier_conf.
-
Making a Textual Widget from a Rich Renderable
Once you have made your sick looking cli apps with rich, eventually you are going to want to add some keybindings to them. Currently Textual, also written by [
-
Remove Vim Tab Characters
I've been stuck many times looking at a vim buffer with little question marks at the beginning of each line and trying to get rid of them. for so long I d
-
Tmux Pop size
tmux popups can be sized how you like based on the % width of the terminal on creation by using the flags (h, w, x, y) for height, width, and position. example
-
Changing copier template strings (_endops)
I was completely stuck for awhile. copier was not replacing my template variables. I found out that adding all these `_endops` fixed it. Now It will support
-
copier template variables
I've been looking for a templating tool for awhile that works well with single files. My go to templating tool `cookiecutter` does not work for single fil
-
Running Kedro on Ubuntu 21.10 Impish Indri
I just installed a brand new Ubuntu 21.10 Impish Indri, and wanted a kedro project to play with so I did what any good kedroid would do, I went to my command li
-
A Minimal Pluggy Example
Pluggy makes it so easy to allow users to modify the behavior of a framework without thier specific feature needing to be implemented in the framework itself. I
-
List all the files containing a phrase
One of the most useful skills you can acquire to make you faster at almost any job that uses a computer is getting good at finding text in your current working
-
My first impressions with pyenv
pyenv provides an easy way to install almost any version of python from a large list of distributions. I have simply been using the version of python from the o
-
Installing Homebrew on Linux
Installing brew on linux proved quite easy and got pyenv running for me within 4 commands. I had never used homebrew before, honestly I thought it was a mac onl
-
Serve html from your command line
When I first moved to vim from and ide like vscode or sublime text one of my very first issues was trying to preview my website at `localhost:8000`. There had
-
Opening files in vim from output of command
Many command line tools can output a list of files, this is quite powerful. I often want to search for something, then open it from a fuzzy picker. This can be
-
Finding hidden (dotfiles) using Telescope in neovi...
Finding hidden files using Telescope as you fuzzy file finder is not too hard, its a single flag passed in. Then it will use whichever file finder it can find
-
Installing system nerd-fonts with ansible
Lately I've been on a journey to really clean up my dotfiles, and I was completely missing fonts. I noticed jumping into a new vm I had a bunch of broken
-
Installing packages with ansible only if they do n...
Part of my neovim setup requires having the `black` python formatter installed and callable. I install it with `pipx` so that I don't have to manage a vir
-
Adding __rich__ methods to python classes
Adding a `__render__` method that returns a rich renderable to any python class makes it display this output if printed with rich. This also includes being nes
-
fugitive verbose commit
Fugitive comes with a pretty sick way to commit files and see the diff at the same time with verbose commit. Opening the fugitive menu with `:G` brings up your