Skip to content

Instantly share code, notes, and snippets.

@starius
starius / gh-discussions-save.sh
Created April 10, 2026 03:20
Save all issues and discussions from GitHub repo using gh tool
#!/usr/bin/env bash
set -euo pipefail
usage() {
cat <<'EOF'
Usage: gh-discussions-save.sh OWNER/REPO
Fetch all discussions, top-level comments, and threaded replies with GitHub
CLI and save one Markdown file per discussion in the current directory.
@starius
starius / extract_telegram_api.py
Created March 30, 2026 03:06
Extract api_id and api_hash from Telegram Desktop binary
#!/usr/bin/env python3
from __future__ import annotations
import argparse
import json
import re
import struct
import sys
from collections import Counter
@starius
starius / go.mod
Created October 25, 2025 16:24
VAES AVX2 test
module vaes-avx2-test
go 1.25.1
### Keybase proof
I hereby claim:
* I am starius on github.
* I am boris_golang (https://keybase.io/boris_golang) on keybase.
* I have a public key ASAOjSL8NV2cyhI9OOhxhAPnlOViPxzwhlypk4NW2EN3iQo
To claim this, I am signing this object:
@starius
starius / main.go
Created July 1, 2021 11:50
TLS server and client built on known ed25519 public key
package main
// See https://golang.org/src/crypto/tls/generate_cert.go
// See https://gist.github.com/denji/12b3a568f092ab951456
import (
"bytes"
"crypto/ed25519"
"crypto/rand"
"crypto/tls"
package main
import (
"crypto/aes"
"crypto/rand"
"crypto/sha256"
"fmt"
"hash"
"github.com/dchest/wots"
"""
Order copier
"""
# API key основного аккаунта
API_KEY = '69eQkHl0R0vgPod21c3XjQsT'
API_SECRET = 'EFAHxtJiOVYHSWa_HPtLAW50GpV31G_2GVSdm1gBZKH85Ltv'
# Список API ключей куда нужно транслировать ордера
API_KYES = ['hLlWHxkqxs42g-WeEt1_wC20']
diff --git a/range_test.go b/range_test.go
index c3b4c71..3f380aa 100644
--- a/range_test.go
+++ b/range_test.go
@@ -200,6 +200,12 @@ func TestBuildVerifyRangeProof(t *testing.T) {
if !VerifyRangeProof(leafData[start*leafSize:end*leafSize], blake, leafSize, start, end, proof, smallRoot) {
t.Errorf("BuildRangeProof constructed an incorrect proof for range %v-%v", start, end)
}
+ if end == start + 1 {
+ singleProof := append([][]byte{leafData[start*leafSize:end*leafSize]}, proof...)
package main
import (
"flag"
"fmt"
"io"
"io/ioutil"
"math/rand"
"os"
"time"
package main
import (
"flag"
"fmt"
"io"
"math/rand"
"os"
"time"