Skip to content

Instantly share code, notes, and snippets.

View jerclarke's full-sized avatar
🌿

Jer Clarke jerclarke

🌿
View GitHub Profile
@jerclarke
jerclarke / fb-ia-transformation-puzzle.html
Created October 17, 2016 18:49
Facebook iA confounding source markup for transformations
<div class="alignright factbox">
FACTBOX!
<h4>H4 IN A FACTBOX</h4>
NORMAL TEXT WITH A <a href="https://test.com">LINK</a> IN FACTBOX.
<ul>
<li>UL &gt; LI IN FACTBOX</li>
<li>SECOND LI JUST IN CASE</li>
</ul>
</div>
@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 / 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 / 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 / readthedocs.io CSS DARK THEME
Last active October 30, 2023 15:28
Quick and dirty CSS dark theme for readthedocs.io 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
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 March 20, 2025 15:38
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>
<em>For information on translating, see the guide <i data-stringify-type="italic"><a class="c-link" href="https://community.globalvoices.org/guide/lingua-guides/special-coverage-pages/" target="_blank" rel="noopener noreferrer" data-stringify-link="https://community.globalvoices.org/guide/lingua-guides/special-coverage-pages/" data-sk="tooltip_parent">Translating Special Coverage</a></i></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
{
"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