Skip to content

Instantly share code, notes, and snippets.

View dkebler's full-sized avatar

David Kebler dkebler

  • We Also Walk Dogs
  • Oregon, US
View GitHub Profile
dkebler /
Last active December 3, 2023 22:22
Pine64 RockPro64 Powerup Watchdog

Rockpro64 Power On Watchdog using esp8266 and Tasmota


Some times after power loss (12v) the rockpro64 will not fully power on when 12v is restored. It will enable 5V but then it will not "power on" which is indicated by pin 1 raising to 3.3v. This is fixed by pushing the power button for 5-8 seconds which for sure forces the rockpro off and then a single push of a second. We can use these facts to "push" the power using a relay powered by a esp8266 running the Tasmota firmware and a simple tasmota rule. Below are the details. You ONLY need to do this is you are using the rockpro64 in an unattended mission critical application (e.g a NAS box running your cloud server).


I take NO responsibility if you brick/fubar your rockpro64 or wemos boards doing this. Please understand and test first. Don't just connect your watchdog to the rockpro64 rather set up a testbench like I did by using the 3.3v pin on the D1 mini and a switch instead of pin1 on the rockpro to simul

dkebler /
Created February 19, 2023 16:18 — forked from fago/
Inotify script to trigger a command on file changes, e.g. rsync
# (c) Wolfgang Ziegler // fago
# Inotify script to trigger a command on file changes.
# The script triggers the command as soon as a file event occurs. Events
# occurring during command execution are aggregated and trigger a single command
# execution only.
# Usage example: Trigger rsync for synchronizing file changes.
add-ppa () {
if [ $EUID != 0 ]; then
sudo bash -c "$(declare -f add-ppa); add-ppa $*"
dkebler /
Last active December 21, 2022 21:10
Install WidevineCDM into chromium
# -eux
function confirm()
echo -n "$@ "
read -e answer
for response in y Y yes YES Yes Sure sure SURE OK ok Ok
if [ "_$answer" == "_$response" ]
dkebler /
Last active November 1, 2021 18:19
install the forked evdi module for amd gpu
# remove default evdi module and build and install this fork
# clone this
# put this script in the parent directory
echo "**** this script must be run from the parent of the the evdi repo ****"
ls -la /usr/src | grep evdi
echo enter the latest evdi driver version
read version
echo "***** moving /usr/src/evdi-$version to evdi-$version.original ****"
sudo mv /usr/src/evdi-$version evdi-$version.original
dkebler / !
Created April 21, 2021 17:50 — forked from Darkhogg/!
"Reboot to {OS}" scripts for rEFInd Next Boot selection
View !

Reboot to {OS}

This a collection of notes and files used in my quest to create "Reboot to Windows" and "Reboot to Linux" scripts (and desktop shortcuts) for Linux and Windows respectively that automatically reboot my system and instruct rEFInd to auto-select the appropriate OS entry.

General Information

The key for achieving this is to modify the EFI Variable PreviousBoot with GUID 36d08fa7-cf0b-42f5-8f14-68df73ed3740, which rEFInd uses to store the last entry selected in the menu and, if using the + default entry, will be used to select the default OS. By doing this, we trick rEFInd into booting the OS we choose without having to be physically there to press the keyboard.

dkebler /
Last active February 6, 2021 21:18
acl based directory share between users
# Usage:
# share_dir [ -o <owner> -g <group> ] <directory> <list of space delimited users names/uid>
# use . for current directory
# -o forces own for directory, default is $USER
# -g forces group name for directory, default is "users" and if not available then $USER
# Note: script operates recursively on given directory!, use with caution
dkebler /
Created September 26, 2020 16:20
Hugo Release Update Script - supports extended version
# Version 0.21.0 8:26 PST, Nov 9, 2018
# inspried from this forum post
# if you have run into github api anonymous access limits which happens during debugging/dev then add user and token here or sourced from a separate file
# . ~/githubapitoken
if [ "$GITHUB_TOKEN" != "" ]; then
echo using access token with script
View sender.js
const net = require("net"), fs = require("fs");
let server, istream = fs.createReadStream("./sender/SC-02.pdf");
server = net.createServer(socket => {
istream.on("readable", function () {
let data;
while (data = {
View receiver.js
const net = require("net"), fs = require("fs"), remote_server = process.argv[2];
let socket;
socket = remote_server ? net.connect(8000, remote_server) : net.connect(8000);
let ostream = fs.createWriteStream("./receiver/SC-02.pdf");
let date = new Date(), size = 0, elapsed;
socket.on('data', chunk => {
size += chunk.length;
elapsed = new Date() - date;