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: Heizkoerpertemperatur bei geoeffnetem Verschluss absenken | |
description: | |
An automation blueprint that reduces the set temperature of your climate | |
device or group if a contact sensor is open for more than the preset wait time. | |
It uses the Homematic window sensor channel to set the temperature to the "Open-window | |
temperature" set in the device configuration. You should set the "Mode for temperature | |
fall detection" to Inactive to avoid conflicts. It waits until the contact is closed | |
again in order to restore the climate entity temperature. It has an optional blocking | |
entity to prevent the automation running unnecessarily, for example during the |
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 | |
IMAGE=$1 | |
PARENT=$IMAGE | |
declare -a RESULTS REV_RESULTS | |
while [ -n "${PARENT}" ]; do | |
JSON=$(docker inspect $PARENT |jq .) | |
RESULTS+=("$(echo $JSON | jq '.[0]'.ContainerConfig.Cmd)") |
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 | |
# | |
# use with: | |
# udevadm control --log-level=debug | |
# | |
# example output: | |
# | |
# ACTIVE: 0, STARTED: 142, SUCCEEDED: 142, BURSTS: 0, LONGEST: 0.366994 secs (device: dm-18, start: 11:22:09.099568, end: 11:22:09.466562) | |
# Burst detected. Resetting. |
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
<?php | |
$a = 0.20; | |
// Test 1: | |
$b = 1 - 0.80; // 0.20 | |
if ($a == $b) { | |
echo "true"; |
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 | |
# Simple one-liner to increase and print dates. To be used in scripts. | |
# Current command starts today and prints next 100 dates. | |
# | |
# Output: | |
# 2021-07-26 | |
# 2021-07-27 | |
# 2021-07-28 | |
# ... |
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 re | |
from datetime import datetime, timedelta | |
if not len(sys.argv) == 4: | |
print('\n * usage: ' + sys.argv[0] + ' %Y-%m-%d-%H:%M[:%S] add|sub #seconds\n') | |
exit(1) |
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
for i in $(rpm -qa); | |
do | |
rpm -qs $i | grep -q "not installed" && test $(rpm -qlc $i | wc -l) -ne 0 && echo $i | |
done |
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 | |
KERNEL_MODULE=softdog | |
WATCHDOG_DEVICE=/dev/watchdog | |
LOGFILE=/deadmancheck.log | |
WATCHDOG_TIMEOUT=30 | |
SLEEPTIMER=3 | |
#### |
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 | |
USE_SYSTEMD_JOURNAL=0 | |
LOGFILE=/var/log/snapper.log | |
WAIT_FOR_HITS=3 | |
SEARCH_TERM="test 123" | |
################ | |
if [ ${USE_SYSTEMD_JOURNAL} -lt 1 ] && ! [ -r ${LOGFILE} ]; then |
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
RewriteEngine On | |
RewriteCond %{DOCUMENT_ROOT}/static.html -f | |
RewriteCond %{SCRIPT_FILENAME} !static.html | |
RewriteRule ^.*$ /static.html [R=503,L] | |
ErrorDocument 503 /static.html |
NewerOlder