Skip to content

Instantly share code, notes, and snippets.

View CyberFlameGO's full-sized avatar
💠
Hey, I’m Cyber/Aaron.

CyberFlame CyberFlameGO

💠
Hey, I’m Cyber/Aaron.
View GitHub Profile
@CyberFlameGO
CyberFlameGO / cyberflame.md
Created April 1, 2020 07:49
My first gist

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.

https://when.lol
@CyberFlameGO
CyberFlameGO / coffee.py
Last active March 21, 2021 21:47
A school task
#!/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
@CyberFlameGO
CyberFlameGO / proxy_basic_iptable_rules.sh
Created July 5, 2021 00:17
Recommended BASIC IPTables firewall rules for Bungeecord networks
### 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 ###
@CyberFlameGO
CyberFlameGO / Ensemble.plist
Created August 30, 2021 10:04 — forked from zhuowei/Ensemble.plist
Put this file as /Library/Preferences/FeatureFlags/Domain/Ensemble.plist and reboot to (hopefully) turn on Universal Control on macOS 12
<?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>
@CyberFlameGO
CyberFlameGO / Ensemble.plist
Created August 30, 2021 10:04 — forked from zhuowei/Ensemble.plist
Put this file as /Library/Preferences/FeatureFlags/Domain/Ensemble.plist and reboot to (hopefully) turn on Universal Control on macOS 12
<?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>
@CyberFlameGO
CyberFlameGO / !Extra info.md
Created October 10, 2021 23:49 — forked from HeathLoganCampbell/!Extra info.md
A weekend project to allow minecraft worlds to be saved in a mysql database, mysql worlds. This was done on top of Paper 1.17 on fa53a1a7f

SkyPaper

Uploading and download Minecraft worlds from mysql

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.

#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
@CyberFlameGO
CyberFlameGO / LoopAllnetAddr.java
Last active October 20, 2021 05:07
Loop thing
/*
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)) ||
@CyberFlameGO
CyberFlameGO / VolatileExample.java
Created October 20, 2021 05:08
Java volatility
public class VolatileExample {
/*
ESSENTIALLY, WITHOUT VOLATILE THREADS OTHER THAN MAIN WON'T BE ABLE
TO FETCH THE MOST UPDATED VALUE FOR THIS VARIABLE AS IT IS FETCHING FROM
CPU CATCH, THEREFORE, TO SURPASS THIS, WE USE VOLATILE AS IT WILL FORCE
THE SYSTEM TO FETCH THE TARGET VARIABLE DIRECTLY FROM MAIN MEMORY.
*/