Skip to content

Instantly share code, notes, and snippets.

@Mistsuu
Mistsuu / heap.h
Last active April 16, 2026 10:06
My implementation of Priority Queue
#ifndef HEAP_H
#define HEAP_H
/*
* D-ary heap implementation. Among all D candidates, D=2 performs the best :)
* Sorry C++ programmers in advanced, I never realized that I'm reinventing the wheel :(
*/
#include <stddef.h>
#include <stdint.h>
@Mistsuu
Mistsuu / myio.c
Last active April 11, 2026 09:19
println in C without malloc
#define _AMD64_
/*
Problem: Because I'm using a constant reading size
using a constant buffer, there will be a
case where we input too much, and it spills
to the next buffer read, which is not good!
I'll fix it later... or not :)
*/
@Mistsuu
Mistsuu / add-binary-to-chroot.sh
Last active April 20, 2025 14:26
Tools I used for debugging
#!/bin/bash
function err {
echo "$1"
exit -1
}
function getbinpath {
local BINNAME="$1"
local BINNAMELEN=${#BINNAME}
@Mistsuu
Mistsuu / count-points.ipynb
Created December 3, 2024 16:13
Counting Points on Elliptic Curve from Scratch -- kinda
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.