Skip to content

Instantly share code, notes, and snippets.

View lukespragg's full-sized avatar

Luke Spragg lukespragg

View GitHub Profile
@lukespragg
lukespragg / spoutcraft.sh
Created September 22, 2011 23:57
spoutcraft.sh
#!/bin/bash
rm -r -f .git
echo "Yes" | runtime/bin/python/python_mcp runtime/cleanup.py
cp -r ~/AppData/Roaming/.minecraft/bin jars
cp -r ~/AppData/Roaming/.minecraft/resources jars
git clone --no-hardlinks https://github.com/SpoutDev/Spoutcraft.git sc.tmp
echo Moving .git folder...
cp -vrf sc.tmp/.git .
echo Moving conf folder...
cp -vrf sc.tmp/conf .
@lukespragg
lukespragg / .project
Created September 22, 2011 23:58
Spoutcraft .project
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Spoutcraft</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
@lukespragg
lukespragg / .classpath
Created September 22, 2011 23:59
Spoutcraft .classpath
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="start"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="lib" path="lib/fastutil-6.3-int2obj.jar"/>
<classpathentry kind="lib" path="jars/bin/jinput.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Spoutcraft/jars/bin/natives"/>
</attributes>
@lukespragg
lukespragg / org.eclipse.jdt.core.prefs
Created September 22, 2011 23:59
Spoutcraft .settings/org.eclipse.jdt.core.prefs
#Wed Aug 31 14:39:25 EDT 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
@lukespragg
lukespragg / status.php
Created November 18, 2011 14:35
Minecraft Server Status Scripts
<?php
$host = "XXXXXXXXXX";
$port = 25565;
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$connected = socket_connect($socket, $host, $port);
if ($connected) {
$ping_start = microtime(true);
socket_send($socket, "\xFE", 1, 0);
@lukespragg
lukespragg / mcping.php
Created May 17, 2012 00:10 — forked from zekesonxx/mcping.php
Edit of barneygale's PHP Minecraft Server Pinger
<?php
$host = $_GET['ip'];
$port = $_GET['port'];
function pingserver($host, $port=25565, $timeout=30) {
//Set up our socket
$fp = fsockopen($host, $port, $errno, $errstr, $timeout);
if (!$fp) return false;
//Send 0xFE: Server list ping
fwrite($fp, "\xFE");
@lukespragg
lukespragg / natives.bat
Last active December 12, 2015 04:48
Native jar creation and md5 listing
@echo off
setlocal enabledelayedexpansion enableextensions
set VERSION=2.8.5
for /d %%o in (*) do (
cd %%o
..\jar cfM ..\%%o_natives-%VERSION%.jar *.*
cd ../
)
@lukespragg
lukespragg / spoutcraft_dmg.sh
Last active December 12, 2015 04:48
Spoutcraft .dmg generation
# Make .dmg for Mac
DMG_NAME=Spoutcraft
VOLUME_LABEL=Spoutcraft
du_output=`du -sk $WORKSPACE/$ARTIFACT_ID-$VERSION.app 2>&1`
DIR_SIZE=`echo $du_output | cut -f1 -d" "`
DIR_SIZE=`expr $DIR_SIZE + 100`
dd if=/dev/zero of=$DMG_NAME bs=1024 count=$DIR_SIZE
mkfs.hfsplus -v "$VOLUME_LABEL" $DMG_NAME
mount -o loop -t hfsplus ./$DMG_NAME /mnt/tmp/
cp -r $DIR_PATH/* /mnt/tmp
@lukespragg
lukespragg / config.yml
Created February 5, 2013 18:32
Taboo config.yml
cussing:
actions:
- zombies
patterns:
- 's/(^|\W)4r5e(\W|$)/ monkey /'
- 's/(^|\W)5h1t(\W|$)/ monkey /'
- 's/(^|\W)5hit(\W|$)/ monkey /'
- 's/(^|\W)a55(\W|$)/ monkey /'
- 's/(^|\W)anal(\W|$)/ monkey /'
- 's/(^|\W)anus(\W|$)/ monkey /'
@lukespragg
lukespragg / sign4j.c
Last active August 2, 2018 15:57
Sign4j for Linux
/*
sign4j.c: a simple utility to sign executables created by Launch4j
Copyright (c) 2012 Grzegorz Kowal
Modified for Linux by Luke Spragg (Wulfspider), Dalton Pelc (Olloth), Contex, and raphfrk
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met: