Skip to content

Instantly share code, notes, and snippets.

View lukegb's full-sized avatar
🦦
👖

Luke Granger-Brown lukegb

🦦
👖
View GitHub Profile
<?xml version="1.0"?>
<dopscript from="nus"><!-- from can be USB, SD or NUS -->
<!-- this line installs the 4.2E System Menu but *not* it's associated IOS -->
<systemmenu installIos="false" version="4.2" region="E" />
<!-- and this one installs IOS70v6687, with no patches -->
<ios patchEsIdentify="false" patchFakesign="false" patchNand="false" version="70" revision="6687" />
<!-- and now we install the (latest) news channel for japan -->
<channel name="News Channel" region="J" />
<!-- of course, this is being rather unspecific -->
world> replace cactus 0
Replacing Cactus with Air
INFO:Chunk 100...
INFO:Chunk 200...
INFO:Chunk 300...
INFO:Chunk 400...
INFO:Chunk 500...
INFO:Chunk 600...
INFO:Chunk 700...
<html><body>
<applet code="net.minecraft.skintest.ModelPreviewApplet" archive="skintest2.jar" codebase="http://minecraft.net/skin/" width="320" height="320">
<param name="name" value="Dinnerbone">
<param name="boxmessage" value="Minecraft skin preview">
<param name="boxbgcolor" value="#000000">
<param name="image" value="Dinnerbone">
</applet> </body></html>
cat > manifest.ex << EOF
Manifest-Version: 1.0
Created-By: Hudson at hudson.lukegb.com - lukegb
X-Build-Id: $BUILD_TAG
Main-Class: Main
Class-Path: minecraft_server.jar mysql-connector-java-bin.jar plugins/
EOF
return;
}
$fact = &decommify($fact);
Log "Learning '$fact' '$verb' '$tidbit'";
# Change to:
return;
}
import os
import urllib, urllib2
pasteto = 'http://paste.ubuntu.com/'
pastedict = {'poster': user, 'syntax': 'python'}
pastekey = 'content'
def iterdir(dirn):
mydir = {}
for file in os.listdir(dirn):
@lukegb
lukegb / vvvvvv_music_unpacker.py
Created August 24, 2011 21:15
Unpack music from VVVVVV's music file!
f = open("vvvvvvmusic.vvv", 'rb')
q = f.read()
FILE_NAMES = ['0levelcomplete.ogg','1pushingonwards.ogg','2positiveforce.ogg','3potentialforanything.ogg','4passionforexploring.ogg','5intermission.ogg','6presentingvvvvvv.ogg','7gamecomplete.ogg','8predestinedfate.ogg','9positiveforcereversed.ogg','10popularpotpourri.ogg','11pipedream.ogg','12pressurecooker.ogg','13pacedenergy.ogg','14piercingthesky.ogg']
startAt = endAt = -1
musStartAt = musEndAt = -1
currentMus = 0
while True:
oldStartAt = startAt
[DEBUG] [root] [09/Nov/2011 15:09:31.855439] Fetching http://dev.bukkit.org/server-mods/capturethepoints/files/?api-key=FARP_LOL_REMOVED
[DEBUG] [root] [09/Nov/2011 15:09:32.334803] Fetching http://dev.bukkit.org/server-mods/consolescheduler/
[DEBUG] [root] [09/Nov/2011 15:09:32.846995] Fetching http://dev.bukkit.org/server-mods/consolescheduler/files/?api-key=FARP_LOL_REMOVED
[DEBUG] [root] [09/Nov/2011 15:09:36.474230] Fetching http://dev.bukkit.org/server-mods/
[DEBUG] [root] [09/Nov/2011 15:09:38.165083] Fetching http://dev.bukkit.org/server-mods/?page=15
[DEBUG] [root] [09/Nov/2011 15:09:39.301576] Fetching http://dev.bukkit.org/server-mods/spoutclock/
[DEBUG] [root] [09/Nov/2011 15:09:39.753334] Fetching http://dev.bukkit.org/server-mods/spoutclock/files/?api-key=FARP_LOL_REMOVED
[DEBUG] [root] [09/Nov/2011 15:09:40.78953] Fetching http://dev.bukkit.org/server-mods/namechanger/
[DEBUG] [root] [09/Nov/2011 15:09:40.745626] Fetching http://dev.bukkit.org/server-mods/namechanger/files/?api-key=FARP_LOL_REM
import glob, sys, os.path
from PIL import Image
def getMaxFrame(folder_a, folder_b, fileext):
fin_a = glob.glob(os.path.join(folder_a, "*.%s" % (fileext,)))
fin_b = glob.glob(os.path.join(folder_b, "*.%s" % (fileext,)))
return min(len(fin_a), len(fin_b))
def checkAllFramesExist(folder_a, folder_b, fileext, max_count):
for i in range(1, max_count + 1):
@lukegb
lukegb / hhhhhhhhhhhhh
Created July 15, 2012 17:47 — forked from anonymous/hhhhhhhhhhhhh
hhhhhhhhhh
elif enamyAttack == 3:
time.sleep(1)
print('The ' +enamyDetails[0] + ' attacks you with ' + enamyDetails[6] + ' for ' + enamyDetails[7] +' damage')
playerHealth = playerHealth - int(enamyDetails[7])
if playerHealth <= 0:
combotLost = True
elif enamyDetails[10] !=0:
playerStatus = int(enamyDetails[10])
playerTurn = 0