Skip to content

Instantly share code, notes, and snippets.

View blizzrdof77's full-sized avatar

Ben Wagner blizzrdof77

View GitHub Profile
@blizzrdof77
blizzrdof77 / zha_lutron_aurora_blueprint - toggle.yaml
Created February 3, 2025 23:28 — forked from mitch-mcfarlane/zha_lutron_aurora_blueprint - toggle.yaml
Blueprint for Lutron Aurora automations in ZHA. Toggles light on each button press
blueprint:
name: ZHA - Lutron Aurora Dimmer Automation Improved
description: 'Control lights with a Lutron Aurora Dimmer Pressing in the dimmer
button will toggle lights regardless of dimmer status. Rotating the dimmer will increase and decrease the light brightness.
Adjust the sensitivity if updates from the dimmer are being sent too quickly. Adds the ability to dim to off and disable the button. (The button is unreliable for most people.) Based on the great work of bjpetit and richlee91!'
domain: automation
input:
remote:
name: Lutron Aurora Dimmer Switch
description: Lutron Aurora Z3-1BRL
@blizzrdof77
blizzrdof77 / automatic-turn-off.yaml
Last active January 12, 2024 03:08 — forked from tdiekel/automatic-turn-off.yaml
Automatic light or switch turn off after time
blueprint:
name: Automatic light or switch turn off after timeout
description: >
Given a switchable entity, when it is turned on, it will automatically turn off after a set timeout period off after a certain period of time.
Based on:
- [Turn Off Light After Time](https://gist.github.com/JonTheNiceGuy/5ac636739165dd593030c0fed16eb618) by [JonTheNiceGuy](https://gist.github.com/JonTheNiceGuy)
- [Automatic light or switch turn off after time](https://gist.github.com/tdiekel/88ac0967cf6d3002aa91e65e3768eb45) by [tdiekel](https://gist.github.com/tdiekel)
domain: automation
input:
entity:
@blizzrdof77
blizzrdof77 / zha-area-based-ikea-symfonisk-rotary-button-lights.yaml
Last active January 21, 2025 16:29 — forked from seamus65/zha_symfonisk_remote_lights.yaml
Blueprint for Home Assistant | Zigbee IKEA Symfonisk sound controller (for lights) [ZHA]
blueprint:
name: ZHA - Area-Based IKEA Symfonisk Sound Controller Knob Light Dimmer
description: Control lights with an IKEA Symfonisk sound controller (the spinny ones).
You can set functions for single press, double press, and triple press (e.g., scenes or scripts).
Rotating adjusts brightness smoothly.
domain: automation
input:
remote:
name: Remote
description: IKEA Symfonisk controller to use
@blizzrdof77
blizzrdof77 / zha-lutron-aurora-smart-area-blueprint.yaml
Last active November 1, 2024 15:44 — forked from bjpetit/zha_lutron_aurora_blueprint.yaml
HASS Blueprint | ZHA - Lutron Aurora Smart Area with Night-Light Dimmer
blueprint:
name: ZHA - Lutron Aurora Smart Area with Night-Light Dimmer (v3.0)
description: Control lights of a provided area with a Lutron Aurora Dimmer Pressing in the dimmer button will toggle between turning lights on to full brightness, and turning the lights off. Rotating the dimmer will increase and decrease the light brightness. Also supports late-night light groups.
domain: automation
source_url: https://gist.github.com/blizzrdof77/a0d048e58b8462748017e081bf3b9099
input:
remote:
name: Lutron Aurora Dimmer Switch
description: Lutron Aurora Z3-1BRL
selector:
@blizzrdof77
blizzrdof77 / open-in-finder.sh
Last active April 6, 2020 06:41 — forked from haifengkao/open_finder_tab.sh
A shell script to open a folder in Finder in a new tab or new window (if no window present)
#!/bin/bash
# open the current folder in Finder's tab
if [ -z "$1" ]; then
folder_name=$PWD
else
folder_name=$1
fi
@blizzrdof77
blizzrdof77 / fix-wordpress-permissions.sh
Last active March 9, 2020 19:39 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
@blizzrdof77
blizzrdof77 / manage-etc-hosts.sh
Created January 21, 2019 19:59 — forked from irazasyed/manage-etc-hosts.sh
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/usr/bin/env bash
# Path to your hosts file
hostsFile="/etc/hosts"
# Default IP address for host
ip="127.0.0.1"
# Hostname to add/remove.
hostname="$2"
@blizzrdof77
blizzrdof77 / mysql.legacy-methods.php
Last active December 17, 2018 23:18 — forked from rubo77/fix_mysql.inc.php.md
Legacy PHP & MySQL Compatibility Functions - Replaces all MySQL functions with the corresponding MySQLi functions
<?php
/**
* Legacy PHP & MySQL Compatibility Functions
*/
/**
* replacement for all mysql functions
*
* Be aware, that this is just a workaround to fix-up some old code and the resulting project
* will be more vulnerable than if you use the recommended newer mysqli-functions instead.
@blizzrdof77
blizzrdof77 / slugify.js
Last active December 6, 2018 00:13 — forked from mathewbyrne/slugify.js
Javascript Slugify
/**
* Slugify
*
* @param string text
* @return string
*/
function cleanSlug(text) {
return (
text.toString().toLowerCase()
.replace(/\s+/g, '-') /* Replace spaces with - */
@blizzrdof77
blizzrdof77 / http-redirect-target.php
Created November 29, 2018 19:52
Get HTTP redirect destination for a URL in PHP
<?php
// FOLLOW A SINGLE REDIRECT:
// This makes a single request and reads the "Location" header to determine the
// destination. It doesn't check if that location is valid or not.
function get_redirect_target($url)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);