Skip to content

Instantly share code, notes, and snippets.

@rokiden
rokiden / dumb_http_git.sh
Created August 7, 2024 10:59
Git mirror from one remote server to another through local or readonly mirror using Nginx
sudo docker run --name gitmir -v $PWD:/usr/share/nginx/html:ro nginx
@rokiden
rokiden / Uptime Kuma desktop notification
Last active November 18, 2024 07:57
Uptime Kuma desktop notification daemon using notify-send
Uptime Kuma running on the same machine in docker container.
Kuma Setup:
Settings - Setup Notification:
Notification Type: Webhook
Friendly Name: uptime_notif
Post URL: http://172.17.0.1:65000
Request Body: Preset - application/json
@rokiden
rokiden / fedora_to_usb.sh
Created August 31, 2023 13:19
Script for converting Fedora LiveCD to LiveUSB with persistence
#!/bin/bash
# Script for converting Fedora (and maybe other dracut-based) LiveCD to LiveUSB
# with persistence. Only UEFI boot supported. Tested with Fedora 37.
#
# Usage:
# ./fedora_to_usb.sh path/to/mounted/livecd /dev/sdX
#
# Result USB partitioning:
# GPT, 2 partitions:
# - "EFI" (vfat 256MB) for GRUB and kernel
@rokiden
rokiden / linuxserver-wireguard-coredns-hosts.sh
Last active December 20, 2022 20:01
linuxserver/wireguard custom script configuring coredns with domain zone and peers
#!/usr/bin/with-contenv bash
CONFIG_DIR="/config"
if [ -z "$COREDNS_ZONE" ]; then
COREDNS_ZONE="wg.net"
fi
echo "**** CoreDNS hosts zone $COREDNS_ZONE ****"
echo "$COREDNS_ZONE {" > $CONFIG_DIR/coredns/hosts.conf