Skip to content

Instantly share code, notes, and snippets.

View maurerle's full-sized avatar

Florian Maurer maurerle

View GitHub Profile
@maurerle
maurerle / update-bat-hosts.lua
Last active August 24, 2024 00:20
update-bat-hosts - get the list of neighbours from the meshviewer to see in batctlcd
#!/usr/bin/lua
-- SPDX-FileCopyrightText: Florian Maurer
-- SPDX-License-Identifier: MIT
local jsonc = require("jsonc")
local function truncate_hostname(hostname, max_length)
-- If the hostname is already within the maximum length, return it as is
if #hostname <= max_length then
return hostname
@maurerle
maurerle / setup.sh
Last active May 21, 2025 05:57 — forked from giannello/setup.sh
Install fprintd-tod with support for Broadcom readers on Debian testing
#!/usr/bin/env sh
####################################################################
### ____ _____ ____ ___ _ _ _ ___ _ _ _ __ __ ###
### | _ \| ____| __ )_ _| / \ | \ | | / _ \| \ | | | \ \ / / ###
### | | | | _| | _ \| | / _ \ | \| | | | | | \| | | \ V / ###
### | |_| | |___| |_) | | / ___ \| |\ | | |_| | |\ | |___| | ###
### |____/|_____|____/___/_/ \_\_| \_| \___/|_| \_|_____|_| ###
####################################################################
####### _ _ ___ _ _ ____ _ _ _ _ _____ _ _ ########
@maurerle
maurerle / backup-system.sh
Created October 13, 2024 17:00
backup script which backs up a whole linux installation doing incremental backups using rsync
#!/bin/bash
# backup script which backs up a whole linux installation doing incremental backups using rsync
# Check for root priviliges
if [[ $EUID -ne 0 ]]; then
printf "Please run as root:\nsudo %s\n" "${0}"
exit 1
fi
set -o errexit
@maurerle
maurerle / compose.yml
Created April 14, 2025 08:09
OpenWebUi Docker Compose
services:
ollama:
image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}
container_name: ollama
volumes:
- ./ollama:/root/.ollama
ports:
- "11434:11434/tcp"
restart: unless-stopped
tty: true
@maurerle
maurerle / backup.sh
Last active May 28, 2025 14:00 — forked from Jipok/backup.sh
Backup HOME with restic, exclude trash, caches and other useless data
#!/usr/bin/env bash
# SET ENV VARIABLES FOR YOUR USE CASE
# export RESTIC_PASSWORD=
# export RESTIC_REPOSITORY=sftp:host:/mnt/folder
# Each element is the exclusion path
excludes=(
"$HOME/.local" # Local configuration and application files
"$HOME/.cache" # Temporary cache files