Skip to content

Instantly share code, notes, and snippets.

View RayHollister's full-sized avatar

Ray Hollister RayHollister

View GitHub Profile
@RayHollister
RayHollister / PANTHEON_STRIPPED_WPFORMS_FIXER.js
Last active May 25, 2022 23:22
A bit of Javascript to pass the UTM to a WPForm since Pantheon strips the UTMs
// Get the UTMs with Javascript and pass them to the WPForm on the page
function getQueryParams(qs) {
qs = qs.split('+').join(' ');
var params = {},
tokens, re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]);
}
return params;
}
@RayHollister
RayHollister / Automated Composer to Grove Radio Show Schedule
Last active August 14, 2023 20:16
This JavaScript fetches and formats the weekly broadcast schedule of a specific NPR radio show from their API. It groups same times on sequential days and displays the schedule on the radio show's webpage. The script runs automatically on page load, if no schedule is already present.
<script>
const daysOfWeek = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
async function getShowSchedule() {
let scheduleDiv = document.querySelector(".RadioShowPage-mediaSchedule");
if (scheduleDiv) return;
const programName = document.querySelector(".RadioShowPage-headline").textContent.trim();
try {
@RayHollister
RayHollister / wjct-grove-style.css
Last active July 31, 2023 18:26
WJCT Grove Style Customization
@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
:root {
--WJCT-primary: #006bb6;
--WJCT-secondary: #40c4ff;
--WJCT-tertiary: #2c3e50;
--WJCT-light-text: white;
--WJCT-red: #d50000;
--bodyFont: "Montserrat", sans-serif;
--primaryFont: "Montserrat", sans-serif;
@RayHollister
RayHollister / Optin-Monster-custom.css
Last active August 28, 2024 18:32
OptinMonster Custom CSS
/* COMMENT: Put "proxima" in the Custom Class Attribute of the element on OptinMonster that you want to appear in Proxima Nova font. */
html div#om-{{id}} .proxima * {
font-family: proxima-nova, sans-serif !important; font-weight: 800; font-style: normal;
}
html div#om-{{id}} .x-btn, html div#om-{{id}} .button, html div#om-{{id}} [type="submit"] {
text-shadow:none !important;
}
@RayHollister
RayHollister / gist:4377e33b5a0cff1722cc967aad12825a
Created October 20, 2024 19:57
hugo --templateMetrics --templateMetricsHints
Template Metrics:
cumulative average maximum cache percent cached total
duration duration duration potential cached count count template
---------- -------- -------- --------- ------- ------ ----- --------
13m59.344464552s 468.122958ms 969.649539ms 0 0 0 1793 people/single.html
11m22.871958486s 657.239613ms 4.766322206s 0 0 0 1039 productions/single.html
10m8.02232355s 20.06277ms 209.203761ms 13 0 0 30306 partials/findPerson.html
13.268277216s 323.616517ms 430.542743ms 0 0 0 41 productions/past.html
10.978905134s 10.576979ms 47.014916ms 0 0 0 1038 _default/production-list.html