Skip to content

Instantly share code, notes, and snippets.

View awfulwoman's full-sized avatar
🏠
Working from home

Charface awfulwoman

🏠
Working from home
View GitHub Profile
substitutions:
name: esphome-web-1dbf28
friendly_name: c3pico-therm-1dbf28
remote_sensor_entity_id: sensor.average_of_temperature_sensors
esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: false
@mharsch
mharsch / mt_viki_remote
Created February 18, 2023 18:32
Arduino replaces MT-VIKI KVM remote module for changing / polling selected KVM input
#include <math.h>
// connected to 'D+' pin on mini USB
const int input_pin = 11;
// connected to 'D-' pin on mini USB
const int output_pin = 12;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
alias: "[Washing] Done"
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_power
for:
hours: 0
minutes: 0
seconds: 0
above: "500"
@skrobul
skrobul / convert.py
Created April 5, 2022 09:05
convert google timeline location history into owntracks
#!/usr/bin/env python
import json
from datetime import datetime
print("Parsing input data...")
records = json.load(open("./Takeout/Location History/Records.json"))['locations']
print("Done.")
def convert_conn(record):
@rikka0w0
rikka0w0 / dell.c
Last active April 19, 2025 20:34
Emulate Dell chargers with ESP-01 module
/*
* Example-Code that emulates a DS2502 - 1kbit EEPROM as a dell power supply
*
* Tested with
* - dell notebook https://forum.pjrc.com/threads/33640-Teensy-2-OneWire-Slave
* - DS9490R-Master, atmega328@16MHz as Slave
* - Arduino ProMini clone
* - esp8266
*
* OneWire messaging starts when AC adapter is plugged to notebook,
@csarn
csarn / README.md
Last active December 4, 2024 03:12
ZFS pull backup with minimal permissions

Usage

on system that should be backed up

  • put "restrict_commands.sh" in /usr/local/bin and make it executable
  • install ts, lzop and optionally mbuffer
useradd zfsbackup --create-home --system
mkdir /home/zfsbackup/.ssh
zfs allow -u zfsbackup send,hold tank/dataset
echo 'restrict,command="restrict_commands.sh" ssh-ed25519 ...' &gt; /home/zfsbackup/.ssh/authorized_keys
@natcl
natcl / docker-compose.yaml
Last active May 21, 2024 04:37
traefik: node-red + mosquitto using letsencrypt
version: "3.3"
services:
traefik:
image: "traefik:v2.2"
container_name: "traefik"
command:
- "--api=true"
- "--api.dashboard=true"
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active May 22, 2025 19:19
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@David-Lor
David-Lor / MQTTSubscribe.sh
Created July 11, 2019 12:29
Shell Script to subscribe to MQTT and execute a callback
#!/bin/bash
# This script subscribes to a MQTT topic using mosquitto_sub.
# On each message received, you can execute whatever you want.
while true # Keep an infinite loop to reconnect when connection lost/broker unavailable
do
mosquitto_sub -h "127.0.0.1" -t "test" | while read -r payload
do
# Here is the callback to execute whenever you receive a message:
@carlosedp
carlosedp / main.yml
Created January 28, 2019 19:02
Ansible playbook to automate new Kubernetes SBC nodes
---
- name: Setup SBC
hosts: all
#become: true
#become_user: root
gather_facts: false
vars:
#New user to be created
new_user: newuser