Skip to content

Instantly share code, notes, and snippets.

View jarz's full-sized avatar
🧟‍♂️

Tim Jarzombek jarz

🧟‍♂️
View GitHub Profile
// Parses a new line separated string of micros() captured from an arduino
// Each entry is a switch from LOW to HIGH or HIGH to LOW
// The line always starts and finishes HIGH.
function parseBtnMessage(timeString){
// Turn the string of times into an array
times = timeString.split("\n");
// Find the start of the first message sent by the button
// The button sends two long pulses which are approx 1300 and 1200 each.
@robdaemon
robdaemon / docker-compose.yml
Created February 28, 2021 02:45
HomeAssistant + zwavejs2mqtt + Mosquitto
version: '3'
services:
homeassistant:
container_name: homeassistant
image: homeassistant/home-assistant:stable
volumes:
- /home/rroland/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
networks:
@cyrenity
cyrenity / k8s-using-talos-in-vms.md
Last active April 21, 2024 06:54
Setup kubernetes cluster using Talos (Lab)

Setup Kubernetes cluster in minutes using Talos

1. Get talosctl

Download and install talosctl binary

wget https://github.com/talos-systems/talos/releases/download/v0.8.1/talosctl-linux-amd64
@williamdes
williamdes / ACME-SH-docker-compose.md
Last active January 4, 2024 10:51 — forked from Dreamacro/ACMESH.md
acme.sh using docker-compose

How to use

$ docker compose -f acmesh.yaml up -d

.env

ACME_HOME_DIR=./acme.sh
@cezarypiatek
cezarypiatek / .editorconfig
Last active February 14, 2023 21:48
This snippet set severity level to error for different rules related to the reference nullability
[*.cs]
# CS8603: Possible null reference return.
dotnet_diagnostic.CS8603.severity = error
# CS8604: Possible null reference argument.
dotnet_diagnostic.CS8604.severity = error
# CS8606: Possible null reference assignment to iteration variable
dotnet_diagnostic.CS8606.severity = error
# CS8600: Converting null literal or possible null value to non-nullable type.
dotnet_diagnostic.CS8600.severity = error
# CS8602: Dereference of a possibly null reference.
@negz
negz / kubedump.sh
Last active March 6, 2024 18:42
Dump Kubernetes cluster resources as YAML
#!/usr/bin/env bash
set -e
CONTEXT="$1"
if [[ -z ${CONTEXT} ]]; then
echo "Usage: $0 KUBE-CONTEXT"
exit 1
fi
@cabal95
cabal95 / vm-backup.sh
Created July 25, 2015 17:53
I use this script to backup my QEMU/KVM/libVirt virtual machines. The script requires KVM 2.1+ since it uses the live blockcommit mode. This means the data in the snapshot disk is rolled back into the original instead of the other way around. Script does NOT handle spaces in paths.
#!/bin/bash
#
BACKUPDEST="$1"
DOMAIN="$2"
MAXBACKUPS="$3"
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]"
exit 1
@abeluck
abeluck / gpg-offline-master.md
Last active October 22, 2023 02:59 — forked from KenMacD/cmd.md
GPG Offline Master Key w/ smartcard