Skip to content

Instantly share code, notes, and snippets.

View giann's full-sized avatar
🧑‍🚀
Working on Buzz

Benoit Giannangeli giann

🧑‍🚀
Working on Buzz
View GitHub Profile
@gbalduzzi
gbalduzzi / app_attest_verification.php
Last active April 26, 2024 09:45
Apple App Attest verification
<?php
const PACKAGE_NAME = 'com.your.bundle_id';
const APPLE_TEAM_ID = 'ABCDEFGHIJK'; // 11 alphanumeric team ID
const ALLOW_DEV_ENVIRONMENT = true;
use CBOR\Decoder;
use CBOR\StringStream;
#![warn(rust_2018_idioms)]
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::TcpListener;
use std::env;
use std::error::Error;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
@mikdusan
mikdusan / commands.sh
Created October 3, 2021 05:09
llvm13 build on macos
# ### THIS IS A LINE-SPLIT OF THE FOLLOWING COMMAND ###
#
# export PATH=/usr/bin:/bin:/usr/sbin:/sbin
# export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
# export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
#
# /opt/local-2021.02/bin/cmake -G Ninja \
# -DCMAKE_MAKE_PROGRAM=/opt/local-2021.02/bin/ninja \
# -DCMAKE_BUILD_TYPE=Release \
# -DCMAKE_INSTALL_PREFIX=/opt/llvm-macos11.0-x86_64-13.0.0-release \
@DOBRO
DOBRO / UCI-Protocol-Specification.txt
Last active April 30, 2024 00:39
Description of the Universal Chess Interface (UCI)
// Dowloaded from: http://download.shredderchess.com/div/uci.zip
Description of the universal chess interface (UCI) April 2006
=================================================================
* The specification is independent of the operating system. For Windows,
the engine is a normal exe file, either a console or "real" windows application.
* all communication is done via standard input and output with text commands,
@lrvick
lrvick / hashbang-todo.md
Last active August 28, 2023 16:47
Hashbang Todo

#! Todo List

Things we want to get done for the community along with bounties for each.

Notes

A project is done when a k8s kustomization is submitted to the gitops repo, and it is live and available for users to use. Also must have some kind of backup solution (hosted postgres with backup services is acceptable for a first pass)

@daurnimator
daurnimator / autolua.zig
Last active May 9, 2021 05:12
Lua binding creator in zig
const std = @import("std");
const assert = std.debug.assert;
const lua_ABI = @cImport({
@cInclude("lua.h");
@cInclude("lauxlib.h");
@cInclude("lualib.h");
});
pub const lua = struct {
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active May 12, 2024 19:40
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@38
38 / Makefile
Last active February 19, 2024 02:12
A Minimal LLVM JIT example for LLVM-5
jit-toy: jit-toy.cpp
clang++ -g -o $@ $^ $(shell /usr/lib/llvm-5.0/bin/llvm-config --cxxflags --ldflags --system-libs --libs core)
@daurnimator
daurnimator / fengari-vue.lua
Last active June 17, 2021 11:43
Playing with Vue from fengari
-- Load Vue library
package.loadlib("https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.js", "*")
-- Get Object helper
local Object = dofile("https://gist.githubusercontent.com/daurnimator/5a7fa933e96e14333962093322e0ff95/raw/8c6968be0111c7becc485a692162ad100e87d9c7/Object.lua").Object
local myapp = js.new(js.global.Vue, Object{
el = "#foo";
template = [[
<div id="foo">{{message}}</div>
]];
@daurnimator
daurnimator / Object.lua
Created January 8, 2018 11:48
Fengari table=>Object helper
local js = require "js"
-- Helper to copy lua table to a new JavaScript Object
-- e.g. Object{mykey="myvalue"}
local function Object(t)
local o = js.new(js.global.Object)
for k, v in pairs(t) do
assert(type(k) == "string" or js.typeof(k) == "symbol", "JavaScript only has string and symbol keys")
o[k] = v
end