Heya! This is my first gist. I'll probably actually make good use of these some time in the future but yeah here's the first.
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
https://when.lol |
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 python3 | |
# From https://github.com/CyberFlameGO/schoolPythonProject/blob/master/coffee.py | |
# This dictionary stores the coffees available and their prices | |
coffee_kv_store = {"espresso": 2.50, "mocha": 4, "cappuccino": 3, "latte": 3.50, "flat white": 2.50, "long black": 2.50} | |
# This list stores the coffees ordered | |
coffees_ordered = [] # a key-value pair would be ideal but this is easiest imo tbh | |
# 'while' loop variables | |
ordering = True |
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
### Recommended BASIC IPTables firewall rules for Bungeecord networks ### | |
# Anything containing 'OPTIONAL' may cause network issues on some server setups. Use at your own risk (Can obviously be removed # | |
### 1: Drop invalid packets ### | |
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP | |
### 2: Drop TCP packets that are new and are not SYN ### | |
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP | |
### 4: Block packets with bogus TCP flags ### |
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
### 1: Drop invalid packets ### | |
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP | |
### 2: Drop TCP packets that are new and are not SYN ### | |
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP | |
### 3: Drop SYN packets with suspicious MSS value ### | |
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP | |
### 4: Block packets with bogus TCP flags ### |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- not sure which one it is, so set both --> | |
<key>Ensemble</key> | |
<dict> | |
<key>Enabled</key> | |
<true/> | |
</dict> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- not sure which one it is, so set both --> | |
<key>Ensemble</key> | |
<dict> | |
<key>Enabled</key> | |
<true/> | |
</dict> |
The idea was to be able to upload worlds to a database so that we could have multiple servers upload and download them at will to enable load balancing for servers such as skyblock as the demands of scalable 1.17 servers grow while the performance falls version to version.
The important idea here was to see if it was possible to upload worlds to a database, which the answer is yes :D. but this even works better for skyblock servers as they are mostly air, which allowed us to do a small optimization. which is when a chunk is empty, we don't have it, as generating empty chunks is cheap as chips, but storing them has about 500B of overhead. so it ends up taking longer to fetch them from the database, then just generate them.
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
#Minecraft server properties | |
#Sun Oct 10 18:18:53 NZDT 2021 | |
enable-jmx-monitoring=false | |
rcon.port=25575 | |
enable-command-block=false | |
gamemode=survival | |
enable-query=false | |
generator-settings={"lakes"\:false,"features"\:false,"layers"\:[{"block"\:"minecraft\:air","height"\:1}],"structures"\:{"structures"\:{}}} | |
level-name=world | |
motd=A Minecraft Server |
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
/* | |
Loops over every IP in the world | |
*/ | |
public class LoopAllnetAddr { | |
public static void main(String[] args) { | |
for (int x = 1; x < 256; x++) { | |
if (x == 10) continue; | |
for (int f = 0; f < 256; f++) { | |
if ((x == 172 && (f >= 16 && f <= 31)) || |
OlderNewer