Skip to content

Instantly share code, notes, and snippets.

View jazzsequence's full-sized avatar
🚀
Hacking, probably.

Chris Reynolds jazzsequence

🚀
Hacking, probably.
View GitHub Profile
@jazzsequence
jazzsequence / validate-fixture-version.sh
Last active March 7, 2024 21:41
Bash script to check a Pantheon plugin's Tested Up To value against its fixture site's WordPress version and the current WordPress version.
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
main(){
export TERMINUS_HIDE_GIT_MODE_WARNING=1
local DIRNAME
DIRNAME=$(dirname "$0")
local CURRENT_WP_VERSION
@jazzsequence
jazzsequence / download-sternberg-gifs.md
Last active January 24, 2024 16:59
Download JT$ gif collection

Download Sternberg Gifs

When I worked at WebDevStudios, we spoke in gifs. I guess, these days, that makes me old. Whatever. I miss them. It represented a shared language even when the source of the gif was unknown. (I remember distinctly how it felt when I found the Key and Peele sketch from which this gem was taken:)

noice

(It kinda felt like that ☝️)

Justin Sternberg even wrote an Alfred workflow called WDS Giffy which predated (in practice, if not in actuality) the gif-sharing service Giphy that pointed to his personal collection of gifs. I can't say for certain, but I think most of us used that, at least while I was there.

@jazzsequence
jazzsequence / update.md
Created November 9, 2023 21:21
Update a Pantheon site's WordPress version to a _specific_ version if multiple updates are available.

When multiple WordPress versions have passed without updates being applied to your site, you will get a list of the updates in your Pantheon dashboard but no way to apply specific updates to your site.

Screenshot 2023-11-09 at 12 58 26 PM

Generally, the only way to apply those updates is to click the Apply Updates button or use terminus upstream:updates:apply, but either of those options will give you all the updates. What if you only wanted to update to a specific WordPress version?

That's what this guide is here to illustrate!

Step 1: Add pantheon-systems/WordPress as a Git remote

@jazzsequence
jazzsequence / install-sage.sh
Last active October 12, 2022 20:36
Roots Sage install script on Pantheon
#!/bin/bash
themedir="web/app/themes/"
echo "Enter the site name. \n
This will be used to clone your site locally to /{User}/pantheon-local-copies/{site_name) and to interact with your site."
read $sitename
echo "Enter your theme name. \n
@jazzsequence
jazzsequence / loader.php
Created October 5, 2022 20:44
MU Plugin Loader
<?php
/**
* Plugin Name: Pantheon MU Plugin Loader
* Description: Loads the MU plugins required to run the site
* Author: Pantheon Systems
* Author URI: https://pantheon.io
* Version: 1.0
*/
if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) {
@jazzsequence
jazzsequence / delete-multidevs.sh
Last active August 25, 2022 20:41
Delete a bunch of Pantheon multidevs
# This assumes all of your multidevs are named similarly, e.g. dev-1, dev-2, dev-3, etc. By default, Pantheon only allows
# 10 concurrent multidevs, so if you're making a lot for debugging purposes, you might want to clear them all out in one
# go so you can create more. All of this could be done in a single line of bash if you really wanted to; it's broken out
# here for readability, but you could do something like this instead of what follows:
#
# for i in {1..10}; do; terminus multidev:delete site-name.site-prefix-$i --yes; done;
#
# Uncomment the following lines with your site name and multidev-prefix.
# Again, your multidevs MUST be named with the same prefix or this script won't work!
# $SITE_NAME=your-site-name
@jazzsequence
jazzsequence / batch_unzip.sh
Last active July 21, 2022 20:47 — forked from ncimino/zip_content.sh
Bash loop through zip files & extract
ls *.zip > filelist
for FILENAME in `cat filelist`
do
unzip $FILENAME
rm $FILENAME
done
rm filelist
@jazzsequence
jazzsequence / settings.json
Created March 8, 2022 20:59
VS Code - Trim trailing whitespace, but not in .md files
{
"files.trimTrailingWhitespace": true,
"[markdown]": {
"files.trimTrailingWhitespace": false
}
}
@jazzsequence
jazzsequence / stupid-ascii-header.php
Created December 17, 2020 22:24
I created a stupid ASCII art header for my site.
<?php
/**
* Plugin Name: Stupid header ASCII art
* Plugin URI: https://jazzsequence.com
* Description: Displays a stupid ASCII art in the html header.
* Version: 1.0
* Author: Chris Reynolds
* Author URI: https://github.com/jazzsequence
* License: GPLv3
*/
@jazzsequence
jazzsequence / end.gcode
Last active December 27, 2022 10:45
Start and End G-code for Ender 5 on Cura
; Ender 5 Custom End G-code
G4 ; Wait
M220 S100 ; Reset Speed factor override percentage to default (100%)
M221 S100 ; Reset Extrude factor override percentage to default (100%)
G91 ; Set coordinates to relative
G1 F1800 E-3 ; Retract filament 3 mm to prevent oozing
G1 F3000 Z20 ; Move Z Axis up 20 mm to allow filament ooze freely
G90 ; Set coordinates to absolute
G1 X0 Y220 F1000 ; Move Heat Bed to the front for easy print removal
M106 S0 ; Turn off cooling fan