This script will check if external IP is changed or not and will update the external IP of A or AAAA record in Cloudflare DNS using API token/ global API key method.
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
# /etc/sysctl.d/60-sysctl.conf | |
# Generic Web + DB Server Tuning | |
# Based on original by Kawin Viriyaprasopsook <[email protected]> | |
# Apply with: sysctl --system | |
######################## | |
# Kernel & Memory | |
######################## | |
# Reduce console noise from kernel messages | |
kernel.printk = 3 4 1 3 |
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 bash | |
# Require curl & jq | |
hash curl 2>/dev/null || { echo >&2 "I require 'curl' but it's not installed. Aborting."; exit 1; } | |
hash jq 2>/dev/null || { echo >&2 "I require 'jq' but it's not installed. Aborting."; exit 1; } | |
# Get domain list | |
read -e -i 'domains.csv' -p 'Domain list file: ' DOMAIN_FILE | |
read -e -i 'y' -p 'CF Proxy [Y/n]: ' CF_PROXY | |
if [[ ${CF_PROXY} =~ ^([yY][eE][sS]|[yY])+$ ]] |
When setting these options consider the following:
- How long is your average request?
- What is the maximum number of simultaneous visitors the site(s) get?
- How much memory on average does each child process consume?
sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
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
<?php | |
wp_load_translations_early(); | |
$protocol = wp_get_server_protocol(); | |
header( "$protocol 503 Service Unavailable", true, 503 ); | |
header( 'Content-Type: text/html; charset=utf-8' ); | |
header( 'Retry-After: 30' ); | |
?> | |
<!DOCTYPE html> | |
<html> |
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 bash | |
#============================================================================== | |
# title: swap.sh | |
# description: This script automatically creates a swap size that's 20% of total RAM | |
# and comments out the old swap device in /etc/fstab. | |
# author: Kawin Viriyaprasopsook <[email protected]> | |
# usage: bash swap.sh | |
# notes: need `sudo dd sed` packages | |
#============================================================================== |
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 bash | |
# ============================================================================= | |
# | |
# *** WARNING: THIS SCRIPT IS NO LONGER MAINTAINED *** | |
# | |
# use https://github.com/keesiemeijer/wp-update instead | |
# | |
# ============================================================================= |
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
/** | |
* My Account | |
*/ | |
.woocommerce-account .woocommerce-MyAccount-navigation { | |
width: 20%; | |
} | |
.woocommerce-account .woocommerce-MyAccount-content { | |
display: inline-block; |
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
<?php | |
/* Example custom archive template file */ | |
// Get header | |
get_header(); ?> | |
<div id="content-wrap" class="container clr"> | |
<?php wpex_hook_primary_before(); ?> |
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
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) === | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated September 2024 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |