Skip to content

Instantly share code, notes, and snippets.

@wcoastsands
wcoastsands / rpi-thermal-monitor.sh
Last active March 30, 2022 20:20
Thermal bench test for Raspberry Pi
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
# Resolve $SOURCE until the file is no longer a symlink.
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
# If $SOURCE was a relative symlink, we need to resolve it
# relative to the path where the symlink file was located.
done
@0x0ade
0x0ade / throttle.sh
Last active September 20, 2019 01:16
#!/bin/bash
# throttle - utility throttling applications according to CPU temperature.
# Usage: throttle.sh <PID>
# Alternatively: throttle.sh <your command here>
# Version: 1
# Changelog:
# 1:
# * Configuration vars are only set if not already set (per-app config. via env.)
# * Added QUIET configuration
# * Added notify-send support