ARTICLES

Computing

Publishing and Signing WinForms Apps

dot what? Use (2024) .NET 8.0. ##Visual Code Digital Signing Digicert hardware key must be physically present (no private key in software now allowed) Sign .exe and .msi of the app (?) Ensure your clock …

Encode custom models to Django's JSONField

Problem Say you have a Class like this: class Device(): def __init__() ref = 333 name = "sweet one" things = { ... of things... } when = datetime.now() and then you want to serialise …

image 41

Quick Debug with VSCode and debugpy

Need to debug a random python process? Overview Add the code below where you wanna break. Start the process with the debugpy modoule Use VSCode to connect to listening debugger 1 Add Code def somefunction(): …

Panda Bears and Pythons

I've seen import pandaas and and numpy around the traps and thought 'geez, that'll be a long install. Today I saw why it's gooda. Some things I learnt: Python on windows is crap. Try conda …

Using Riverpod with Flutter

I'm new to app development. This is 2023 notes about state management in Flutter using Riverpod. Code generation Probably better NOT to use this at the start, it's another layer of complexity. But it's nice …

Make Apps with Flutter

I need to make an app. I'm an experienced programmer. These are my 2023 notes. Getting Started I choose Flutter to (hopefully) have a single code base for Andriod, iOS and (maybe) Web. Inital impressions …

Multi-Tenant Grafana with DRF

While looking at Grafana Multi-Tenant arrangements, I realised it's problematic to have a multi-tenant SQL database accessed by Grafana. One solution is to use the X-GRAFANA-USER. If we can trust this header it will allow …

image 34

Django Object-level Permissions with DRF and Rules

Finding a simple way to limit API users' permissions to certain objects. We want an API via Django, so we use DRF. We want object-level permissions so we use django-rules . There are other options …

Signing Windows Apps

Background: I've created some windows apps (winforms with .Net 4 and a WinWord x64 Add-In). These are packaged up into .msi installers by Advanced Installer. I need to digitally sign them to allow installation with …

Django Development and Staging

I have two boxes: dev and production. I need a very simple method for working on the dev machine and then pushing to production. Environment Use direnv to maintain environment based on directory. Use two …

Postgres Tricks

Log-the-frick-in sudo -u postgres psql dbname # typical root user psql -h localhost -U user -W dbname # default host is unix-domain (not tcp to localhost) More detail here. Create read-only user # login to …

Why the hell can't I login to PostgreSQL?

Some possible reasons and solutions Wrong host Use the "-h" flag : psql -h localhost -U phisaver --password Wrong syntax Use -U and -W flags for user and password psql -U fred -W > prompts …