Skip to content

Instantly share code, notes, and snippets.

@sekyHC
sekyHC / ha_smoke_sensors_notification.yaml
Last active November 21, 2023 19:11
homeassistant smoke sensors notification
blueprint:
name: Smoke Alert
description: 'Push notification (mobile App) + persistent notification will be sent
as soon as one of the sensors detects smoke.'
domain: automation
input:
title:
name: Title
description: Title of the notification - by example !! FIRE ALERT !!
default: ' !! FIRE ALERT !!'
@sekyHC
sekyHC / noip2.service
Created May 2, 2023 14:42 — forked from NathanGiesbrecht/noip2.service
Systemd Service file for no-ip.com dynamic ip updater
# Simple No-ip.com Dynamic DNS Updater
#
# By Nathan Giesbrecht (http://nathangiesbrecht.com)
#
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin)
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file
# 3) Copy this file noip2.service to /etc/systemd/system/
# 4) Execute `sudo systemctl daemon-reload`
# 5) Execute `sudo systemctl enable noip2`
# 6) Execute `sudo systemctl start noip2`

Setup nut and netdata on Ubuntu

In this document, I will explain how to setup nut (Network UPS Tools) on Ubuntu 18.04 and 20.04.

It is basically the next chapter of my previous gist, Upgrade nut on Ubuntu 18.04.

I'll only document USB connected UPS and not the other supported connection modes.

Install required dependencies

@sekyHC
sekyHC / snapRAID_helper.sh
Created January 23, 2023 08:15 — forked from bfg100k/snapRAID_helper.sh
Bash helper script to help with the automation of routine snapRAID tasks. Add it as a cron job to automate the routine tasks of running sync and scrub. Script will optionally send you email of status and issues encountered during the run.
#!/bin/bash
#######################################################################
# This is a helper script that keeps snapraid parity info in sync with
# your data and optionally verifies the parity info. Here's how it works:
# 1) It first calls diff to figure out if the parity info is out of sync.
# 2) If parity info is out of sync, AND the number of deleted files exceed
# X (configurable), it triggers an alert email and stops. (In case of
# accidental deletions, you have the opportunity to recover them from
# the existing parity info)
# 3) If partiy info is out of sync, AND the number of deleted files exceed X