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
| #!/usr/bin/env python3 | |
| """One-shot indoor-vs-outside temperature/humidity snapshot. | |
| Reads HomeKit sensor values via macOS Shortcuts (`shortcuts run <name>`), | |
| each call bounded by a timeout so a sleeping home hub can't hang the run, | |
| then prints a colour terminal dashboard mirroring the physical room layout. | |
| If the outdoor shortcut fails to return a value, falls back to live Manchester | |
| weather from Open-Meteo (keyless). | |
| """ |
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 | |
| /** | |
| * Local Kitten images. | |
| * | |
| * Filters image URLs to load files from placekitten if they aren't present locally. | |
| * | |
| * @wordpress-plugin | |
| * Plugin Name: Local Kitten Images | |
| * Version: 1.0.2 | |
| * Description: Loads missing image files from placekitten when using local environment. |
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 exclude_post_categories( $exclude = '', $spacer = ' ' ) { | |
| $categories = get_the_category(); | |
| if ( empty( $categories ) ) { | |
| return; | |
| } | |
| $exclude = explode( ',', $exclude ); | |
| $counter = count( get_the_category() ) - count( $exclude ); | |
| foreach ( $categories as $cat ) { |
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
| wp.blocks.registerBlockVariation( | |
| 'core/column', | |
| { | |
| name: 'featured-column', | |
| isDefault: false, | |
| title: 'Featured Column', | |
| description: 'A highlighted central column!', | |
| attributes: { className: 'central' }, | |
| } |
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( wp ) { | |
| var el = wp.element.createElement; | |
| wp.blocks.registerBlockType( 'tomjn/dynamic', { | |
| title: 'Toms Dynamic Block', | |
| edit: function( props ) { | |
| return el( wp.serverSideRender, { | |
| block: 'tomjn/dynamic', | |
| attributes: props.attributes, | |
| } ); | |
| }, |
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
| Index: functions.php | |
| =================================================================== | |
| --- functions.php (revision 56804) | |
| +++ functions.php (working copy) | |
| @@ -7,9 +7,19 @@ | |
| namespace P2020; | |
| +function is_automattician() { | |
| + return false; |
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
| π¦π¦π¦π¦π¦π¦π¦π¦π¦π¦π¦ | |
| π¦π¦π¦π¨π¨π¨π¨π¦π¦π¦π¦ | |
| π¦π¦π¨π¨π¨π¨β¬π¨π¦π¦π¦ | |
| π¦π¨π¨β¬π¨π¨β¬π¨π¨π¦π¦ | |
| π¦π¨π¨β¬π¨π¨π¨π¨π¨π¦π¦ | |
| π¦π¨π¨π¨π¨π¨π¨π¨π¨π¦π¦ | |
| π¦π¨π¨π¨β¬β¬π§π§π¨π¦π¦ | |
| π¦π¦π¨π¨π§π§π§π§π§π§π¦ | |
| π¦π¦π¦π¨π¨π¨π¨π§π§π§π¦ | |
| π¦π¦π¦π¦π¦π¦π¦π§π§π¦π¦ |
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 | |
| $args = [ | |
| // parameters go here | |
| ]; | |
| $query = new WP_Query( $args ); | |
| if ( $query->have_posts() ) { | |
| while ( $query->have_posts() ) { | |
| $query->the_post(); | |
| // display the post |
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 | |
| /** | |
| * Plugin name: HTTP2 Push scripts | |
| * Author: Tom J Nowell | |
| */ | |
| function tomjn_get_dep_url( /*\WP_Dependency*/ $dep ) { | |
| global $wp_version; | |
| $relative = str_replace( site_url(), '', $dep->src ); | |
| $ver = $dep->ver; |
NewerOlder