Skip to content

Instantly share code, notes, and snippets.

View ironprogrammer's full-sized avatar
💭
hackin the gibsons

Brian Alexander ironprogrammer

💭
hackin the gibsons
View GitHub Profile
@ironprogrammer
ironprogrammer / set-featured-image.php
Created September 6, 2012 19:04 — forked from bueltge/set-featured-image.php
Set featureed image automaticly on save post/page
<!-- 1. Take your Campaign Monitor subscribe form as generated from within your account: -->
<form action="http://myaccount.createsend.com/t/r/s/aljhk/" method="post" id="subForm">
<div>
<label for="name">Name:</label><br /><input type="text" name="cm-name" id="name" /><br />
<label for="aljhk-aljhk">Email:</label><br /><input type="text" name="cm-aljhk-aljhk" id="aljhk-aljhk" /><br />
<input type="submit" value="Subscribe" />
</div>
</form>
function oenology_add_menu_parent_class( $items ) {
$parents = array();
foreach ( $items as $item ) {
if ( $item->menu_item_parent && $item->menu_item_parent > 0 ) {
$parents[] = $item->menu_item_parent;
}
}
foreach ( $items as $item ) {
@ironprogrammer
ironprogrammer / intercom-report-printable.css
Created April 2, 2018 21:38
Printing Intercom reports sucks. This makes it suck less.
/* allow scroll */
body>div.ember-view>div.ember-view {
overflow: visible !important;
}
/* hide links */
.ember-view a[href]:after {
content: '' !important;
}
.t__em-link {

Keybase proof

I hereby claim:

  • I am ironprogrammer on github.
  • I am ironprogrammer (https://keybase.io/ironprogrammer) on keybase.
  • I have a public key ASBkabFHTiblx8yQIc2ualSeQ_5nqPARBEsD_xs0COLDeQo

To claim this, I am signing this object:

@ironprogrammer
ironprogrammer / rollback-update-failure.md
Last active June 30, 2022 15:46
WP-CLI-flavored Rollback Update Failure plugin testing reference

Testing the Rollback Update Failure Plugin

Hint: Preceding the following wp calls with the time command will provide execution timing to help with before and after patch comparisons. E.g. time wp plugin update --all.

Install the Plugin ⚙️

# install the Rollback Update Failure plugin (plugin to test)
wp plugin install rollback-update-failure --activate

# [OPTIONAL] install the Rollback Update Testing plugin (to simulate failures)
@ironprogrammer
ironprogrammer / object-replacement-character.md
Last active June 30, 2022 18:14
Visual representation of the object replacement character

See comments below for images.

@ironprogrammer
ironprogrammer / wordpress.zsh
Last active October 10, 2025 01:03
macOS command line functions and aliases for contributing to `wordpress-develop`
# `wordpress-develop` contributor command line scripts for macOS
# Requires WP-CLI: https://wp-cli.org
# use local project's PHPunit
alias phpunit='vendor/bin/phpunit'
# PHPunit aliases, e.g. `puf name_of_test`
alias pu=phpunit
alias puf='phpunit --testdox --filter'
alias pug='phpunit --testdox --group'
alias pul='phpunit --list-groups'
@ironprogrammer
ironprogrammer / wordpress-sqlite.zsh
Last active October 9, 2025 22:37
Quick WordPress on SQLite instances, with rollback and DB backup.
# Spin up a SQLite WP site, e.g.: `wp-sqlite wp-603 6.0.3`
# If omitted, version defaults to latest, and pins rollback to that version
# @TODO consider using https://developer.wordpress.org/cli/commands/cli/alias/ for locals?
wp-sqlite() {
local wp_name=''
local wp_ver='latest'
# check required arg for site name
if [ -z "$1" ]; then
echo Usage: wp-sqlite site-name \[wp-version\]
@ironprogrammer
ironprogrammer / notes.md
Created December 9, 2022 03:46
Trac 54504/PR 3732 Testing

Notes from testing PR 3732

(Note that some commands refer to shell functions from wordpress.zsh and wordpress-sqlite.zsh.)

## Testing Instructions for Trac 54504

# PREPARE PR SOURCE
# get pr
gh pr checkout 3732