git commit
templates only work with interactive message writing. Need a hook for -m
commits.
cd .git/hooks
touch commit-msg
chmod +x commit-msg
#!/bin/bash | |
# Markdown is hard - this finds broken URL patterns. For example: | |
# this (doc)[https://example.com] | |
# where you meant: [doc](https://example.com) | |
pattern='\([^()]+\)\[[^][]+\]' | |
find . -type f -name "*.html" | while read -r file; do | |
perl -ne 'print "$ARGV: $_" if /\([^()]+\)\[[^][]+\]/' "$file" | grep -vE 'object\.get|decode' |
// keep N-day worth of data | |
var days=7; | |
// change to false to have the script to really exclude old records | |
// from the database. While true, no change at all will be made to the DB | |
var dryrun=true; | |
var now = new Date().getTime(), | |
time_criteria = now - days * 86400 * 1000, | |
time_criteria_in_seconds = time_criteria / 1000; |
#!/bin/bash | |
make local-setup-mgc | |
make local-setup-kind OCM_SINGLE=true | |
./bin/clusteradm init --bundle-version='0.11.0' --wait --context kind-mgc-control-plane | |
hub_token=$(./bin/clusteradm get token --context kind-mgc-control-plane -o=json | jq -r '."hub-token"') | |
hub_apiserver=$(./bin/clusteradm get token --context kind-mgc-control-plane -o=json | jq -r '."hub-apiserver"') | |
./bin/clusteradm join kind-mgc-control-plane --hub-token ${hub_token} --hub-apiserver ${hub_apiserver} --cluster-name kind-mgc-control-plane --bundle-version='0.11.0' --force-internal-endpoint-lookup --context kind-mgc-control-plane --feature-gates=RawFeedbackJsonString=true |
window.location.href = `narwhal://${window.location.host}${window.location.pathname}`; |
import requests | |
from geopy.distance import geodesic | |
from geopy.geocoders import Nominatim | |
def get_outages(): | |
url = "https://api.esb.ie/esbn/powercheck/v1.0/outages" | |
headers = {"api-subscription-key": "f713e48af3a746bbb1b110ab69113960"} | |
response = requests.get(url, headers=headers) |
/** | |
* Monitor an MQTT connection, and HTTP connectivity to Home Assistant | |
* if either fail - trigger a fail-safe mode which turns the switch on. | |
* | |
*/ | |
// Config | |
let homeAssistantUrl = "https://x.x.x.x:8123"; | |
// number of times the check is done before internet is considered as down. | |
let maxfails = 2; |
# Sensor(s) for Kingspan Watchman SENSiT Oil Tank monitor: https://www.kingspan.com/ie/en/products/tank-monitoring-systems/remote-tank-monitoring/watchman-sensit/ | |
# Replace email & password in the payload | |
- platform: rest | |
name: Oil Tank | |
resource: https://www.connectsensor.com/soap/MobileApp.asmx | |
method: POST | |
payload: '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><SoapMobileAPPAuthenicate_v3 xmlns="http://mobileapp/"><emailaddress>[email protected]</emailaddress><password>_PASSWORD_</password></SoapMobileAPPAuthenicate_v3></soap:Body></soap:Envelope>' | |
headers: | |
Content-Type: text/xml |
blueprint: | |
name: Moisture Sensor | |
description: Perform action when moisture sensor turns wet | |
domain: automation | |
input: | |
actions: | |
name: Actions | |
description: | |
Notifications or similar to be run. {{ trigger.event.data.new_state.attributes.friendly_name | |
}} will be the name of the sensor |
To tune Frigate, it can sometimes be useful to input saved clips in order to see how detection works. I've found the easiest way to accomplish this is by grabbing a clip (say, from your NVR), and streaming this on a loop via RTSP to Frigate. This will let you tune settings with an existing configuration, which is a bit different to using process_clip.py
that's included with Frigate.
ffmpeg
(.mp4
is good)ffmpeg
install. I'm using a mac, so I typically install via Brew: brew install ffmpeg