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
import ipaddress | |
from typing import List, Tuple | |
cidr_blocks = [ | |
"172.31.0.0/16", ...... | |
] | |
def check_cidr_conflicts(cidr_blocks: List[str]) -> List[Tuple[str, List[str]]]: | |
results = [] | |
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
blueprint: | |
name: Frigate Notifications (0.12.0.1g) | |
description: | | |
## Frigate Notifications | |
This blueprint will send a notification to your device when a Frigate event for the selected camera is fired. The notification will initially include the thumbnail of the detection, but include an actionable notification allowing you to view the clip and snapshot. | |
With this blueprint, you may send the notification to multiple devices by leaving "Device" blank and instead use a [notification group][1]. | |
### Software Version Requirements |
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
- trigger: | |
- platform: event | |
event_type: set_ppp0_data_received | |
sensor: | |
- name: UXG ppp0 Data Received | |
unique_id: uxg_ppp0_data_received | |
state: "{{ trigger.event.data.state }}" | |
- trigger: | |
- platform: event |
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
alias: UXG ppp0 stats | |
description: UXG ppp0 stats | |
trigger: | |
- platform: webhook | |
allowed_methods: | |
- POST | |
local_only: true | |
webhook_id: "uxg_ppp0_stats" | |
condition: [] | |
action: |
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
#!/bin/bash | |
# Using some hints from https://community.home-assistant.io/t/convert-webhook-into-multiple-temp-sensors/573335/2 | |
# Get Receive and Transmit bytes for ppp0 interface | |
if read data_received data_sent < <(awk '/ppp0:/{print $2, $10}' /proc/net/dev); then | |
# Validate that data_received and data_sent are numbers | |
if [[ ! "$data_received" =~ ^[0-9]+$ ]] || [[ ! "$data_sent" =~ ^[0-9]+$ ]]; then | |
echo "Error: Received invalid data. Expected numeric values for data_received and data_sent." >&2 | |
exit 1 |
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
#!/bin/sh | |
# add to cron to run every 20 minutes | |
# cru a ssh-clean "1,21,41 * * * * /jffs/cron/ssh-clean" | |
# remove cron | |
# cru d ssh-clean | |
netstat -p | grep ":ssh.*192.168.118.10:.*ESTABLISHED" | awk '{print $7}' | awk -F'/' '{print "kill", $1}' | sh |
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
#!/bin/bash | |
loblaws_10909() { | |
curl -m10 -s https://www.loblaws.ca/api/pickup-locations/1208/time-slots \ | |
-H 'Site-Banner: loblaw' | | |
jq -e -r '.timeSlots[] | select(.available!=false)' | |
} | |
loblaws_high_tech() { | |
curl -m10 -s https://www.loblaws.ca/api/pickup-locations/1028/time-slots \ |
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
Timestamp RF Strnght Quality Symbol Virtual Name | |
------------------------------------------------------------------------ | |
2019-12-16 00:04 41 100 100 100 41.1 CIII | |
2019-12-16 01:05 41 100 100 100 41.1 CIII | |
2019-12-16 02:05 41 100 100 100 41.1 CIII | |
2019-12-16 03:05 41 100 100 100 41.1 CIII | |
2019-12-16 04:05 41 100 100 100 41.1 CIII | |
2019-12-16 05:05 41 100 100 100 41.1 CIII | |
2019-12-16 06:05 41 100 100 100 41.1 CIII | |
2019-12-16 07:04 41 100 100 100 41.1 CIII |
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
version: "3" | |
# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md | |
services: | |
pihole: | |
container_name: pihole | |
image: pihole/pihole:latest | |
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host" | |
ports: |
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
# $ cat docker-compose.yml | |
version: '2' | |
services: | |
unifi: | |
image: ryansch/unifi-rpi:latest | |
container_name: unifi | |
restart: always | |
network_mode: host | |
volumes: | |
# Unifi v5.0.7 creates all of these directories (some remain empty) |
NewerOlder