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 | |
// valid credentials | |
$valid_user='user'; | |
$valid_password='pwd'; | |
if (isset($_POST['login']) && isset($_POST['pwd'])) { | |
// trying to log | |
if ( ($_POST['login'] == $valid_user) and | |
($_POST['pwd'] == $valid_password) ) { |
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
<html> | |
<head> | |
<!-- include Synology SSO js --> | |
<script src="http://ds:5000/webman/sso/synoSSO-1.0.0.js"></script> | |
</head> | |
<body> | |
<script> | |
/** Display login/logout button. |
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 <stdio.h> | |
#include <errno.h> | |
#include <termios.h> | |
#include <unistd.h> | |
#include <string.h> | |
/* source : http://stackoverflow.com/a/6947758 */ | |
int set_interface_attribs (int fd, int speed, int parity) { | |
struct termios tty; |
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
<html> | |
<head> | |
<title> static images </title> | |
</head> | |
<body> | |
<pre> | |
<?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
/* Deep Sleep - Blink | |
* | |
* Blinks the onboard LED, sleeps for 10 seconds and repeats | |
* | |
* Connections: | |
* D0 -- RST | |
* | |
* If you cant reprogram as the ESP is sleeping, disconnect D0 - RST and try again | |
*/ |
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
#!/usr/bin/env python3 | |
# doc : http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html | |
import tkinter as tk | |
class Application(tk.Frame): | |
def __init__(self, master=None): | |
super().__init__(master) | |
self.master = master |
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
#!/usr/bin/env python3 | |
# fenetre avec grille de boutons | |
# doc en francais : http://tkinter.fdex.eu/index.html | |
import tkinter as tk | |
root = tk.Tk() | |
root.resizable(False, False) | |
# affiche un chaine passée en paramètre |
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
/** | |
* Lego (Powered Up) train control from Home Assistant / MQTT with BellRing | |
* | |
* Licence: GPLv3 | |
* | |
* needed libraries: | |
* legoino https://github.com/corneliusmunz/legoino | |
* > 1.1.0, tested with commit 4daae4f683b087b8c443a4c813934e3dfff41d69 | |
* home-assistant-integration https://github.com/dawidchyrzynski/arduino-home-assistant | |
* 1.3.0 |