CLI fuzzy search

I often whish to search through large bodies of text, like my knowledge base or source code repositories, from the command line.

I use fuz for this and I’m quite happy with it.

I also have it aliased to my knowledge base folder for even easier searching.

alias search="fuz -p /path/to/knowledge-base/"

Render Plain HTML with Hugo

Hugo is my favorite tool for publishing markdown to the internet, but sometimes I want to do something a little bit more advanced with my posts.

With this shortcode I can always just fall back to plain old HTML.

[Read More]
hugo 

Ansible and cowsay

Cowsay is one of those packages you just end up installing randomly on just about any client over time.

And if your using ansible you may be in for a little surprise:

[Read More]

Django: CSRF exempt view

Django’s CSRF protection is usually a great thing, but when building (API) endpoints meant to be accessed by scripts/third parties it gets in the way of that.

This is how to disable it:

For a class based view

from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt

@method_decorator(csrf_exempt, name='dispatch')
class MyView(View):
    pass

For a function based view

from django.views.decorators.csrf import csrf_exempt

@csrf_exempt
def my_view(request):
    pass

My Publishing Pipeline

I write an extensive personal knowledge base using markdown, code-server and a variety of other tools. Originally, in 2021, I wanted to have something like Obsidian Publish but self-hosted, so I created it.

Over time my knowledge base evolved more into a second brain, tracking not only my technical notes and journal, but also things like recipes and hikes. With this my publishing pipeline, and the script at it’s core, extended in a multitude of ways.

[Read More]

Simple Self Organization

Simple Self Organization

This is a guide to a simple self organization/task management system I built for myself over the years.

From time to time I showed it to someone and they got some benefits from it, most adapted it to better fit their needs down the line, which is exactly what you should do with any kind of personal task management in my opinion.

[Read More]

HTMX

Go check out their website, it’s incredibly good at explaining itself.

To me, a backend heavy developer, HTMX is the frontend framework I like to use because:

  • It does not feel like a JavaScript framework at all, but more like an extension of the HTTP/HTML model
  • It allows me to write interfaces that feel responsive and modern to users while still doing all the heavy lifting in my backend with the tools I’m used to
  • It works with my mental model, which is heavily based on the request-response cycle

Handling signals with Python

When building a Python script that is long running or has to manage some state on termination it is helpful to handle a couple of signals: SIGINT: The signal sent when pressing Ctrl+C SIGTERM and SIGQUIT: Meant to terminate the process, sent by kill and process managers like systemd or supervisord Handling them is possible with Pythons signals library: import signals class SignalHandler: stop = False def __init__(self): # Ctrl+C signal. [Read More]
python