View sunrise.php
<?php | |
// Mask Domain testing | |
$clientslug_custom_sunrise_domains = [ | |
'mask.test', | |
]; | |
// quickly switch testing scenarios |
View post-images.sh
#!/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
#!/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
#!/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
#!/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
# 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
<?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
<?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
<?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
<?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