Skip to content

Instantly share code, notes, and snippets.

View jerclarke's full-sized avatar
🌿

Jer Clarke they/them jerclarke

🌿
View GitHub Profile
@jerclarke
jerclarke / love-poem.php
Last active July 25, 2017 02:16
PHP Love Poem
<?php
try_love();
function try_love() {
echo "<div class='this-world'>";
$me = new Lover ( 'Me' );
@jerclarke
jerclarke / wp_admin_post_thumbnail_html_example.php
Created March 1, 2017 15:38
Demo using WP's admin_post_thumbnail_html filter to insert content in featured image metabox
<?php
/**
* Adds a detailed UI to WP's thumbnail HTML markup used in the Feature Image metabox.
*
* Adds a description of featured images, a listing of the formats used by GV and
* previews of how the images will appear in features slider and thumbnails.
*
* Note that $thumbnail_id is only saved when the post is saved. Immediately after the featured image is changed
* this value is updated, but not the postmeta field in the database (nor OUR fields which are tied to it)
* SO:
@jerclarke
jerclarke / Google_OAuth2.php
Last active February 17, 2018 19:40
Google_OAuth2.php from Google Analyticator v.6.4.3 with modifications to fix "Fatal error: Uncaught exception 'Google_AuthException'" See revision history for details on what I changed to fix the error. See this wordpress.org support forum posting about the issue: http://wordpress.org/support/topic/solution-for-fatal-error-uncaught-exception-goo…
<?php
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@jerclarke
jerclarke / Jer-dnd-combat-notes.md
Last active February 3, 2020 14:52
Jer's reference notes on D&D 5e combat

Jer's reference notes on D&D 5e combat

Surprise

  • The DM determines who might be surprised for the first round of combat
  • If neither side tries to be stealthy, they automatically notice each other.
  • Notice check: DM compares the Dexterity (Stealth) checks of anyone hiding with the passive Wisdom (Perception) score of each creature on the opposing side.
  • Any character or monster that doesn't notice a threat is surprised at the start of the encounter.
  • If you're surprised, you can't move or take an action on your first turn of the combat, and you can't take a reaction until that turn ends.
  • A member of a group can be surprised even if the other members aren't.
@jerclarke
jerclarke / acf-advancedcustomfields.com DARK MODE
Created October 23, 2020 14:42
Quick and Dirty Dark Mode for advancedcustomfields.com ACF WordPress plugin homepage
@-moz-document domain("advancedcustomfields.com") {
body, #wrap {background: #333; color: #fff;}
#sidebar:after,
#wrap pre[class*=language-]{background: #222; border-color: #111;}
.links-list>li {
border-color: #999;
}
@jerclarke
jerclarke / developer.wordpress.org DARK MODE CSS
Created November 4, 2020 00:12
Quick and dirty dark mode CSS for WordPress Developer Handbook. Use with the Stylus browser extension. Probably full of problems but works on the pages I've tried it on.
@-moz-document domain("developer.wordpress.org") {
/*Find this on Github Gist: https://gist.github.com/jerclarke/4aad7b92636baec4aae461f2f5820b1a*/
body,
.single-handbook #primary,
.single-handbook #page {
background: #fff;
background: #232323;
@jerclarke
jerclarke / gv_temporary_sc_draft_post_template.html
Last active December 1, 2021 22:52
GV Temporary SC Draft Post Template
<em>Read the guide for instructions: <a href="https://bit.ly/gv-special-categories-temp-guide">Temporary Special Category Guide</a></em>
<strong>DO NOT PUBLISH THIS!!!</strong>
Link to special category: ADD LINK HERE FOR CONVENIENCE
Full size featured image URL: ADD FEATURED IMAGE URL
<em>This URL above should be the largest version of the featured image available. Get the URL by opening the image in the <strong>Add Media</strong> browser, and copying the URL from the <strong>Copy Link</strong> field. Translators should use this URL to download the image, then re-upload it into the category edit screen as the term's <strong>Featured Image</strong>.</em>
<h3>Shortcode for widget in <a href="/wp-admin/widgets.php">Featured Posts Sidebar</a></h3>
[gv_term_promo term="" taxonomy="gv_special"]
{
"bundleId" : "com.knollsoft.Hookshot",
"defaults" : {
"allowAnyShortcut" : {
"bool" : false
},
"almostMaximizeHeight" : {
"float" : 0
},
"almostMaximizeWidth" : {
@jerclarke
jerclarke / aiwp-jer-second-amp-tracker-plugin.php
Created December 10, 2022 00:13
A simple demo wp plugin to show how I add a second AMP tracker to AIWP
<?php
/**
* Plugin Name: AIWP Jer's Filter Demo
* Plugin URI: https://jerclarke.org
* Description: Simple demo of Jer's filters for AIWP
* Author: Jer Clarke
* Version: 0.1
* Author URI: https://jerclarke.org
* Text Domain: jer-demo
* Domain Path: /languages
@jerclarke
jerclarke / aiwp-jer-query-demo.php
Created May 23, 2023 19:15
AIWP Jer's Query Demo - Simple demo of Jer's custom queries using AIWP internals
<?php
/**
* Plugin Name: AIWP Jer's Query Demo
* Plugin URI: https://jerclarke.org
* Description: Simple demo of Jer's custom queries using AIWP internals
* Author: Jer Clarke
* Version: 0.1
* Author URI: https://jerclarke.org
* Text Domain: jer-aiwp-queriess
* Domain Path: /languages