Skip to content

Instantly share code, notes, and snippets.

View AxGord's full-sized avatar
🦄
Pony

Alexander Gordeyko AxGord

🦄
Pony
View GitHub Profile
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active April 30, 2024 11:57
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@qti3e
qti3e / README.md
Last active April 13, 2024 15:50
List of file signatures and mime types based on file extensions
@Yanrishatum
Yanrishatum / hxsl-cheatsheet.md
Last active October 6, 2023 12:55
HXSL cheat-sheet

HXSL cheat-sheet

This is a WIP of a cheat-sheet that I will finish Eventually™

Types

Mapping of the shader types to Heaps types:

Float = Float
Int = Int
Bool = Bool
@city41
city41 / composite.js
Created January 29, 2012 03:33
Alpha compositing in JavaScript
function _composite(under, over) {
var alphaO = over[3],
alphaU = under[3],
invAlphaO = 1 - alphaO,
i,
len;
for(i = 0, len = under.length - 1; i < len; ++i) {
under[i] = Math.round((over[i] * alphaO)
+ ((under[i] * alphaU) * invAlphaO));
@nadako
nadako / 1 Main.hx
Last active October 16, 2021 04:38
ocaml-like `with` for Haxe
using WithMacro;
typedef Player = {
final name:String;
final level:Int;
}
class Main {
static function main() {
var player = {name: "Dan", level: 15};
@nadako
nadako / SchemaTypeBuilder.hx
Last active October 31, 2020 03:34
JSON-schema type builder prototype.
#if macro
import haxe.macro.Context;
import haxe.macro.Expr;
class SchemaTypeBuilder
{
public static function build(ref:String):haxe.macro.Type
{
var schema = haxe.Json.parse(sys.io.File.getContent(ref));
var type:ComplexType = parseType(schema);
import haxe.macro.Expr;
class FTW
{
public static function build()
{
return haxe.macro.Context.getBuildFields().map(transformField);
}
static function transformField(field:Field)
@clarkjones
clarkjones / HaxeScript.hx
Last active July 12, 2018 19:55 — forked from jasononeil/HaxeScript.hx
haxex, a short shell script that can be used so you have Haxe shell scripting
#!/usr/bin/env haxex -lib mcli @
/**
Taken from mcli example https://github.com/waneck/mcli
Say hello.
Example inspired by ruby's "executable" lib example
**/
class HaxeScript extends mcli.CommandLine
{
/**
@nadako
nadako / 1 Main.hx
Created February 18, 2014 22:19
Using haxe macros as syntax-tolerant, position-aware json parser
import haxe.macro.Context;
import haxe.macro.Expr;
using haxe.macro.ExprTools;
class Main
{
inline static var QUOTED_FIELD_PREFIX = "@$__hx__";
static function main()
@tong
tong / nacl-toolchain.xml
Created February 2, 2013 12:30
NativeClient toolchain file for HXCPP
<!-- NativeClient hxcpp toolchain -->
<xml>
<include name="gcc-toolchain.xml"/>
<path name="${NACL_SDK_ROOT}/toolchain/linux_x86_newlib/bin"/>
<set name="M" value="32" unless="HXCPP_M64" />