Skip to content

Instantly share code, notes, and snippets.

View nickw444's full-sized avatar

Nick Whyte nickw444

View GitHub Profile
@nickw444
nickw444 / modbus_sungrow_sg5-0rs.yaml
Last active August 24, 2025 11:42
Sungrow SG5.0RS-ADA Home Assistant modbus config
modbus:
- name: Sungrow SG5.0RS
type: tcp
host: !secret sungrow_modbus_host_ip
port: !secret sungrow_modbus_port
sensors:
- name: Inverter Device Type Code
unique_id: inverter_device_type_code
device_address: !secret sungrow_modbus_slave
address: 4999 # reg 5000
@nickw444
nickw444 / README.md
Last active January 15, 2025 12:43
moOde Audio - Toggle Home Assistant Switch Entity
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20200925 (64-bit version)
* Copyright (c) 2000 - 2020 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of iASLWRITfR.aml, Mon Jan 31 22:53:43 2022
*
* Original Table Header:
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20200925 (64-bit version)
* Copyright (c) 2000 - 2020 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of iASLDaYalX.aml, Mon Jan 31 22:48:55 2022
*
* Original Table Header:
@nickw444
nickw444 / backup-config.sh
Last active August 8, 2021 08:43
USG Scripts
#!/bin/bash
set -eu
WORKDIR=$(set -eu; mktemp -d);
DESTINATION="changeme@hostname:~/usg-backup/"
echo "Dumping configuration"
mca-ctrl -t dump > "$WORKDIR/info.json"
mca-ctrl -t dump-cfg > "$WORKDIR/config.json"
@nickw444
nickw444 / README.md
Last active February 5, 2023 22:47
ga-z77x-d3h notes
@nickw444
nickw444 / hc.py
Last active March 17, 2020 10:49
healthchecks.io long running job notifier
#!/usr/bin/env python3
import sys
import urllib.request
import subprocess
def main():
if len(sys.argv) < 3:
print("Usage: hc.py hc_url cmd [...cmd]")
sys.exit(1)
- for page in ig.fetch_pages('triplej', per_page=10):
+ for page in ig.fetch_pages(hashtag, per_page=10):
for post in page.posts:
if post.is_video:
logger.info("Skipping {} because it's a video".format(post.shortcode))
[
{
"id": 3,
"name": "My Favourite Downfall {Ft. JOY.}",
"artist": "360",
"track_preview": "http://mpegmedia.abc.net.au/triplej/hottest100/16/samples/360myfavouritedownfallftjoy.mp3"
},
{
"id": 5,
"name": "Paranoia",
Starting "sosh"...
/home/nickw/aos-2016/apps/sos/src/elf.c:159 : * Loading segment 00010000-->00020a38
/home/nickw/aos-2016/apps/sos/src/elf.c:159 : * Loading segment 00030a38-->00131a44
Region 0xe9eb0: low: 0x10000, high: 0x20a38. rights: 0x2, is_loading: 0
Region 0xe9ed0: low: 0x30a38, high: 0x131a44. rights: 0x3, is_loading: 0
Region 0xe9ef0: low: 0x8ffd8000, high: 0x90000000. rights: 0x3, is_loading: 0
Heap region: 0
Defining heap with addr: 0x133000
Region 0xe9eb0: low: 0x10000, high: 0x20a38. rights: 0x2, is_loading: 0
Region 0xe9ed0: low: 0x30a38, high: 0x131a44. rights: 0x3, is_loading: 0