- Log in as root (default configured)
- Run
apt-get update && apt-get dist-upgrade - Create a user named
minecraftwithadduser minecraft, and skip everything except the password - Run
usermod -a -G sudo minecraft - Log off, and log back in with the
minecraftaccount - Run
sudo passwd -dl root - Disable root login via SSH by running
sudo sed -i -e "s/PermitRootLogin yes/PermitRootLogin no/g" /etc/ssh/sshd_config && sudo service ssh restart
This file contains hidden or 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 | |
| class Skin { | |
| public static function get($username) { | |
| $steve = in_array(strtolower($username), array("steve", "player", "default")); | |
| if(!$steve) $contents = self::fetch('http://skins.minecraft.net/MinecraftSkins/' . $username . '.png'); | |
| $defaultImage = WideImage::load("char.png"); | |
| $defaultType = "image/png"; | |
| if ($steve || $contents === false) { | |
| $img = $defaultImage; |
This file contains hidden or 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.thechunk.purchases; | |
| import net.thechunk.chunklib.uuid.UUIDFetcher; | |
| import net.thechunk.chunklib.uuid.UUIDUtils; | |
| import org.bukkit.Bukkit; | |
| import org.bukkit.ChatColor; | |
| import org.bukkit.command.Command; | |
| import org.bukkit.command.CommandSender; | |
| import org.bukkit.entity.Player; | |
| import org.bukkit.event.EventHandler; |
This file contains hidden or 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
| public boolean isForwarded(Player player) { | |
| UUID uuid = player.getUniqueId(); | |
| UUID generatedId = UUID.nameUUIDFromBytes(("OfflinePlayer:" | |
| + player.getName()).getBytes(Charsets.UTF_8)); | |
| return !uuid.equals(generatedId); | |
| } |
This file contains hidden or 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 datetime | |
| import threading | |
| from flask import Flask | |
| from collections import OrderedDict | |
| import json | |
| import hashlib | |
| import os | |
| import markdown | |
| class Entry(): |
This file contains hidden or 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 python | |
| """Checks the status (availability, logged-in players) on a Minecraft server. | |
| Example: | |
| $ %(prog)s host [port] | |
| available, 3/5 online: mf, dignity, viking | |
| or | |
| >>> McServer('my.mcserver.com').Update().player_names_sample |
This file contains hidden or 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 com.google.common.collect.BiMap; | |
| import com.google.common.collect.ImmutableBiMap; | |
| public class RomanNumerals { | |
| private static final BiMap<String, Integer> ROMAN_INT_MAP = new ImmutableBiMap.Builder<String, Integer>() | |
| .put("i", 1) | |
| .put("ii", 2) | |
| .put("iii", 3) | |
| .put("iv", 4) | |
| .put("v", 5) |
This file contains hidden or 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 mcstatus, time, threading | |
| from bottle import route, run, response, hook | |
| server = mcstatus.McServer('hub.thechunk.net', 25565) | |
| def schedule_update(): | |
| threading.Timer(1, schedule_update).start() | |
| threading.Thread(target=lambda: server.Update()).start() | |
| @hook('after_request') |
This file contains hidden or 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 org.json.simple.JSONArray; | |
| import org.json.simple.parser.JSONParser; | |
| import org.json.simple.parser.ParseException; | |
| import java.io.IOException; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import java.util.*; | |
| public class NameFetcher { |
This file contains hidden or 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 Map<String, String> bukkitToNMS = ImmutableMap.<String, String>builder() | |
| .put("horse", "EntityHorse") | |
| .put("mushroom_cow", "MushroomCow") | |
| .put("magma_cube", "LavaSlime") | |
| .put("snowman", "SnowMan") | |
| .put("silverfish", "Silverfish") | |
| .put("cave_spider", "CaveSpider") | |
| .put("iron_golem", "VillagerGolem") | |
| .put("ender_dragon", "EnderDragon") | |
| .put("pig_zombie", "PigZombie") |
OlderNewer