Skip to content

Instantly share code, notes, and snippets.

View JayWood's full-sized avatar

JayWood

View GitHub Profile
@JayWood
JayWood / closetags.php
Created July 18, 2014 20:17
Close ALL open HTML tags in PHP string
<?php
function closetags($html) {
preg_match_all('#<([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result);
$openedtags = $result[1];
preg_match_all('#</([a-z]+)>#iU', $html, $result);
$closedtags = $result[1];
$len_opened = count($openedtags);
# mongod.conf
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# Basic settings
systemLog:
@JayWood
JayWood / co-authors-query.php
Last active February 10, 2023 22:46
Query by co-authors for Co-Authors Plus
<?php
function query_by_co_authors() {
$current_user = wp_get_current_user();
// Your standard query
$post_args = array(
'post_type' => 'post',
'posts_per_page' => 10,
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.533] [main/DEBUG] [cpw.mods.m
[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