Skip to content

Instantly share code, notes, and snippets.

View input.bstruct
big endian struct Example1 {
int32 anInt;
float positionedFloat 0x16;
float[3] position 32;
}
little endian struct Test1 {
float[6] bb;
}
@Pwootage
Pwootage / sj.json
Last active Jun 19, 2016
Example patch file
View sj.json
{
"type": "ScriptObject",
"filename": "c44e7a07.MREA",
"typ": "Pickup",
"id": "0x40007",
"objectPatch": {
"0x0C": "2d7e6590.CMDL",
"0x0D": {
"animANCS": "a9b8e446.ANCS",
"character": 0,
@Pwootage
Pwootage / crossword.py
Created Jan 29, 2015
Python crossword one-liner (i'm so sorry)
View crossword.py
import sys
import itertools
class Crossword:
def __init__(self, path):
f = open(path, 'r')
lines = filter(lambda x: len(x) > 0, map(lambda x: x.strip(), f.readlines()))
f.close()
self.size = len(lines[0])
View gist:e78b0b69ef428a8163b4
m_iSoldierXPLevels=0; PFC
m_iSoldierXPLevels=120; SPEC
m_iSoldierXPLevels=350; LCPL
m_iSoldierXPLevels=700; CPL
m_iSoldierXPLevels=1200; SGT
m_iSoldierXPLevels=1900; TSGT
m_iSoldierXPLevels=2800; GSGT
m_iSoldierXPLevels=4000; MSGT
View Error
Caused by: org.lwjgl.LWJGLException: Could not create context (WGL_ARB_create_context)
21at org.lwjgl.opengl.WindowsContextImplementation.nCreate(Native Method)
at org.lwjgl.opengl.WindowsContextImplementation.create(WindowsContextImplementation.java:50)
at org.lwjgl.opengl.ContextGL.<init>(ContextGL.java:132)
at org.lwjgl.opengl.DrawableGL.createSharedContext(DrawableGL.java:77)
at org.lwjgl.opengl.DrawableGL.createSharedContext(DrawableGL.java:41)
at org.lwjgl.opengl.SharedDrawable.<init>(SharedDrawable.java:50)
at me.adanac.latura.render.world.impl.RenderUpdateThreadPool.<init>(RenderUpdateThreadPool.java:29)
... 5 more
@Pwootage
Pwootage / CrashExample.java
Created Jan 5, 2013
Crash of SharedDrawable on certain windows platforms
View CrashExample.java
import javax.swing.JFrame;
import org.lwjgl.LWJGLException;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.SharedDrawable;
public class CrashExample extends JFrame {
View mcinthisfolder.sh
set APPDATA=%CD%
minecraft
View gist:1963864
public class DList<E extends Comparable<E>> {
private class Node {
public E data;
public Node next;
public Node prev;
public Node(E data) {
this.data = data;
}
View gist:1421985
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
Vector3 pos = game.getPlayer().getPos();
Vector3 look = game.getPlayer().getLookVec();
Vector3 eye = pos.add(look);
gluLookAt(eye.getX(), eye.getY(), eye.getZ(), pos.getX(), pos.getY(), pos.getZ(), 0, 0, 1);
View gist:1396588
BLACK - 0
DARK_BLUE - 1
DARK_GREEN - 2
DARK_AQUA - 3
DARK_RED - 4
DARK_PURPLE - 5
GOLD - 6
GRAY - 7
DARK_GRAY - 8
BLUE - 9
You can’t perform that action at this time.