This file contains 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 | |
/* | |
Plugin Name: Fix SSL Please | |
Plugin URI: https://github.com/kasparsd/ssl-fix | |
GitHub URI: https://github.com/kasparsd/ssl-fix | |
Description: Ensure that everything works over SSL | |
Version: 0.1.1 | |
Author: Kaspars Dambis | |
Author URI: http://kaspars.net | |
*/ |
This file contains 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 | |
/** | |
* Plugin Name: Admin PWA | |
*/ | |
namespace Preseto\Admin_PWA; | |
const ACTION_QUERY_VAR = 'admin-pwa'; | |
function manifest_url() { |
This file contains 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 // Run as `php zip-chunks.php path/to/directory`. | |
$chunk_limit = 1024 * 1024 * 1024; // 1 GB | |
function get_files( $path ) { | |
$files = glob( rtrim( $path, '\\/' ) . '/*' ); | |
foreach ( $files as $file ) { | |
if ( is_dir( $file ) ) { | |
$files = array_merge( $files, get_files( $file ) ); | |
} |
This file contains 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc="http://www.w3.org/2003/05/soap-encoding" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" | |
xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" | |
xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" | |
xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tst="http://www.onvif.org/ver10/storage/wsdl" | |
xmlns:ter="http://www.onvif.org/ver10/error" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" | |
xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" | |
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl" xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12" |
This file contains 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_to_file( $list, $file ) { | |
array_unshift( $list, array_keys( reset( $list ) ) ); // Append the keys to the top of the file. | |
$csv_file = fopen( $file, 'w' ); | |
foreach ( $list as $fields ) { | |
fputcsv( $csv_file, $fields ); | |
} |
This file contains 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
sensor: | |
- platform: template | |
sensors: | |
t81_temperature: | |
friendly_name: "Outside Temperature" | |
unit_of_measurement: '°C' | |
value_template: "{{ state_attr('weather.t81', 'temperature') }}" | |
t81_humidity: |
This file contains 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/sh | |
######################################### | |
#Function: update tuya_gateway app | |
#Usage: ./app_upgrade.sh | |
#Author: hxh | |
#Company: tuya | |
#Version: 3.0 | |
######################################### | |
ENG_MODE_FILE=/tmp/eng_mode |
This file contains 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 | |
NOTIFY_FROM="no-reply@example.com" | |
NOTIFY_TO="hi@example.com" | |
URLS=( | |
"https://example.com" | |
"https://google.com" | |
) |
This file contains 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 | |
/** | |
* Map all categories to the new category tree. | |
* | |
* - Create a list of new categories by their path of slugs. | |
*/ | |
class Terms { | |
/** |
NewerOlder