Skip to content

Instantly share code, notes, and snippets.

View grapefrukt's full-sized avatar
💭
🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭

martin jonasson grapefrukt

💭
🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭🌭
View GitHub Profile
// on init
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at patterns.mvc.views.loader::AbstractLoader/show()
at patterns.mvc.views.loader::MainLoader/show()
at ApplicationHolder/onQueueStart()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.hydrotik.utils::QueueLoader/dispatchEvent()
at com.hydrotik.utils::QueueLoader/openHandler()
@grapefrukt
grapefrukt / gist:730276
Created December 6, 2010 13:22
Three.js error
Uncaught ReferenceError: Float32Array is not defined
THREE.WebGLRenderer/three.js/build/Three.js:138
initgeometry_minecraft.html:125
(anonymous function)geometry_minecraft.html:66
#aDir is a directory path
names = glob.glob(aDir + "/*.png") #file type of the packable images
#append to the list of image objects
if names:
images.extend(names);
# then sort later:
sortedImages = sorted([(i.size[1], name, i) for name,i in ((x,Image.open(x)) for x in images)], reverse=True)
L-Button 1  2 50  W 87  F12 123 
R-Button 2  3 51  X 88  F13 124 
Cancel 3  4 52  Y 89  F14 125
M-Button 4  5 53  Z 90  F15 126
Back 8  6 54  NP - 0 96  F16 127
Tab 9  7 55  NP - 1 97  F17 128
Clear 12  8 56  NP - 2 98  F18 129
Return 13  9 57  NP - 3 99  F19 130
Shift 16  A 65  NP - 4 100  F20 131
Control 17  B 66  NP - 5 101  F21 132
@grapefrukt
grapefrukt / smokeparticle1.svg
Created March 19, 2011 17:06
Vector output example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@grapefrukt
grapefrukt / TraceFixTest.as
Created July 6, 2011 07:19
Provides a way to sidestep a local trace function to get at the global trace()
package {
import flash.display.Sprite;
/**
* ...
* @author Martin Jonasson (m@grapefrukt.com)
*/
public class TraceFixTest extends Sprite {
@grapefrukt
grapefrukt / gist:1111357
Created July 28, 2011 10:43
the dog ate my email
[12:25:28] Martin: the dog ate my email!
[12:29:27] Petri: you don't even have a dog
[12:29:41] Martin: no. he died from email poisoning.
[12:30:04] Petri: must have eaten a lot emails
[12:30:24] Martin: all that cialis and viagra really got to him
[12:30:46] Petri: you fed your spam to your dog?
[12:31:06] Martin: he got into my mailbox when i was out
[12:31:47] Petri: I'm sorry for your loss
*** Error compiling shader 'fshader':ERROR: 0:24: '' : No precision specified for (float)
ERROR: 0:24: '' : No precision specified for (float)
ERROR: 0:30: 'mediump' : syntax error
Lattice.html:88 Uncaught TypeError: Cannot call method 'createBuffer' of null
@grapefrukt
grapefrukt / InputManager.as
Created August 10, 2011 23:07
Using closures for fun and profit
public function InputManager(players:GameObjectCollection, keyCodes:Vector.<int>){
_players = players;
_inputs = new Vector.<OneButtonInput>(Settings.NUM_PLAYERS, Settings.NUM_PLAYERS);
for (var i:int = 0; i < Settings.NUM_PLAYERS; i++) {
_inputs[i] = new OneButtonInput(_players.collection[i].stage, keyCodes[i]);
var makeClosure:Function = function(arg:int):Function {
return function(e:Event):void{ handleChange(e, arg)};
}
@grapefrukt
grapefrukt / beards.txt
Created December 6, 2011 14:11
Bearded game designers
Al Lowe
Raph Koster
Ernest Adams
Alexey Pajitnov
Warren Spector
Allan Alcorn
Richard Garriott (Lord British)
Timothy Cain
Ken Levine