Skip to content

Instantly share code, notes, and snippets.

View SilverCory's full-sized avatar
❄️
Serve chilled. Carbonated.

Cory Redmond SilverCory

❄️
Serve chilled. Carbonated.
View GitHub Profile
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.net.URL;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* https://gist.github.com/brianewing/994401
* https://gist.github.com/acecheese/2f5fa5f00abda0e8d1c0/
/**
* Convert a millisecond duration to a string format
*
* @param millis A duration to convert to a string form.
* @return A string of the form "X Days Y Hours Z Minutes A Seconds".
*/
public static String getDurationBreakdown( long millis )
{
if ( millis < 1000 ) return "a short amount of time!";
package com.comphenix.example;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.concurrent.Callable;
import com.google.common.collect.Lists;
package co.ryred.fuckoff;
import java.lang.reflect.Field;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.locks.ReadWriteLock;
import com.google.common.base.Charsets;
import net.md_5.bungee.BungeeCord;
package co.ryred.util;
import lombok.Getter;
import lombok.Setter;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Created by Admin on 20/05/2015.
package co.ryred.rybot;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
/**
* Created by rissa on 01/07/2015.
@SilverCory
SilverCory / submit.php
Created August 4, 2015 15:22
So you can past log files to hastebin. Because it's moar sexy than the ones they provide.
// PUT THIS SECTION AT http://your-site.com/submit.php
<?php
function grab_dump($var)
{
ob_start();
var_dump($var);
return ob_get_clean();

Keybase proof

I hereby claim:

  • I am SilverCory on github.
  • I am grey (https://keybase.io/grey) on keybase.
  • I have a public key whose fingerprint is E421 2233 31DE 74E1 B3DD 0F73 5A9A BC74 9771 FAA1

To claim this, I am signing this object:

@SilverCory
SilverCory / Properties.java
Last active April 28, 2023 14:01 — forked from WesJD/Properties.java
Simple class for changing Minecraft server properties easily.
import org.bukkit.Bukkit;
import java.lang.reflect.InvocationTargetException;
public class Properties {
private static Class minecraftServerClass;
private static Class propertyManagerClass;
private static Method getServerMethod;
private static Method getPropertyManagerMethod;
@SilverCory
SilverCory / service.sh
Last active August 11, 2017 01:32
A tmux chrootable service script for RTK.
#!/bin/bash
# /etc/init.d/redstone
# version 0.11 2016-03-27 (YYYY-MM-DD)
#
### BEGIN INIT INFO
# Provides: minecraft_redstone
# Required-Start: $local_fs $remote_fs screen-cleanup
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network