Skip to content

Instantly share code, notes, and snippets.

View thomasuster's full-sized avatar

Thomas Uster thomasuster

View GitHub Profile
@thomasuster
thomasuster / ByteBufferConverter.hx
Created January 24, 2017 00:53
Convert a haxe.io.BytesBuffer to js.html.ArrayBuffer
package com.thomasuster.js;
import js.html.Blob;
import haxe.io.Bytes;
import haxe.io.BytesBuffer;
import js.html.ArrayBuffer;
import js.html.DataView;
class ByteBufferConverter {
public function new():Void {}
package com.thomasuster.ws;
import haxe.io.Bytes;
import haxe.crypto.Sha1;
import haxe.crypto.Base64;
class HandShaker {
public function new() {}
public function shake(key:String):String {
var magic:String = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11';
#!/bin/sh
# Download Neko
curl -L http://nekovm.org/_media/neko-2.0.0-osx.tar.gz > neko-2.0.0-osx.tar.gz
# Extract and copy files to /usr/lib/neko
#!/bin/sh
# Download Neko
curl -L http://nekovm.org/_media/neko-2.0.0-osx.tar.gz > neko-2.0.0-osx.tar.gz
# Extract and copy files to /usr/lib/neko
@thomasuster
thomasuster / install.sh
Last active August 29, 2015 14:04 — forked from jgranick/install.sh
#!/bin/sh
# Download Neko
curl -L http://nekovm.org/_media/neko-2.0.0.tar.gz > neko-2.0.0.tar.gz
# Extract and copy files to neko
package com.underscorediscovery;
import com.eclecticdesignstudio.spritesheet.data.SpriteSheetFrame;
import com.eclecticdesignstudio.spritesheet.SpriteSheet;
import com.eclecticdesignstudio.spritesheet.data.BehaviorData;
import hxjson2.JSON;
class TexturePackerJSON {
@thomasuster
thomasuster / IntelliJ problem
Created November 17, 2012 05:25
IntelliJ problem
class BabyTest()
{
//setup function constructing a baby
[Test]
public function testWalk():void
{
baby.shouldWalk(); //My Cursor is baby.shouldWalk[HERE]();, alt+enter won't suggest generating the non-existent method or property for the class Baby.
}
}
@thomasuster
thomasuster / Fast 2D ArraysVectors
Created October 9, 2012 18:54
Me playing around with different ways to generate a grid of arbitrary size using techniques described in http://alecmce.com/as3/fast-2d-arrays
package
{
import flash.display.Sprite;
import flash.utils.getTimer;
public class MakeGrid extends Sprite
{
private const numCols:uint = 500;
private const numRows:uint = 500;