View sunrise.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Mask Domain testing | |
$clientslug_custom_sunrise_domains = [ | |
'mask.test', | |
]; | |
// quickly switch testing scenarios |
View post-images.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "post_id,post_title,image_path"; | |
while read -r post_row | |
do | |
# --format=csv always has a header | |
if [[ "ID,post_title" == $post_row ]]; then | |
continue; |
View wordmoji.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
convert='/usr/local/bin/convert' | |
# flight check: must have imagemagick | |
if [ ! $(which $convert) ]; then | |
echo 'Error: `convert` required' | |
exit; | |
fi; |
View testurl.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Call this file with the URL to test for as the only param | |
# `bash testurl.sh ms.test/doesthissiteexist` | |
# | |
# This script also assumes the multisite you're looking in is at /srv/www/ms | |
# | |
colorreset="\033[0;0m" |
View gifintensifier.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Call this script, passing an image filename | |
# Creates an intensified version | |
convert='/usr/local/bin/convert' | |
realpath='/usr/local/bin/realpath' | |
# flight check: must have imagemagick | |
if [ ! $(which $convert) ]; then |
View file-cleanup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find your files in /tmp older than 7 days | |
find /tmp -mtime +7 -user `whoami` -exec ls -lpdh {} \; | column -t | |
# Delete your files in /tmp older than 7 days | |
find /tmp -type f -mtime +7 -user `whoami` -delete | |
find /tmp -type d -mtime +7 -user `whoami` -empty -delete | |
# Find your files in /home (2 dirs deep) older than 7 days | |
find /home -maxdepth 2 -mtime +7 -user `whoami` -exec ls -lpdh {} \; | column -t |
View wlo-widget.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Plugin Name: WLO Widget | |
// register core 'text' widget | |
register_wlo_widget( 'text' ); // id base | |
/** | |
* hook in | |
*/ | |
function register_wlo_widget( $widget_id ) { |
View curl-rest-cli.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( !defined( 'WP_CLI' ) ) return; | |
/** | |
*/ | |
class trepmal_cURL_REST extends WP_CLI_Command { | |
/** | |
* Generate cURL command for REST API |
View debug-rest-api.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Debug Bar for REST API | |
* Description: Enable Debug Bar for REST API endpoints (add ?debug). Not for production. | |
* Author: Kailey "trepmal" Lampert | |
*/ | |
namespace trepmal\rest_debug; | |
/** |
View dev-plugins.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Dev Plugins | |
*/ | |
add_action( 'muplugins_loaded', function() { | |
// Plugins to activate automatically. | |
$auto_activate = [ | |
'debug-bar/debug-bar.php', | |
'debug-bar-extender/debug-bar-extender.php', |
NewerOlder