Real-time notifications with Django-channels, HTMX and Server Sent Events

When using HTMX with Django, you may have come across the problem of updating HTML components in real-time based on changes that happen to the underlying data in the database. The simplest way to make real-time updates to html elements is for the client to regularly poll the backend for updates. HTMX makes this easy with polling. However, there are two issues with this: It’s not really “real-time”. You are polling the backend at a regular interval, but the data could have changed at any time in the interval.

ChatGPT: Improving the software developer experience

Every man and his bot has an opinion on ChatGPT, and I’m sure I’m not adding anything novel to the discussion here. But after using it for a day, here are my thoughts: I’m finding it immensely useful for at least the following use-cases: 1. Completing small annoying technical tasks. As an example, I was trying to mount a synology drive in Ubuntu. I had previously used NFS, but had forgotten the correct incantation to do it again.

An Ansible Adventure: Using the Python API to list unmanaged packages

I’ve been trying to get into the habit of managing an ansible playbook to keep track of any manual installations or config tweaks I do on my local machine. No matter how vigilant you are though, there will always be packages you install that slip through the cracks. It would be great for example if you could run an ansible playbook which runs all the relevant install tasks, and then provides you a list of these “unmanaged packages” that are not handled by the playbook:

Traffic Shaping Processes in Linux

I live in Australia, and while this is on the whole a lovely country, our internet sucks. Check out my awesome upload speed: Now while this does not cause me grief for the most part, I recently attempted to upload a large number of photos to Google Drive. And as soon as I set Google’s Backup and Sync App (in Windows) to run in the background - Me and everyone else in the house could no longer access the internet.

Understanding Python Decorators

Python decorators seem to be one of those mysterious parts of python code that other people write, and you just use. Here, we’ll be building a simple, but useful decorator from scratch and adding new functionality step by step to try and gain a better understanding of how decorators work, and how they can be used. For reference, python wiki provides an excellent library of python decorator patterns, from which we will steal the Retry example.

Kerberos: A Practical Overview of Principals and Keytabs

Kerb Your Enthusiasm - What is this all about? Despite the readily available documentation on Kerberos, I’ve found that many people are still confused about kerberos concepts such as keytabs, principals and tickets. The issue is compounded by the fact that there are also terms outside of the protocol specification that get thrown around such as “headless keytabs”. There have already been excellent posts written on this topic, such as this one, and I acknowledge that I may be covering some of the same material.

Openstack Neutron: L2 Networking In Depth

Openstack networking is often a wondrous, complex and perplexing beast to the uninitiated. This post is my attempt to dissect a portion of the Openstack networking stack to figure out how it works. There will be a bit of history, code, and theory - something for everyone. When you start to explore Openstack, you quickly realise that it is extremely flexible in the range of technologies and vendor specific physical equipment it supports - especially when it comes to networking.

Setup an Openstack Project (with Dedicated Physical Hosts)

1. Opening it up to the Masses If you are using Red Hat Openstack, then you have already made the decision to empower your employees with the ability to manage and operate their own virtualization compute and storage environments. But before you can give any old John Smith this superpower, you need to manage and restrict the level of access he has, as well as logically separating your infrastructure into isolated projects.

Getting Found on Google

I know what you’re thinking - how hard can it be to get your site on Google? Can’t I just pay some internet wizard to sprinkle some SEO fairy dust and make my site appear at the top of the searches? You probably could. But hey, call me old fashioned - but I like to know exactly how I achieved something, and I’d like to have played some part in it.

Storage Gymnastics: Migrating Openstack Volumes (The Unconventional Way)

0. Background As part of my day job, I help to manage a large Openstack cluster with a large number of virtual instances running on physical infrastructure. Things often go wrong, and sometimes you have to get creative to solve them. Today, someone reported that a particular instance had failed catastrophically (due to a layer 8 malfunction), and could not be recovered. We decided it would be easier to rebuild a new instance rather than try and fix the instance (it was well and truly borked).