Skip to content

Instantly share code, notes, and snippets.

[Unit]
Description=phantom
[Service]
Type=simple
ExecStart=/path/to/phantom-linux -server lax.mcbr.cubed.host:19132
[Install]
WantedBy=multi-user.target
@jhead
jhead / identifySpigot.sh
Last active January 18, 2016 10:04
P.S. gunfighterj - I stole your sums list ;)
#!/bin/bash
SUMS_URL="http://s3.amazonaws.com/cubedhost-prisma/spigot/sums"
JENKINS_URL="http://ci.md-5.net/job/Spigot"
if [ -z $1 ]; then
echo "A tool which tries to identify hash, build #, and full version for an arbitrary Spigot jar file."
echo
echo "Usage: ./identifySpigot <spigot.jar>"
echo
exit 1
import crypto from 'crypto';
import { EventEmitter } from 'events';
import fs from 'fs';
class ChunkedFileHasher extends EventEmitter {
constructor(path, chunkSize = 512) {
super();
this.paused = true;
@jhead
jhead / fePruneBackups.sh
Created April 29, 2015 06:55
Prunes ForgeEssentials backups (probably badly)
#!/bin/bash
BASE=$(pwd)
TEMPDIR="temp"
DELAY=2
echo "Running from: $BASE"
echo "Starting in $DELAY seconds..."
sleep $DELAY
mkdir -p ./$TEMPDIR
@jhead
jhead / dedupe.sh
Last active August 29, 2015 14:16
#!/bin/bash
if [ $# -lt 1 ]; then
echo "Usage: ./dedupe.sh [path]"
exit 1
fi
BASE=$1
MAX_SIZE="25M"
FILTER='\.(mca|log|gz)$'
package justinhead.se3345;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Stack;
var fs = require('fs'),
https = require('https'),
async = require('async'),
yaml = require('js-yaml');
var TIMESTAMP = 1422921600;
var data = fs.readFileSync('permissions.yml');
var doc = yaml.safeLoad(data);
//
#!/bin/bash
ITER=5
##
function usage {
echo "Usage: resolve [options] hostname"
echo
echo -e " -t #\t\tSpecify number of lookups (default 5)"
exit
@jhead
jhead / spigot-patcher.sh
Last active August 29, 2015 14:06
Finds latest Spigot binary patch and applies to the specified file
#!/bin/bash
## Validate arguments
if [ "$#" -ne 2 ]; then
echo "Fetches latest Spigot patch and applies it."
echo
echo "Usage: <spigot-1649-jar-path> <output-file>"
exit 1
fi
<?php
$procList = array();
$newProcList = array();
$limitProcs = array();
while (true) {
$count = 0;
$newProcList = getProc();
foreach ($newProcList as $pid) {