Skip to content

Instantly share code, notes, and snippets.

View Alexfilus's full-sized avatar

Alexfilus Alexfilus

View GitHub Profile
@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active June 24, 2024 01:34
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@xsqian
xsqian / alter-kafka-partitions.sh
Last active October 11, 2023 19:04
How to alter kafka partitions
# create a topic with specified partitons
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --create --partitions 2 --topic test-partitions
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --describe --topic test-partitions
# create a topic with default partitions
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --create --topic test-def-partitions
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --describe --topic test-def-partitions
# alter the number of partitions of an existing topic
kafka-topics --bootstrap-server xx.xx.xx.xx:39092 --alter --topic test-def-partitions --partitions 3
@NAKsir-melody
NAKsir-melody / readdb.go
Created May 15, 2019 15:15
Read ethereum level DB directly
package main
import (
"fmt"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie"
_ "github.com/ethereum/go-ethereum/common"
@jboner
jboner / latency.txt
Last active June 23, 2024 14:31
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD