This file contains 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 | |
watchdog () { | |
datum=$(date -u) | |
scna="$(basename $1)" | |
ps -ef | grep $1 | grep -v grep; | |
if [[ $? -eq 0 ]]; then | |
echo "$datum - OK, $scna is running"; | |
else | |
echo "$datum - $1 died, resurrecting $scna now..."; |
This file contains 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
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
const char* ssid = "my_SSID"; | |
const char* password = "my_PASSWORD"; | |
/* | |
usage: |
This file contains 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
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
#include <TM1637Display.h> | |
/* | |
thanks to: | |
https://github.com/avishorp/TM1637 | |
http://www.esp8266learning.com/tm1637-7-segment-display-example.php | |
*/ |
This file contains 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 | |
# ###################################################################################################### | |
## WARNING: THIS SCRIPT HAS THE POTENTIAL TO HARM YOUR DSM ON CURRENT VERSIONS OF DSM! DO NOT USE IT | |
# ###################################################################################################### | |
# this script moves ALL packages from volume-x to volume-y | |
# For Synology DSM - tested with DSM6.1 | |
# change these values | |
from_vol="volume1" |
This file contains 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
#include <ESP8266WiFi.h> | |
#include <SPI.h> | |
#include <MFRC522.h> | |
/* | |
hardware: RFID-RC522, wemos d1 mini, some rfid tags, wifi | |
software: MFRC522 library, webserver (on the other side) | |
wireing: http://lazyzero.de/elektronik/esp8266/rfid_mqtt/start | |
get the MFRC522 arduino library from: | |
get the library at https://github.com/miguelbalboa/rfid |
This file contains 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
# Please make this file available to others | |
# by sending it to <[email protected]> | |
# | |
# this config file was automatically generated | |
# using lirc-0.9.0-pre1(default) on Wed Jan 10 02:29:33 2018 | |
# | |
# contributed by auckenox | |
# | |
# brand: pioneer |
This file contains 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
# Please make this file available to others | |
# by sending it to <[email protected]> | |
# | |
# this config file was automatically generated | |
# using lirc-0.9.0-pre1(default) on Wed Jan 10 02:41:27 2018 | |
# | |
# contributed by auckenox | |
# | |
# brand: Dyson Hot + Cool AM05 |
This file contains 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
""" | |
you will need smbus, install it: | |
apt install python-smbus | |
only keys 0-7 are covered by this script | |
this script will show you which keys you touched | |
tested with a: 16 Keys I2C Capacitive Touch TTP229 Module | |
""" | |
import smbus,time | |
bus = smbus.SMBus(1) |
This file contains 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 | |
/* requires sysstat: apt install sysstat */ | |
function parseIostatLine($line) | |
{ | |
$re = '/(?\'device\'[a-z0-9]{3}) \s* (?\'tps\'[\d\.]*) \s* (?\'readS\'[\d\.]*)\s*(?\'writeS\'[\d\.]*)\s*(?\'read\'[\d\.]*)\s*(?\'write\'[\d\.]*)/m'; | |
preg_match_all($re, $line, $matches, PREG_SET_ORDER, 0); | |
if($matches[0]['read']==''&&$matches[0]['write']==''){return false;} | |
return array( | |
"device"=>$matches[0]['device'], |