Skip to content

Instantly share code, notes, and snippets.

View Siedlerchr's full-sized avatar

Christoph Siedlerchr

View GitHub Profile
@Siedlerchr
Siedlerchr / build.sh
Created April 12, 2023 18:50 — forked from mlabbe/build.sh
MacOS M1 cross compile and build a fat binary with aarch64/arm64 and x86_64/amd64
#!/bin/bash
clang hello.c -target arm64-apple-darwin20.1.0 -o hello.arm64
echo -n "hello.arm64 is architecture " && lipo -archs ./hello.arm64
clang hello.c -target x86_64-apple-darwin-macho -o hello.x86_64
echo -n "hello.x86_64 is architecture " && lipo -archs ./hello.x86_64
lipo hello.arm64 hello.x86_64 -create -output hello
echo -n "final output binary has archs " && lipo -archs ./hello
@Siedlerchr
Siedlerchr / ObjectListener.php
Created December 23, 2017 15:19 — forked from soyuka/ObjectListener.php
Streaming big json files the good way with php with https://soyuka.me/streaming-big-json-files-the-good-way/
<?php
namespace Fry;
use JsonStreamingParser\Listener;
/**
* This implementation allows to process an object at a specific level
* when it has been fully parsed
*/