Skip to content

Instantly share code, notes, and snippets.

@cobryan05
cobryan05 / garmin_connect_workout_muscle_filter.js
Created January 23, 2024 22:11
TamperMonkey script to filter GarminConnect workout list by muscle
// ==UserScript==
// @name Garmin Connect Workout - Filter By Target Muscle
// @namespace https://github.com/cobryan05
// @version 2024-01-23
// @description Filter workouts by target area
// @author cobryan05
// @match https://connect.garmin.com/modern/workout/edit/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=garmin.com
// @grant GM_xmlhttpRequest
// ==/UserScript==
@cobryan05
cobryan05 / notification_light_beta.py
Created March 9, 2022 23:26
AppDaemon MQTT SmartBulb controller
import hassapi as hass
import asyncio
import colorsys
import json
"""
*BETA* - EXPECT ISSUES!
App to control a Smart Bulb using MQTT
@cobryan05
cobryan05 / webcamDetect.py
Created February 9, 2022 19:08
Query registry for active webcam
import winreg
class WebcamDetect:
REG_KEY = winreg.HKEY_CURRENT_USER
WEBCAM_REG_SUBKEY = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\webcam\\NonPackaged"
WEBCAM_TIMESTAMP_VALUE_NAME = "LastUsedTimeStop"
def __init__(self):
self._regKey = winreg.OpenKey( WebcamDetect.REG_KEY, WebcamDetect.WEBCAM_REG_SUBKEY )
@cobryan05
cobryan05 / fixNvPe.py
Last active January 25, 2024 14:33
Python Script to disable ASLR and make nv fatbins read-only to reduce memory commit
# Simple script to disable ASLR and make .nv_fatb sections read-only
# Requires: pefile ( python -m pip install pefile )
# Usage: fixNvPe.py --input path/to/*.dll
import argparse
import pefile
import glob
import os
import shutil
@cobryan05
cobryan05 / turn_off_idle_switch.yaml
Last active May 6, 2022 18:36
Blueprint - Turn off switch when no motion
blueprint:
name: Turn off unoccupied switches
source_url: https://gist.github.com/cobryan05/24f19bad93b642b7e0c5f8f1da0515d0
description: Turn off a switch that has been left on with no motion
domain: automation
input:
motion_entity:
name: Motion Sensor
selector:
entity: