Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Hacking, probably.

Chris Reynolds jazzsequence

🚀
Hacking, probably.
View GitHub Profile
@jazzsequence
jazzsequence / install-sage.sh
Last active October 12, 2022 20:36
Roots Sage install script on Pantheon
View install-sage.sh
#!/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
View loader.php
<?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
View delete-multidevs.sh
# 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
View batch_unzip.sh
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
View settings.json
{
"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.
View stupid-ascii-header.php
<?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
View end.gcode
; 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
@jazzsequence
jazzsequence / addCharacter.js
Last active May 17, 2019 19:07
D&D Battle Tracker
View addCharacter.js
/**
* Add a character line.
*/
function addCharacter() {
const addChar = document.querySelectorAll( '[id^="add-tmp-char-"]' );
// Loop through added character inputs.
for ( const tmpCharButton of addChar ) {
// Add a click handler for this particular input.
tmpCharButton.addEventListener( 'click', () => {
View class-taxonomy-base.php
<?php
/**
* Encompass Health Blog Taxonomy Base Class
*
* Base class for creating and modifying all taxonomies for Encompass Health Blog.
*
* @package EH\Taxonomies
* @author Chris Reynolds <chris@humanmade.com>
*/
@jazzsequence
jazzsequence / remove-empty-ps.php
Last active November 29, 2018 23:17
remove_empty_ps.php
View remove-empty-ps.php
<?php
/**
* Remove Empty Ps
*
* Deletes empty <p> tags on save.
* This can be included as a standalone plugin.
*/
namespace Gist\EmptyPs;