Skip to content

Instantly share code, notes, and snippets.

@jensb
jensb / whiptail_menu.sh
Created August 31, 2023 19:39
OpenWrt menu based user and (smb)passwd management
#!/bin/bash
# User Management script for OpenWRT Samba user managemen (passwd and smbpasswd files).
# Needs "whiptail" and "samba4-server" packages installed, can be set as startup script when logging in as root
# This will not care about user groups and assume all users have group "users" (gid 100) for simplicity!
W=/usr/bin/whiptail
UA=/usr/sbin/useradd
UD=/usr/sbin/userdel
S=/usr/bin/smbpasswd
@jensb
jensb / influx-editor.sh
Last active January 29, 2023 11:40
InfluxDB measurement export-edit-reimport hack
#!/bin/bash
#
# Perform Influx v2 query with correct headers as CSV, open editor for changes, and write back to InfluxDB.
#
# Usage: influx-edit.sh <Org/Bucket> <flux_measurement> <from> <to>
# Prerequisites: Need to put login data (host, Org, token) into $HOME/.influxdbv2/configs file.
#
# Author: Jens Benecke <jens-github@spamfreemail.de>, 2022.
# Published as public domain, as far as legally possible.
@jensb
jensb / iphoto2xmp.rb
Last active December 18, 2015 19:34
Export iPhoto library with metadata to XMP
See https://github.com/jensb/iphoto2xmp for a heavily modified version with more features.