Skip to content

Instantly share code, notes, and snippets.

View Teagan42's full-sized avatar

Teagan Glenn Teagan42

View GitHub Profile
@Teagan42
Teagan42 / render.yml
Created May 14, 2022 02:03
Netplan to NMCLI
{%- set ns = namespace(
ethernets=network_ethernets,
vlans={},
bridges={},
bonds={},
ip={}
)
-%}
{%- for bond_name, bond_config in network_bonds.items() -%}
{%- for interface in bond_config.interfaces -%}
@Teagan42
Teagan42 / activate_60min_timer.json
Last active January 1, 2022 19:48
Govee IoT Payloads - Purifier
{
"proType": 2,
"sku": "H7121",
"device": "3E:6E:D4:AD:FC:05:36:60",
"softVersion": "1.00.20",
"wifiSoftVersion": "1.00.20",
"cmd": "ptReal",
"type": 1,
"transaction": "v_1641064081500260",
"pactType": 1,
@Teagan42
Teagan42 / GitHub-card-fix.js
Created August 2, 2021 12:09
Fix to GitHub-Card CDN issue
(function(v){var o="//cdn.jsdelivr.net/gh/lepture/github-cards@latest/jsdelivr/";var i,m=0;var e=v.getElementsByTagName("meta");var b,w,p,A;for(i=0;i<e.length;i++){var t=e[i].getAttribute("name");var r=e[i].getAttribute("content");if(t==="gc:url"){b=r}else if(t==="gc:base"){o=r}else if(t==="gc:client-id"){w=r}else if(t==="gc:client-secret"){p=r}else if(t==="gc:theme"){A=r}}function a(e){if(v.querySelectorAll){return v.querySelectorAll("."+e)}var t=v.getElementsByTagName("div");var r=[];for(i=0;i<t.length;i++){if(~t[i].className.split(" ").indexOf(e)){r.push(t[i])}}return r}function y(e,t){return e.getAttribute("data-"+t)}function E(t){if(window.addEventListener){window.addEventListener("message",function(e){if(t.id===e.data.sender){t.height=e.data.height}},false)}}function n(e,t){t=t||b;if(!t){var r=y(e,"theme")||A||"default";t=o+"cards/"+r+".html"}var i=y(e,"user");var a=y(e,"repo");var n=y(e,"github");if(n){n=n.split("/");if(!(!n.length||i)){i=n[0];a=a||n[1]}}if(!i){return}m+=1;var l=y(e,"width");var d=y(e,

Keybase proof

I hereby claim:

  • I am teagan42 on github.
  • I am teagan42 (https://keybase.io/teagan42) on keybase.
  • I have a public key ASA18POunkyczScmx2q8lQelPkhceE0O_X_ROmP_gfI09Qo

To claim this, I am signing this object:

- name: Verify FAN is in spec
block:
- name: Get FAN Data
shell:
cmd: "ipmitool sdr elist | grep FAN"
register: siad_hard_diag_fan
- name: Prep PSU data for processing
set_facts:
fan_dict: >
@Teagan42
Teagan42 / post-receive
Created May 28, 2019 01:48
Automatically Reload Home-Assistant Configuration on Git Push
#!/bin/bash
ha_container_name="home-assistant"
use_systemctl=0
docker exec $ha_container_name sh -c "python -m homeassistant -c /config --script check_config"
if [ $? -ne 0 ]; then
exit
fi
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bash_profile
echo '[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm' >> ~/.bash_profile
echo '[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion' >> ~/.bash_profile
@Teagan42
Teagan42 / Client.kt
Last active March 25, 2019 20:56
Quick Channel Wrapped MqttClient
package rocks.teagantotally.kotqtt.domain.framework.client
interface Client : MqttCommandExecutor, MqttEventProducer
@Teagan42
Teagan42 / gist:e4938bd9b880011cee68b6fb9baaab70
Last active December 17, 2018 21:15
isInitialized is always false when overriding a lateinit var
open class ParentClass {
open lateinit var property: String
val isInitialized: Boolean
get() = this::property.isInitialized
val isLateInit: Boolean
get() = this::property.isLateinit
}
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLrWcrJDrq/7TLMqTTzIj3CqvthxxBFFwioafSDj0BaEy5e9gr3lYMjKuVMjMjA8h2RTgaXipoR6o2funSamHQ+li52QTlLLFAFgJXT3Rv2UscOAr+iNh22ka+PGnScwYNEEgmjeXcjRqpaeg2nDp0aVv0aCNvDji6u3s4bAr/ZopbwOzUVP9x8nrUCcXQvPGZxh2sPP5x1YUBa6AqSHk37c1zbHOzQPTcFmtjgzMSDkY464vqlEhb/AFzf/dwISGA27n/VqJkIV9wum8pt9fVNW/yco6X4ZBbOZTrcxwpBs70iLa3JcOsJhuE1hPxjYKjj3vGXSXTWJ2ZS8aZqK9n [email protected]