I hereby claim:
- I am blizzrdof77 on github.
- I am blizzrdof77 (https://keybase.io/blizzrdof77) on keybase.
- I have a public key ASDvmPKv9H4qgAUEEFgHXoMfeJsXDgSaxfRp31cYzkc_0go
To claim this, I am signing this object:
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: |
# ----------------------------------------- | |
# Create new environment variable & print assignment statement to your shell's '.rc' file | |
# | |
# @1 = variable new | |
# @2 = variable definition | |
# @requires: '~/.zshrc' or '~/.bashrc' | |
# ----------------------------------------- | |
function new_env_var { | |
local detected_shell="$(ps -o comm= -p $$)" | |
local rcfile=$(echo "${HOME}/.${detected_shell//-/}rc") |
#!/bin/bash | |
# open the current folder in Finder's tab | |
if [ -z "$1" ]; then | |
folder_name=$PWD | |
else | |
folder_name=$1 | |
fi |
#!/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> | |
# | |
I hereby claim:
To claim this, I am signing this object:
SDG = SDG || {}; | |
SDG.loadStyle = function(cssSource, append) { | |
var append = typeof append === 'undefined' ? true : append, | |
external = !(cssSource.indexOf('{') > 0 && cssSource.indexOf('}') > 1), | |
newElem = external ? ((function() { | |
i = document.createElement('link'); | |
i.rel = 'stylesheet'; | |
i.href = cssSource; | |
i.type = 'text/css'; |
#!/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" |
<?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. |
/** | |
* Slugify | |
* | |
* @param string text | |
* @return string | |
*/ | |
function cleanSlug(text) { | |
return ( | |
text.toString().toLowerCase() | |
.replace(/\s+/g, '-') /* Replace spaces with - */ |
<?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); |