Skip to content

Instantly share code, notes, and snippets.

View nickw444's full-sized avatar

Nick Whyte nickw444

View GitHub Profile
@nickw444
nickw444 / README.md
Last active November 21, 2022 10:17
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
@nickw444
nickw444 / Makefile
Created August 26, 2016 05:16
2121 On OSX
# Makefile for COMP2121 on OSX
# Assumes Wine is installed and AVR Studio is installed within
# Also assumes your wine "drive c" is in the .wine folder in your home directory.
#
# Things this does:
# `make` or `make build` to build the output
# `make studio` to open AVR studio in wine
# `make upload` to build and upload the built image to the AVR.
default: build