Skip to content

Instantly share code, notes, and snippets.

View wallentx's full-sized avatar
:shipit:
ȋ̴͎ ̶̘͝u̷̥͆s̴͖̾ē̷̠ ̶̟̉a̴͙̕ŗ̸͆č̶̬ḣ̷̭ ̴̡̄b̷̳̒ẗ̷͍ẘ̴̡

William Allen wallentx

:shipit:
ȋ̴͎ ̶̘͝u̷̥͆s̴͖̾ē̷̠ ̶̟̉a̴͙̕ŗ̸͆č̶̬ḣ̷̭ ̴̡̄b̷̳̒ẗ̷͍ẘ̴̡
View GitHub Profile
@wallentx
wallentx / fzfstr
Last active December 5, 2023 21:08
fzfstr
#!/usr/bin/env bash
set -e
# Dependency check
RG_VERSION="$(rg --version | head -n1 | cut -d" " -f2)"
version_ge() {
printf '%s\n%s\n' "$2" "$1" | sort -V -C
}
@wallentx
wallentx / mkcluster
Last active October 27, 2023 21:43
Create a KinD cluster ezpz
#!/usr/bin/env bash
set -o errexit
function checkDeps() {
if [[ $OSTYPE =~ ^darwin ]]; then
command -v kind &>/dev/null || brew install kind
command -v kubectl &>/dev/null || brew install kubectl
elif [[ $OSTYPE =~ ^linux ]]; then
command -v kind &>/dev/null || go install sigs.k8s.io/kind@v0.17.0 || echo "Install kind from your package manager"
command -v kubectl &>/dev/null || curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" &&
#!/usr/bin/env bash
INPUT=$1
NWAIT="${INPUT:-1}"
start_block_height=$(chia rpc full_node get_blockchain_state | jq -r '.blockchain_state.peak.height')
start_time=$(date +%s)
synced_state=$(chia rpc full_node get_blockchain_state | jq -r '.blockchain_state.sync.synced')
fakewatch() {
@wallentx
wallentx / extract
Created August 3, 2023 23:50
Easy archive extraction
###########################
# Easy archive extraction!
###########################
extract() {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar -I pigz -xvzf $1 ;;
*.tar.zst) tar -I "zstd -T0" -xvf $1 ;;
*.bz2) bunzip2 $1 ;;
@wallentx
wallentx / results.md
Last active June 30, 2023 18:33
bls-signatures runBenchmark results - i9 13900k
Test Case blspy 1.0.16 blspy 2.0.2 blspy 2.0.2 (ADX)
Signing: 5000 runs (avg) 2462ms (0.4924ms) 1246ms (0.2492ms) 1070ms (0.214ms)
Verification: 10000 runs (avg) 16063ms (1.6063ms) 7605ms (0.7605ms) 6443ms (0.6443ms)
Public key validation: 100000 runs (avg) 13047ms (0.13047ms) 3769ms (0.03769ms) 3484ms (0.03484ms)
Signature validation: 100000 runs (avg) 14251ms (0.14251ms) 5522ms (0.05522ms) 4781ms (0.04781ms)
Aggregation: 100000 runs (avg) 147ms (0.00147ms) 122ms (0.00122ms) 103ms (0.00103ms)
Batch verification: 100000 runs (avg) 68266ms (0.68266ms) 24965ms (0.24965ms) 21186ms (0.21186ms)
PopScheme Aggregation
#!/usr/bin/env bash
set -euo pipefail
download_dir="."
TMPOUT=$(mktemp /tmp/tmpXXXXXXXXXX)
while getopts ":d:v" opt; do
case ${opt} in
d)
download_dir=$OPTARG
@wallentx
wallentx / kill-me.json
Last active June 7, 2023 21:50
YoU wOuLdNt PuT pOwErShElL iN yAmL
{
"schemaVersion": "2.2",
"description": "Create AD User (writing this gave me AIDS)",
"parameters": {
"userName": {
"type": "String",
"default": "Enabled"
},
"firstName": {
"type": "String",
                                          SoC:                 Google Tensor 
                                          Technology:          5nm
                                          CPU 1:
                                            Microarchitecture: Cortex-A55
                                            Max Frequency:     1.803 GHz
                                            Cores:             4 cores
   #####  ##   # #####  ## ####  ######     Features:          NEON,SHA1,SHA2,AES,CRC32
 ###    ####   ###      ####  ###   ###   CPU 2:
###       ##   ###      ###    ##    ###    Microarchitecture: Cortex-A76
SoC: Unknown
Technology: Unknown
CPU 1:
Microarchitecture: Cortex-A55
Max Frequency: 1.803 GHz
Cores: 4 cores
##### ## # ##### ## #### ###### Features: NEON,SHA1,SHA2,AES,CRC32
### #### ### #### ### ### CPU 2:
### ## ### ### ## ### Microarchitecture: Cortex-A76