Skip to content

Instantly share code, notes, and snippets.

Avatar

Joshua Granick jgranick

View GitHub Profile
@jgranick
jgranick / install-haxe.sh
Last active Feb 11, 2021
Haxe Linux install script
View install-haxe.sh
#!/bin/sh
HAXE_VERSION=3.2.1
NEKO_VERSION=2.0.0
if [ `uname -m` = "armv7l" ]; then
HAXE_VERSION=3.1.3
@jgranick
jgranick / gist:1763850
Created Feb 8, 2012
NMML File Specification
View gist:1763850
<?xml version="1.0" encoding="utf-8"?>
<project>
<!-- <meta />
Use meta nodes to set metadata for your application. The description is ignored
on most targets, but is useful for packaging like Chrome Apps or Opera Widgets.
For compatibility with Android and webOS, the package name must include at least
View .htaccess
SetOutputFilter DEFLATE
@jgranick
jgranick / install-haxe.sh
Last active Apr 17, 2019
Install Haxe using a development release for 64-bit Linux
View install-haxe.sh
#!/bin/sh
# Install Haxe using a development release for 64-bit Linux
HAXE_VERSION=haxe_2019-04-01_development_bbfe5ac
NEKO_VERSION=2.2.0
if [ "$1" = "y" -o "$1" = "-y" ]; then
echo "Do you want to install Haxe $HAXE_VERSION and Neko $NEKO_VERSION? (y/n) y"
@jgranick
jgranick / flashplayerdebugger.sh
Created Mar 2, 2019
Flash Player install script for Linux
View flashplayerdebugger.sh
#!/bin/sh
echo ""
echo "-----------------------------------"
echo " Installing Flash Debugger"
echo "-----------------------------------"
sudo echo ""
@jgranick
jgranick / gist:026efc8addaf6cbca353
Created Jul 29, 2014
Basic Lime/OpenAL sample
View gist:026efc8addaf6cbca353
//var bytes = Assets.getBytes ("soundTheme");
//var sound = lime.audio.Sound.loadFromBytes (bytes);
var sound = lime.audio.Sound.loadFromFile ("sounds/theme.ogg");
var format = 0;
if (sound.channels == 1) {
if (sound.bitsPerSample == 8) {
View gist:d5e43dd7e74d20b9d123be75d8c91f63
git clone https://github.com/openfl/starling
cd starling
git reset --hard 0306c8625df7bb4b183ca5ca104b33091f814436
cd samples/demo_npm/as3
npm install
npm start
View DisplayObject.hx
package openfl.display;
import lime.graphics.cairo.Cairo;
import lime.graphics.utils.ImageCanvasUtil;
import lime.ui.MouseCursor;
import lime.utils.ObjectPool;
import openfl._internal.renderer.cairo.CairoBitmap;
import openfl._internal.renderer.cairo.CairoDisplayObject;
import openfl._internal.renderer.cairo.CairoGraphics;
@jgranick
jgranick / Main.hx
Created Jan 31, 2018
Lime SimpleImage, using GL framebuffer
View Main.hx
package;
import lime.app.Application;
import lime.graphics.cairo.*;
import lime.graphics.opengl.*;
import lime.graphics.Image;
import lime.graphics.Renderer;
import lime.math.Matrix4;
import lime.utils.Float32Array;
@jgranick
jgranick / Main.hx
Created Mar 5, 2014
Basic GameCenter Example
View Main.hx
package;
import extension.gamecenter.GameCenter;
import extension.gamecenter.GameCenterEvent;
import flash.display.Sprite;
class Main extends Sprite {