Skip to content

Instantly share code, notes, and snippets.

View applenick's full-sized avatar
🍎
Thinking Different

applenick applenick

🍎
Thinking Different
View GitHub Profile
#!/bin/bash
# Maven project build and deployment
# Usage: ./build-and-deploy.sh [project_dir] [server] [destination1] [destination2] ...
# define the directory where the project is located
# default to the current directory if not specified
project_dir=${1:-$PWD}
# check if the project directory exists and contains the necessary files
@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 / Useless Websites
Created December 22, 2016 07:16
Totally Useless
['http://heeeeeeeey.com/', false],
['http://thatsthefinger.com/', false],
['http://cant-not-tweet-this.com/', false],
['http://weirdorconfusing.com/', false],
['http://eelslap.com/', false],
['http://www.staggeringbeauty.com/', false],
['http://burymewithmymoney.com/', true],
['http://endless.horse/', false],
['http://www.fallingfalling.com/', true],
['http://just-shower-thoughts.tumblr.com/', false],
@applenick
applenick / MiniBlocks.java
Created August 23, 2015 02:20
MiniBlocks API for use in the future
package me._ug.main;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.libs.jline.internal.Log;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.EulerAngle;
@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.