Skip to content

Instantly share code, notes, and snippets.

@iethree
iethree / mb-jars.mjs
Created October 5, 2023 15:44
Metabase jar helper
const version = process.argv[3];
const edition = process.argv[4] === 'oss' ? 'oss' : 'ee';
const [major, minor] = version.split('.');
const jarName = `metabase-${edition}-${version}.jar`;
const fileExists = fs.existsSync(jarName);
if (!fileExists) {
@dpeek
dpeek / FTW.hx
Last active December 10, 2025 03:05
import haxe.macro.Expr;
class FTW
{
public static function build()
{
return haxe.macro.Context.getBuildFields().map(transformField);
}
static function transformField(field:Field)
import haxe.macro.Expr;
class Func
{
public static function each<T>(it:Iterable<T>, cb:T -> Void)
{
for (i in it) cb(i);
}
public static function every<T>(it:Iterable<T>, cb:T -> Bool):Bool
@skial
skial / Macro.hx
Last active December 17, 2015 06:18
Haxe async to sync style metadata thingy, supporting auto completion. Inspired by https://github.com/koush/node/wiki/%22async%22-support-in-node.js which was inspired by C# await keyword. Using Haxe r6632
package example.inlineMeta;
import haxe.macro.Printer;
import haxe.macro.Type;
import haxe.macro.Expr;
import haxe.macro.Context;
/**
* ...
* @author Skial Bainn