Skip to content

Instantly share code, notes, and snippets.

View lauratheq's full-sized avatar

Laura The Q lauratheq

View GitHub Profile
#!/usr/bin/python3
"""
This module defines the `Hooks` class, which provides a flexible mechanism for managing
and executing hooks with associated callbacks.
The `Hooks` class supports the registration of hooks with specific names, priorities,
and callback functions. Hooks can be executed or applied in order of their priority to
perform actions or modify values.
@lauratheq
lauratheq / rename-branches.sh
Last active February 14, 2023 14:33
Renames the default branch to 'main' in gitlab for all accessible repositories
#!/bin/bash
# notice: you need jq for this
GITLAB_URL="<your gitlab url>"
GITLAB_API_ACCESS_TOKEN="<your gitlab access token>"
if [ -f repos.txt ]
then
rm repos.txt