Skip to content

Instantly share code, notes, and snippets.

View JayWood's full-sized avatar
:octocat:
Levelling up, one commit at a time.

JayWood

:octocat:
Levelling up, one commit at a time.
View GitHub Profile
@JayWood
JayWood / Cloudflare.sh
Last active July 6, 2024 18:53
Update your Cloudflare A record to point to your IP with only a shell script. Useful for a cron job every 15m or so.
#!/bin/bash
# Variables (replace these with your actual values)
CF_API_TOKEN="YOUR_CLOUDFLARE_API_TOKEN"
CF_ZONE_ID="YOUR_CLOUDFLARE_ZONE_ID"
CF_RECORD_ID="YOUR_DNS_RECORD_ID"
DOMAIN="yourdomain.com"
IP_FILE="/path/to/ip_address.txt"
# Get the current public IP address
# mongod.conf
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# Basic settings
systemLog:
version: '3.2'
services:
mc:
image: itzg/minecraft-server
container_name: ftb
restart: always
volumes:
- ./modpacks:/modpacks:ro
- ./data:/data
@JayWood
JayWood / getAllFiles.js
Created June 29, 2021 13:19
A function to recursively get all files in an array.
/**
* Gets all files as the function says.
*
* @param {string} dirPath
* @param {string[]} arrayOfFiles
* @returns {*|string[]}
*/
const getAllFiles = function(dirPath, arrayOfFiles) {
const files = fs.readdirSync(dirPath)
## Put on separate lines for readability.
-d64
-server
-XX:+AggressiveOpts
-XX:ParallelGCThreads=3
-XX:+UseConcMarkSweepGC
-XX:+UnlockExperimentalVMOptions
-XX:+UseParNewGC
-XX:+ExplicitGCInvokesConcurrent
-XX:MaxGCPauseMillis=10
[18:32:59] [main/INFO]: ModLauncher running: args [--username, phyrax, --version, forge-31.1.47, --gameDir, C:\Users\jjwoo\Documents\Curse\Minecraft\Instances\Plunger, --assetsDir, C:\Users\jjwoo\Documents\Curse\Minecraft\Install\assets, --assetIndex, 1.15, --uuid, bee7f9c0a0944c3a9f38baf6d4270139, --accessToken, ????????, --userType, mojang, --versionType, release, --width, 1024, --height, 768, --launchTarget, fmlclient, --fml.forgeVersion, 31.1.47, --fml.mcVersion, 1.15.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20200414.225201]
[18:32:59] [main/INFO]: ModLauncher 5.0.0-milestone.4+67+b1a340b starting: java version 1.8.0_51 by Oracle Corporation
[18:33:01] [main/INFO]: Added Lets Encrypt root certificates as additional trust
[18:33:01] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8 Source=file:/C:/Users/jjwoo/Documents/Curse/Minecraft/Instances/Plunger/mods/MixinBootstrap-1.0.2.jar Service=ModLauncher Env=CLIENT
[18:33:04] [main/INFO]: [org.antlr.v4.runtime.ConsoleErrorListener:synta
This file has been truncated, but you can view the full file.
[29Apr2020 19:05:57.480] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 31.1.47, --fml.mcpVersion, 20200414.225201, --fml.mcVersion, 1.15.2, --fml.forgeGroup, net.minecraftforge, nogui]
[29Apr2020 19:05:57.483] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 5.0.0-milestone.4+67+b1a340b starting: java version 11.0.7 by Ubuntu
[29Apr2020 19:05:57.498] [main/DEBUG] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Found launch services [minecraft,testharness,fmlclient,fmlserver]
[29Apr2020 19:05:57.507] [main/DEBUG] [cpw.mods.modlauncher.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : []
[29Apr2020 19:05:57.524] [main/DEBUG] [cpw.mods.modlauncher.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [eventbus,object_holder_definalize,runtime_enum_extender,capability_inject_definalize,accesstransformer,runtimedistcleaner]
[29Apr2020 19:05:57.480] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 31.1.47, --fml.mcpVersion, 20200414.225201, --fml.mcVersion, 1.15.2, --fml.forgeGroup, net.minecraftforge, nogui]
[29Apr2020 19:05:57.483] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 5.0.0-milestone.4+67+b1a340b starting: java version 11.0.7 by Ubuntu
[29Apr2020 19:05:57.722] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
[29Apr2020 19:05:57.847] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8 Source=file:/home/minecraft/servers/plunger/mods/MixinBootstrap-1.0.2.jar Service=ModLauncher Env=SERVER
[29Apr2020 19:05:58.384] [main/INFO] [STDERR/]: [jdk.nashorn.api.scripting.NashornScriptEngine:<init>:143]: Warning: Nashorn engine is planned to be removed from a future JDK release
[29Apr2020 19:05:58.458] [main/INFO] [STDERR/]: [jdk.nashorn
# RandomPatches configuration
# Options related to the movement speed limits.
[speedLimits]
# The maximum player elytra speed.
# The vanilla default is 300.0.
# Min: 1.0
# Max: 3.4028234663852886E38
# Default: 1000000.0
maxPlayerElytraSpeed = 1000000.0
This file has been truncated, but you can view the full file.
[29Apr2020 19:05:57.480] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 31.1.47, --fml.mcpVersion, 20200414.225201, --fml.mcVersion, 1.15.2, --fml.forgeGroup, net.minecraftforge, nogui]
[29Apr2020 19:05:57.483] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 5.0.0-milestone.4+67+b1a340b starting: java version 11.0.7 by Ubuntu
[29Apr2020 19:05:57.498] [main/DEBUG] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Found launch services [minecraft,testharness,fmlclient,fmlserver]
[29Apr2020 19:05:57.507] [main/DEBUG] [cpw.mods.modlauncher.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : []
[29Apr2020 19:05:57.524] [main/DEBUG] [cpw.mods.modlauncher.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [eventbus,object_holder_definalize,runtime_enum_extender,capability_inject_definalize,accesstransformer,runtimedistcleaner]