Skip to content

Instantly share code, notes, and snippets.

@logikal
logikal / darkmoon_plates.md
Last active February 22, 2025 03:39
Darkmoon Plate Settings Matrix
Plate Plate in OrcaSlicer Used For Cleaning Notes Mfr Link
Darkmoon Satin Textured PEI Plate PLA,PETG,TPU,ABS/ASA/PC/PA IPA/Dawn PC needs glue. See Link for Z-offset GCode. Link
Darkmoon CFX (Carbon Fiber) Smooth High Temp Plate PLA,PETG,TPU,ABS/ASA/PC/PA IPA/Dawn Pre-heat for everything but PLA, TPU. See link for glue/adhes
blueprint:
name: WLED Notifier
description: Temporarily changes WLED lights for notifications and restores their previous state.
domain: automation
input:
lights:
name: WLED Lights
description: List of WLED light entities to notify
selector:
target:
@logikal
logikal / mqttknob.yaml
Last active December 18, 2024 23:42
a HomeAssistant automation for using an MQTT smart knob for controlling the volume of a media_player
alias: "Knob: Volume Up/Down"
description: "Knob: Volume Up/Down"
triggers:
- domain: mqtt
device_id: 96d04892651a90bd5c81cd7211453052
type: action
subtype: brightness_step_up
trigger: device
- domain: mqtt
device_id: 96d04892651a90bd5c81cd7211453052
@logikal
logikal / docker-compose.llms.yaml
Last active June 27, 2024 15:53
docker compose for locally hosted llms with tailscale
services:
# More info on using tailscale like this can be found in the
# tailscale blog entry about it: https://tailscale.com/blog/docker-tailscale-guide
ts-aichat-server:
image: tailscale/tailscale:latest
container_name: ts-aichat-server
hostname: aichat
environment:
- TS_AUTH_KEY=tskey-auth-REPLACEME
- TS_EXTRA_ARGS=--advertise-tags=tag:container --reset
blueprint:
name: Set thermostat temperature at specific time
description: Sets a Thermostat to a specifc temperature at a certain time everyday
domain: automation
input:
time_to_set:
name: Time
selector:
time:
climate_entity:
blueprint:
name: Doorbell - Notify Google and send camera snapshot to app
description: 'Make an announcement over Google devices when the doorbell is pushed and send a camera snapshot to your app.'
# from https://community.home-assistant.io/t/doorbell-notify-google-and-send-camera-snapshot-to-app/257953
domain: automation
input:
doorbell:
name: Doorbell
description: This is the doorbell binary sensor
@logikal
logikal / ntp_drift_reporter.sh
Created November 21, 2018 03:24
Ever wondered how far off your clock was? now you can know.
#!/usr/bin/env bash
# finds the maximum clock drift in the last 30 days
# using the stats files kept in /var/log/ntpstats
# We need somewhere temporary to keep our concatenated results
TMPFILE=$(mktemp) || exit 1
FILELIST=$(find /var/log/ntpstats/ -mtime -31 -type f)
cut -d' ' -f 5 $FILELIST| sort -g > $TMPFILE
@logikal
logikal / cent6.log
Created November 7, 2017 17:57
seccomp & bpf support between cent6 and cent7
[vagrant@seccomp-centos-6-chef-12-kitchen ~]$ cat /etc/redhat-release
CentOS release 6.8 (Final)
[vagrant@seccomp-centos-6-chef-12-kitchen ~]$ uname -a
Linux seccomp-centos-6-chef-12-kitchen.vagrantup.com 2.6.32-642.4.2.el6.x86_64 #1 SMP Tue Aug 23 19:58:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[vagrant@seccomp-centos-6-chef-12-kitchen ~]$ gcc -H -fsyntax-only test.c
. /usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/stdbool.h
. /usr/include/stdio.h
.. /usr/include/features.h
... /usr/include/sys/cdefs.h
@logikal
logikal / graphite_traps.sh
Last active August 2, 2017 23:15
using traps to send graphite metrics in bash scripts
#!/usr/bin/env bash
starttime=$(date +%s)
########
# Set up a set of functions and traps that will emit duration and error counts for this script on exit.
# expects that $GRAPHITE_HOST is set in the environment.
function emit_duration {
endtime=$(date +%s)
duration=$(($endtime-$starttime))