Skip to content

Instantly share code, notes, and snippets.

View niklaskorz's full-sized avatar
🐢
Turtle

Niklas Korz niklaskorz

🐢
Turtle
View GitHub Profile
@niklaskorz
niklaskorz / bench_split.rs
Created April 14, 2025 10:53
facet_json vs serde_json
#![feature(test)]
// Run with `cargo +nightly bench`
#[derive(facet::Facet)]
struct FacetPerson {
name: String,
age: u32,
}
use serde::{Deserialize, Serialize};
@niklaskorz
niklaskorz / bench.rs
Created April 14, 2025 10:40
facet_json vs serde_json
#![feature(test)]
// Run with `cargo +nightly bench`
extern crate test;
#[cfg(test)]
mod tests {
use super::*;
use test::Bencher;
use facet_json::{from_str, to_json_string};
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
boost,
openssl,
zlib,
readline,
Building bootstrap
Compiling bootstrap v0.0.0 (/Users/niklaskorz/dev/rust/rust/src/bootstrap)
Finished `dev` profile [unoptimized] target(s) in 3.25s
WARNING: The `change-id` is missing in the `config.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.
NOTE: to silence this warning, add `change-id = 136941` at the top of `config.toml`
Generating unstable book md files (aarch64-apple-darwin)
Building stage0 tool unstable-book-gen (aarch64-apple-darwin)
Finished `release` profile [optimized] target(s) in 0.40s
Building stage0 tool rustbook (aarch64-apple-darwin)
Finished `release` profile [optimized] target(s) in 0.19s
Generating unstable book md files (aarch64-apple-darwin)
Building stage0 tool unstable-book-gen (aarch64-apple-darwin)
Updating crates.io index
Downloading crates ...
Downloaded cargo-platform v0.1.9
Downloaded thiserror-impl v2.0.11
Downloaded thiserror v1.0.69
Downloaded thiserror-impl v1.0.69
Downloaded num-traits v0.2.19
Downloaded autocfg v1.4.0
{ pkgs }:
pkgs.zed-editor.overrideAttrs (
finalAttrs: prevAttrs: {
version = "0.168.0";
src = prevAttrs.src.override {
tag = "v${finalAttrs.version}-pre";
hash = "sha256-GcsK64tJrEp1QVcLJV2xTWAzupmNXsMgzzW5KOEFqTI=";
};
postPatch =
builtins.replaceStrings [ prevAttrs.version ] [ finalAttrs.version ]
@niklaskorz
niklaskorz / zed-editor-deps
Created December 30, 2024 13:10
nix-store -qR $(nix-build -A zed-editor)
/nix/store/59kpxafq7nqfg32ygybzg65a2q2m3dlp-libffi-3.4.6
/nix/store/5s3b3s1kc2i2y9j8zcm03nphg7lmcxrg-zlib-1.3.1
/nix/store/5wjj1f3pa1ndi3kvskm1fcs9kdy2xajf-bash-5.2p37
/nix/store/86vs8mxfpzzw6vjrqv1ml9734qz83g8h-libcxx-19.1.5
/nix/store/m3jzhwg8h7fhy913lh27rmlpp36szg8v-libiconv-107
/nix/store/69lid8xyqwl0fx6f4czvdbqwjl85bm6a-gettext-0.22.5
/nix/store/bzx98yb86791m7jbwinz23m0xjn2inag-pcre2-10.44
/nix/store/gd2546zkaizg9cfgq3rfawvr2d9xxfk5-libresolv-83
/nix/store/ncqqqxrccy0dasj3hy2fg81pgghpmdmx-glib-2.82.1
/nix/store/pkic7ygf0sz3j21457qslmvdssw40n5y-graphite2-1.3.14
@niklaskorz
niklaskorz / cuda-maintainers.nix
Created November 13, 2023 22:08
NixOS with cuda and micromamba
# cachix/cuda-maintainers.nix (create through `cachix use cuda-maintainers`)
{
nix = {
settings = {
substituters = [
"https://cuda-maintainers.cachix.org"
];
trusted-public-keys = [
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
@niklaskorz
niklaskorz / local-status-link.js
Last active November 29, 2022 19:13
Getting your local instance's URL for an external status on Mastodon
@niklaskorz
niklaskorz / Caddyfile
Created November 19, 2022 12:24
rheinneckar.social caddy config
www.rheinneckar.social {
redir https://rheinneckar.social{uri}
}
rheinneckar.social {
encode zstd gzip
reverse_proxy /api/v1/streaming* 127.0.0.1:4000
reverse_proxy 127.0.0.1:3000
}