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
#!/usr/bin/env bash | |
# | |
# Mastodon update script | |
# v3 (2024.02.18) | |
# forked | |
# | |
# Changelog | |
# * v1 - initial version | |
# * v2 - added mastodon-bird-ui |
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 | |
# CACHE WARMER script for XML Sitemaps with MULTIPLE SUB-SITEMAPS: | |
# from: https://gist.github.com/JPustkuchen/f185bee60c5a36211cdf6f1c8f6deebe | |
# chmod u+x | |
DOMAIN='https://www.xyz.com' | |
wget -q $DOMAIN/sitemap.xml --no-cache -O - | egrep -o "$DOMAIN[^<]+" | while read subsite; | |
do | |
echo --- Reading sub-sitemap: $subsite: --- | |
wget -q $subsite --no-cache -O - | egrep -o "$DOMAIN[^<]+" | while read line; | |
do |
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
' Windows Devs said on the developer feedback asking for cron, deamons and background tasks: | |
' "This first release of Bash/WSL doesn’t support background tasks, cron jobs, daemons, etc. | |
' Currently, when you close your last bash shell console window, we tear-down the Linux process | |
' chain in order to conserve resources." | |
' | |
' That's the workaround for now. | |
' You can run it on boot, for example, and it'll keep a instance of bash running alone in the background | |
' allowing background processes to run on WSL. | |
Set WshShell = CreateObject("WScript.Shell") |
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 | |
# Check: https://onexa.nl/wordpress/toolbar-link-redis-object-cache/ | |
/** | |
* Add a link to the Admin Toolbar to easily flush the Redis cache (Redis Object Cache plugin) | |
* | |
* @author Hiranthi Herlaar, onexa.nl | |
* | |
* @var $wp_admin_bar > https://codex.wordpress.org/Class_Reference/WP_Admin_Bar |
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
sub headers_x { | |
## Add after vcl 4.1; | |
## include "/etc/varnish/ext/cheshire_cat.vcl"; | |
## | |
## Add after sub vcl_deliver { | |
## call header_smiley; | |
sub header_smiley { | |
set resp.http.xa = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀.'\⠀⠀⠀/`."; | |
set resp.http.xb = "⠀⠀⠀⠀⠀⠀⠀⠀⠀.'.-.`-'.-.`."; | |
set resp.http.xc = "⠀⠀⠀⠀..._:⠀⠀⠀.-.⠀.-.⠀⠀⠀:_..."; |
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
sub deliver_moomin { | |
set resp.http.x-moomin0 = "⠀⠀⠀⠀⠀⠀⠀⢠⢦⡀⠀⡰⣩⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀"; | |
set resp.http.x-moomin1 = "⠀⠀⠀⠀⠀⠀⠀⠘⣄⠙⠍⠁⠙⠦⡀⠀⠀⠀⠀⠀⠀⠀⠀"; | |
set resp.http.x-moomin2 = "⠀⠀⠀⠀⠀⠀⠀⠀⡎⠀⠀⡠⠄⠔⠊⠉⠒⠒⠒⢄⠀⠀⠀"; | |
set resp.http.x-moomin3 = "⠀⠀⠀⠀⠀⠀⠀⢀⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢈⠆⠀⠀"; | |
set resp.http.x-moomin4 = "⠀⠀⢠⢤⠜⡆⠀⢸⠀⠰⣄⠀⠀⠀⠀⠀⠀⠀⣠⠎⠀⠀⠀"; | |
set resp.http.x-moomin5 = "⠀⠀⠱⠤⡁⠈⠑⠇⠀⠀⠀⠉⠒⠤⠤⠄⢖⠊⠀⡐⠧⣄⣀"; | |
set resp.http.x-moomin6 = "⠀⠀⠀⠀⠘⢆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⡉⠀⣀⣨⡷"; | |
set resp.http.x-moomin7 = "⠀⠀⠀⠀⠀⠈⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢱⠜⠁ "; | |
set resp.http.x-moomin8 = "⠀⠀⠀⠀⠀⠀⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣸⠱⡀⠀"; |
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
# Check: https://onexa.nl/wordpress/toolbar-link-redis-object-cache/ | |
/** | |
* Add a link to the Admin Toolbar to easily flush the Redis cache (Redis Object Cache plugin) | |
* | |
* @author Hiranthi Herlaar, onexa.nl | |
* | |
* @var $wp_admin_bar > https://codex.wordpress.org/Class_Reference/WP_Admin_Bar | |
**/ | |
function redis_add_toolbar_link( $wp_admin_bar ) | |
{ |
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
[www] | |
listen = /run/php/php7.4-fpm.sock | |
user = www-data | |
group = www-data | |
listen.owner = www-data | |
listen.group = www-data | |
pm = ondemand | |
pm.max_children = 2 | |
pm.process_idle_timeout = 10s | |
pm.max_requests = 100 |
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
//define('WP_CACHE', true); | |
$_SERVER['HTTPS'] = 'on'; | |
//define('DISABLE_WP_CRON', true); | |
define('WP_REDIS_DATABASE', 1); | |
$redis_server = array( 'host' => '127.0.0.1', 'port' => 6379, ); | |
define('WP_REDIS_MAXTTL', 900); | |
define('WP_CACHE_KEY_SALT', 'eksis.dev'); |
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
bind 127.0.0.1 ::1 | |
protected-mode yes | |
port 6379 | |
tcp-backlog 511 | |
# unixsocket /var/run/redis/redis-server.sock | |
# unixsocketperm 700 | |
timeout 0 | |
tcp-keepalive 300 | |
daemonize yes |
NewerOlder