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 - Tuya 4-Button Scene Switch | |
description: Automate your Tuya 4-Button Scene Switch via ZHA. | |
domain: automation | |
input: | |
switch: | |
name: Tuya Zigbee Switch | |
description: Tuya 4-Button Scene Switch to use | |
selector: | |
device: |
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
ERPNEXT_VERSION=v13 | |
FRAPPE_VERSION=v13 | |
MARIADB_HOST=mariadb | |
MYSQL_ROOT_PASSWORD=a_mysql_Passw0rd_CHANGEME | |
SITE_NAME=my.mywebsite.com | |
SITES=`my.mywebsite.com` | |
DB_ROOT_USER=root | |
ADMIN_PASSWORD=myfancyadminPasswordCHANGEME | |
INSTALL_APPS=erpnext | |
SKIP_NGINX_TEMPLATE_GENERATION=0 |
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
const MY_DOMAIN = "agodrich.com" | |
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2" | |
const DISQUS_SHORTNAME = "agodrich" | |
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
const corsHeaders = { | |
"Access-Control-Allow-Origin": "*", |
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
// Wait for jQuery, using the full name for compatability reasons | |
jQuery('document').ready(function(){ | |
// This is our main function that will loop | |
function doFFGa(){ | |
// If google tag manager or analytics is NOT detected | |
// Then loop this function with a two second delay | |
// return afterwards just in case | |
if(typeof gtag != 'function') { |
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
// Setting up and splitting up the parameters passed to this url | |
var QueryString = (function (paramsArr) { | |
let params = {}; | |
for (let i = 0; i < paramsArr.length; i++) { | |
let param = paramsArr[i].split("=", 2); | |
if (param.length !== 2) continue; | |
params[param[0]] = decodeURIComponent(param[1].replace(/\+/g, " ")); | |
} | |
return params; | |
})(window.location.search.substr(1).split("&")); |
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
// for inputData set: | |
// keys = the array's list of key values (Such as when WooCommerce sends of two arrays for one array of data. Such as "metakeys" | |
// values = is the array's value list | |
// of course, you can modify this easy to simply accept one array ... or as many as you'd like. | |
// Currently, this code does NOT do any error checking (other than exists()) nor sanitization | |
output = { | |
'the_output_field_label_here': '', | |
} |
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 | |
function list_categories_and_children($atributes) | |
{ | |
$atts = shortcode_atts(array( | |
'main' => null | |
), $atributes); | |
$cat_id = $atts['main']; | |
if (isset($atts['main'])) { |
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
function add_meta_tags() { | |
echo '<meta name="meta_name" content="meta_value" />'; | |
} | |
add_action('wp_head', 'add_meta_tags'); |
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
<script> | |
$(document).ready(function() { | |
$('textarea').bind('keypress', function (event) { | |
// Allow for regular characters and include these special few: | |
// comma, period, explanation point, new line | |
var regex = new RegExp("^[a-zA-Z0-9\r\n\.\,\!\ ]+$"); | |
var key = String.fromCharCode(!event.charCode ? event.which : event.charCode); | |
if (!regex.test(key)) { | |
event.preventDefault(); | |
return false; |
NewerOlder