View gotty.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
# 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] |
View Triangle.java
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 | |
* | |
** | |
*** | |
**** | |
***** | |
****** | |
******* | |
******** |
View MinecraftServerPatch.java
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(); | |
} |
View compton.conf
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"; |
View PositionLookHook.java
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; |
View ReflUtil.java
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; |
View app.py
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') |
View reset.py
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'): |
View GetCommandMap.java
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) { |
View PotionMetaUtil.java
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