- [[netdata#Change install type of an existing installation]]
- Create new keyrings dir
mkdir -p /etc/apt/keyrings && chmod 0755 /etc/apt/keyrings
- delete old legacy keys
### apt repos | |
> [!tip] Back up apt repo lists | |
> ``` | |
> a="${HOME}/${HOSTNAME}_aptsources_$(date +%s).tar.gz"; tar --transform='s/^.*\///' -czvf "$a" $(find /etc/apt/sources.list.d -name "*.list") | |
> ``` | |
### More | |
- Foo |
system_profiler SPSoftwareDataType -json | | |
jq --raw-output --argjson labels '[ "day", "hour", "minute", "second" ]' ' | |
.SPSoftwareDataType[0].uptime[3:] // empty | split(":") as $uptime | | |
def pprint: | |
($uptime[.] | tonumber) as $val | | |
if $val == 0 then empty else | |
"\($val) \($labels[.])" + (if $val == 1 then "" else "s" end) | |
end; |
tccd: [com.apple.TCC:access] -[TCCDAccessIdentity staticCode]: static code for: identifier com.p5sys.jump.connect, type: 0: 0xZZZZZZZZZ at /Applications/Jump Desktop Connect.app | |
tccd: [com.apple.TCC:access] AUTHREQ_ATTRIBUTION: msgID=XXX.XXXX, attribution={accessing={TCCDProcess: identifier=com.p5sys.jump.connect, pid=59540, auid=501, euid=501, binary_path=/Applications/Jump Desktop Connect.app/Contents/MacOS/JumpConnect}, requesting={TCCDProcess: identifier=com.apple.mds, pid=572, auid=0, euid=0, binary_path=/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Support/mds}, }, | |
tccd: [com.apple.TCC:access] AUTHREQ_ATTRIBUTION: msgID=XXX.XXXX, attribution={responsible={TCCDProcess: identifier=com.p5sys.jump.connect, pid=20435, auid=501, euid=501, responsible_path=/Applications/Jump Desktop Connect.app/Contents/MacOS/JumpConnect, binary_path=/Applications/Jump Desktop Connect.app/Contents/MacOS/JumpConnect}, accessing={TCCDProcess: identifier=com.p5sys.jump.conne |
#!/usr/bin/env bash | |
case $1 in | |
-h|--help|'') echo "${0##*/} [files-or-dir]"; exit;; | |
esac | |
#requires jd, jq | |
for f in jd jq; do | |
if ! hash $f &>/dev/null; then brew install --quiet $f; fi | |
done |
#!/usr/bin/env bash | |
# watches for changes to xattrs and utimes | |
# https://github.com/syncthing/syncthing/issues/9371#issuecomment-1937696552 | |
# https://gist.github.com/luckman212/4bb90c65a3470cb11fba49e694dc205f | |
sudo eslogger --format json setextattr deleteextattr setattrlist utimes | jq -r ' | |
.event as $e | | |
.process as $p | | |
($e | keys[0]) as $t | |
#!/bin/bash -e | |
# | |
# Improved backup script for Ubiquiti UniFi controller | |
# original source: http://wiki.ubnt.com/UniFi#Automated_Backup | |
# | |
# must contain: | |
# username=<username> | |
# password=<password> | |
source ~/.unifi-backup |
#!/bin/zsh | |
#number of times after which a refill is required | |
REFILL_AFTER=25 | |
#text (case sensitive regex) that should cause the counter to increment | |
TRIGGER_STR='Sprinkler turned on' | |
#script to run when alert fires (send email, SMS, etc...) | |
ALERT_SCRIPT=/path/to/your/script |
#!/usr/bin/env bash | |
CLIENT_DB="$HOME/Library/Application Support/CloudDocs/session/db/client.db" | |
[[ -e $CLIENT_DB ]] || { echo "db not found"; exit 1; } | |
mapfile -t ITEM_IDS < <(sqlite3 "$CLIENT_DB" <<-EOS | |
SELECT throttle_id | |
FROM client_sync_up | |
EOS | |
) |
# place in same dir as compose.yml, adjust as needed for your environment | |
# create a limited user and run `id <username>` to get the PUID/PGID values | |
TZ=America/New_York | |
CNAME=speedtest | |
DOCKER_DIR=/volume1/docker | |
PUID=1030 | |
PGID=100 | |
MARIADB_DATABASE=speedtest-tracker | |
MARIADB_USER=speedy |