Skip to content

Instantly share code, notes, and snippets.

View Dexwell's full-sized avatar

Doney den Ouden Dexwell

View GitHub Profile
@joogps
joogps / automations.yaml
Last active July 16, 2023 13:33
Home Assistant automation for calling webostv.button on HomeKit Remote key presses
- alias: Call webostv.button on HomeKit Remote key presses
trigger:
- platform: event
event_type: homekit_tv_remote_key_pressed
event_data:
entity_id: media_player.living_room_tv
action:
- service: webostv.button
data_template:
entity_id: "{{ trigger.event.data['entity_id'] }}"
@magnolialogic
magnolialogic / pihole-dietpi-cloudflared.md
Last active March 5, 2024 08:04
DNS over HTTPS with DietPi, Pi-hole, and Cloudflare DNS

DietPi + Pi-hole + Cloudflare DNS + DNS over HTTPS

Summary

Quick and dirty setup instructions to get Pi-hole running with DoH via Cloudflare on a headless Raspberry Pi.

I was originally using Pi-hole with Quad9 as my upstream DNS provider, but noticed that my ISP (Spectrum) was still intercepting and answering some DNS queries so I've switched to Cloudflare and their Argo Tunnel client for DNS over HTTPS.

Yes, I know there are other options out there like unbound, stubby, DNS over TLS, and DNSCrypt, but as of this writing the whole encrypted DNS thing still feels really runny so I went with cloudflared because it's a single package that's easy to configure, update, and remove. This combination gets me to a place where my network is using encrypted DNS + DNSSEC and should automagically support ESNI once Safari implements it, and I could easily back out of DNS over HTTPS if DoT or DNSCrypt becomes more fully-baked before DoH does. I'll also happily switch back to Quad9 if they provide a DoH pr

@JamesMGreene
JamesMGreene / EventedDatastore.js
Last active June 26, 2021 09:57
Forcibly adding NeDB events by deriving from the Datastore prototype
// IMPORTANT:
// As of nedb@^1.7.0, Datastore now inherits from EventEmitter in the NeDB core module.
// If you need to support older versions of NeDB, please look at the following previous revision
// of this gist:
// https://gist.github.com/JamesMGreene/0e0b2506c7bd2a2557f7/d8b4b1e97bb0d118c509672e3c7276b6dc4ba13a
/*
This gist provides a module which derives from the NeDB Datastore module and extends it to
emit several important events:
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 1, 2024 03:44
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@eligrey
eligrey / object-watch.js
Created April 30, 2010 01:38
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/