Skip to content

Instantly share code, notes, and snippets.

@fponticelli
fponticelli / config.ini
Created February 3, 2012 20:32
ReportGrid visualizations template
cache=2 days
formats=pdf,ps,png,jpg,svg,bmp,tif,html
[params]
viz[0]=pieChart
viz[1]=barChart
[defaults]
viz=pieChart
@fponticelli
fponticelli / config.ini
Created June 4, 2012 13:51 — forked from abergie/config.ini
RG Description
cache=2 days
formats=png,html
[params]
start=true
end=true
path=true
@fponticelli
fponticelli / config.ini
Created July 17, 2012 20:13 — forked from abergie/config.ini
RG Description
cache=2 days
formats=png,jpg,pdf,html
screenWidth=580
[params]
start=true
end=true
path=true
token=true
@fponticelli
fponticelli / gist:5040330
Last active December 14, 2015 06:09
Function wrapping in abstract
abstract FunctionInfo<T>({ f : T, arity : Int, hasReturn : Bool })
{
public inline function new(f : T, arity : Int, hasReturn : Bool)
{
this = { f : f, arity : arity, hasReturn : hasReturn };
}
public inline function self() : T return this.f;
public inline function call(args : Array<Dynamic>)
@fponticelli
fponticelli / RGBLed.hx
Last active December 17, 2015 18:29
Rotating RGB LED color hue with BeagleBone Black, Haxe and BoneScript.
import bone.Bone;
import thx.color.Color;
import thx.color.HSL;
using thx.color.Convert;
class RGBLed
{
public static function main()
{
reset();
#ifndef _LINKEDLIST_H
#define _LINKEDLIST_H
template <typename T>
class LinkedList {
public:
LinkedList();
~LinkedList();
void add(T value);
void remove(T value);
@fponticelli
fponticelli / stream.js
Created April 21, 2014 15:50
simple stream
import Timer from 'ui/timer';
let _listeners = Symbol();
class Source {
constructor(callback) {
this[_listeners] = [];
let sink = (value) => {
Timer.immediate(() => {
this[_listeners].map(ƒ => ƒ(value));
@fponticelli
fponticelli / CommentBox.hx
Created June 1, 2014 22:21
react.hx first attempt
import react.React;
class CommentBox extends React {
static function main() {
React.renderComponent(
@dom '<CommentBox url="comments.json" pollInterval={2000} />',
js.Browser.document.getElementById('content')
);
}
@fponticelli
fponticelli / Sample.axe
Last active August 29, 2015 14:02
new haxe?
class Sample<T>(value : T) {
trace(value)
def toString = value
}
import sui.Sui;
class DemoObject {
public static function main() {
var o = new DemoObject(),
sui = new Sui();
sui.bind(o.name);
sui.bind(o.enabled);
sui.bind(o.startedOn);
sui.bind(o.traceMe);