This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# open the current folder in Finder's tab | |
if [ -z "$1" ]; then | |
folder_name=$PWD | |
else | |
folder_name=$1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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> | |
# | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Slugify | |
* | |
* @param string text | |
* @return string | |
*/ | |
function cleanSlug(text) { | |
return ( | |
text.toString().toLowerCase() | |
.replace(/\s+/g, '-') /* Replace spaces with - */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); |
NewerOlder