Skip to content

Instantly share code, notes, and snippets.

@jmgrosen
jmgrosen / gist:984643
Created May 21, 2011 16:04
Error from smelting
java.lang.NullPointerException
at ii.b(SourceFile:73)
at av.a(SourceFile:154)
at ho.a(SourceFile:138)
at ho.a(SourceFile:62)
at oy.b(SourceFile:515)
at EntityRendererProxy.b(EntityRendererProxy.java:13)
at net.minecraft.client.Minecraft.run(SourceFile:721)
at java.lang.Thread.run(Thread.java:680)
@jmgrosen
jmgrosen / gist:1046895
Created June 25, 2011 21:05
An error I'm getting when i try to run minecraft on my ubuntu 11.04 machine.
when I run java -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrame (with the Sun (well, Oracle now) JRE):
16 achievements
148 recipes
Setting user: jmgrosen, -8622908869192837380
Loading: net.java.games.input.LinuxEnvironmentPlugin
Failed to open device (/dev/input/event4): Failed to open device /dev/input/event4 (13)
Failed to open device (/dev/input/event3): Failed to open device /dev/input/event3 (13)
@jmgrosen
jmgrosen / gist:1239987
Created September 24, 2011 23:27
Code for gui
package net.minecraft.src;
import net.minecraft.client.Minecraft;
import de.matthiasmann.twl.TextArea;
public class mod_TestGui extends BaseMod {
public KeyBinding keyTest = new KeyBinding("keyTest", 24);
public WidgetSimplewindow mainscreen;
@jmgrosen
jmgrosen / gist:3875751
Created October 11, 2012 21:53
Organic Error
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at Organic.Assembler.CreateListing (System.Collections.Generic.List`1 output) [0x00000] in <filename unknown>:0
at Organic.Assembler.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at Organic.Assembler.CreateListing (System.Collections.Generic.List`1 output) [0x00000] in <filename unknown>:0
at Organic.Assembler.Main (System.String[] args) [0x00000] in <filename unknown>:0
JSR init_hardware
JSR main
:monitor
DAT 0x0000
:init_hardware
HWN I
:hw_loop
@jmgrosen
jmgrosen / gist:3875922
Created October 11, 2012 22:25
Display C code
#include "display.h"
int main(void) {
while (1) {
for (int i = 0; i < 12; i++) {
puts_mod("Hello world", 0, i, (i + 1) << 12);
}
}
return 5;
}
@jmgrosen
jmgrosen / gist:3875942
Created October 11, 2012 22:28
Display DASM code
; .file "main.c"
.text
.globl main
; .align 1
:main
SET PUSH, Y
SET PUSH, X
SUB SP, 0x1
SET X, 0x0
SET Y, X

I can't figure out why this gives errors... Code:

/*-----------------------------------------------------------------------*/
/* Low level disk I/O module skeleton for FatFs     (C)ChaN, 2012        */
/*-----------------------------------------------------------------------*/
/* If a working storage control module is available, it should be        */
/* attached to the FatFs via a glue function rather than modifying it.   */
/* This is an example of glue functions to attach various exsisting      */
import java.util.ArrayList;
import java.util.Random;
/**
* Created with IntelliJ IDEA.
* User: john
* Date: 1/14/13
* Time: 10:29 AM
* To change this template use File | Settings | File Templates.
*/
@jmgrosen
jmgrosen / shocked_rarity.py
Created January 21, 2013 04:06
ShockedRarity bot
import praw
import time
manspike = '(/manspike)'
rarishock = '[](/rarishock)'
reddit = praw.Reddit('Responds to (/manspike) on /r/mylittlepony with (/rarishock) '
'by /u/jmgrosen/')
reddit.login('ShockedRarity', '********')