Skip to content

Instantly share code, notes, and snippets.

View Actpohomoc's full-sized avatar

ACTPO HOMOC Actpohomoc

View GitHub Profile
@rmarskell
rmarskell / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active November 27, 2021 08:55 — forked from sbyx/low-battery-level-detection-notification-for-all-battery-sensors.yaml
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').
@peterlavelle
peterlavelle / autoshutdown-proxmox-ve.sh
Created August 23, 2021 13:04
#Quick script to shutdown a laptop when AC power is no longer being supplied and the battery is low. Can optionally send an alert out via Pushover or email (Need a functioning mail server for email) Tested on Proxmox VE. Needs the following packages installed on the target server: powermgmt-base, curl, util-linux
#!/bin/bash
#Quick script to shutdown a laptop when AC power is no longer being supplied and the battery is low.
#Can optionally send an alert out via Pushover or email (Need a functioning mail server for this)
#Tested on Proxmox VE. Needs the following packages installed on the target server: powermgmt-base curl util-linux
#Set alerting method (pushover/email/off)
#a value of 'off' here will disable all alerts
#Alerting method
@Actpohomoc
Actpohomoc / Макет.html
Created August 19, 2020 11:30 — forked from PlugFox/Макет.html
Журнал Регистрации ➜ Телеграмм
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Журнал регистрации</title>
<style>.container{margin:0 auto;width:100%}@media only screen and (min-width:601px){.container{width:95%}}@media only screen and (min-width:993px){.container{width:90%}}.deep-orange{background-color:#ff5722!important}table,th,td{border:0}table{width:100%;display:table;border-collapse:collapse;border-spacing:0}table.striped tr{border-bottom:0}table.striped>tbody>tr:nth-child(odd){background-color:rgba(242,242,242,0.5)}table.striped>tbody>tr>td{border-radius:0}table.highlight>tbody>tr{-webkit-transition:background-color .25s ease;transition:background-color .25s ease}table.highlight>tbody>tr:hover{background-color:rgba(255,87,34,0.5)}table.centered thead tr th{text-align:center}tr{border-bottom:1px solid rgba(0,0,0,0.12)}td,th{padding:15px 5px;display:table-cell;text-align:left;vertical-align:middle;border-r
@MatthewFlamm
MatthewFlamm / Alarm system.md
Last active February 27, 2024 22:37
Esp32 home alarm system with home assistant and esphome

Alarm system using esp32 with esphome and home assistant

@danie1k
danie1k / download_opnsense_cert.curl.sh
Last active September 11, 2023 22:10
Export SSL Certificate from OPNsense to file
#!/usr/bin/env sh
# Based on https://forum.netgate.com/post/785981
HOSTNAME=""
CERT_ID=""
USERNAME=""
PASSWORD=""
echo "Downloading certificate id=${CERT_ID} from ${HOSTNAME} into cert.pem file..."
@whiskerz007
whiskerz007 / gist:9d146fcb99e6db1cfb9d21bd7287f5ed
Created August 7, 2019 10:12
Create a Windows Scheduled Task to synchronize the clock when the internet is established
C:\WINDOWS\System32\schtasks.exe /CREATE /RU "NT AUTHORITY\LOCAL SERVICE" /SC ONEVENT /EC "Microsoft-Windows-NetworkProfile/Operational" /MO "*[System[Provider[@Name='Microsoft-Windows-NetworkProfile'] and EventID=10000]]" /TN "Update Time When Connected to Internet" /TR "C:\WINDOWS\System32\w32tm.exe /resync /force"
@jeffehobbs
jeffehobbs / vibration_sensor_ESP32_HA_how_to.txt
Last active March 7, 2024 09:59
Vibration Sensor for ESPHome/Home Assistant
GOAL: Send a push notification after the (vibrations from the) dryer cycle has completely stopped.
USING:
* Inexpensive hardware (see below)
* ESPhome (http://esphome.io) for chip firmware
* Home Assistant (http://hass.io) for sensor state machine and push notification.
---
SHOPPING LIST:
@basoro
basoro / proxmox-proxy
Created May 25, 2019 20:45
Running Proxmox behind a single IP address
I ran into the battle of running all of my VMs and the host node under a single public IP address. Luckily, the host is just pure Debian, and ships with iptables.
What needs to be done is essentially to run all the VMs on a private internal network. Outbound internet access is done via NAT. Inbound access is via port forwarding.
Network configuration
Here’s how it’s done:
Create a virtual interface that serves as the gateway for your VMs:
@PlugFox
PlugFox / .proxyauth
Created May 15, 2019 10:29
Установка и настройка прокси-сервера 3proxy на Debian/Ubuntu
## addusers in this format:
#user:CL:password
##see for documentation: http://www.3proxy.ru/howtoe.asp#USERS
#
# Username
MyUser:CL:MyPassword