Skip to content

Instantly share code, notes, and snippets.

@GeekVisit
GeekVisit / README.md
Last active February 1, 2023 05:20
24 Hour Freeze Warning

This checks openweathermap.org for the low temperatures for the next 24 hours and provides an alert to Home Assistant if outside temperature is or will go below freezing. Imperial (Farenheit) temperature is used and US Zip code is used, but the flow can easily be edited to long/latitude. See Forecast Api documentation for options. Make sure you update the "Get 5 Day Forecast" node to edit the url to put in your zip and token "http://api.openweathermap.org/data/2.5/forecast?zip=zip=[REPLACE_WITH_YOUR_ZIP_AND_COUNTRY_ID]&appid=[REPLACE_WITH_YOUR_API_KEY]&units=imperial" (api token you can get free at Openweathermap.org). The message states the first time the temperature dips below freezing and also states the lowest temperature in next 24 hours.

Screenshot of Flow

Example screenshot of Windows Desktop notification using [Homeassi

@GeekVisit
GeekVisit / wireguard.conf
Created March 26, 2021 16:23 — forked from nealfennimore/wireguard.conf
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@GeekVisit
GeekVisit / doc.txt
Created March 26, 2021 16:21 — forked from MartinBrugnara/doc.txt
DigitalOcean, assign public ipv6 to wireguard clients
# /etc/sysctl.d/wireguard.conf
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.eth0.proxy_ndp=1
#/etc/wireguard/wg0.conf (DO virtual machine)
[Interface]
# The server interface does not actually need an ipv6.
# The 2 following must be repeated for each used addres [0, 1]
@GeekVisit
GeekVisit / wsl2-network.ps1
Last active March 22, 2021 06:17 — forked from daehahn/wsl2-network.ps1
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}