Chrome DevTools tips and tricks
Speed up your workflow with these Mac shortcuts
Cmd-Alt+I # Open DevTools
Cmd-Alt+J # Open DevTools into console
Cmd-Alt+U # Open new tab with HTML source of current URL
Cmd-Alt+I # Open DevTools
Cmd-Alt+J # Open DevTools into console
Cmd-Alt+U # Open new tab with HTML source of current URL
$ svgo --show-plugins
$ svgo -f /Users/ttadej/community/lithium-plugin/src/svgs/collections --enable=removeTitle
# show hidden files
Cmd+Shift+.
# bash into container
docker exec -it [container-id] bash
# exclude image from build
docker-compose up --scale serviceToNotRun=0
# kill all containers
$ ls -a # lists all contents of a directory, including hidden files and directories
$ ls -l # lists all contents in long format
$ ls -t # orders files and directories by the time they were last modified
/* | |
* Usage | |
* The following code will modify the title of the browser tab on the "blur" event and change it back to the original on the "focus" event. | |
* http://developers.optimizely.com/javascript/code-samples/index.html#advanced-use-cases-browserTab-test | |
*/ | |
// store the original tab title | |
var origTitle = document.title; | |
// function to change title when focusing on tab |
Alt+Up Select text blocks in incrementing size
Alt+Down Deselect text blocks in decreasing size
Shift+Shift Search Everywhere pop-up window
.gitconfig
file; view file using $ cat ~/.gitconfig
/.git/config
in your project folder$ git config --list
$ git config <level> --list
// Clear the cache of specific posts after the homepage is cleared. | |
// This is useful if you have a feed of items on the homepage and other pages with the same feed. | |
// WP Rocket source: https://github.com/wp-media/wp-rocket/blob/443f2e1b902c592bd517cbaa641571bb2ddce1a5/inc/functions/files.php#L613 | |
//clean with POST ID. | |
function rocket_clean_posts_with_home_cleaning( $root = '' ) { | |
$posts_list = [ | |
1 |