Skip to content

Instantly share code, notes, and snippets.

View jsenecal's full-sized avatar

Jonathan Senecal jsenecal

View GitHub Profile
@skippengs
skippengs / Moes_smart_knob_color.yaml
Last active July 22, 2024 20:03
ZHA - Moes Smart Knob for lights With color change
blueprint:
name: ZHA - Moes Smart Knob for lights with color change v2
description: 'Control lights with a Moes Smart Knob.
You can set functions for a single press. This allows you to assign,
e.g., a scene or anything else.
Rotating left/right will change the brightness smoothly of the selected light.
Press and rotate to smoothly step through the color temperature
Long press allows you to bind anything you want. For example, set scenes in home assistant to quickly change to a desired light temperatur and brightness.
Not all functionality of the device is available at time of writing, e.g. double press'
@starbuck93
starbuck93 / inovelli_vzm31-sn.yaml
Last active May 14, 2024 13:23
Inovelli Blue Series 2-in-1 blueprint demo for Home Assistant
blueprint:
name: Z2M - Inovelli 2-in-1 switch + dimmer Scene Controls
description: |
For Inovelli Blue Series 2-in-1 switch + dimmer, model VZM31-SN
Allows setting a few different actions such as 2,3,4,5 clicking the up/down and config buttons.
domain: automation
input:
switch:
name: Switch
from dcim.models import *
from extras.scripts import ObjectVar, Script
class OSPPatchFrontPorts(Script):
name = "Outside Plant - Patch Front Ports"
description = "Patch all front ports through"
site = ObjectVar(
@rosswf
rosswf / k3s.md
Last active July 10, 2024 12:24
Deploy HA k3s with kube-vip and MetalLB using k3sup

Prerequisites

kubectl

Install the required tools for deploying and controlling k3s.

Installation Docs:

# Download
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
blueprint:
name: ZHA - Moes Smart Knob for lights
description: 'Control lights with a Moes Smart Knob.
You can set functions for a single press. This allows you to assign,
e.g., a scene or anything else.
Rotating left/right will change the brightness smoothly of the selected light.
Not all functionality of the device is available at time of writing, e.g. double press, long press and press and rotate.'
@kralicky
kralicky / harvester-gpu.md
Last active May 9, 2024 03:33
Harvester GPU Provisioning

Harvester GPU Provisioning

  1. Install Harvester, then SSH into the server.

  2. Edit /boot/grub/grub.cfg as follows:

 set default=0
 set timeout=10
 
@santiagobasulto
santiagobasulto / server.py
Created April 4, 2021 13:21
A Python 3 debugging server based on http.server that logs every request. Use it to inspect incoming connections.
import time
from functools import partialmethod
from http.server import BaseHTTPRequestHandler, HTTPServer
import utils
class Request:
def __init__(self, method, path, headers, stream):
self.path = path
self.method = method.upper()
@s3rj1k
s3rj1k / HowTo
Last active July 22, 2024 14:19
Ubuntu 20.04.3 AutoInstall
# For recent versions of Ubuntu:
- https://www.pugetsystems.com/labs/hpc/ubuntu-22-04-server-autoinstall-iso/
# Docs:
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference
- https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
- https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53
# Download ISO Installer:
@dshoreman
dshoreman / slurp.md
Last active July 1, 2024 12:19
Swaymsg commands for listing windows and outputs

i3

Get Active Window ID

xdotool getactivewindow

Get Current Desktop ID

xdotool get_desktop_for_window "$(xdotool getactivewindow)"
@smcveigh-phunware
smcveigh-phunware / test_mongodb_examples.py
Last active January 20, 2022 02:06
Test Shapely with MongoDB GeoJSON examples
#!/usr/bin/env python
# -*- coding: utf-8 -*
import pytest
import typing as typ
import pymongo as pm
import mongoengine as me
import shapely.geometry as geo