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
//WooCommerce Email Customizations | |
add_filter( 'woocommerce_email_recipient_customer_note', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
add_filter( 'woocommerce_email_recipient_customer_completed_order', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
add_filter( 'woocommerce_email_recipient_customer_invoice', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
add_filter( 'woocommerce_email_recipient_customer_processing_order', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
/** | |
* $recipient could be comma separated to send to additional people | |
* EX. $recipient .= ', $additonal_recipient'; | |
*/ |
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
# Put this file in /etc/systemd/system | |
[Unit] | |
Description=A better rc.local-service | |
[Service] | |
Type=idle | |
ExecStart=/etc/rc.local.better | |
[Install] | |
WantedBy=network.target |
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
[Unit] | |
Description = Kodi Media Center | |
# if you don't need the MySQL DB backend, this should be sufficient | |
After = systemd-user-sessions.service network.target sound.target | |
# if you need the MySQL DB backend, use this block instead of the previous | |
# After = systemd-user-sessions.service network.target sound.target mysql.service | |
# Wants = mysql.service |
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/ksh | |
# | |
# Using blacklist from pi-hole project https://github.com/pi-hole/ | |
# to enable AD blocking in unbound(8) | |
# | |
# src: https://www.tumfatig.net/20190405/blocking-ads-using-unbound8-on-openbsd/ | |
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" | |
# Available blocklists - comment line to disable blocklist | |
_disconad="https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt" |
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 | |
# replace with latest moodle directory and filename from moodle.org | |
DIRECTORY="stable401" | |
FILENAME="moodle-4.1.1.tgz" | |
URL="https://download.moodle.org/download.php/direct/$DIRECTORY/$FILENAME" | |
pushd | |
rm -f moodle-latest.tgz | |
wget "$URL" -O moodle-latest.tgz |
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 | |
# usage: ./restore-proxmox-vm backup.zst local:111 newlocal | |
tempdir=$(mktemp -d -u) # do not create directory or vma extract will fail | |
if [ -f "$1" ]; then zstd -d "$1"; fi | |
vma extract "$(basename $1 .zst)" "$tempdir" | |
vmid=$(($(ls -1 /etc/pve/qemu-server/*.conf | tr '\n' '\0' | xargs -0 -n 1 basename | sed -e 's:\.conf::g' | sort -n | tail -1)+1)) | |
mv "$tempdir/qemu-server.conf" /etc/pve/qemu-server/$vmid.conf | |
newdisk="$3:$vmid" | |
sed -i -e "s:$2:$newdisk:g" /etc/pve/qemu-server/$vmid.conf | |
mkdir -p "$3/images/$vmid" |
OlderNewer