This file contains hidden or 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 python3 | |
| import os | |
| import re | |
| import sys | |
| import json | |
| import httpx | |
| import tempfile | |
| import configparser | |
| from langdetect import detect |
This file contains hidden or 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 | |
| # Nicknames, urls and snapshot directories | |
| case "$1" in | |
| example) | |
| DOMAIN="www.example.com" | |
| TARGET_DIR="/var/www/emergency/example" | |
| ;; | |
| try) | |
| DOMAIN="try.example.tld" |
This file contains hidden or 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
| // Add Xkey-based X-Cache-Tags headers | |
| add_action('send_headers', function () { | |
| if (is_admin() || is_user_logged_in()) { | |
| return; | |
| } | |
| $tags = []; | |
| // Frontpage | |
| if (is_front_page()) { |
This file contains hidden or 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
| // Use snippets plugin or functions.php | |
| // Adds xkey tags: frontpage, sidebar (right), article-ID, category and tag | |
| // Remember to change url | |
| add_action('save_post', function ($post_id) { | |
| // Don't do anything is this isn't an article or is autosaving | |
| if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return; | |
| if (get_post_type($post_id) !== 'post') return; | |
| $tags = []; |
This file contains hidden or 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 | |
| # chmod +x purge.sh | |
| # DEFAULT | |
| DEFAULT_DOMAIN="1.example.tld" | |
| # MANUAL | |
| function usage() { | |
| echo "Use:" |
OlderNewer