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
| ➜ ll | |
| total 45600 | |
| 166K 2 14:14 sample0-1024x576.jpg | |
| 118K 2 14:14 sample0-1024x576.webp | |
| 168K 2 14:14 sample0-1038x576.jpg | |
| 120K 2 14:15 sample0-1038x576.webp | |
| 28K 2 14:14 sample0-150x150.jpg | |
| 7.0K 2 14:14 sample0-150x150.webp | |
| 304K 2 14:14 sample0-1536x864.jpg | |
| 220K 2 14:15 sample0-1536x864.webp |
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
| 166K sample0-1024x576.jpg | |
| 118K sample0-1024x576.webp | |
| 168K sample0-1038x576.jpg | |
| 120K sample0-1038x576.webp | |
| 28K sample0-150x150.jpg | |
| 7.0K sample0-150x150.webp | |
| 304K sample0-1536x864.jpg | |
| 220K sample0-1536x864.webp | |
| 468K sample0-2048x1152.jpg |
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
| WITH picture AS ( | |
| SELECT | |
| url | |
| FROM | |
| `httparchive.pages.2022_01_01_mobile` | |
| WHERE | |
| JSON_VALUE(JSON_VALUE(payload, '$._element_count'), '$.picture') IS NOT NULL | |
| ), wordpress AS ( | |
| SELECT DISTINCT | |
| url |
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
| // When image uploads complete, trigger a check for additional mime types | |
| //Extend the Uploader success. | |
| jQuery.extend(wp.Uploader.prototype, { | |
| success: function( file ) { | |
| wp.ajax.post( | |
| 'media-create-image-mime-types', | |
| { | |
| _wpnonce: _wpPluploadSettings.defaults.multipart_params._wpnonce, | |
| attachment_id: file.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
| { | |
| "width": 2560, | |
| "height": 1920, | |
| "file": "2022\/01\/bikes-scaled.jpg", | |
| "sizes": { | |
| "medium": { | |
| "file": "bikes-300x225.jpg", | |
| "width": 300, | |
| "height": 225, | |
| "mime-type": "image\/jpeg" |
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 | |
| /** | |
| * Multiple mime types for WordPress. | |
| * | |
| * @wordpress-plugin | |
| * Plugin Name: Multi-mime. | |
| * Description: Uploaded images in multiple mime types, requires https://github.com/WordPress/wordpress-develop/pull/2239. | |
| * Plugin URI: | |
| * Version: 1.0.0 | |
| * Author: Adam Silverstein, Google |
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
| SELECT | |
| mobile.version, | |
| ROUND(pct_webp_mobile, 3) AS pct_webp_mobile, | |
| ROUND(pct_webp_desktop, 3) AS pct_webp_desktop | |
| FROM | |
| ( | |
| SELECT | |
| version, pct_webp AS pct_webp_mobile | |
| FROM | |
| ( |
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
| SELECT | |
| has_webp, | |
| APPROX_QUANTILES(bytesImg, 1000)[OFFSET(500)] / 1024 / 1024 AS median_img_mbytes | |
| FROM ( | |
| SELECT DISTINCT | |
| url, | |
| info AS version | |
| FROM | |
| `httparchive.technologies.2021_11_01_mobile` | |
| WHERE |
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 | |
| /** | |
| * WP Rocket compatibility for Site Kit. | |
| * | |
| * @wordpress-plugin | |
| * Plugin Name: SiteKit WP Rocket Compatibility | |
| * Description: Improve compatibility between Site Kit and WP Rocket. | |
| * Plugin URI: | |
| * Version: 1.0.0 | |
| * Author: Adam Silverstein, Google |
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
| CREATE TEMP FUNCTION IS_GOOD(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( | |
| good / (good + needs_improvement + poor) >= 0.75 | |
| ); | |
| CREATE TEMP FUNCTION IS_NON_ZERO(good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS ( | |
| good + needs_improvement + poor > 0 | |
| ); | |
| SELECT * | |
| FROM ( | |
| SELECT |