Skip to content

Instantly share code, notes, and snippets.

View corgan2222's full-sized avatar
🏠
Working from home

Stefan Knaak corgan2222

🏠
Working from home
View GitHub Profile
@corgan2222
corgan2222 / github-image-lightbox.user.js
Created August 19, 2026 20:02
Tampermonkey userscript that opens images in GitHub READMEs, issues and PRs in a lightbox instead of navigating away — gallery navigation, zoom, pan.
// ==UserScript==
// @name GitHub Image Lightbox
// @namespace https://github.com/corgan2222
// @version 1.0.0
// @description Opens images from READMEs, issues, PRs and discussions in a lightbox instead of navigating to a new page. Gallery navigation, zoom, pan, ESC to close.
// @author corgan2222
// @match https://github.com/*
// @match https://gist.github.com/*
// @run-at document-idle
// @grant none
@corgan2222
corgan2222 / frigate-018-beta-en.sh
Last active July 27, 2026 22:39
Install Frigate 0.18.0-beta1
#!/usr/bin/env bash
# ---------------------------------------------------------------------------
# Install Frigate 0.18.0-beta1 via community-scripts (ProxmoxVE)
#
# Run on the PROXMOX HOST (not inside the container) as root:
# bash frigate-018-beta-en.sh
#
# What this script does:
# 1. downloads build.func, ct/frigate.sh and install/frigate-install.sh locally
# 2. sets the version in frigate-install.sh from v0.17.2 -> the desired version
@corgan2222
corgan2222 / report_zigbee_zwave_devices_gone_offline2.yaml
Last active July 19, 2026 01:57
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Report offline zigbee/zwave/battery/smart plug devices with device exclusion
description: Works with Smart Plugs, ZWave, Zigbee etc (Works with ZHA & Z2M). Now supports excluding entire devices.
#By Tahutipai 2024-02-21, updated to include device exclusion
#Originally Based on the work of Sybx @ https://community.home-assistant.io/t/low-battery-level-detection-notification-for-all-battery-sensors/258664
#Note: This has been upgraded to report only the Device that is offline, not multiple individual sensors within one Device
domain: automation
input:
time:
name: Time to test on
mkdir backupZigbee
cd backupZigbee
virtualenv -p 3 venv
source venv/bin/activate
pip3 install zigpy-znp
usb-devices
lsusb
ls -lah /dev/tty*
service zigbee2mqtt stop
python3 -m zigpy_znp.tools.network_backup /dev/ttyACM0 -o network_backup.json -v
@corgan2222
corgan2222 / windowTitle.ps1
Last active July 19, 2026 01:58
Open Windows Explorer with the Folder of the current opened Adobe Premiere/After Effects Project
$x = get-process | ? {$_.MainWindowTitle -like "*Adobe Premiere*"} | Select-Object -ExpandProperty mainwindowtitle
if ($x){
$pp_path = $x.SubString($x.IndexOf("-") + 2, $x.LastIndexOf("\") - $x.IndexOf("-") - 1)
$pp_path -replace ' ', '` '
# echo $pp_path
explorer.exe $pp_path
}else {
$ae = get-process | ? {$_.MainWindowTitle -like "*Adobe After Effects*"} | Select-Object -ExpandProperty mainwindowtitle
@corgan2222
corgan2222 / gist:5f7f0345273e364b6c365bbc75ab268d
Created September 7, 2020 12:36
Ender 5 Pro Cura 4.6 Start GCode for heating nozzle and bed while BL Touch bed leveling
; Script based on an original created by tjjfvi (https://github.com/tjjfvi)
; An up-to-date version of the tjjfvi's original script can be found
; here: https://csi.t6.fyi/
; Note - This script will only work in Cura V4.2 and above!
; --- Global Settings
; layer_height = {layer_height}
; smooth_spiralized_contours = {smooth_spiralized_contours}
; magic_mesh_surface_mode = {magic_mesh_surface_mode}
; machine_extruder_count = {machine_extruder_count}
; --- Single Extruder Settings
@corgan2222
corgan2222 / gist:f60c3752b9ce1ffd6c5e76e1d0717542
Created April 1, 2020 10:02
IPMI commands for Dell PowerEdge R210 II running pfsense freeBSD
#Dell PowerEdge R210 II
#pfsense freeBSD
kldload ipmi
ipmitool
ipmitool sensor
ipmitool sensor get "FAN 1 RPM"
* install the docker addon in Libreelec using the menu system
o From addons/install from repository/libreelec addons/services/docker
* log in via ssh and install the docker container
> docker pull bltavares/zerotier
docker run --device=/dev/net/tun \
docker run \
--name kodi \
--net=host \
--privileged \
--restart unless-stopped \
-e ZBX_HOSTNAME="kodi" \
-e ZBX_SERVER_HOST="192.168.2.25" \
-d aledjones/zabbix-agent:4.2
@corgan2222
corgan2222 / gist:4af711f9e7032b72ca8e7c84b1f6cdbf
Last active July 19, 2026 01:58
libreelec.tv/config.txt
https://wiki.libreelec.tv/config.txt
mount -o remount,rw /flash
nano /flash/config.txt
mount -o remount,ro /flash
Adding Device Tree Overlays
The current supported DTB's can be found in /flash/overlays. These can be set by using any of the following overlays