Skip to content

Instantly share code, notes, and snippets.

View FedericoCeratto's full-sized avatar

Federico Ceratto FedericoCeratto

View GitHub Profile
@zacharycarter
zacharycarter / wclwn.md
Last active March 12, 2024 12:45
Binding to C Libraries with Nim
@gubatron
gubatron / dht-walkthrough.md
Last active October 24, 2023 01:02
DHT walkthrough notes

DHT Walkthrough Notes

I've put together these notes as I read about DHT's in depth and then learned how the libtorrent implementation based on the Kademlia paper actually works.

What problem does this solve?

400,000,000,000 (400 billion stars), that's a 4 followed by 11 zeros. The number of atoms in the universe is estimated to be around 10^82. A DHT with keys of 160 bits, can have 2^160 possible numbers, which is around 10^48

@arr2036
arr2036 / delay.sh
Last active June 30, 2023 19:13
Simple script to introduce delay on outbound packets to one or more (run multiple times) ip addresses
#!/bin/bash
# root qdisc handle
r_handle=1
# netem qdisc handle
n_handle=2
interface=
delay=
dstip=
qdpresent=