View debian-install-zram.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
#!/bin/bash | |
# | |
not_root() { | |
echo "ERROR: You have to be root to execute this script" | |
exit 1 | |
} | |
zram_exists() { | |
echo "ERROR: /etc/init.d/zram already exists" |
View SimpleScoreboard.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
import com.google.common.base.Charsets; | |
import com.google.common.base.Splitter; | |
import com.google.common.collect.Lists; | |
import org.bukkit.Bukkit; | |
import org.bukkit.ChatColor; | |
import org.bukkit.OfflinePlayer; | |
import org.bukkit.entity.Player; | |
import org.bukkit.scoreboard.*; | |
import java.lang.reflect.Constructor; |
View Skin.php
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 | |
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; |