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 / 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 { }
@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 / 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 / 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 / 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 / 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 / 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 / config.xml
Last active December 30, 2015 22:09
CircleTimer config example
<?xml version="1.0" encoding="utf-8"?>
<config invertbar="true" mouseFilterWait="1000" mouseFilterCount="9">
<work repeat="5000" sound="start.mp3">1</work>
<relax sound="start.mp3">1</relax>
<idle>10</idle>
</config>
package ;
import neko.Lib;
using Main;
/**
* ...
* @author AxGord <[email protected]>
*/
class Main {
@AxGord
AxGord / Elvis.hx
Last active December 24, 2015 09:19
package ;
import haxe.macro.Context;
import haxe.macro.Expr;
import neko.Lib;
/**
* ...
* @author AxGord <[email protected]>
*/