Archive

All posts

616 posts latest post 2026-10-06
Publishing rhythm
Jun 2026 | 3 posts

Systemd timer for syncoid

I have a bash script called which boils down to a barebones - I want to run this script hourly but as my user (notice the no-privilege-elevation flag) First - create a systemd unit file at Then we save the unit file, enable the service, and then start it Note this will run that script… so be ready for syncoid to do its thing Now for the timer… We create Hit it with a and you’re in business!

in /lib/systemd/system/docker.service there is an ExecStart command that got placed there when I setup Docker with Ansible - it threw the -H flag which told the daemon what hosts to setup. But I added the “hosts” key in my daemon.json and it broke - so removing the -H flag from the systemd unit fixed it

I regularly need to edit system config files - take /etc/sanoid/sanoid.conf as an example… I’ll want to play with something but if I don’t start Neovim as root then I get in trouble making edits I can’t save! So suda.vim gives me :SudaWrite which let’s me write that buffer with sudo privileges even though I’m Neovim is running with my login user!

I’m playing with my ansible playbook in a remote tmux session, and I’m no wiz so I don’t know the ins and outs, but I can’t scroll up to get any console log output that’s not already visible on my screen. So I’m starting to end my commands with | less so I can page through the console output!

ansible-playbook plays.yml -v --tags mytag | less

AJAX wasn’t cutting it, traditional crontab in containers doesn’t make much sense to me, webcron is recommended but I don’t want to register with anything outside my LAN… Turns out you can just spin up an identical container with a different entrypoint to /cron.sh that does what you need!

Note that this is a task in an Ansible playbook - but the docker-compose is straight forward

So the only thing you need to make sure of is that all the configuration options - data volumes, user permissions, etc. are identical between the containers running the cron job and the one actually hosting NextCloud. This ensures that the container running cron has proper access to the database and filesystem - or at least the same access as NextCloud proper.

- name: Nextcloud Cron Docker Container
  docker_container:
    name: nextcloud-cron
    image: "{{ nextcloud_image }}"
    pull: true
    links:
      - nextcloud-mysql:mysql
    entrypoint: /cron.sh
    volumes:
      - "{{ nextcloud_data_directory }}/nextcloud:/var/www/html:rw"
    env:
      MYSQL_HOST: "mysql"
      MYSQL_DATABASE: "nextcloud"
      MYSQL_USER: "{{ nextcloud_sql_user }}"
      MYSQL_PASSWORD: "{{ nextcloud_sql_password }}"
      NEXTCLOUD_TRUSTED_DOMAINS: "{{ nextcloud_hostname }}.{{ ansible_nas_domain }}"
      PUID: "{{ nextcloud_user_id }}"
      PGID: "{{ nextcloud_group_id }}"
      TZ: "{{ ansible_nas_timezone }}"
    restart_policy: unless-stopped
    memory: "{{ nextcloud_memory }}"

Logging instead of printing

I am trying to adopt logger.debug instead of print but ran into a confusing thing in ipython during Advent of Code… I riddled by script with logger.debug (yes after setting logging.setLevel('DEBUG')) but in ipython none of my log messages showed up!

import logging

logger = logging.getLogger(__name__)
logger.setLevel("DEBUG")

Turns out what I was missing was a call to basicConfig

import logging

# forget this and your messages are in the ether! or at least not seen in ipython...
logging.basicConfig()

logger = logging.getLogger(__name__)
logger.setLevel("DEBUG")

Bonus

Want your new messages to show up while iterating on something without killing the ipython kernel?

from importlib import reload
reload(logging) # to make sure you get new log messages you add while developing!

I wanted to break down some long lines in a Markdown table cell to make it look nicer on my blog but \n didn’t do anything for me… turns out
is the magic sauce

Column 1 Column 2
Key Doggo ipsum many pats. Borkdrive borking doggo doing me a frighten doggorino, noodle horse heckin. what a nice floof. Pupper borking doggo you are doing me a frighten, much ruin diet.
— —
Column 1 Column 2
Key Doggo ipsum many pats.
Borkdrive borking doggo doing me a frighten doggorino, noodle horse heckin.
what a nice floof.
Pupper borking doggo you are doing me a frighten, much ruin diet.
— —

Description of my proposed vimconf 2022 talk

Switching to Vim opened a whole new world to me for interacting with a computer and for getting things done. Before I adopted Vim I used GUIs for everything because I thought that’s how it had to be done… Notes in OneNote, code using a GUI editor, different notes in TiddlyWiki, slides for work in PowerPoint, slides for church using Logos, etc… Adopting Vim allowed me to disconnect a specific tool from the problem that tool is solving - because usually I just need to write text (notes, code, slides, etc.). Now, very nearly everything I do is from a text-based and git-based workflow… I put all my notes on basically anything just in my blog, which is all markdown and deployed to GH with Markata on every push (living dangerously pushing to main) - and that’s all done easily from Vim with nice syntax highlighting, fast response, integrated git-plugins, etc.. I keep project-specific task lists just in markdown files and I have Vim/tmux shortcuts to quickly add todos for any project (todo lis…

mkdir s{1..10} will make directories s1, s2, … s10 in one command!

Hebrew Bible Full Class

Class link Classroom notes (Must be on home network) 01 The Shape of the Hebrew Bible Session 1: What on Earth is the Hebrew Bible? # This class is not so much a survey of the HB, it is Tim’s attempt to distil the most helpful things for understanding it in a consumable way for laypeople. A chunk of this is the other people giving some of their own background. One lady said something that might be helpful for ministry - “Maybe that thing that I saw as ‘you don’t love me’ is ‘I don’t know how to love you’” how to love Maybe that thing that I saw as ‘you don’t love me’ is ‘I don’t know how to love you’ Christian coping strategy for the Olt Testament Hero-example model Stories get isolated and distilled down into a simple moral model, where the hero is just the hero. Veggie-Tales is uber-guilty of this nonsense There’s something correct about this - but the oversimplification usually comes out of a massive re-writting of the stories, then anyone raised on those versions of the story is sc…