- Generelle Entwicklung
- Module sollten grundsätzlich auf Englisch erstellt und ins Deutsche übersetzt werden
- Fehlermeldungen dürfen mit @ nur verdeckt werden, wenn der Rückgabewert überprüft wird und bei einem echten Fehlerfall dies dem Nutzer mitgeteilt wird. Andernfalls findet man im Fehlerfall den Verursacher niemals heraus. Sichtbare Fehler können behoben werden. Unsichtbare Fehler bringen inkonsistentes Verhalten und frustrieren nur alle beteiligten.
- Daten, welche der Benutzer nicht benötigt, sollten auch nicht in Variablen erscheinen (z.B. irgendwelche Puffer / Temporäre Inhalte in String Variablen). Dafür bietet das SDK die SetBuffer/GetBuffer Funktionen, welches über eine JSON Kodierung auch mehrere Elemente enthalten können.
- Der Inhalt der library.json / module.json darf nur die von der Dokumentation definierten Felder enthalten. Andere Felder können in zukünftigen Version seitens IP-Symcon verwendet werden und sind vollständig r
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
let aws = require("aws-sdk"); | |
let platformArn = "arn:aws:sns:eu-west-1:*******************"; | |
(async function() { | |
let sns = new aws.SNS({region: 'eu-west-1'}); | |
let request = { | |
"PlatformApplicationArn": platformArn | |
}; |
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
diff -ur buildroot/package/tzdata/tzdata.mk buildroot-patched/package/tzdata/tzdata.mk | |
--- buildroot/package/tzdata/tzdata.mk 2020-08-26 21:07:57.000000000 +0200 | |
+++ buildroot-patched/package/tzdata/tzdata.mk 2020-08-27 16:54:38.000000000 +0200 | |
@@ -41,18 +41,13 @@ | |
define TZDATA_INSTALL_TARGET_CMDS | |
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/zoneinfo | |
cp -a $(HOST_DIR)/share/zoneinfo/* $(TARGET_DIR)/usr/share/zoneinfo | |
- cd $(TARGET_DIR)/usr/share/zoneinfo; \ | |
- for zone in posix/*; do \ | |
- ln -sfn "$${zone}" "$${zone##*/}"; \ |
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
*** Install with... | |
sudo nano /etc/systemd/system/switchOff.service | |
sudo systemctl start switchOff | |
sudo systemctl enable switchOff | |
************************************* | |
[Unit] | |
Description=SwitchOff Tool | |
After = NetworkManager-wait-online.service network.target network-online.target dbus.service | |
Wants = NetworkManager-wait-online.service network-online.target |
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
//Install dependencies: sudo apt install libxss-dev | |
//Compile with: gcc -o switchOff switchOff.c -lXss -lX11 | |
#include <X11/extensions/scrnsaver.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
int main(void) { | |
Display *dpy = NULL; |
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 | |
//Docs: http://srp.stanford.edu/design.html | |
//Test Vector: https://github.com/wolfSSL/wolfssl/issues/18#issuecomment-83941582 | |
//Copyright: Michael Maroszek | |
//Hint: The old version used BCMath with was 100 times slower! | |
//Modulus | |
$N = "FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 29024E08 8A67CC74 |
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 | |
$_IPS = array ( | |
'SELF' => 0, | |
'SENDER' => '', | |
'VALUE' => 0, | |
'OLDVALUE' => 0, | |
'OLDUPDATED' => 0, | |
'OLDCHANGED' => 0, | |
'VARIABLE' => 0, |
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 | |
/** | |
* Copyright: Michael Maroszek | |
* Version: 1.3, 07.08.2019 | |
* Requires: IP-Symcon 5.2 or newer | |
*/ | |
echo "<?php" . PHP_EOL . PHP_EOL; |
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
#include <stdio.h> | |
#include <iostream> | |
#include <thread> | |
#include <list> | |
#include <sapi/embed/php_embed.h> | |
int main(int argc, char* argv[]) { | |
int threadCount = 5; |
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
*** Enable src deps... | |
sudo nano /etc/apt/sources.list | |
sudo apt update | |
*** Install package deps | |
sudo apt build-dep xserver-xorg-input-elographics | |
*** Download package source (without root!) | |
apt source xserver-xorg-input-elographics | |
*** Apply patch inside xserver-xorg-input-elographics-1.4.1 folder | |
patch -p1 < xxx.patch | |
*** Rebuild package inside xserver-xorg-input-elographics-1.4.1 folder |
NewerOlder