- Web Page Usability Matters
- PageSpeed Insights w/Lighthouse and Chrome User Experience Report
- Data Saver for Chrome on Android - enable and then look at about:flags for Lite Pages and other interventions
- web.dev/fast - code-labs and tooling for optimizing performance
- Lighthousebot for using Lighthouse in continuous integration
- Bundlesize for JavaScript budgets in CI
- Start performance budgeting
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 | |
| if (!function_exists('is_rest')) { | |
| /** | |
| * Checks if the current request is a WP REST API request. | |
| * | |
| * Case #1: After WP_REST_Request initialisation | |
| * Case #2: Support "plain" permalink settings | |
| * Case #3: URL Path begins with wp-json/ (your REST prefix) | |
| * Also supports WP installations in subfolders | |
| * |
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
| /* | |
| A (very) WIP collection of optimized/recommended jQuery plugin patterns | |
| from @addyosmani, @cowboy, @ajpiano and others. | |
| Disclaimer: | |
| ----------------------- | |
| Whilst the end-goal of this gist is to provide a list of recommended patterns, this | |
| is still very much a work-in-progress. I am not advocating the use of anything here | |
| until we've had sufficient time to tweak and weed out what the most useful patterns |
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 | |
| if (is_single()) | |
| { | |
| $title = htmlspecialchars( strip_tags( get_the_title( $post->ID ) ) ); | |
| $description = htmlspecialchars( strip_tags( get_the_excerpt( $post->ID ) ) ); | |
| $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); | |
| $image = $thumbnail[0]; | |
| $type = 'article'; | |
| } elseif (is_page()) { | |
| $title = htmlspecialchars( strip_tags( get_the_title( $post->ID ) ) ); |
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 wh_maintenance_mode() { | |
| if ( !is_user_logged_in() || !current_user_can('administrator') ) { | |
| wp_die( 'Dritte Variante einer Wartungsseite', 'Wartung!', array( 'response' => '503')); | |
| } | |
| } | |
| add_action( 'get_header', 'wh_maintenance_mode' ); |
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.php | |
| \wp-blog-header.php | |
| \wp-load.php | |
| \wp-config.php | |
| \wp-settings.php | |
| \wp-includes\load.php | |
| \wp-includes\default-constants.php | |
| \wp-includes\version.php | |
| \wp-includes\compat.php | |
| \wp-includes\random_compat\random.php |
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 | |
| $loop = new WP_Query( array( | |
| 'post_type' => 'Property', | |
| 'posts_per_page' => -1 | |
| ) | |
| ); | |
| ?> | |
| <?php while ( $loop->have_posts() ) : $loop->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
| /** | |
| * jQuery iLightBox - Revolutionary Lightbox Plugin | |
| * http://www.ilightbox.net/ | |
| * | |
| * @version: 2.2.3 - June 03, 2017 | |
| * | |
| * @author: Hemn Chawroka | |
| * http://www.iprodev.com/ | |
| * | |
| */ |
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
| // redirect single posts to the archive page, scrolled to the current member. | |
| // * this is for a post type of "board_member" | |
| add_action( 'template_redirect', function() { | |
| if ( is_singular('board_member') ) { | |
| // I used the two variables to put the member's name as the ID of the article | |
| // so the redirect would automatically scroll. This can be removed. | |
| $title = get_the_title(); | |
| $url_append = str_replace( ' ', '-', strtolower($title) ); | |
| global $post; | |
| $redirectLink = get_post_type_archive_link( 'board_member' ) . "#" . $url_append; |
Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav
Hello, brethren :-)
As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".