Skip to content

Instantly share code, notes, and snippets.

View dominiwe's full-sized avatar
🐚
~

Domi dominiwe

🐚
~
View GitHub Profile

Sphinx event callbacks

The sphinx documentation generator can be extended by providing event callbacks. Events fire during different phases of the build and the functions are called.

The page event callbacks documents these. To see when which functions run, this little minimal conf.py file can be used.

# if using uv
uv venv
source .venv/bin/activate
@dominiwe
dominiwe / README.md
Last active August 13, 2025 11:08
Helper functions for rust development

Helper functions for rust development

These are helper functions for rust development inspired by Jeremy Chones cwt and cwe helper functions (however I call them rwt and rwe). They start examples or tests and watch them with bacon. This is nice when exploring in examples or doing a kind of test driven development.

These are best if you have fzf, bacon and bat installed but should also work with just bacon (that is needed and recommended, as cargo-watch is unmaintained). Add the function declarations in rust_helpers.bash to your initialization files (e.g. ~/.bashrc). To also get autocompletion for them, create files ~/.local/share/bash-completion/completions/{rwe,rwt} and add the contents of rwe_completion.bash and rwt_completion.bash. Note that the completion files have no file extension. I added an extension here so that the gist

@dominiwe
dominiwe / cicd-ssh-helper.bash
Last active April 8, 2023 21:31
A script which generates information to use ssh in a ci/cd pipeline.
#!/bin/env bash
set -euo pipefail
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo -e "This script takes a hostname as its only argument.
It will get the host key and print a base64 encoding of it to be used in a CI/CD variable.
It will also generate a new ssh key pair and print:
@dominiwe
dominiwe / uninstall-guix.md
Created December 27, 2022 14:27
Uninstall guix after installing it on top of an existing GNU/Linux system

How to uninstall guix

Date of creation: 2022-12-27

First of all, if the install script referenced here was used to install guix, ideally the output of that script as well as the script itself should have been saved somewhere. This makes it easier to see which components were installed and where and thus makes it easier for you to uninstall them.

As for me personally, I used the install script to install guix on a debian derivative distribution with systemd. This guide thus focuses on uninstalling guix from a debian derivative distribution but will probably work for your distribution as well with some slight changes.