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 / asynctosync.java
Created November 18, 2021 09:34
this is a small snippet for running sync code asynchronously (just a task in an async scheduler)
Bukkit.getScheduler().runTaskTimerAsynchronously(LumberHarvester.getInstance(), () -> {
Bukkit.getScheduler().runTask(VoidFlame.getPlugin(), () -> {
World world = Bukkit.getWorld("world");
world.spawnEntity(new Location(world, 0, 100, 0), EntityType.PRIMED_TNT);
});
}, 0L, 20L);
/**
* Utility message for sending version independent actionbar messages as to be able to
* support versions from 1.8 and up without having to disable a simple feature such as this.
*
* @param player the recipient of the actionbar message.
* @param message the message to send. If it is empty ("") the actionbar is cleared.
*/
public void sendActionbar(Player player, String message) {
if (player == null || message == null) return;
@CyberFlameGO
CyberFlameGO / xp.md
Created October 28, 2021 06:34 — forked from Fuwn/xp.md
Windows XP All Editions Universal Product Keys Collection.

Although Microsoft does not support Windows XP updates any more, I’m sure there are still many users using it due to their personal habits or job demands. Therefore XP’s product keys may be necessary even now, and 8cy provided you with the most comprehensive Windows XP product keys here, just in order to provide some convenience.

The following CD-KEYs are official and original from Microsoft, mainly used for Windows XP Professional Service Pack 2/3 VOL/VLK system images which are the easiest ones to find on the Internet. Their biggest advantage is your Windows XP will be activated after using these CD-KEYs to complete installation.

// Windows XP Pro Product Keys //

import javax.crypto.*;
import javax.crypto.spec.SecretKeySpec;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
public class KeyUtils {
public static SecretKey rebuildKey(String encodedKey){
final byte[] decodedKey = Base64.getDecoder().decode(encodedKey);
@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.
*/
@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)) ||
#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 / !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.

@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>