Skip to content

Instantly share code, notes, and snippets.

View bpmore's full-sized avatar

Brent Passmore bpmore

View GitHub Profile
@aarondfrancis
aarondfrancis / audit-your-codebase.md
Created August 14, 2026 15:20
A read-only, agent-orchestrated codebase audit prompt for data structures, state modeling, algorithms, and ownership.

Audit this entire codebase for materially useful simplifications in its data structures, state representation, control flow, algorithms, and ownership.

This is an audit-only exercise. Do not edit files, run tests, implement recommendations, commit, or push. Read-only inspection commands are allowed.

You are the coordinator. Continue until the complete codebase has been reviewed and the final audit is validated.

  1. Establish the coverage contract

Inspect the repository and inventory every identifiable subsystem.

@aarondfrancis
aarondfrancis / typing-animation.sh
Created February 7, 2026 13:28
Terminal typing animation with AI tool cycling and particle explosion effect
#!/bin/bash
# Hide the real cursor
tput civis
# Restore cursor on exit
trap 'tput cnorm' EXIT
# ANSI color codes
BOLD="\033[1m"
╭─── Claude Code v2.1.12 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │ Tips for getting started │
│ Welcome back Jonny! │ Run /init to create a CLAUDE.md file with instructions for Claude │
│ │ │
│ │ ───────────────────────────────────────────────────────────────── │
│ ▐▛███▜▌ │ Recent activity
@ryanmitchell
ryanmitchell / ImportWP.php
Created October 11, 2024 05:42
Wordpress -> Statamic import
<?php
namespace App\Console\Commands;
use Corcel\Model\Post;
use Illuminate\Console\Command;
use Statamic\Facades\Asset;
use Statamic\Facades\Entry;
class ImportWP extends Command
@melissajclark
melissajclark / block-editor.js
Last active May 19, 2023 15:24
WordPress Block Editor: Add a custom Query block variation with a Post Template
/**
* Include variable for ImageDateTitle icon from core. Used in the Query Block Variation below
*/
const external_wp_element_namespaceObject = window["wp"]["element"];
const external_wp_components_namespaceObject = window["wp"]["components"];
const imageDateTitle = (0, external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 48 48"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Path, {
@todd-uams
todd-uams / gist:336235d7e4002cee7855b0e4b2846c47
Last active November 6, 2019 17:26
Generate Users List per site for WPMU
function tell_all() {
global $wpdb;
$all_sites = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs} WHERE archived = FALSE" ); // Hide archived sites
$list = array();
foreach( $all_sites as $site ) {
$args = array(
'blog_id' => $site,
'fields' => 'user_email',
'role' => 'Editor',
);
@nickcernis
nickcernis / add-editor-layout-classes.js
Last active February 20, 2020 09:09
Add Genesis layout class to Gutenberg editor pages (admin)
// Add genesis layout classes to the Block Editor.
// File lives in the theme's /js/ folder.
wp.domReady(function () {
yourTheme.updateLayoutClass();
var layouts = document.querySelector(".genesis-layout-selector");
if( layouts ) {
layouts.addEventListener("input", function (e) {
yourTheme.updateLayoutClass();
@SiGaCode
SiGaCode / genesis-bootstrap.php
Created June 5, 2017 14:11
Combine Genesis with Bootstrap, use Genesis filters to add Bootstrap divs and classes while retaining the framework base. Credits: https://teamtreehouse.com/community/bootstrap-or-genesis
<?php
//* Add Bootstrap container class to header
function my_site_bootstrap_header( $attributes ) {
$attributes['class'] = $attributes['class']. ' container-fluid';
return $attributes;
}
add_filter( 'genesis_attr_site-header', 'my_site_bootstrap_header' );
//* Add Bootstrap container wrap around page content
function my_site_start_page_container(){ echo '<div id="page-container" class="container-fluid"><div class="row">'; };
@carasmo
carasmo / htaccess.txt
Last active May 15, 2017 00:29
Speed Up WordPress self hosted sites. This content goes inside the .htaccess file BEFORE the # BEGIN WordPress.
## If your server has a redirect problem with
## .htpasswds protection on wp-admin directory, add the following:
ErrorDocument 401 default
## ------- UNSET PRAGMA ------
## https://www.mnot.net/cache_docs/#PRAGMA
@tomfinitely
tomfinitely / events-widgets.php
Last active December 4, 2021 01:23
The Events Calendar Pro - Cross-site Events Widget
<?php
if ( ! defined( 'ABSPATH' ) ) die('-1');
/*
* WDG-customized version of the Events Calendar Pro mini calendar widget.
* Changes are noted inline.
* Replacing class name: Tribe__Events__Pro__Mini_CalendarWidget
*/
class MultisiteTribeEventsProMiniCalendarWidget extends WP_Widget {
function __construct() {