Skip to content

Instantly share code, notes, and snippets.

View Green-Sky's full-sized avatar
😜
*typing...*

Erik Scholz Green-Sky

😜
*typing...*
View GitHub Profile
@Green-Sky
Green-Sky / gist:cea90807d9ede8abc7cd43ab1da88cbc
Last active March 6, 2025 17:31
vp8 decode perf on desktop hardware

ffmpeg vp8 decode bench

tldr

libvpx vp8 decoding is now on par, or even faster in singlethreaded mode on modern hardware.

ffmpeg -benchmark -c:v libvpx -i Downloads/Big_Buck_Bunny_1080_10s_30MB.webm -f null -
ffmpeg -benchmark -c:v vp8 -i Downloads/Big_Buck_Bunny_1080_10s_30MB.webm -f null -

[NGC] Group-History-Sync (v2.1) [PoC] [Draft]

Simple group history sync that uses timestamp + peer public key + message_id (ts+ppk+mid) to, mostly, uniquely identify messages and deliver them.

Messages are bundled up in a msgpack array and sent as a file transfer.

Requirements

TODO: more?

diff --git a/toxcore/tox.c b/toxcore/tox.c
index 67f7cc00..de805edc 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -1072,16 +1072,6 @@ void tox_kill(Tox *tox)
mem_delete(tox->sys.mem, tox);
}
-void tox_get_options(Tox *tox, struct Tox_Options *options)
-{
@Green-Sky
Green-Sky / thumbhash.hexpat
Created August 19, 2024 10:00
haxpat file for ImHex for ThumbHash es
bitfield Header24 {
dct_l_dc : 6;
dct_p_dc : 6;
dct_q_dc : 6;
dct_l_scale : 5;
has_alpha : 1;
};
bitfield Header16 {
@Green-Sky
Green-Sky / StickerPackSpecV1.md
Last active December 20, 2024 13:52
[DRAFT] StickerPack spec v1

Spec for StickerPacks (v1) [Draft]

This spec describes the file format for a collection of stickers. Stickers are image files, that represent a blown up and more dominant version of an emoji.

A StickerPack does not contain the sticker images itself, it only contains unique Identifiers, hashes of said sticker image files.

TODO: link to sticker spec

File structure

Port forwarding in tox

(maybe more generic?)

This specification describes how 2 or more tox clients can setup and run tcp/udp traffic forwarding. A common usecase for this is securely exposing local webserver to a friend or forwarding game traffic without setting up a vpn or punching holes into a firewall.

Setup flow

If a successful setup is performed,

  • peer A sends an Offer to B,
@Green-Sky
Green-Sky / ngclist.md
Last active February 5, 2025 13:37
ngc list
title topics chatid
TokTok-Dev toxcore main dev 360497da684bce2a500c1af9b3a5ce949bbb9f6fb1f91589806fb04ca039e313
Lobby general offtopic d325f0095cb4d10f5ed668b854e2e10c131f7256949625e5e2dddadd8143dffa
TRIfA Community zoxcore and related 154b3973bd0e66304fd6179a8a54759073649e09e6e368f0334fc6ed666ab762
*nix C and unix/linux 42dc8eb4551ed602e56265e32cf3331c523b501454cfcba5294dd94c8d07149d
IPX Gaming Find other gamers to play with 05f8421a577725b718eebf702588c20b016b90ae4c6b92cafbfcded196f4ec76
struct Header {
u32 magic;
u32 version;
u32 n_vocab;
u32 n_embd;
u32 n_mult;
u32 n_head;
u32 n_layer;
u32 n_rot;
#include "llama-util.h"
#include "llama.h"
int main(void) {
//llama_file_saver lfs{"ggml-bytewise-vocab.bin", nullptr, LLAMA_FTYPE_ALL_F32};
llama_file file{"ggml-bytewise-vocab.bin", "wb"};
// magic
file.write_u32(LLAMA_FILE_MAGIC); // magic
#!/bin/bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
#rm ~/.config/tox/DHTnodes.json
for i in {0..19}
do
# inital setup client if save file does not exist
if [[ ! -f "tmp_tcp_ngc_$i.tox" ]]; then