I hereby claim:
- I am tugzrida on github.
- I am tugzrida (https://keybase.io/tugzrida) on keybase.
- I have a public key whose fingerprint is 4D61 B752 B355 94DC CB7E 61C3 CE91 5A0B C269 4D91
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
A simple python-based CLI front end for dnsleaktest.com
Usage details available with -h
Should run on most platforms as all modules are included in the standard python install
When you visit dnsleaktest.com and run a test, your browser attempts to load resources from randomly generated subdomains of test.dnsleaktest.com.
| #!/usr/bin/env python | |
| # Simple python2/3 routine to get a SID from a FRITZ!Box as it took me forever to figure this out | |
| # If you don't have https set up, set the urls to http and remove the two verify options | |
| # If you do have https set up, point the two verify options to the CA cert | |
| # (unless your FB cert is publicly signed, then remove the verify options) | |
| from requests import get |
| #!/bin/bash | |
| # Requires install of dnsutils package. Can be added to a crontab with root permissions | |
| # for however often you want to refresh the cached IP. | |
| host="pfclient-upload.planefinder.net" | |
| ipaddr=$(dig +short "$host" | awk '{ print ; exit }') | |
| grep -v "$host" /etc/hosts | tee /etc/hosts | |
| echo "$ipaddr $host" | tee -a /etc/hosts |
| #!/usr/bin/python3 | |
| # v0.5 Created by Tugzrida(https://gist.github.com/Tugzrida/5910e1b1a9d096e297e793890b7c5236) | |
| # This script should be added to the root crontab (or whichever user controls nginx) | |
| # to run perhaps once or twice a day. It will create and keep up to date | |
| # the file /etc/nginx/conf.d/cloudflare_realip.conf which will make all of nginx | |
| # trust and use Cloudflare's provided client IP's. | |
| # | |
| # After updating the file, it runs nginx -t to check the config for errors, and if | |
| # any are found, nginx will not be restarted to avoid taking things down. You may wish | |
| # to add your own error reporting to the handle_error function below. |
| #!/bin/bash | |
| # hashchecker Created by Tugzrida(https://gist.github.com/Tugzrida) | |
| # A simple utility that accepts a file path and expected md5, sha1 or | |
| # sha256 hash, then verifies the file matches the expected hash. | |
| # Hash length assumptions: | |
| # md5 - 32 chars | |
| # sha1 - 40 chars | |
| # sha256 - 64 chars |
| uview.upload.tool=avrdude | |
| uview.bootloader.tool=avrdude | |
| uview.name=MicroView | |
| uview.upload.protocol=arduino | |
| uview.upload.maximum_size=32256 | |
| uview.upload.speed=115200 | |
| uview.bootloader.low_fuses=0xff | |
| uview.bootloader.high_fuses=0xde | |
| uview.bootloader.extended_fuses=0x05 | |
| uview.bootloader.file=optiboot/optiboot_atmega328.hex |
| #!/usr/bin/env python | |
| # v0.1 Created by Tugzrida(https://gist.github.com/Tugzrida) | |
| # Dependencies: python, requests | |
| # Add your Cert Spotter API key below, then save this script to | |
| # /etc/letsencrypt/renewal-hooks/deploy/certspotter_acknowledge with execute permissions. | |
| # Any certificates renewed by this instance of Certbot will then be automatically | |
| # marked as acknowledged on Cert Spotter to reduce notifications for legitimate |
| import time, socket | |
| from struct import unpack | |
| from machine import RTC | |
| standardTimeOffset = 60 * 60 * 10 # The base TZ UTC offset in sec, AEST(UTC+10) | |
| summerTimeDifference = 60 * 60 * 1 # The difference between the base TZ and DST TZ in sec, AEDT(UTC+11), 1 hour ahead | |
| rtc = RTC() | |
| lastSync = 0 |
This is a fairly involved process as it seems that no one currently makes a pre-made product that measures water usage from a household meter.
It took quite a while to set up due to WiFi issues and the flow rate code still needs some work as the output is semi-random at the moment.
If you get stuck anywhere I'm happy to answer questions provided this doesn't go viral 😂