Skip to content

Instantly share code, notes, and snippets.

View AxGord's full-sized avatar
🦄
Pony

Alexander Gordeyko AxGord

🦄
Pony
View GitHub Profile
@AxGord
AxGord / Com.hx
Created March 11, 2014 15:39
TCP-IP <-> Com port bridge
package ;
import haxe.io.BytesInput;
import haxe.io.BytesOutput;
import pony.net.SocketClient;
import pony.net.SocketServer;
import pony.nodejs.SerialPort;
using pony.Tools;
@AxGord
AxGord / FastSignalsExample.hx
Created April 2, 2014 06:47
Ultra fast and small strict typed simple signals.
package ;
class FastSignalsExample {
static function main() {
var o = new Signal1<String>();
o.add(function(v) trace(v));
o.dispatch('Hello');
}
}
@AxGord
AxGord / ProtoTest.hx
Created April 24, 2014 14:21
Simple work with network. Libs: pony, proto-gen-haxe.
import pony.net.Protobuf;
import pony.net.SocketClient;
import pony.net.SocketServer;
import test.Main_Builder;
import test.Sub_Builder;
class ProtoTest {
static function main() {
@AxGord
AxGord / MidiExample.hx
Created May 16, 2014 14:04
Simple binding midi keys, using Haxe, Pony, Nodejs, node-midi
import pony.midi.MidiDevice;
class Main {
static function main() {
var midi = new MidiDevice(0);
//Signal - Key - Velocity << function
midi.on - 81 - 0 << function() trace('first disable');
midi.on - 81 - 127 << function() trace('first enable');
midi.on - 82 - 0 << function() trace('second disable');
@AxGord
AxGord / 81.ahk
Last active August 29, 2015 14:01
Use midi controllers for Code Snippets. Soft: Windows, Haxe, Pony, Nodejs, node-midi, Autohotkey. I'm use Automap/Launchpad. File name == midi code.
Send, trace();
Send, {Left}
Send, {Left}
@AxGord
AxGord / Example.hx
Created May 29, 2014 20:17
Pony + Bindx, coming soon.
class Example
{
static function main()
{
var t = new Tumbler();
t.onEnable << function() trace('enable');
t.onDisable << function() trace('disable');
t.enabled = true;
@AxGord
AxGord / Builder.hx
Created June 3, 2014 12:04
Macro inside macro
#if macro
import haxe.macro.Expr;
import haxe.macro.Context;
import haxe.macro.Type;
#end
#if !macro
@:autoBuild(BuilderBuilder.build())
#end
interface Builder { }
cd C:\HaxeToolkit\haxe
rd std /s /q
rd haxe-3.1.3 /s /q
del haxe.exe
del haxelib.exe
del haxe_latest.tar.gz
wget http://hxbuilds.s3-website-us-east-1.amazonaws.com/builds/haxe/windows/haxe_latest.tar.gz
7z e haxe_latest.tar.gz -y
7z x haxe_latest.tar -y
move haxe-3.1.3\std .
@AxGord
AxGord / MySQLExample.hx
Created August 6, 2014 09:57
Pony Async MySQL, ready for nodejs, neko
package ;
import com.dongxiguo.continuation.Continuation;
import haxe.CallStack;
import haxe.Log;
import haxe.PosInfos;
#if nodejs
import js.Node;
#end
import pony.db.mysql.Flags;
package ;
import haxe.Log;
import pony.events.Event;
import pony.xr.modules.Object;
import pony.xr.modules.Op;
import pony.xr.modules.V;
import pony.xr.XmlRequest;
using pony.Tools;