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
blueprint: | |
name: Aqara TRV E1 external temperature | |
description: > | |
Configures the Aqara TRV to receive it's temperature from an external sensor. | |
Every time the temperature sensor value cahnges it's is send to the TRV. | |
domain: automation | |
source_url: "https://gist.github.com/pavax/8d6ed250765d89cb281d4a1762b8d2e8" | |
input: | |
external_temp_sensor: | |
name: External temperature sensor |
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
sebastien@sebastien-desktop:~$ ssh -vv defr9012@delaware.o2switch.net | |
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017 | |
debug1: Reading configuration data /home/sebastien/.ssh/config | |
debug1: Reading configuration data /etc/ssh/ssh_config | |
debug1: /etc/ssh/ssh_config line 19: Applying options for * | |
debug2: resolving "delaware.o2switch.net" port 22 | |
debug2: ssh_connect_direct: needpriv 0 | |
debug1: Connecting to delaware.o2switch.net [109.234.162.115] port 22. | |
debug1: Connection established. | |
debug1: identity file /home/sebastien/.ssh/id_rsa type 0 |
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
function get_lat_lng( $address ) { | |
$address = rawurlencode( $address ); | |
$coord = get_transient( 'geocode_' . $address ); | |
if( empty( $coord ) ) { | |
$url = 'http://nominatim.openstreetmap.org/?format=json&addressdetails=1&q=' . $address . '&format=json&limit=1'; | |
$json = wp_remote_get( $url ); | |
if ( 200 === (int) wp_remote_retrieve_response_code( $json ) ) { | |
$body = wp_remote_retrieve_body( $json ); | |
$json = json_decode( $body, true ); | |
} |
This file has been truncated, but you can view the full 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
Attaching to stjean_database_1 | |
[36mdatabase_1 |[0m chmod: changing permissions of '/helpers/add-cert.sh': Operation not permitted | |
[36mdatabase_1 |[0m chmod: changing permissions of '/helpers/auth.sh': Operation not permitted | |
[36mdatabase_1 |[0m chmod: changing permissions of '/helpers/binding.sh': Operation not permitted | |
[36mdatabase_1 |[0m chmod: changing permissions of '/helpers/generate-key.sh': Operation not permitted | |
[36mdatabase_1 |[0m chmod: changing permissions of '/helpers/get-remote-url.sh': Operation not permitted | |
[36mdatabase_1 |[0m chmod: changing permissions of '/helpers/lando-entrypoint.sh': Operation not permitted | |
[36mdatabase_1 |[0m chmod: changing permissions of '/helpers/load-keys.sh': Operation not permitted | |
[36mdatabase_1 |[0m chmod: changing permissions of '/helpers/mounter.sh': Operation not permitted | |
[36mdatabase_1 |[0m chmod: changing permissions of '/helpers/pantheon.sh': Operation not permitted |
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
add_filter( 'robots_txt', 'thfo_add_sitemaps'); | |
function thfo_add_sitemaps( $output ){ | |
$sitemap_url = 'sitemap: ' . get_bloginfo('url') . '/sitemap.xml'; | |
$output .= $sitemap_url; | |
return $output; | |
} |
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
public function compare_register_prod() { | |
error_log( 'start Import' ); | |
//$truncat = $wpdb->query( 'DELETE FROM ' . $table . ' WHERE `platform` LIKE "Awin"' ); | |
$partners = $this->awin['partner']; | |
$partners = explode( ',', $partners ); | |
$secondes = apply_filters( 'compare_time_limit', 600 ); |
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: Disable Gutenberg Callout | |
Plugin URI: https://www.thivinfo.com | |
Description: Disable the Gutenberg Callout added in WordPress 4.9.8 | |
Author: Sébastien SERRE | |
Author URI: https://thivinfo.com | |
Version: 1.0.0 | |
*/ | |
/* |
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
/** | |
* correct Date in XML from Pericles fr-> en | |
*/ | |
function thfo_correct_date($biens) { | |
$date = explode( '/', $biens->DATE_MODIF ); | |
$date = $date[2] . '/' . $date[1] . '/' . $date[0]; | |
$date = date( 'Y/m/d', strtotime( $date ) ); |
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 | |
/** | |
* Unzip photo before import by WP ALL Import | |
*/ | |
function thfo_extract_photo(){ | |
$path = wp_get_upload_dir(); | |
$file = $path['basedir'] . '/wpallimport/files/export.ZIP'; | |
$real_path = $path['basedir'] . '/wpallimport/files/'; |
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 | |
// add a favicon | |
function favicon_link() { | |
echo '<link rel="shortcut icon" type="image/x-icon" href="http://www.thivinfo.com/wp-content/themes/thivinfo_v3/favicon.ico" />' . "\n"; | |
} | |
add_action( 'wp_head', 'favicon_link' ); | |