Skip to content

Instantly share code, notes, and snippets.

View georgkreimer's full-sized avatar
☠️
hack the planet!

georg kreimer georgkreimer

☠️
hack the planet!
View GitHub Profile
@georgkreimer
georgkreimer / synology-zigbee-bootscript.sh
Last active December 17, 2025 12:42
bootscript for the synology task scheduler to take care of the zigbee usb stick
#!/bin/sh
set -eu
VIDPID="10c4:ea60"
DEV="/dev/ttyUSB0"
LOADER="/usr/local/etc/rc.d/usb-serial-drivers.sh"
log() { echo "$(date -Iseconds) $*"; }
fail() { log "FAIL: $*"; exit 1; }
@georgkreimer
georgkreimer / synology-usb-serial-upgrade.sh
Created December 17, 2025 11:53
Safe-ish updater/loader for robertklep/dsm7-usb-serial-drivers on Synology DSM.
#!/bin/sh
# synology-usb-serial-upgrade.sh
#
# Safe-ish updater/loader for robertklep/dsm7-usb-serial-drivers on Synology DSM.
# - Detects platform + DSM version; probes repo; falls back to dsm-7.2 when needed
# - Downloads modules with integrity guards (non-empty, not HTML, ELF check, vermagic check if possible)
# - Atomic install via staging + rollback on failure + explicit --rollback mode
# - Concurrency lock
# - Observable logging (file + stdout)
# - Separate modes: --download-only / --install-only / --load-only
@georgkreimer
georgkreimer / gist:577d89fb7e31caccf291587ab2c8a2e6
Created January 12, 2024 11:36
Reset all macOS display resolution in case ext. monitor doesnt turn on spontaneously or you effed up your settings
- delete files:
~/Library/Preferences/ByHost/com.apple.windowserver.displays.{ Some HEX string}.plist
/Library/Preferences/com.apple.windowserver.displays.plist
- reboot.
@georgkreimer
georgkreimer / gist:e5033a1a5c2e735c020463cc0a75bb20
Created September 26, 2023 18:46
Commonly Whitelisted Domains - pi-hole community
pihole -w clients4.google.com
pihole -w clients2.google.com
pihole -w s.youtube.com
pihole -w video-stats.l.google.com
pihole -w www.googleapis.com
pihole -w youtubei.googleapis.com
pihole -w oauthaccountmanager.googleapis.com
pihole -w android.clients.google.com
pihole -w reminders-pa.googleapis.com firestore.googleapis.com
pihole -w gstaticadssl.l.google.com

method 1

sudo /usr/local/McAfee/AntiMalware/VSControl stopoas

alternatively

sudo defaults write /Library/Preferences/com.mcafee.ssm.antimalware.plist OAS_Enable -bool False
sudo /usr/local/McAfee/AntiMalware/VSControl stop
sudo /usr/local/McAfee/AntiMalware/VSControl reload
Verifying my Blockstack ID is secured with the address 1CZSuabhhT3A5Nf6qjawHJCtvYxuct4zoE https://explorer.blockstack.org/address/1CZSuabhhT3A5Nf6qjawHJCtvYxuct4zoE
@georgkreimer
georgkreimer / readme
Created May 15, 2017 21:04
UFW config changes for NBD connections
Set the default INPUT policy to ACCEPT: Edit /etc/default/ufw and set:
DEFAULT_INPUT_POLICY="ACCEPT"
Append a drop-all rule to the INPUT chain: Edit /etc/ufw/after.rules, add this line just before the final COMMIT line:
-A ufw-reject-input -j DROP
Disable UFW logging (this seems to cause issuses with Scaleway's default kernel):
ufw logging off
Enable UFW (don't forget to allow SSH traffic):
@georgkreimer
georgkreimer / gist:7a02af49604da91c5e3605b08b2872ec
Created May 15, 2017 20:28
UFW config w/ NBD connections
https://community.online.net/t/enable-ufw-in-debian-or-ubuntu-results-in-lock-out/2118/2
Set the default INPUT policy to ACCEPT: Edit /etc/default/ufw and set:
DEFAULT_INPUT_POLICY="ACCEPT"
Append a drop-all rule to the INPUT chain: Edit /etc/ufw/after.rules, add this line just before the final COMMIT line:
-A ufw-reject-input -j DROP
Disable UFW logging (this seems to cause issuses with Scaleway's default kernel):
ufw logging off

Keybase proof

I hereby claim:

  • I am georgkreimer on github.
  • I am gkreimer (https://keybase.io/gkreimer) on keybase.
  • I have a public key whose fingerprint is 694E F469 7AEE CC8B 4542 B9EC E206 F2B1 8054 0C10

To claim this, I am signing this object:

@georgkreimer
georgkreimer / oauth.js
Created October 20, 2016 18:15 — forked from srph/oauth.js
axios: interceptor which includes your oauth token in every request as an Authorization header
import axios from 'axios';
// You can use any cookie library or whatever
// library to access your client storage.
import cookie from 'cookie-machine';
axios.interceptors.request.use(function(config) {
const token = cookie.get(__TOKEN_KEY__);
if ( token != null ) {
config.headers.Authorization = `Bearer ${token}`;