Skip to content

Instantly share code, notes, and snippets.

View markjaquith's full-sized avatar

Mark Jaquith markjaquith

View GitHub Profile
<?php
/*
Plugin Name: Fix WooCommerce Template Cache
Plugin URI: https://woocommerce.com
Description: This fixes some issues with WC's template caching on sites that use multiple containers, due to the entire path being cached. If the file does not exist, this script uses default WC logic (copy/pasted) to grab the correct templates.
Version: 1.0.0
Author: Julien Melissas
Author URI: https://julienmelissas.com
*/
add_filter('wc_get_template_part', function( $template, $slug, $name ) {
@mattmc3
mattmc3 / optparsing_demo.zsh
Last active August 19, 2025 13:16
Zsh option parsing example
# Manual opt parsing example
#
# Features:
# - supports short and long flags (ie: -v|--verbose)
# - supports short and long key/value options (ie: -f <file> | --filename <file>)
# - supports short and long key/value options with equals assignment (ie: -f=<file> | --filename=<file>)
# - does NOT support short option chaining (ie: -vh)
# - everything after -- is positional even if it looks like an option (ie: -f)
# - once we hit an arg that isn't an option flag, everything after that is considered positional
function optparsing_demo() {
@Hebilicious
Hebilicious / cloudflare-pages-bun.env
Last active April 17, 2025 05:03
Cloudflare Pages and Bun
# Bun is now officially supported and these environments variables are no longer needed. Keeping this gist for legacy purposes.
# SKIP_DEPENDENCY_INSTALL=true
# UNSTABLE_PRE_BUILD=asdf install bun latest && asdf global bun latest && bun i