Skip to content

Instantly share code, notes, and snippets.

Busy ... Always busy

Mitchell Krog mitchellkrogza

Busy ... Always busy
View GitHub Profile
mitchellkrogza / generate-webp-images
Created Aug 16, 2021
Generate webp images from png and jpg files recursively in any web folder (uses webp command line tool)
View generate-webp-images
# ---------------------------------------------------------------------------
# Generate WebP Images - Uses cwebp command line tool for Linux
# This will generate / re-generate all webp images for all JPG and PNG files
# Being command line based it is incredibly fast
# If you don't want to re-generate existing files set generateall=0
# If you want to re-generate everything set generateall=1
# USE this script at your own risk and Only if you know what you are doing
# Written by Mitchell Krog -
mitchellkrogza /
Created Jul 17, 2018 — forked from lancejpollard/
Complete List of HTML Meta Tags

Copied from

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
mitchellkrogza / sysctl-proxmox-tune.conf
Created Sep 25, 2021 — forked from sergey-dryabzhinsky/sysctl-proxmox-tune.conf
Most popular speedup sysctl options for Proxmox. Put in /etc/sysctl.d/
View sysctl-proxmox-tune.conf
# Proxmox or other server kernel params cheap tune and secure.
# Try it if you have heavy load on server - network or memory / disk.
# No harm assumed but keep your eyes open.
# @updated: 2020-02-06 - more params used, adjust some params values, more comments on params
### NETWORK ###
mitchellkrogza / Remove-unnecessary-wordpress-image-sizes
Last active Oct 6, 2021
Remove unnecessary wordpress image sizes
View Remove-unnecessary-wordpress-image-sizes
* WordPress: Remove unwanted image sizes.
* Remove the three sizes medium_large, 1536x1536, 2048x2048
* Not needed for 99% of Woocommerce stores
add_filter('intermediate_image_sizes', function($sizes) {
return array_diff($sizes, ['medium_large']); // Medium Large (768 x 0)
mitchellkrogza / google-pagespeed-fix-does-not-use-passive-event-listeners
Last active Oct 5, 2021
Google Pagespeed FIX does not use passive event listeners warning
View google-pagespeed-fix-does-not-use-passive-event-listeners
// Passive event listeners
// Add this to your own custom.js file < YOU NEED TO CREATE THIS FILE YOURSELF
// Call the file in your body using
// <script src="" ></script>
jQuery.event.special.touchstart={setup:function( _, ns, handle ){this.addEventListener("touchstart", handle, { passive: !ns.includes("noPreventDefault") });}};
jQuery.event.special.touchmove={setup:function( _, ns, handle ){this.addEventListener("touchmove", handle, { passive: !ns.includes("noPreventDefault") });}};
View Fix-slow-wordpress-editor
// A fix for the horribly slow WordPress post and product editor
// With many thanks to Jon Brown
// Read about it at
* Remove Ancient Custom Fields metabox from post editor
* because it uses a very slow query meta_key sort query
* so on sites with large postmeta tables it is super slow
* and is rarely useful anymore on any site
mitchellkrogza / woocommerce-login-logout-redirects.php
Last active Sep 30, 2021 — forked from gbot/woocommerce-login-logout-redirects.php
WP: Redirect to home page for WooCommerce login logout and registration
View woocommerce-login-logout-redirects.php
// redirects for login / logout / registration
// Redirect after login
add_filter('woocommerce_login_redirect', 'login_redirect');
function login_redirect($redirect_to) {
return home_url();
mitchellkrogza / flatsome-fix-gallery-thumbnail-sizes
Created Sep 26, 2021
Flatsome Theme - FIX Google Properly Size Images Warning for Gallery Thumbnails
View flatsome-fix-gallery-thumbnail-sizes
View force-css-js-to-go-live-immediately.php
// Version CSS file in a theme
wp_enqueue_style( 'theme-styles', get_stylesheet_directory_uri() . '/style.css', array(), filemtime( get_stylesheet_directory() . '/style.css' ) );
// Version JS file in a theme
wp_enqueue_script( 'theme-scripts', get_stylesheet_directory_uri() . '/js/scripts.js', array(), filemtime( get_stylesheet_directory() . '/js/scripts.js' ) );
mitchellkrogza / wp-rocket-deactivate-cart-fragments-cache
Created Jul 22, 2021
WP Rocket | Deactivate WooCommerce Refresh Cart Fragments Cache
View wp-rocket-deactivate-cart-fragments-cache
* Plugin Name: WP Rocket | Deactivate WooCommerce Refresh Cart Fragments Cache
* Description: Deactivate the WP Rocket feature that caches WooCommerce Refresh Cart Fragments.
* Plugin URI:
* Author: WP Rocket Support Team
* Author URI:
* License: GNU General Public License v2 or later
* License URI:
* Copyright SAS WP MEDIA 2018