Skip to content

Instantly share code, notes, and snippets.

View devboy's full-sized avatar

Dominic Graefen devboy

View GitHub Profile
haxelib install nodejs 0.6
@devboy
devboy / Test.as
Created November 4, 2011 12:03
Mixins with include in AS3
// ActAsDog.as
public function bark(): void
{
trace("bark");
}
// ActAsCat.as
public function meow(): void
@devboy
devboy / BlueForestDev.xml
Created November 2, 2011 18:21
BlueForest for IDEA11
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="BlueForestDev" version="1" parent_scheme="Default">
<option name="LINE_SPACING" value="1.1" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_FONT_NAME" value="Menlo" />
<colors>
<option name="ADDED_LINES_COLOR" value="8080" />
<option name="ANNOTATIONS_COLOR" value="8080ff" />
<option name="ANNOTATIONS_MERGED_COLOR" value="80ff80" />
<option name="CARET_COLOR" value="ffffff" />
@devboy
devboy / MyProject.as
Created November 2, 2011 12:52
Use robotlegs2 and swiftsuspenders2 snapshot builds with buildr-as3
//put this class in src/main/as3
package
{
import flash.display.Sprite;
import org.robotlegs.v2.core.impl.Context;
import org.swiftsuspenders.ReflectorBase;
[SWF(width="1024",height="768")]
public class MyProject extends Sprite
{
@devboy
devboy / enum.hx
Created October 30, 2011 21:44 — forked from alecmce/enum.hx
Haxe Enum Example
enum MyEnum
{
first;
second;
third(param:MyParam);
}
class MyClass
{
private var _state:MyEnum;
@devboy
devboy / enum.hx
Created October 30, 2011 21:43 — forked from alecmce/enum.hx
Haxe Enum Example
enum MyEnum
{
first;
second;
third(param:MyParam);
}
class MyClass
{
private var _state:MyEnum;
@devboy
devboy / instanceMixins.rb
Created October 29, 2011 15:00
Mixins on instances
class MyObject
def instanceMethod
"MyObject"
end
end
module MyMixin
def instanceMethod
"MyMixin"
end
class Node
private
_upstream/_parents: Vector.<Node>
_downstream/_children: Vector.<Node>
end
@devboy
devboy / sandbox.rb
Created October 6, 2011 16:56
Don't you just love ruby
module Sandbox
end
class App
def initialize
app = self
Sandbox.class.send(:define_method, :app) do
puts app
end
Sandbox.app
@devboy
devboy / Test.as
Created September 7, 2011 12:41
Wondering why this code throws no error at: changeValue("e");
package
{
import flash.display.Sprite;
public class Test extends Sprite
{
public function Test()
{
var a:Value = new Value();