Skip to content

Instantly share code, notes, and snippets.

View ch4rlie's full-sized avatar

Charlie Grove ch4rlie

View GitHub Profile
@ch4rlie
ch4rlie / gist:254d836d839b8010af6a4488eeb5785c
Created December 22, 2022 16:44
Route specific subfolders of website to another host - incremental adoption of nextjs & vercel on a wordpress site with Cloudflare Worker
// ONLY CHANGE THESE VARIABLES -- {START}
const locales = ['be', 'de', 'fi']; //belgium Locale
const assetPath = '_next'; //app Assets
const origin = 'example.vercel.app'; //add app url from vercel or netlify
// ONLY CHANGE THESE VARIABLES -- {END}
addEventListener('fetch', event => {
@ch4rlie
ch4rlie / mkto-form-embed.html
Created March 22, 2022 13:54
Marketo Embed Examples
<script>
/*
* FormsPlus::Wrapper Row/Column Tagger
* @author Sanford Whiteman, TEKNKL (blog.teknkl.com / sandy@teknkl.com)
* @version v0.2.3
* @copyright Copyright 2016, 2017, 2018, 2019, 2020 FigureOne, Inc.
* @license Hippocratic 2.1: This license must appear with all reproductions of this software.
*/
window.FormsPlus = window.FormsPlus || {
allDescriptors: {},
@ch4rlie
ch4rlie / event_espresso_acf_field_message_shortcode.php
Created June 28, 2019 18:15
Use value from an Advanced Custom Field in Event Espresso Email Message Templates
<?php
function register_ch4rlie_ee4_shortcodes( $shortcodes, EE_Shortcodes $lib ) {
//Add a shortcode to be used with the EE Event List within messages
if ( $lib instanceof EE_Event_Shortcodes ) {
//Add your shortcode to the add as the key, the value should be a description of the shortcode.
$shortcodes['[PREADING_LINK]'] = _('Outputs a html link to the course reading materials, or returns blank if none is found.');
}