Skip to content

Instantly share code, notes, and snippets.

from __future__ import print_function
import gdb
import subprocess
import sys
import re
class WineReload (gdb.Command):
"Command to pipe gdb internal command output to external commands."
@a1exdandy
a1exdandy / checkm8_a8_a9.patch
Last active March 21, 2023 10:32
ipwndfu patch for s8000/s8003/t7000
diff --git a/Makefile b/Makefile
index 96e99b7..4884309 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,10 @@ arm64:
gobjcopy -O binary -j .text bin/checkm8_arm64.o bin/checkm8_arm64.bin
rm bin/checkm8_arm64.o
+ xcrun -sdk iphoneos clang src/checkm8_nopaddingcorruption_arm64.S -target arm64-apple-darwin -Wall -o bin/checkm8_nopaddingcorruption_arm64.o
+ gobjcopy -O binary -j .text bin/checkm8_nopaddingcorruption_arm64.o bin/checkm8_nopaddingcorruption_arm64.bin
@gubatron
gubatron / dht-walkthrough.md
Last active April 24, 2024 11:14
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

@juliohm1978
juliohm1978 / k8s-drain.sh
Last active March 13, 2024 14:12
Drains a Kubernetes node using "rollout restart" instead "kubectl drain". See comments for motiviation and usage.
#!/bin/bash
NODE_NAME=$1
ROLLOUT_CMD=$2
if [[ "$NODE_NAME" == "" ]]; then
echo "
USAGE: ./drain.sh <NODE_NAME>
Drains a node from its Deployments/Stateful set pods.