Skip to content

Instantly share code, notes, and snippets.

View jlr7245's full-sized avatar
🐋

J Silverstein jlr7245

🐋
View GitHub Profile
@sebmarkbage
sebmarkbage / Infrastructure.js
Last active May 2, 2024 03:11
SynchronousAsync.js
let cache = new Map();
let pending = new Map();
function fetchTextSync(url) {
if (cache.has(url)) {
return cache.get(url);
}
if (pending.has(url)) {
throw pending.get(url);
}
@klihelp
klihelp / wc-pagination-functions.php
Last active June 6, 2022 03:37
WooCommerce shortcode pagination on pages
<?php
/**
* Thanks for James Kemp / Iconic turning the idea into a plugin
* https://wordpress.org/plugins/shortcode-pagination-for-woocommerce
*
* This code shows pagination for WooCommerce shortcodes when it's embeded on single pages.
* Include into functions.php.
*/
if ( ! is_admin() ) {