Skip to content

Instantly share code, notes, and snippets.

View miklos-szel's full-sized avatar
💭
42

Miklos Szel miklos-szel

💭
42
View GitHub Profile
@miklos-szel
miklos-szel / wiim_power_control.sh
Last active August 20, 2024 06:52
Wiim soft trigger for amps without 12v trigger (with Tasmota power plug)
#!/bin/bash
## sudo apt install python3-pip
##
# URL and command details
URL="http://192.168.0.65:49152/description.xml"
COMMAND="/usr/local/bin/upnp-client --pprint call-action $URL AVTransport/GetInfoEx InstanceID=0"
POWER_URL="/usr/bin/wget -O /dev/null -o /dev/null http://192.168.0.202/cm?cmnd=Power%20"
INTERVAL=5
# Initialize previous status
docker run -h proxyweb --name proxyweb --network="host" -d proxyweb/proxyweb:latest
git clone https://github.com/edmodo/proxyweb
cd proxyweb
make install
docker run -h proxyweb --name proxyweb -p 5000:5000 -d proxyweb/proxyweb:latest
@miklos-szel
miklos-szel / source.html
Last active April 24, 2018 03:02
motionEyeOs embed frame
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#414141">
@miklos-szel
miklos-szel / sql
Last active May 18, 2018 17:50
sample table
CREATE TABLE `users` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`username` CHAR(128),
`passwordhash` VARCHAR(32),
`description` TEXT,
`joined` datetime,
`last_visit` datetime,
PRIMARY KEY (`id`),
UNIQUE KEY `last_visit_username` (`last_visit`,`username`),
KEY `last_visit` (`last_visit`),
#file proxysql.cfg
# This config file is parsed using libconfig , and its grammar is described in:
# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-File-Grammar
# Grammar is also copied at the end of this file
datadir="/var/lib/proxysql"
@miklos-szel
miklos-szel / mha
Created July 21, 2016 14:40
MHA online failover sample output
Thu Jul 21 14:34:16 2016 - [info] MHA::MasterRotate version 0.56.
Thu Jul 21 14:34:16 2016 - [info] Starting online master switch..
Thu Jul 21 14:34:16 2016 - [info]
Thu Jul 21 14:34:16 2016 - [info] * Phase 1: Configuration Check Phase..
Thu Jul 21 14:34:16 2016 - [info]
Thu Jul 21 14:34:16 2016 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Thu Jul 21 14:34:16 2016 - [info] Reading application default configuration from /etc/mha_mukkannnn.cnf..
Thu Jul 21 14:34:16 2016 - [info] Reading server configuration from /etc/mha_mukkannnn.cnf..
Thu Jul 21 14:34:16 2016 - [info] GTID failover mode = 0
Thu Jul 21 14:34:16 2016 - [info] Current Alive Master: 10.77.24.236(10.77.24.236:3306)