$ cd /path/to/Dockerfile
$ sudo docker build .
View running processes
<?php | |
// Force re-approval of updated comments. | |
add_action( 'activitypub_handled_update', function( $activity, $second_param, $state, $reaction ) { | |
/** @todo: Send an email or something, because if you get quite a few of these, it's impossible to keep up. */ | |
if ( $reaction instanceof \WP_Comment ) { | |
wp_set_comment_status( $reaction, 'hold' ); | |
wp_notify_moderator( $reaction->comment_ID ); | |
} | |
}, 99, 4 ); |
<?php | |
/** | |
* Auto-Update Enabler | |
* | |
* Decisions, not options. Inspired by Trac ticket #58389 by | |
* Jos Velasco and an offhanded comment on the fedi by Andy | |
* Fragen. | |
* | |
* @package Auto-Update Enabler | |
* @author Jason Cosper <[email protected]> |
#!/bin/bash | |
# ------------------------------------------------- | |
# Make site directory | |
# Download WP and install WP to site directory | |
# Set WP configuration | |
# Configure NGINX for new domain-name | |
# ------------------------------------------------- | |
# | |
# Requirments: | |
# |
<?php | |
// Put this in wp-config.php and replace https://example.com/ with the URL of the production site. | |
define( 'RH_USE_REMOTE_MEDIA_URL', 'https://example.com/' ); | |
// Put the rest of this in functions.php or a custom plugin or somewhere else. | |
if ( defined( 'RH_USE_REMOTE_MEDIA_URL' ) && ! empty( RH_USE_REMOTE_MEDIA_URL ) ) { | |
add_filter( 'wp_get_attachment_image_src', 'filter_wp_get_attachment_image_src' ); | |
add_filter( 'wp_calculate_image_srcset', 'filter_wp_calculate_image_srcset' ); | |
add_filter( 'wp_get_attachment_url', 'filter_wp_get_attachment_url' ); | |
} |
#!/bin/bash | |
# This is a script for switching between Intel and NVIDIA graphics modes | |
# on System 76 Oryx Pros. It was written because I installed KDE Plasma, | |
# thereby losing the graphics-switching functionality built into Gnome. | |
# But it should work just fine under Gnome, as well, if you're into that. | |
# | |
# It uses a modified version of Dave Miller's excellent ask.sh script, | |
# which can be found here: | |
# https://gist.github.com/davejamesmiller/1965569 |
<?php | |
/** | |
* Site Kit by Google Anonymize IPs plugin file. | |
* | |
* @package Google\Site_Kit_Anomyize_IPs | |
* @author Felix Arntz, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2019 Google Inc. | |
* | |
* @wordpress-plugin |
WARNING
To get the script, use the Terminal app:
user@penguin:~$ mkdir bin && cd $_
user@penguin:~/bin$ curl -O https://gist.githubusercontent.com/mdrovdahl/3e941c129c70d3d0bd1fbc088de1f31b/raw/setup-dev-machine.sh
#!/bin/bash | |
drush=/usr/local/bin/drush | |
#check if drush exists before running rest of script | |
type $drush >/dev/null 2>&1 || { echo >&2 "I require drush but it's not installed. Aborting."; exit 1; } | |
#define default variables | |
profile_d=standard | |
acctname_d=Admin |
function! ClipboardCopy(lines, regtype) | |
let sum = TryClipboardCmd('md5sum', a:lines) | |
call writefile(sum, s:regtype_sum, 'S') | |
call writefile([a:regtype], s:regtype_txt, 'S') | |
return TryClipboardCmd('clipboard-provider copy', a:lines) | |
endfunction | |
function! ClipboardPaste() | |
let lines = TryClipboardCmd('clipboard-provider paste') | |
let regtype = 'V' |