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
blueprint: | |
name: Cusotm climate from binary sensor | |
description: This blueprint intelligently manages your heating or cooling systems | |
based on window sensor activity, conserving energy by suspending climate control | |
when a window is open and restoring settings after user-defined delays for opening | |
and closing the window. | |
domain: automation | |
input: | |
window_sensor: | |
name: Window Sensor |
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
# Assuming you have T-TeleSec_GlobalRoot_Class_2.pem in /etc/ssl/certs. | |
# Replace TU-ID with your ID | |
# replace wlan0 with your interface name | |
nmcli connection add type wifi con-name eduroam ifname wlan0 ssid "eduroam" -- wifi-sec.key-mgmt wpa-eap 802-1x.eap peap 802-1x.anonymous-identity [email protected] 802-1x.identity [email protected] 802-1x.phase2-auth mschapv2 802-1x.domain-suffix-match radius.hrz.tu-darmstadt.de 802-1x.ca-cert /etc/ssl/certs/T-TeleSec_GlobalRoot_Class_2.pem | |
nmcli connection up eduroam --ask |
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/python3 | |
from datetime import datetime, timedelta | |
# sample logstring from nginx | |
logstring = '185.128.120.94 - - [01/Aug/2020:16:04:47 +0200] "POST /http-bind?room=test HTTP/2.0" 200 342 "https://foo" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.85 Safari/537.36"' | |
start = logstring.find('[')+1 | |
end = logstring.find(']') |
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/python3 | |
import sys | |
import json | |
import html | |
from escapejson import escapejson | |
from lxml import etree | |
import lxml.html | |
from io import StringIO, BytesIO | |
with open(str(sys.argv[1]),'r') as f: |