Skip to content

Instantly share code, notes, and snippets.

View jeremyfelt's full-sized avatar
🍕
Look at that pizza emoji!

Jeremy Felt jeremyfelt

🍕
Look at that pizza emoji!
View GitHub Profile
@jeremyfelt
jeremyfelt / LocalValetDriver.php
Created October 24, 2024 17:14
latest local valet driver
<?php
use Valet\Drivers\Specific\WordPressValetDriver;
/**
* Class LocalValetDriver
*
* This class demonstrates how we might go about proxying any missing local images to a remote host. i.e; the production
* site. This has been created with WordPress in mind but could be adjusted to work with any other system.
*/
@jeremyfelt
jeremyfelt / restore-blocks.php
Last active December 21, 2022 15:33
Restore Shortnotes blocks
<?php
add_action( 'init', function() {
remove_filter( 'allowed_block_types', 'ShortNotes\PostType\Note\filter_allowed_block_types' );
} );
@jeremyfelt
jeremyfelt / launch.json
Last active June 3, 2022 23:08
VS Code debug configuration
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003
}
]
@jeremyfelt
jeremyfelt / hacky-characters.js
Created January 12, 2022 15:50
My hacky little script to identify common character pairs in the Wordle word list.
// See https://jeremyfelt.com/2022/01/12/a-wordle-character-pair-strategy/
const words = []; // Populate with word list.
const wordScores = [];
const pairPositions = [];
const positionText =[ "first", "second", "third", "last" ];
words.forEach( word => {
let position = 0;
@jeremyfelt
jeremyfelt / code.txt
Created December 14, 2021 00:20
Code from a comment on the R Studio blog post
output file: report.md
Entity 'raquo' not defined
Entity 'raquo' not defined
xmlParseEntityRef: no name
EntityRef: expecting ';'
xmlParseEntityRef: no name
xmlParseEntityRef: no name
xmlParseEntityRef: no name
xmlParseEntityRef: no name
@jeremyfelt
jeremyfelt / limit-block-types.php
Created February 27, 2021 23:22
Limit block types allowed
<?php
namespace JF;
add_action( 'init', __NAMESPACE__ . '\register_post_type', 10 );
add_filter( 'allowed_block_types', __NAMESPACE__ . '\filter_allowed_block_types', 10, 2 );
function register_post_type() {
\register_post_type(
'exampletype',
@jeremyfelt
jeremyfelt / no-title-cpt.php
Created February 27, 2021 21:29
A custom post type with title support turned off
<?php
add_action( 'init', 'register_no_title_post_type', 10 );
function register_no_title_post_type() {
register_post_type(
'no-title',
array(
'labels' => array(
'name' => 'No Title',
@jeremyfelt
jeremyfelt / github-action-ips-20210209.txt
Created February 9, 2021 17:01
IP address ranges for GitHub actions, February 9, 2021
"13.64.0.0/16",
"13.65.0.0/16",
"13.66.0.0/17",
"13.66.128.0/17",
"13.67.128.0/20",
"13.67.144.0/21",
"13.67.152.0/24",
"13.67.153.0/28",
"13.67.153.32/27",
"13.67.153.64/26",
@jeremyfelt
jeremyfelt / error.txt
Created February 28, 2020 06:32
DOMException: "The operation is insecure." react-dom.min.b694e242.js:103:487
As/</<@https://content.jeremyfelt.com/plugins/gutenberg/build/block-editor/index.js?ver=241345a79547bcd17b5c2c78b839ed72:49:273323
As/<@https://content.jeremyfelt.com/plugins/gutenberg/build/block-editor/index.js?ver=241345a79547bcd17b5c2c78b839ed72:49:273283
Vb@https://content.jeremyfelt.com/plugins/gutenberg/vendor/react-dom.min.b694e242.js?ver=16.9.0:104:431
Xi@https://content.jeremyfelt.com/plugins/gutenberg/vendor/react-dom.min.b694e242.js?ver=16.9.0:151:136
unstable_runWithPriority@https://content.jeremyfelt.com/plugins/gutenberg/vendor/react.min.0212dc62.js?ver=16.9.0:26:340
Ma@https://content.jeremyfelt.com/plugins/gutenberg/vendor/react-dom.min.b694e242.js?ver=16.9.0:52:280
Yb@https://content.jeremyfelt.com/plugins/gutenberg/vendor/react-dom.min.b694e242.js?ver=16.9.0:150:420
O@https://content.jeremyfelt.com/plugins/gutenberg/vendor/react-dom.min.b694e242.js?ver=16.9.0:120:254
ze@https://content.jeremyfelt.com/plugins/gutenberg/vendor/react-dom.min.b694e242.js?ver=16.9.0:118:14
mg/<@https://content.j
@jeremyfelt
jeremyfelt / twitter-terms.txt
Created December 3, 2019 00:02
Twitter TOS Diff
1. Who May Use the Services
You may use the Services only if you agree to form a binding contract with Twitter and are not a person barred from receiving services under the laws of the applicable jurisdiction. In any case, you must be at least 13 years old, or in the case of Periscope 16 years old, to use the Services. If you are accepting these Terms and using the Services on behalf of a company, organization, government, or other legal entity, you represent and warrant that you are authorized to do so and have the authority to bind such entity to these Terms, in which case the words “you” and “your” as used in these Terms shall refer to such entity.
2. Privacy
Our Privacy Policy (https://www.twitter.com/privacy) describes how we handle the information you provide to us when you use our Services. You understand that through your use of the Services you consent to the collection and use (as set forth in the Privacy Policy) of this information, including the transfer of this information to the United Stat