Skip to content

Instantly share code, notes, and snippets.


Jer Clarke they/them jerclarke

View GitHub Profile
jerclarke / gv_temporary_sc_draft_post_template.html
Last active Jan 14, 2021
GV Temporary SC Draft Post Template
View gv_temporary_sc_draft_post_template.html
<em>Read the guide for instructions: <a href=''>Temporary Special Category Guide</a></em>
<strong>DO NOT PUBLISH THIS!!!</strong>
<h3>Shortcode for widget in <a href='/wp-admin/widgets.php'>Featured Posts Sidebar</h3>
[gv_specialcoverage_term_promo term="" taxonomy="gv_special" image="" excerpt=""]
<h3>Taxonomy Archive header <a href='/wp-admin/edit-tags.php?taxonomy=gv_special'>Edit special categories</a></h3>
jerclarke / DARK MODE CSS
Created Nov 4, 2020
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("") {
/*Find this on Github Gist:*/
.single-handbook #primary,
.single-handbook #page {
background: #fff;
background: #232323;
jerclarke / CSS DARK THEME
Last active Nov 5, 2020
Quick and dirty CSS dark theme for and the Stylus browser extension.
@-moz-document regexp("https?:\\/\\/([a-z0-9][a-z0-9-]+[a-z0-9]\\.readthedocs\\.io)(\\S+)") {
@media (prefers-color-scheme: dark) {
/*Syntax Highlighting*/
.rst-content pre.literal-block, .rst-content div[class^='highlight'] {
border-color: transparent;
pre {
background-color: #191919 !important;
font-weight: bold;
font-family: "JetBrains Mono", monospace;
jerclarke / DARK MODE
Created Oct 23, 2020
Quick and Dirty Dark Mode for ACF WordPress plugin homepage
@-moz-document domain("") {
body, #wrap {background: #333; color: #fff;}
#wrap pre[class*=language-]{background: #222; border-color: #111;}
.links-list>li {
border-color: #999;
jerclarke /
Last active Feb 3, 2020
Jer's reference notes on D&D 5e combat

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


  • 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 / love-poem.php
Last active Jul 25, 2017
PHP Love Poem
View love-poem.php
function try_love() {
echo "<div class='this-world'>";
$me = new Lover ( 'Me' );
jerclarke / wp_admin_post_thumbnail_html_example.php
Created Mar 1, 2017
Demo using WP's admin_post_thumbnail_html filter to insert content in featured image metabox
View wp_admin_post_thumbnail_html_example.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 / fb-ia-transformation-puzzle.html
Created Oct 17, 2016
Facebook iA confounding source markup for transformations
View fb-ia-transformation-puzzle.html
<div class="alignright factbox">
<h4>H4 IN A FACTBOX</h4>
<li>UL &gt; LI IN FACTBOX</li>
jerclarke / edit-flow-autosave-comments-not-a-real-plugin.php
Created Oct 6, 2016
Edit Flow "plugin" (hack) to autosave unsubmitted Editorial Comment text when post is saved
View edit-flow-autosave-comments-not-a-real-plugin.php
* EDIT FLOW: wp_insert_post action to autosave "draft" editorial comments in post meta field
* Currently (2016-10-06) Edit Flow has no handling of unsubmitted editorial comments in the textarea
* when the post is saved, so saving your post deletes your comment unless you submitted it, which is awful.
* This function hooks into wp_insert_post where the value of the textarea is present (but ignored by default)
* and if found, saves the text (and ID of parent comment if it was a specific reply) to a postmeta field
* keyed on the user who saves the post.
View gv-test-HHVM-PHP-FPM-fallback.php
* Simple function to intentionally crash HHVM and trigger our PHP-FPM fallback
* For whatever reason having two "default:"" clauses in a switch statement crashes HHVM but not PHP-FPM
* In HHVM error logs it causes: Fatal error: Switch statements may only contain one default: clause in /var/www/sites/monittest/index.php on line XX
* This can be used to intentionally trigger a fallback from HHVM to PHP-FPM in our system, which normally happens
* to avoid scripts with rare HHVM bugs from crashing completely to WSOD, and to keep the server mostly working
* if HHVM failed completely, which has happened a couple of times.