Skip to content

Instantly share code, notes, and snippets.

View Jaharmi's full-sized avatar
👋
You had me at ‘Hello World’!

Jeremy Reichman Jaharmi

👋
You had me at ‘Hello World’!
  • Landenberg, PA
  • 14:37 (UTC -05:00)
View GitHub Profile
@dmdeller
dmdeller / mailrules.json
Last active December 8, 2023 03:53
Fastmail rules to filter useless delivery emails
[
{
"markFlagged": false,
"fileIn": "Deliveries",
"combinator": "any",
"snoozeUntil": null,
"discard": false,
"created": "2023-07-25T14:15:44Z",
"previousFileInName": null,
"name": "Useless delivery notifications",
@plmcgrn
plmcgrn / sonos-udm-mutiple-networks.md
Last active October 31, 2024 19:23
Unifi UDM and Sonos home theater with multiple VLAN's

Overview

This goal of this setup is to put the Sonos speakers on an untrusted network to keep all but the required traffic away from the trusted network where devices like personal computers, phones, etc. live. This write-up assumes you already have two networks setup and working.

Important Note on Unifi OS 3.x

UI broke cross-VLAN multicast DNS in this version. See below for steps to install the multicast-relay script to re-enable this. Without it, your Sonos controller app will not be able to discover your speakers on the other VLAN.

System

I have a Sonos Playbar, Sub, and 2 Play:3's as rear surrounds as one home theater setup connected to a UDM (non-Pro, but this should work on Pro too). Some of this setup may be easier for people with non-paired speakers, as Sonos does some shenanigans with which speaker is actively sending traffic to your wifi.

@e-dreyer
e-dreyer / configAccessor.py
Created August 3, 2023 10:12
ConfigAccessor ABC Python class
from typing import Any, Dict
import yaml
from collections import UserDict
class ConfigAccessor(UserDict):
def __init__(self, file_name: str) -> None:
super().__init__()
self.file_name = file_name
try:
@pudquick
pudquick / 00-reproducible-mach-o.md
Last active November 11, 2024 11:02
Reproducible Builds for macOS

Reproducible Builds for macOS

There's a neat writeup I stumbled across recently titled "Reproducible codesigning on Apple Silicon" from Keith Smiley about some gotchas when it comes to compiling a binary in a way that's repeatable and always generates the exact same byte output (which would then checksum to the exact same hash) - even if compiled on a different Mac.

In applying the suggestions I found in the blog post, I found a few other corner cases that I just wanted to get documented more explicitly somewhere.

Tools Matter

Footnote 2 from that blog post is important:

@throwaway96
throwaway96 / crashd.md
Last active November 8, 2024 09:40
crashd instructions

News

EOL (2024-07-21)

I'm not going to be maintaining this document anymore. I'm leaving it as-is since much of the FAQ section is still accurate and has yet to be incorporated into other resources.

Use CanI.RootMy.TV to find an exploit for your TV.

New exploit for webOS 3.5+: DejaVuln (2024-04-21)

@mdegat01
mdegat01 / update_notifications.yaml
Last active November 17, 2024 03:39
Update Notifications Automation Blueprint
blueprint:
name: Update notifications
description: Send notifications for new updates and install or skip on action
homeassistant:
min_version: '2022.4.0'
domain: automation
input:
update_entities:
name: Update entities
description: >-
@flufftronix
flufftronix / peco-greenbutton.py
Created April 5, 2022 03:58
For automating the download of My Green Button data from PECO
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
from selenium.webdriver.support import expected_conditions as EC # available since 2.26.0
from pyshadow.main import Shadow
import time
options = Options()
options.headless = True
@karanlyons
karanlyons / log4shell_regexes.py
Last active March 7, 2022 03:49
log4shell Regexes
import re
from urllib.parse import unquote
FLAGS = re.IGNORECASE | re.DOTALL
ESC_DOLLAR = r'(?:\$|[\\%]u0024||\\x24|\\0?44|%24)'
ESC_LCURLY = r'(?:\{|[\\%]u007B|\\x7B|\\173|%7B)'
ESC_RCURLY = r'(?:\}|[\\%]u007D|\\x7D|\\175|%7D)'
_U_PERCENT_ESCAPE_RE = re.compile(r'%(u[0-9a-f]{4})', flags=FLAGS)
_PERCENT_ESCAPE_RE = re.compile(r'%[0-9a-f]{2}', flags=FLAGS)
@cjnaz
cjnaz / scrape_pfsense_dhcp_leases.py
Created November 7, 2021 21:32 — forked from pletch/scrape_pfsense_dhcp_leases.py
Scrape PFSense DHCP Leases Status Page and Export Results to JSON
#!/usr/bin/env python3
# # This python script provides a function to query the pfsense (+v2.4) dhcp leases status page and return a list of tuples including
# ip, hostname, and mac address. To use, ensure LXML is installed via package manager or via pip.
#
# 16-Dec-2016 - Original release
# 3-Sep-2020 - Minor update to match formatting of leases page in latest pfSense version (2.4.5).
# 9-Sep-2020 - Backported improvements to handle table rows with missing data, use global variables for user/pass/server_ip,
# and return list from scrape function as implemented by fryguy04 in fork here:
# https://gist.github.com/fryguy04/7d12b789260c47c571f42e5bc733a813
@romkatv
romkatv / run-command.zsh
Last active October 25, 2024 11:50
Zsh function to run a command and capture its status, stdout and stderr
# Runs "$@" in a subshell with the caller's options, sets reply=(stdout stderr)
# and returns the status of the executed command. Both stdout and stderr are
# captured completely, including NUL bytes, incomplete UTF-8 characters and
# trailing LF, if any.
#
# Example:
#
# % zsh-run-command ls -d ~ /garbage
# % printf 'status: %s\nstdout: %s\nstderr: %s\n' $? "${(q+)reply[@]}"
# status: 2