Skip to content

Instantly share code, notes, and snippets.

@bootsa
bootsa / ha-trigger_action_on_startup.yaml
Last active February 27, 2021 06:48 — forked from nikosthanos/ha_start_notify_telegram.yaml
Perform action (e.g. send notification, etc) when Home Assistant starts
blueprint:
name: Action on HA start
description: Do something when Home Assistant has successfully started
domain: automation
source_url: https://gist.github.com/bootsa/d73cb4161ecadddb17939339affafa9f
input:
actions:
name: Actions
description: Actions (e.g. pushing a notification, TTS announcement, ...)
selector:
@bootsa
bootsa / ha-trigger_action_on_appliance_finish.yaml Home Assistant Blueprint: Notify or do something when an appliance like a dishwasher or washing machine finishes
blueprint:
name: Appliance has finished
description: Do something when an appliance (like a washing machine or dishwasher)
has finished as detected by a power sensor.
domain: automation
input:
power_sensor:
name: Power Sensor
description: 'Power sensor entity (e.g. from a smart plug device).'
selector:
@bootsa
bootsa / Using Git to Manage a Live Web Site.md
Last active January 12, 2018 13:10 — forked from Nilpo/Using Git to Manage a Live Web Site.md
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@bootsa
bootsa / generate_key.py
Last active December 7, 2017 17:48 — forked from airtonix/generate_key.py
Django Settings. Dynamic secret key. Keep your secret key out of version control.
from hashlib import md5, sha1
from base64 import urlsafe_b64encode as b64encode
import random, string
random.seed()
pattern = "%%0%dX"
junk_len = 1024
def generate_key(max_length, seed_length, encoder=b64encode, digester=sha1):