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 / open-source-search-compare.md
Last active July 19, 2023 01:28
Comparing open source search solutions
@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 / ubuntu-wifi-diag.txt
Last active September 11, 2022 21:28
Figuring out my wifi issues in Ubuntu
> cat kern.log
Jan 2 13:03:25 jeremy-wsu NetworkManager[21883]: <info> [1483391005.6506] device (wlp58s0): supplicant interface state: 4-way handshake -> completed
Jan 2 13:05:25 jeremy-wsu kernel: [330686.828062] wlp58s0: disconnect from AP 58:6d:8f:99:8b:f4 for new auth to 58:6d:8f:99:8b:f5
> lspci -k -nn | grep -A 3 -i net
3a:00.0 Network controller [0280]: Intel Corporation Wireless 8260 [8086:24f3] (rev 3a)
Subsystem: Intel Corporation Wireless 8260 [8086:0050]
Kernel driver in use: iwlwifi
@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 / gist:2625350
Created May 7, 2012 01:37
Post type argument test results
'rewrite' => true
'public' => true 'publicly_queryable' => true /cpt-slug/cpt-post-slug Loads fine
'public' => false 'publicly_queryable' => true /cpt-slug/cpt-post-slug Loads fine
'public' => true 'publicly_queryable' => false /cpt-slug/cpt-post-slug 404 Error
'public' => false 'publicly_queryable' => true /cpt-slug-cpt-post-slug 404 Error
'rewrite' => false
'public' => true 'publicly_queryable' => true /?cpt-slug=cpt-post-slug Loads fine
'public' => true 'publicly_queryable' => true /?p=ID&post_type=cpt-slug Loads fine
'public' => false 'publicly_queryable' => true /?cpt-slug=cpt-post-slug Loads fine
@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",