This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: switchboard | |
labels: | |
app: switchboard | |
spec: | |
replicas: 2 | |
minReadySeconds: 5 | |
selector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: multipress | |
labels: | |
app: multipress | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# ARG_POSITIONAL_SINGLE([home-assistant-address],[root URL of home assistant]) | |
# ARG_OPTIONAL_BOOLEAN([tvservice],[],[tvservice on],[on]) | |
# ARG_OPTIONAL_BOOLEAN([usb],[],[USB on],[on]) | |
# ARGBASH_GO() | |
# needed because of Argbash --> m4_ignore([ | |
### START OF CODE GENERATED BY Argbash v2.8.1 one line above ### | |
# Argbash is a bash code generator used to get arguments parsing right. | |
# Argbash is FREE SOFTWARE, see https://argbash.io for more info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.location.href.indexOf('kiosk') > 0) { | |
setTimeout(function () { | |
try { | |
const home_assistant_main = document | |
.querySelector("body > home-assistant").shadowRoot | |
.querySelector("home-assistant-main"); | |
const header = home_assistant_main.shadowRoot | |
.querySelector("app-drawer-layout > partial-panel-resolver > ha-panel-lovelace").shadowRoot | |
.querySelector("hui-root").shadowRoot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
interfaces=(eth0 eth1 eth2) # which interfaces to auto-detect, in descending order of priority | |
interface="eth0" # the default/current interface | |
while true; do | |
newif="$interface" | |
for i in "${interfaces[@]}"; do | |
if $(ip link show dev "$i"); then | |
newif="$i" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
con="${1}" | |
if [[ -z "$con" ]]; then | |
echo "Please provide an interface name as an argument." | |
exit 1 | |
fi | |
while true; do | |
conns=$(nmcli con show "$con" | grep "GENERAL.STATE:" | grep "activated") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"d647cda7.47601","type":"tab","label":"OBD","disabled":false,"info":""},{"id":"c1814e23.3d93d","type":"inject","z":"d647cda7.47601","name":"","topic":"","payload":"","payloadType":"date","repeat":"15","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":240,"wires":[["e8d485cc.aa10a8"]]},{"id":"e8d485cc.aa10a8","type":"http request","z":"d647cda7.47601","name":"prometheus","method":"GET","ret":"txt","paytoqs":false,"url":"localhost:8000","tls":"","proxy":"","authType":"","x":290,"y":240,"wires":[["1360a3fe.df2cdc"]]},{"id":"1360a3fe.df2cdc","type":"function","z":"d647cda7.47601","name":"stats","func":"lines = msg.payload.split(\"\\n\");\nmsg.payload = [];\nfor(var i=0; i<lines.length; i++) {\n if (lines[i][0] == '#')\n continue;\n if (!lines[i].startsWith('obd_'))\n continue;\n var br = lines[i].indexOf('{');\n var sp = lines[i].indexOf(' ');\n var f = (br > 0 && br < sp) ? br : sp;\n var v = parseFloat(lines[i].substr(f+1))\n msg.payload.push([lines[i].substr(0, f), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import subprocess, re, os, json, sys | |
zones = None | |
def _sh(cmd): | |
return subprocess.run(cmd, shell=True, check=True, capture_output=True, text=True).stdout.strip() | |
def _whatsmyip(): | |
return _sh('dig +short myip.opendns.com @resolver1.opendns.com') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1001) | |
(T1 D=0.25 CR=0 - ZMIN=-0.8394 - FLAT END MILL) | |
G0 G40 G90 G17 | |
G20 | |
(POCKET ROUGH) | |
T1 M6 | |
M3 S10000 | |
G0 X12.3576 Y18.4 | |
G0 Z0.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client> $$ | |
$0=10 (Step pulse time, microseconds) | |
$1=25 (Step idle delay, milliseconds) | |
$2=0$3=0 (Step pulse invert, mask) | |
$4=0 (Invert step enable pin, boolean) | |
$5=0 (Invert limit pins, boolean) | |
$6=0 (Invert probe pin, boolean) | |
$10=1 (Status report options, mask) | |
$11=0.010 (Junction deviation, millimeters) | |
$12=0.002 (Arc tolerance, millimeters) |