Skip to content

Instantly share code, notes, and snippets.

View mpsparrow's full-sized avatar

Matthew Sparrow mpsparrow

View GitHub Profile
@isaumya
isaumya / cf_cache_rules_implementation_guide_spcc.md
Last active July 2, 2024 10:04
Super Page Cache for Cloudflare — Guide for using Remove Cache Buster Query Parameter feature (when using Cache Everything page rule)

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

@rcarmo
rcarmo / buid-xrdp-glamor-annotated.sh
Last active July 5, 2024 12:34 — forked from rkkoszewski/gist:aa531cee7126edf329b76bdd0546f502
Notes for installing XorgXrdp and Xrdp with GLAMOR support
#!/bin/bash
# Install Latest XRDP with XORGXRDP and GFX/Glamor server-side acceleration
# Tested on Ubuntu 22.04 LTS
BUILD_DIR=/tmp/xrdpbuild
echo "-> preparing $BUILD_DIR"
rm -f -r $BUILD_DIR
mkdir -p $BUILD_DIR
@Obydux
Obydux / Fabric-Quilt-Server-Optimization.md
Last active July 10, 2024 10:11
Fabric/Quilt Server Optimization

Fabric/Quilt Server Optimization

This has updated for 1.20.4, all of the optimization mods mentioned here are compatible with each other and don't affect vanilla behaviour by default.

Mods

Lithium - A mod designed to drastically improve the general performance of Minecraft without breaking things.

VMP - A mod designed to improve general server performance at high playercount.

@Phxntxm
Phxntxm / custom_commands.py
Last active April 21, 2024 22:42
A pretty simplified way to implement custom commands into your bot.
from discord.ext import commands
# The check to ensure this is the guild used where the command was made
def guild_check(_custom_commands):
async def predicate(ctx):
return _custom_commands.get(ctx.command.qualified_name) and ctx.guild.id in _custom_commands.get(ctx.command.qualified_name)
return commands.check(predicate)
class CustomCommands(commands.Cog):
@dronezzzko
dronezzzko / mysql-mariadb-tuning-and-optimization-for-best-performance.md
Last active June 18, 2024 19:20
MySQL/MariaDB Tuning And Optimization For Best Performance

MySQL/MariaDB Tuning And Optimization For Best Performance

OS Level Optimization

Swappiness

sysctl -w vm.swappiness=1
echo "vm.swappiness = 1" | sudo tee -a /etc/sysctl.conf

noatime

@lxe
lxe / goes16-rtlsdr.md
Last active June 6, 2024 04:19
Receive GOES-16 and GOES-17 Images with a Raspberry Pi and RTL-SDR dongle
@denji
denji / nginx-tuning.md
Last active July 20, 2024 17:33
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.