Skip to content

Instantly share code, notes, and snippets.

View KrzysztofHajdamowicz's full-sized avatar

Krzysztof Hajdamowicz KrzysztofHajdamowicz

  • Wroclaw, Poland
  • 06:54 (UTC +02:00)
View GitHub Profile
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active August 4, 2026 13:25
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@Neo23x0
Neo23x0 / audit.rules
Last active May 18, 2026 05:52
Linux Auditd Best Practice Configuration
# IMPORTANT!
# This gist has been transformed into a github repo
# You can find the most recent version there:
# https://github.com/Neo23x0/auditd
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
@fstanis
fstanis / pi-sound-guide.md
Created February 28, 2018 00:30
Setting up Speaker pHAT or pHAT DAC with pulseaudio

Setting up Speaker pHAT or pHAT DAC with pulseaudio

Overview

The purpose of this document if to provide a simple method of getting pulseaudio to work on Raspberry Pi with either Speaker pHAT or pHAT DAC.

Please see Software installer for Speaker pHAT or Setting up pHAT DAC for the more official guide / installer. The idea behind this guide is to provide you with a more manual alternative that lets you have a minimal setup.

Installation

@dale3h
dale3h / automations.yaml
Created May 15, 2019 04:45
[Home Assistant] Webhook Debugger
# Webhook URL: https://[your-hass-domain]/api/webhook/2qDFuSEBA7jU2sNjaK6JD5ac3FxnGfVTSF
- id: webhook_debugger
alias: "Webhook Debugger"
trigger:
- platform: webhook
webhook_id: 2qDFuSEBA7jU2sNjaK6JD5ac3FxnGfVTSF
action:
- service: persistent_notification.create
data_template:
sensor:
- platform: rest
scan_interval: 900
name: pse
resource: https://www.pse.pl/transmissionMapService
value_template: " {{ status }}"
json_attributes:
- data
- platform: template
sensors:
@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active August 13, 2026 17:28
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

@LucaTNT
LucaTNT / tesla-wall-connector-esp-power-meter.yaml
Created January 16, 2026 14:00
ESPHome configuration to run a Modbus adapter that can talk to the Tesla Wall Charger 3 to dynamically adjust power. Includes API connection to a Shelly Pro EM 50 (easily adaptable to another type of Shelly meter)
substitutions:
device_name: esp-tesla
friendly_name: ESPHome Tesla
mqtt_broker: 10.42.1.10 # CHANGE!
tx_pin: GPIO32 # connect to RX on modbus bridge # CHANGE!
rx_pin: GPIO33 # connect to TX on modbus bridge # CHANGE!
ct1_value_id: internal_meter_reading # Name of the (number) variable that needs to be set as ct reading
min_value: 0.0
max_value: 35.0 # adjust to a value above configured max-value in Wall Connector config
start_value: 0.0 # Initial value at boot - determines the behavior when home assistant