Skip to content

Instantly share code, notes, and snippets.

View applenick's full-sized avatar
🍎
Thinking Different

applenick applenick

🍎
Thinking Different
View GitHub Profile
@applenick
applenick / mc-server.js
Last active October 24, 2020 16:45 — forked from vegeta897/mc-status-bot.js
Simple Minecraft server status bot command with Discord.js -- add me on Discord! vegeta897#7777
const util = require('minecraft-server-util');
const Discord = require('discord.js');
const client = new Discord.Client();
client.login('your_token_here');
// IMPORTANT: You need to run "npm i minecraft-server-util@^3.0.1 discord.js@^12.3.1" (without quotes) in your terminal before executing this script
const server = {
ip: '0.0.0.0', // Put your minecraft server IP or hostname here (e.g. '192.168.0.1')
port: 25565 // Put your minecraft server port here (25565 is the default)
@applenick
applenick / Skin.php
Last active August 29, 2015 14:06 — forked from tonybruess/Skin.php
<?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;
@applenick
applenick / Skin.php
Last active August 29, 2015 14:06 — forked from vemacs/Skin.php
<?php
class Skin {
public static function get($username) {
$contents = self::fetch('http://skins.minecraft.net/MinecraftSkins/' . $username . '.png');
$default = WideImage::load("char.png");
if ($contents === false) {
header("Status: 404 Not Found");
return $default;
} else {
class ChatColor
@@color_char = "\u00A7"
def initialize(code)
@code = code
end
def +(str)
to_str + str
end
'Twas the night before Christmas, when all through the racks
Not a server was alerting, not even Compaqs.
The backups were written to tapes with care
In hopes that later the data would be there.
The machines were nestled all snug in their sleds
Whilst visions of vengeance danced in their heads;
And oncall in his three-wolf and I in my rack.
Had just settled down for some syn and some ack.