In this article, I would like to share three features of PageSpeed Insights (PSI), that is not easy to find in the official documentation. I discovered them while hacking on the Lighthouse plugin and integrating PSI to Treo.sh.
For a context, PSI is a simple yet powerful API by Google, that audits your page using Lighthouse and provides real-world users' data from Chrome UX Report (CrUX).
By default, PSI API returns only performance category. It's possible to pass ?category
argument multiple times and get a report with many Lighthouse categories using one request (available categories: performance
, accessibility
, best-practices
, seo
, pwa
).
curl -i "https://www.googleapis.com/pagespe
# how to run this thingy | |
# create a file on your mac called setup.sh | |
# run it from terminal with: sh setup.sh | |
# heavily inspired by https://twitter.com/damcclean | |
# https://github.com/damcclean/dotfiles/blob/master/install.sh | |
# faster dock hiding/showing (run in terminal) | |
# defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock |
/** | |
* Enable Bootstrap tooltips using Vue directive | |
* @author Vitim.us | |
* @see https://gist.github.com/victornpb/020d393f2f5b866437d13d49a4695b47 | |
* @example | |
* <button v-tooltip="foo">Hover me</button> | |
* <button v-tooltip.click="bar">Click me</button> | |
* <button v-tooltip.html="baz">Html</button> | |
* <button v-tooltip:top="foo">Top</button> | |
* <button v-tooltip:left="foo">Left</button> |
<?php | |
/** | |
* Plugin name: WP Trac #42573: Fix for theme template file caching. | |
* Description: Flush the theme file cache each time the admin screens are loaded which uses the file list. | |
* Plugin URI: https://core.trac.wordpress.org/ticket/42573 | |
* Author: Weston Ruter, XWP. | |
* Author URI: https://weston.ruter.net | |
*/ | |
function wp_42573_fix_template_caching( WP_Screen $current_screen ) { |
Look for the 'manual' tab here: https://blackfire.io/docs/24-days/06-installation#installation-on-your-local-computers
I just installed your tools on OSX using MAMP Pro and have some feedback. The installation wasn't very straightforward.
The documentation provided was perfect for the agent and the CLI tools. But, it fell quite short for the probe installation: https://blackfire.io/docs/up-and-running/installation#install-probe-osx
Zu den Arrays | |
Eingabe: | |
CODE: ALLES AUSWÄHLEN | |
$value1 = rex_var::toArray('REX_VALUE[1]'); | |
<input type="text" name="VALUE[1][]" value="<?php echo $value1[0]; ?>" /> | |
Ausgabe | |
CODE: ALLES AUSWÄHLEN |
/* | |
* © 2016 - Julián Acosta | |
* License: CC BY-SA 4.0 (http://creativecommons.org/licenses/by-sa/4.0/) | |
* | |
* Print your own logo in developer tools! | |
* | |
* Step 1: Convert your logo to ASCII text here: http://picascii.com (I used color output) | |
* Note: Is possible that you'll have to resize your photo in order to retain aspect ratio | |
* Step 2: Remove the <pre></pre> tag that is surrounding the generated code, replace with "[" and "]" | |
* Step 3: Run the following regexes (*DON'T ALTER THE ORDER*) in order to convert to JSON (Works in PHPStorm and Sublime Text 2): |
<script> | |
lp.jQuery(function($) { | |
var ruleID = 'emailMatch'; | |
//The email field to check against | |
var firstEmailField = 'email'; | |
//The second confirmation email field |