Skip to content

Instantly share code, notes, and snippets.

@kibibites
kibibites / bench.ts
Created April 25, 2025 14:12
benchmarking different encoders/decoders
// curl https://microsoftedge.github.io/Demos/json-dummy-data/1MB-min.json > test.json
import { decode as decodeMsgpack, encode as encodeMsgpack } from "npm:@msgpack/msgpack";
import { decode as decodeCbor, encode as encodeCbor } from "npm:cbor-x";
const encoder = new TextEncoder(),
decoder = new TextDecoder(),
data = JSON.parse(Deno.readTextFileSync("test.json"));
Deno.bench("@msgpack/msgpack", () => {
@kibibites
kibibites / .index.md
Last active March 27, 2025 20:38
code advent 2024 solutions in uiua

here are my solutions (partially) in uiua for advent of code 2024.

there is an explained version with filename ending in _long and a minimized version ending in _short for each part in each day.

i might explain more for each one on my website here so yea :3

body {
min-height: fit-content;
background-color: #f7f2ff;
color: #392142;
font-family: 'Gambarino', serif;
&>.page {
min-height: 100dvh;
height: 100%;
padding: 3rem;
@kibibites
kibibites / readme.md
Last active November 6, 2023 00:14
a tl;dr for hpke

HPKE Flow

sequenceDiagram
  actor Initiator
  actor Recipient
  participant KEM
  participant KDF
  participant AEAD
@kibibites
kibibites / index.tsx
Last active November 7, 2022 21:07
json to css vars
import { useRef, useEffect, useState } from 'preact/hooks';
export function App() {
const [keys, setKeys] = useState<string[]>([]);
const [obj, setObj] = useState<any>();
return (
<>
<textarea
onInput={(ev) => {
@kibibites
kibibites / .env
Last active July 2, 2022 20:02
mod updater rewrite in bash
# example config
MINECRAFT_VERSION="1.18.1"
FABRIC_MODS=(
# add the mod id / slug from modrinth here
)
FORGE_MODS=(
# add the mod id / slug from modrinth here
)
QUILT_MODS=(
@kibibites
kibibites / .config
Last active March 19, 2022 05:20
linux config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.16.4 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23700
@kibibites
kibibites / action.yaml
Created December 21, 2021 17:45
Build rust program on linux, macos and windows with caching
name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
@kibibites
kibibites / breathebg.css
Last active December 15, 2021 02:52
Monkeytype themes
/* ==UserStyle==
@name monkeytype nord
@namespace github.com/openstyles/stylus
@version 1.0.0
@description nord theme for monkeytype
@author refact0r
@homepageURL https://github.com/refact0r/monkeytype-themes
@updateURL https://github.com/refact0r/monkeytype-themes/raw/main/nord.user.css
==/UserStyle== */
@-moz-document domain("monkeytype.com") {
@kibibites
kibibites / Nibble.md
Last active October 26, 2021 11:16
Nibble Assembly Parts

Nibble 65% Build

Base:

Amazon - $70 Waiting for restock...

Mechboards - £75.00($103.04)