Configure allowed callback urls:
https://pad.server.com/auth/oauth2/callback
http://pad.server.com/auth/oauth2/callback
Configure scopes:
| /* | |
| Battery Guard | |
| Use an arduino nano and connect the input voltage with an voltage divider to A0 | |
| I used 9kOhm and 1kOhm to get a /10 divider to be able to measure up to 50V | |
| Switch points are for a 12v AGM battery. | |
| The relais is controlled via D7. | |
| */ | |
| #define NUM_READINGS 10 | |
| #define RELAIS_PIN 7 | |
| #define ADC_REF 5.0 |
| #!/bin/bash | |
| CHROOTDIR=/opt/minichroot | |
| mkdir -p ${CHROOTDIR}/bin | |
| mkdir -p ${CHROOTDIR}/lib64 | |
| mkdir -p ${CHROOTDIR}/etc/dropbear | |
| mkdir -p ${CHROOTDIR}/dev | |
| mkdir -p ${CHROOTDIR}/tmp |
| #!/bin/sh | |
| # add to config | |
| # --route-noexec | |
| # --route-up script.sh | |
| # --route-pre-down script.sh | |
| echo "++++++++++++ $script_type ++++++++++++" | logger -t ovpn_route | |
| #env | tee -a /tmp/vpn | |
| #echo "--------------------------------------" | tee -a /tmp/vpn |
| #!/usr/bin/python3 | |
| # | |
| # Simple Bloom filter implementation in Python 3 | |
| # Copyright 2017 Hector Martin "marcan" <marcan@marcan.st> | |
| # Licensed under the terms of the MIT license | |
| # | |
| # Written to be used with the Have I been pwned? password list: | |
| # https://haveibeenpwned.com/passwords | |
| # | |
| # Download the pre-computed filter here (968MB, k=11, false positive p=0.0005): |
| #listener 1883 192.168.178.25 | |
| listener 1883 | |
| log_dest syslog | |
| log_dest stdout | |
| log_dest topic | |
| log_type error | |
| log_type warning | |
| log_type notice | |
| log_type information | |
| connection_messages true |
| #!/usr/bin/env python | |
| import paho.mqtt.client as mqtt | |
| import json | |
| import time | |
| import requests | |
| nodename="sonoff" | |
| apikey="--xx--" | |
| url="https://emoncms.org/input/post" |
| #!/bin/sh | |
| # Author: bri | |
| # Will add all interfaces in state DOWN to /etc/network/interfaces.d/auto.cfg | |
| # with option dhcp | |
| ## for iface in `ls /sys/class/net/`; do | |
| /sbin/ip -br l | awk '/DOWN/{print $1}' | | |
| while read dev | |
| do |