$ curl -sL https://git.io/JPaRT | sudo sh
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
import sys | |
import os | |
import math | |
import urllib2 | |
import json | |
import time | |
import shutil | |
import uuid | |
from nbt import nbt # pip install nbt |
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
<?php | |
// ip2asn.php?ip=IP_OR_HOSTNAME : Returns a comma-separated list of matching ASNs | |
// ip2asn.php?asn=AS_NUMBER : Returns the organization name | |
// ip2asn.php?update=1&token=SECRET_TOKEN : Updates the local database (setup cron to run once a day) | |
$SECRET_TOKEN = 'ChangeMe'; | |
$TMP_DIR = '/tmp/ip2asn'; | |
$DATA_DIR = '/var/lib/ip2asn'; |
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
<?php | |
// Your GitHub username goes here. | |
$user = $_ENV['GITHUB_USER'] ?? ''; | |
// If using 2FA, you must create a Personal Access Token at https://github.com/settings/tokens | |
// The access token can be used in place of the password and should be revoked when no longer needed. | |
$password = $_ENV['GITHUB_PASSWORD'] ?? ''; | |
// This is the base URL to the GitHub API. |
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
func getFlags(desiredHeap int64) string { | |
asKb := desiredHeap / units.KiB | |
// the following is specific to OpenJ9 and is based on Aikar's flags: | |
// https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/ | |
// The equivalent of -XX:G1NewSizePercent/-XX:G1MaxNewSizePercent in OpenJ9's gencon policy is -Xmns/-Xmnx. | |
// We have to manually compute these values ourselves. By default, the gencon policy assumes 25% of Xms, which is | |
// simply not sufficient for Minecraft (and Aikar can tell you). | |
xmns := asKb / 2 |
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
package net.byteflux.core.library; | |
import java.util.ArrayList; | |
import java.util.Base64; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.LinkedList; | |
import java.util.List; | |
import static java.util.Objects.requireNonNull; |
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
diff --git a/pom.xml b/pom.xml | |
index 4bfafb88..89a147c5 100644 | |
--- a/pom.xml | |
+++ b/pom.xml | |
@@ -101,7 +101,7 @@ | |
</relocation> | |
<relocation> | |
<pattern>org.apache.commons</pattern> | |
- <shadedPattern>me.glaremasters.guilds.libs.commons-io</shadedPattern> | |
+ <shadedPattern>me.glaremasters.guilds.libs.commonsio</shadedPattern> |
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
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java | |
index b5f318c00..f3c73b0de 100644 | |
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java | |
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java | |
@@ -215,11 +215,12 @@ public class PaperCommand extends Command { | |
} | |
private void dumpHeap(CommandSender sender) { | |
- File file = new File(new File(new File("."), "dumps"), | |
- "heap-dump-" + DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss").format(LocalDateTime.now()) + "-server.hprof"); |
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
<repositories> | |
<repository> | |
<id>byteflux</id> | |
<url>https://repo.byteflux.net/repository/maven-public/</url> | |
</repository> | |
</repositories> | |
<dependencies> | |
<dependency> | |
<groupId>net.byteflux</groupId> |
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 | |
"""Conway's Game of Life""" | |
STEPS = 100 | |
STEPS_PER_SECOND = 3 | |
# Pulsar | |
SEED = ('0 0 0 0 0 0 0 0 0 0 0 0 0 0 0', | |
'0 0 0 1 1 1 0 0 0 1 1 1 0 0 0', |
OlderNewer