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
# systemd unit file | |
# place in /etc/systemd/system | |
# systemctl enable gotty.service | |
# systemctl start gotty.service | |
[Unit] | |
Description=Gotty Web Terminal | |
After=network.target | |
[Service] |
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
/* | |
Enter height of triangle: 10 | |
* | |
** | |
*** | |
**** | |
***** | |
****** | |
******* | |
******** |
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
protected final Queue<FutureTask<?>> j = new java.util.concurrent.ConcurrentLinkedQueue<FutureTask<?>>() { | |
// PaperSpigot: Make size() constant-time | |
private AtomicInteger cachedSize = new AtomicInteger(0); | |
@Override | |
public boolean add(FutureTask<?> e) { | |
boolean result = super.add(e); | |
if (result) { | |
cachedSize.incrementAndGet(); | |
} |
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
################################# | |
# | |
# Backend | |
# | |
################################# | |
# Backend to use: "xrender" or "glx". | |
# GLX backend is typically much faster but depends on a sane driver. | |
backend = "glx"; |
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 es.nkmem.da.movefreq.packethooks; | |
import com.comphenix.packetwrapper.WrapperPlayClientPositionLook; | |
import com.comphenix.protocol.PacketType; | |
import com.comphenix.protocol.events.ListenerPriority; | |
import com.comphenix.protocol.events.PacketAdapter; | |
import com.comphenix.protocol.events.PacketEvent; | |
import es.nkmem.da.movefreq.MoveFreqPlugin; | |
import lombok.Data; | |
import lombok.RequiredArgsConstructor; |
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.ess3.nms.refl; | |
import com.google.common.collect.HashBasedTable; | |
import com.google.common.collect.Table; | |
import org.bukkit.Bukkit; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import java.util.Arrays; |
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 mcserver, time, threading | |
from bottle import route, run, response, hook | |
server = mcserver.McServer('play.primemc.org', 25565) | |
def schedule_update(): | |
threading.Timer(1, schedule_update).start() | |
threading.Thread(target=lambda: server.Update()).start() | |
@hook('after_request') |
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 os, yaml | |
datadir = 'userdata' | |
key = 'money' | |
maxbal = 2500.0 | |
def is_non_zero_file(fpath): | |
return True if os.path.isfile(fpath) and os.path.getsize(fpath) > 0 else False | |
for f in os.listdir(datadir): | |
if str(f).endswith('.yml'): |
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
private static Method getCommandMap; | |
public static CommandMap getCommandMap(Server server) { | |
try { | |
if (getCommandMap == null) { | |
getCommandMap = server.getClass().getDeclaredMethod("getCommandMap"); | |
getCommandMap.setAccessible(true); | |
} | |
return (CommandMap) getCommandMap.invoke(server); | |
} catch (Exception exception) { |
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 com.earth2me.essentials.utils; | |
import org.bukkit.inventory.ItemStack; | |
import org.bukkit.potion.Potion; | |
import org.bukkit.potion.PotionType; | |
public class PotionMetaUtil { | |
@SuppressWarnings("deprecation") | |
public ItemStack createPotionItem(int effectId) throws IllegalArgumentException { | |
int damageValue = getBit(effectId, 0) + |
NewerOlder