Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import requests
import json
import sys
import os
import socket
# --- settings ---
@mauroprojetos
mauroprojetos / cf_cache_rules_implementation_guide_spcc.md
Last active April 28, 2025 11:12 — forked from isaumya/cf_cache_rules_implementation_guide_spcc.md
Super Page Cache for Cloudflare — Cache cloudflare auto performance

Implementation Guide for using "Remove Cache Buster Query Parameter" feature

The Super Page Cache for Cloudflare plugin has recently added the feature for using the Cache Everything pagerule withing the ?swcfpc=1 cache buster query paramater. This opens up so many new doors where users previously had to use the Cloudflare Workers to remove the cache buster.

With this new option now users are able to take advantage of Cloudflare Cache Everything page rule and take it to the next level by using the new Rulesets released by Cloudflare. Basically this is achived by taking advantage of the all new Cache Rules feature implemented by Cloudflare.


Setp 1 — Setting up the Cache Rules inside your Cloudflare Dashboard

The first thing that you need to do is, log-in to your Cloudflare Dahsbord and go to the domain/zone doe which you are setting up the [Super Page Cache for Cloudflare](https://wordpress.org/plug

@mauroprojetos
mauroprojetos / zabbix60_rocky8_timescaledb_nginx.sh
Created October 9, 2023 02:23 — forked from isaqueprofeta/zabbix60_rocky8_timescaledb_nginx.sh
Instalação Zabbix 6.0 com TimescaleDB (PG15) e Nginx no Rocky/Alma 8
#!/bin/bash
DATABASE_PASSWORD=${1:-Z4bb1xD4t4b4s3}
echo "######################################################################"
echo " INSTALACAO DO ZABBIX "
echo " SISTEMAS OPERACIONAIS RHEL-LIKE ROCKY/ALMA LINUX "
echo "######################################################################"
echo " FONTE DO SCRIPT: "
echo "https://gist.github.com/isaqueprofeta/7ac75a4f90b9d39283e51f78ae7abaca"
@mauroprojetos
mauroprojetos / grafana8_zabbix54_rocky8.sh
Created October 9, 2023 02:23 — forked from isaqueprofeta/grafana8_zabbix54_rocky8.sh
Instalação Grafana no Rocky 8
#!/bin/bash
# Desabilitar selinux
sudo sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
sudo setenforce 0
# Configurar o firewall
sudo firewall-cmd --add-port=3000/tcp --permanent
sudo firewall-cmd --reload
@mauroprojetos
mauroprojetos / zabbix60_ubuntu22_timescaledb_nginx.sh
Created October 9, 2023 02:22 — forked from isaqueprofeta/zabbix60_ubuntu22_timescaledb_nginx.sh
Instalação Zabbix 6.0 com TimescaleDB (PG15) e Nginx no Ubuntu 22.04
#!/bin/bash
DATABASE_PASSWORD=${1:-Z4bb1xD4t4b4s3}
echo "######################################################################"
echo " INSTALACAO DO ZABBIX "
echo " SISTEMA OPERACIONAL UBUNTU "
echo "######################################################################"
echo " FONTE DO SCRIPT: "
echo "https://gist.github.com/isaqueprofeta/abf61686c0c086678175c7b9eaaa0508"
@mauroprojetos
mauroprojetos / zabbix54_buster_timescaledb_nginx.sh
Created October 9, 2023 02:20 — forked from isaqueprofeta/zabbix54_buster_timescaledb_nginx.sh
Instalação Zabbix 5.4 com TimescaleDB e Nginx no Debian 10
#!/bin/bash
# Dependencias DEBIAN
sudo apt-get -q update
sudo apt-get -q -y install gnupg2
# BANCO DE DADOS
## Repositório
sudo echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
@mauroprojetos
mauroprojetos / Get-VmIPv4.ps1
Created June 15, 2021 21:56 — forked from kdaniel32/Get-VmIPv4.ps1
PowerShell: Get the IPv4 addresses of VMs running on a host
# Get the IPv4 addresses of the VMs where the VMNetworkAdapter status is OK
# presuming a single VmNIC on the VM
# I need to check and see if the following is always true
# $_.IPAddresses[0] is the IPv4 address
# $_.IPAddresses[1] is the IPv6 address
Get-VMNetworkAdapter -VMName * | Where-Object {$_.Status -eq “Ok”} | ForEach-Object {Write-Host $_.VMName ", " $_.IPAddresses[0]}
# Get the IPv4 addresses of the running VMs
Get-VM | Where-Object {$_.State -eq “Running”} | Select -ExpandProperty NetworkAdapters | ForEach-Object {Write-Host $_.VMName ", " $_.IPAddresses[0]}
@mauroprojetos
mauroprojetos / cloudSettings
Last active June 27, 2021 17:41 — forked from argentinaluiz/README.md
VSCode - Guia para configuração do ambiente com Docker
{"lastUpload":"2021-06-27T17:41:38.040Z","extensionVersion":"v3.4.3"}
@mauroprojetos
mauroprojetos / functions.php
Created July 1, 2020 11:51 — forked from claudiosanches/functions.php
WooCommerce 2.2 - Register new order statuses.
<?php
// My new order statuses.
function register_my_new_order_statuses() {
register_post_status( 'wc-status-name', array(
'label' => _x( 'Status Name', 'Order status', 'textdomain' ),
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
@mauroprojetos
mauroprojetos / cloudflare_update.script
Created April 29, 2020 15:35 — forked from kiler129/cloudflare_update.script
Automatic script for Mikrotik RouterOS updating record on CloudFlare.
#########################################################################
# ================================================== #
# $ Mikrotik RouterOS update script for CloudFlare $ #
# ================================================== #
# #
# - You need a CloudFlare account & api key (look under settings), #
# a zone and A record in it #
# - All variables in first section are obvious, except CFid, #
# To obtain CFid use following command in any unix shell: #
# curl https://www.cloudflare.com/api_json.html -d 'a=rec_load_all' -d 'tkn=YOUR_API_KEY' -d '[email protected]' -d 'z=domain.com'|python -mjson.tool