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: Appliance has finished | |
description: Do something when an appliance (like a washing machine or dishwasher) | |
has finished as detected by a power sensor. | |
domain: automation | |
input: | |
power_sensor: | |
name: Power Sensor | |
description: Power sensor entity (e.g. from a smart plug device). | |
selector: |
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: Low battery level detection & notification for all battery sensors | |
description: Regularly test all sensors with 'battery' device-class for crossing | |
a certain battery level threshold and if so execute an action. | |
domain: automation | |
input: | |
threshold: | |
name: Battery warning level threshold | |
description: Battery sensors below threshold are assumed to be low-battery (as | |
well as binary battery sensors with value 'on'). |
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
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
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
/** | |
* Obtiene la lista de archivos del directorio especificado | |
* @param string $directory | |
* @return array listado de archivos | |
*/ | |
function getDirectoryList ($directory) | |
{ | |
// create an array to hold directory list | |
$results = array(); |
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: WP Cron Jobs | |
Plugin URI: https://github.com/franz-josef-kaiser | |
Description: List WordPress internal cron jobs (array data) in the footer. The hook 'wp_footer()' must be present in your theme. | |
Author: Franz Josef Kaiser | |
Author URI: https://github.com/franz-josef-kaiser | |
Version: 0.1 | |
License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
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
//Crear un nuevo temporizador | |
add_filter('cron_schedules', 'add_scheduled_interval'); | |
// Anyade nuevos intervalos a wp_schedules | |
function add_scheduled_interval($schedules) | |
{ | |
$schedules['minutes_1'] = array('interval'=>60, 'display'=>'Once 1 minutes'); | |
$schedules['minutes_30'] = array('interval'=>30, 'display'=>'Once 30 minutes'); | |
return $schedules; | |
} |
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 | |
/** | |
* Theme setup. | |
* | |
* @package WordPress | |
*/ | |
function theme_setup() | |
{ |
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
<title><?php | |
if (is_home () || is_front_page() ) { | |
bloginfo('name'); | |
} elseif ( is_category() ) { | |
single_cat_title(); echo ' - ' ; | |
bloginfo('name'); | |
} elseif (is_single() ) { | |
single_post_title(); | |
} elseif (is_page() ) { | |
bloginfo('name'); |
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
/* | |
Theme Name: [Theme name] | |
Theme URI: [Theme url] | |
Description: [Theme description] | |
Author: [Theme author] | |
Author URI: [Author URL] | |
Version: 1.0 | |
Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu (optional) | |
License: |
NewerOlder