Skip to content

Instantly share code, notes, and snippets.

@TheRealFalseReality
TheRealFalseReality / send_snapshot_conditional.yaml
Last active August 28, 2024 20:06
Camera - Creates a camera snapshot if motion is detected and sends a notification to your device with the picture when certain conditions are met.
blueprint:
name: Camera - Send & Save Camera snapshot when if a binary sensor's state turns
'off' to 'on', with Conditions
description: This automation blueprint creates a camera snapshot if motion is detected,
or if a binary sensor's state turns 'off' to 'on', and sends a notification to
your phone with the picture. Clicking the notification will navigate to dashboard
URL. [More Info](https://community.home-assistant.io/t/camera-send-save-snapshot-to-mobile-device-when-motion-is-detected-with-conditions/604156)
(v2.2.9) [Automation]
author: TheFalseReality
homeassistant:
@zeehio
zeehio / 80-mount-usb-to-media-by-label.rules
Last active September 24, 2024 04:30 — forked from eklex/80-mount-usb-to-media-by-label.rules
udev rule for Home Assistant OS (hassio) to mount USB drives into the Supervisor Media directory
#
# udev rule
# Mount USB drive to the media directory using the partition name as mount point
#
# Description:
# Created for Home Assistant OS, this rule mounts any USB drives
# into the Hassio media directory (/mnt/data/supervisor/media).
# When a USB drive is connected to the board, the rule creates one directory
# per partition under the media directory. The newly created partition is named
# as the partition name. If the partition does not have a name, then the following
@blizzrdof77
blizzrdof77 / zha-moes-zigbee-rotary-smart-knob-remote-control.yaml
Last active September 7, 2024 16:15
ZHA - Moes Tuya Smart Knob (TS004F) controller for remote control devices
blueprint:
name: ZHA - Moes Tuya Smart Knob (TS004F) controller for remote control devices
description: Control remotes (e.g. volume up/down) with a Moes Tuya smart knob (the spinny ones). You can set functions for single press, rotating left, and rotating right.
domain: automation
source_url: https://gist.github.com/blizzrdof77/c30c388ca5f4ce7ed72752296767417d
input:
remote:
name: Smart Knob Device
description: Moes Tuya Smart Knob Device to use
selector:
@bohwaz
bohwaz / php-8.1-strftime.php
Last active May 14, 2024 13:55
strftime() replacement function for PHP 8.1
<?php
namespace PHP81_BC;
/**
* Locale-formatted strftime using \IntlDateFormatter (PHP 8.1 compatible)
* This provides a cross-platform alternative to strftime() for when it will be removed from PHP.
* Note that output can be slightly different between libc sprintf and this function as it is using ICU.
*
* Usage:
* use function \PHP81_BC\strftime;
@artizirk
artizirk / nginx.conf
Last active February 26, 2024 09:38
Nginx config for scaling matrix synapse server via workers
# Matrix Synapse workers example config
# backends
upstream synapse_master {
server 192.19.18.12:38008;
}
upstream synapse_federation {
server 192.19.18.12:8083;
}
@niemyjski
niemyjski / save-camera-snapshot-notification-on-motion.yaml
Last active August 23, 2024 08:03
Home Assistant Blueprint - Save a camera snapshot with archive when motion is detected
blueprint:
name: Save a camera snapshot when motion is detected
description: Save a camera snapshot with archive when motion is detected
domain: automation
source_url: https://gist.github.com/niemyjski/08c566a4fe64fb2e70998ee4f38c9d1e
input:
motion_sensor:
name: Motion sensor
description: The sensor wich triggers the snapshot creation
selector:
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active September 26, 2024 09:36
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@lukasnellen
lukasnellen / 00-docker-shorewall.md
Last active September 23, 2024 04:19
setup shorewall for docker networking beyond the default bridge network, e.g., for docker-compose

Docker(-compose) with shorewall

The shorewall documentation explains in http://shorewall.org/Docker.html how to configure shorewall for use with docker. The problem with the configuration is that it only allows connections from the host to the main bridge docker0. Connections to other networks on dynamically created bridges, with names starting by default with br-, is blocked. Instead of the recommended contents of /etc/shorewall/interfaces, use wild-card interface names as follows:

#ZONE	INTERFACE	OPTIONS
#dock	docker0		bridge     # disabled default recommendation
dock 	docker0		physical=docker+,routeback=1
dock 	br		physical=br-+,routeback=1
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active September 17, 2024 08:30
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
@Kibur
Kibur / office2016_activation.bat
Last active July 26, 2024 10:50
Microsoft Office 2016 activation script for all versions
@echo off
title Activate Microsoft Office 2016 ALL versions for FREE!&cls&echo ============================================================================&echo #Project: Activating Microsoft software products for FREE without software&echo ============================================================================&echo.&echo #Supported products:&echo - Microsoft Office Standard 2016&echo - Microsoft Office Professional Plus 2016&echo.&echo.&(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&echo.&echo ============================================================================&ech