Skip to content

Instantly share code, notes, and snippets.

View h4x3rotab's full-sized avatar

h4x3rotab

View GitHub Profile
@h4x3rotab
h4x3rotab / README-gist.md
Last active August 10, 2025 09:37
Container Unpack Performance Benchmark - One-line Docker deployment

Container Unpack Performance Benchmark

Measures pure container image unpacking performance, isolated from download overhead.

🚀 One-Line Quick Start

curl -sL https://gist.githubusercontent.com/h4x3rotab/89374fdf8048550986f5e3b3935fa072/raw/gist-docker-compose.yml -o docker-compose.yml && docker compose up
@h4x3rotab
h4x3rotab / unpack_bench.py
Created August 9, 2025 06:16
Containerd Unpack Benchmark - Python Version with CPU/IO Monitoring
#!/usr/bin/env python3
"""
Containerd unpack benchmark script with CPU and I/O monitoring.
Requirements: containerd (ctr), taskset, /usr/bin/time, Python 3.6+
Usage:
sudo python3 unpack_bench.py --image docker.io/library/ubuntu:22.04 --cpus 2 --iters 5
"""
import argparse
@h4x3rotab
h4x3rotab / bench.sh
Last active August 9, 2025 04:03
Containerd unpack benchmark script - Measure container image unpacking performance with CPU affinity control
#!/usr/bin/env bash
# unpack-bench.sh
#
# Limit cores used during containerd "unpack" and benchmark it.
#
# Requirements: containerd (ctr), taskset, /usr/bin/time
# Usage:
# sudo ./unpack-bench.sh --image docker.io/library/ubuntu:22.04 --cpus 2 --iters 5
# Options:
# --image <ref> OCI image ref (default: docker.io/library/alpine:latest)
@h4x3rotab
h4x3rotab / verifiable-inference.md
Last active February 24, 2025 22:26
Phala verifiable inference on RedPill

Step 1. Get an API key on red-pill.ai

Step 2. Query (using phala/deepseek-r1-70b as example here)

curl -X 'POST' \
  'https://api.red-pill.ai/v1/chat/completions' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
 -H 'Authorization: Bearer ' \
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/v1/chat/completions":{"post":{"summary":"Creates a model response for the given that conversation.","description":"Given a list of messages comprising a conversation, the model will return a response.\n\nCurrently, we support `meta-llama/meta-llama-3.1-8b-instruct`, `google/gemma-2-9b-it` and `microsoft/phi-3-mini-4k-instruct` as the model.","operationId":"create_chat_completion_v1_chat_completions_post","parameters":[{"name":"x-phala-signature-type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"StandaloneApi or ModifiedResponse. If other value is set, will not have signature","title":"X-Phala-Signature-Type"},"description":"StandaloneApi or ModifiedResponse. If other value is set, will not have signature","example":"ModifiedResponse"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{

Linking my account h4x3rotab on GitHub with my address 5DFG7GbJu6BrVkt4EAgnMjyDGZosdTd7uxKU4VJLZJ8MqpLh on Substrate in mycryptoprofile.io, and the challenge code is: 5cab6a89d5f86210473b69a6aaaec99e. #LitentryVerifyMyAddress

Linking my account h4x3rotab on GitHub with my address 5DFG7GbJu6BrVkt4EAgnMjyDGZosdTd7uxKU4VJLZJ8MqpLh on Substrate in prod.mycryptoprofile.io, and the challenge code is: bb4d286c87a516202d342a5a8603d0b2. #LitentryVerifyMyAddress
@h4x3rotab
h4x3rotab / instructions.md
Last active March 31, 2021 11:41
Start pahla collator

Deploy ElectrumX Server On Ubuntu

Here are the steps required to run electrumX for BitcoinGold wallet ElectrumG. Replace the variables according to your setup.

  • $username is the username under which electrumX will run
  • $rpcuser$ and $rpcpass are form the conf of bitcoindgold.conf

Before run

Make sure you have at least 30G ~ 40G free space on your device, and you have enabled txindex=1 in bitcoingold.conf

@h4x3rotab
h4x3rotab / tinc-pre.md
Last active March 30, 2020 21:05 — forked from azrdev/tinc-pre.md
build tinc-1.1pre .deb package on raspbian

Follow https://wiki.debian.org/SimpleBackportCreation for https://packages.debian.org/experimental/tinc (which is currently 1.1pre17)

sudo apt-get install packaging-dev debian-keyring devscripts equivs

Don't add experimental to your sources.list, its gpg keys are not in raspbian. Instead, get the source package (.dsc and tinc source code) manually: On https://packages.debian.org/experimental/tinc look for the "source package" link in the box on the right side; it is currently labeled [tinc_1.1~pre17-1.1.dsc]. Then use that link to get the .dsc and the source code, and continue with the debian backport guide:

dget http://deb.debian.org/debian/pool/main/t/tinc/tinc_1.1~pre17-1.1.dsc