Skip to content

Instantly share code, notes, and snippets.

@patrickdk77
patrickdk77 / ds2.patch
Created March 5, 2026 02:22
DS2 codec
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index fb22541f8d..3b98da18a3 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -344,6 +344,7 @@ OBJS-$(CONFIG_DSD_MSBF_PLANAR_DECODER) += dsddec.o dsd.o
OBJS-$(CONFIG_DSICINAUDIO_DECODER) += dsicinaudio.o
OBJS-$(CONFIG_DSICINVIDEO_DECODER) += dsicinvideo.o
OBJS-$(CONFIG_DSS_SP_DECODER) += dss_sp.o
+OBJS-$(CONFIG_DS2_DECODER) += ds2.o
OBJS-$(CONFIG_DST_DECODER) += dstdec.o dsd.o
@patrickdk77
patrickdk77 / k8s-etcd-backup.yaml
Last active October 31, 2025 05:35 — forked from jslay88/k8s-etcd-backup.yaml
k8s cronjob for doing daily backups of etcd from a master. (updated)
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: etcd-backup
namespace: kube-system
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
Template
{"NAME":"Tuya Siren","GPIO":[255,107,255,108,255,255,0,0,255,255,255,255,255],"FLAG":0,"BASE":54}
You must activate the template before using any of the tuya commands below.
Recommended rules for tasmota:
rule1 on system#boot backlog tuyasend4 102,0; tuyasend2 103,300; TuyaSend1 117,0 endon
rule1 1
tuyamcu 11,104
class "randommac" {
match substring (hardware, 1, 1);
ignore booting;
}
subclass "randommac" 02;
subclass "randommac" 12;
subclass "randommac" 22;
subclass "randommac" 32;
subclass "randommac" 42;
subclass "randommac" 52;
#!/bin/bash
#
# Author: Ryan Kernan
# Date: September 23, 2011
# Version: 1.0
# Credits: Mike La Spina for the original concept and script http://blog.laspina.ca/
#
# Function: Provides snapshot and send process which replicates ZFS file systems from a source to target server.
# Maintains a runing snapshot archive for X days (X being the value of keep_snaps).
#
# Patrick Domack
# Base taken from Orion Anderson https://misterorion.com/lambda-update-ami/
# https://github.com/ranman/awesome-sns/blob/master/Events.md#windows-ami-update
# https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/aws-windows-ami.html#subscribe-notifications
import boto3, os, json
from datetime import datetime, timezone, timedelta
def lambda_handler(event, context):
substitutions:
# Change the disp_name to something you want
disp_name: Energy_Monitor
name: panelmonitor
tele: "${name}"
availability: "${name}/LWT"
heartbeat: 900s
# Interval of how often the power is updated
update_time: 10s
# Current Transformers:
@patrickdk77
patrickdk77 / sprinkler.yaml
Last active October 21, 2022 12:01
Sprinkler System esphome
substitutions:
display_name: Sprinkler
heartbeat: 900s
esphome:
name: sprinkler
platform: ESP8266
board: d1_mini
board_flash_mode: dout
esp8266_restore_from_flash: true
@patrickdk77
patrickdk77 / a25-tx028.txt
Last active October 12, 2022 01:02
A25-TX028 Remote (hampton bay/dawnsun)
Hampton Bay mara fan (dawnsun remote)
Uses unmarked chip
{ 400, { 34, 1 }, { 1, 2 }, { 2, 1 }, true } (rc-switch)
aaaa is address dips, 0=on 1=off
111111000110aaaa01111110 Power On (actually just toggles)
111111000110aaaa01111101 Power Off (actually just toggles)
111111000110aaaa01110100 Fan High
#0 boot (not used)
#1 tx (not used)
#2 led status (not used)
#3 rx (not used)
#4 status neopixel
#5 dallas
#16 thermostat O
#17 thermostat Y
#18 (not used)
#19 outdoor W