Configure allowed callback urls:
https://pad.server.com/auth/oauth2/callback
http://pad.server.com/auth/oauth2/callback
Configure scopes:
#!/bin/bash | |
# Set traps to catch exite signals | |
trap stopservice SIGINT | |
trap stopservice SIGKILL | |
trap stopservice SIGTERM | |
function stopservice { | |
if [[ ! -z ${DATA_HANDLE} && ! -z ${CLIENT_CID} ]] | |
then |
/* | |
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/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 |
/* | |
* Building: cc -o com com.c | |
* Usage : ./com /dev/device [speed] | |
* Example : ./com /dev/ttyS0 [115200] | |
* Keys : Ctrl-A - exit, Ctrl-X - display control lines status | |
* Darcs : darcs get http://tinyserial.sf.net/ | |
* Homepage: http://tinyserial.sourceforge.net | |
* Version : 2007-07-31 | |
* | |
* Ivan Tikhonov, http://www.brokestream.com, kefeer@brokestream.com |
#!/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): |
#!/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 |