Skip to content

Instantly share code, notes, and snippets.

@seemly
seemly / wpengine-regex-url-rewrites-from-column.txt
Created September 9, 2025 14:52
This is a formula snippet for Google Sheets to prepare the From column in WP Engine regex URL redirects.
/*==========================
1.) Google Sheets spreadsheet should have a sheet named 'source' and a another called 'target'.
2.) 'source' sheet should contain raw/unprocessed export of 'From' and 'To' columns. Therefore, column selectors may need updating.
3.) Copy and paste each of the formulas below as appropriate into your 'target' sheet.
==========================*/
/*. From column */
=ARRAYFORMULA(
@seemly
seemly / bulk-export-rewrite-rules-wpengine.js
Created September 4, 2025 13:41
WP Engine - Bulk Export Rewrite Rules
/*================
In the absence of support to Bulk Export all rewrite rules from WP Engine, I wrote the following snippet.
1.) Navigate to the Rewrite Rules in the Web Rules section of your WP Engine dashboard.
2.) Copy and paste the below code into your web dev console.
3.) Save the CSV to your machine.
================*/
@seemly
seemly / cleanup-macos-metadata-files.sh
Created July 14, 2025 11:58
Simple shell command to recursively remove unnecessary macOS metadata files (.DS_Store and AppleDouble ._ files) from a directory tree, useful for cleaning up files copied from macOS to Linux or NAS storage.
find /home /mnt /media /srv -type f \( -name '.DS_Store' -o -name '._*' \) -delete
@seemly
seemly / cv-rewrite-prompt.txt
Created February 27, 2025 20:35
LLM prompt to help with rewriting your CV
You are a resume-feedback assistant. Please follow these steps:
- Instruct me to paste my current resume.
- After you have my resume, ask me which roles I’ve been targeting.
- Once you know the roles I’m targeting—given what you know about me and my profession—tell me, brutally, why I’m not getting interviews. Don’t hold back. I want the harsh truth.
- Rewrite my resume based on the feedback you’ve given.
@seemly
seemly / update-generatepress-dynamic-content-title-value-in-elements.php
Last active October 22, 2024 14:46
Replace GeneratePress dynamic content 'title' value in custom taxonomy archive page defined in Elements
<?php
add_filter(
"render_block",
function ($block_content, $block) {
$should_replace_title = ("title" === $block["attrs"]["gpDynamicTextType"]);
if (is_tax("your-custom-taxonomy") && $should_replace_title) {
// Get the dynamically defined text we want to replace.
$text_to_replace = $block["attrs"]["gpDynamicTextReplace"];
@seemly
seemly / safe-delete-flamingo-inbound-messages-older-than-3-months.md
Last active June 5, 2024 13:59
MySQL query to delete Flamingo WordPress plugin Inbound Messages created more than 3 months ago.
START TRANSACTION;

DELETE FROM wp_posts
WHERE post_type = 'flamingo_inbound'
AND post_date < DATE_SUB(CURDATE(), INTERVAL 3 MONTH);

ROLLBACK;
@seemly
seemly / safe-delete-flamingo-address-book-records-older-than-3-months.md
Last active June 5, 2024 13:58
MySQL query to delete Flamingo WordPress plugin Address Book entries created more than 3 months ago
START TRANSACTION;

DELETE FROM wp_posts
WHERE post_type = 'flamingo_contact'
AND post_date < DATE_SUB(CURDATE(), INTERVAL 3 MONTH);

ROLLBACK;
@seemly
seemly / safe-delete-flamingo-address-book-records.md
Created May 31, 2024 14:53
MySQL query to delete Flamingo WordPress plugin Address Book entries
START TRANSACTION;

DELETE FROM wp_posts
WHERE wp_posts.post_type = 'flamingo_contact';

ROLLBACK;
@seemly
seemly / safe-delete-flamingo-inbound-messages.md
Created May 31, 2024 14:52
MySQL query to delete Flamingo WordPress plugin Inbound Messages.
START TRANSACTION;

DELETE FROM wp_posts
WHERE wp_posts.post_type = 'flamingo_inbound';

ROLLBACK;
@seemly
seemly / list-all-registered-gutenberg-blocks.js
Created February 8, 2024 16:13
List all registered WordPress Gutenberg Blocks. Paste this snippet in Chrome Dev Tools Console while in the Gutenberg editor view.
let types = wp.blocks.getBlockTypes();
// filter to just the core blocks
let core_blocks = types.filter(
type => type.name.startsWith('core/')
);
// grab just the names
let block_names = types.map(type => type.name);