This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Toggle libinput touchpad state with each execution | |
touchpad=$(xinput list --name-only | grep -i touchpad) | |
props=$(xinput list-props "$touchpad") | |
enabled=$(awk '/Device Enabled \(...\)/{print $4}' <<< "$props") | |
tapping=$(awk '/libinput Tapping Enabled \(...\)/{print $5}' <<< "$props") | |
if [[ $enabled -eq 1 ]]; then | |
if [[ $tapping -eq 1 ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Keep a number of snapshots | |
# adapted from my `backup-zfs` | |
PREFIX="daily" | |
KEEP=31 # days | |
SOURCE="data3" | |
# non-recursive: | |
EXCLUDES=("$SOURCE/Temp" "$SOURCE/Temp/playground" "$SOURCE/tmp") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ZFS-send backups v1.9.0 :D | |
# | |
# $1: target device (e.g. `/dev/sdg`) - if omitted, uses udev's $DEVNAME env var instead | |
# $2: optional - if existing, assume we're called by udev -> obey inhibit, log to /tmp/backup-zfs_*.log instead of stdout | |
# create /tmp/backup-zfs.inhibit to disable automatic udev backups | |
# needs udev rule like: | |
# `ACTION=="add", KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", RUN+="/usr/bin/setsid --fork /usr/local/bin/backup-zfs $env{DEVNAME} udev"` | |
# | |
# status beep HP led Fit-statUSB LED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Alternatives: https://github.com/ajslater/picopt | |
# https://github.com/thebeansgroup/smush.py | |
# TODO: implement max file size | |
# TODO: support gz archives with zopfli | |
set -u | |
if [[ $1 == "-h" || $1 == "--help" ]]; then | |
echo "Recursively and losslessly optimize images and ZIP archives. Usage: $(basename "$0") [dir] [dir]..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Interact with BMBF's config | |
# FIXME: Album covers go missing?! | |
# Useful to start/kill BMBF without putting on the headset: | |
## adb shell am start com.weloveoculus.BMBF/.MainActivity | |
## adb shell am force-stop com.weloveoculus.BMBF | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
#============================================================= -*-perl-*- | |
# | |
# BackupPC_deleteFile.pl: Delete one or more files/directories from | |
# a range of hosts, backups, and shares | |
# | |
# DESCRIPTION | |
# See below for detailed description of what it does and how it works | |
# | |
# AUTHOR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
see https://github.com/haarp/gcode-streamer |