Skip to content

Instantly share code, notes, and snippets.

View moises-silva's full-sized avatar
🐢
Taking it easy

Moises Silva moises-silva

🐢
Taking it easy
View GitHub Profile
@toolness
toolness / adventures-in-python-core-dumping.md
Last active January 9, 2024 11:53
Adventures in Python Core Dumping

Adventures in Python Core Dumping

After watching Bryan Cantrill's presentation on [Running Aground: Debugging Docker in Production][aground] I got all excited (and strangely nostalgic) about the possibility of core-dumping server-side Python apps whenever they go awry. This would theoretically allow me to fully inspect the state of the program at the point it exploded, rather than relying solely on the information of a stack trace.

@tuxfight3r
tuxfight3r / tcp_flags.txt
Last active April 17, 2024 14:48
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)
@alk
alk / gist:1148755
Created August 16, 2011 09:57
grab tcmalloc stats into /tmp/malloc-stats
set $mem = malloc(1048576)
p $mem
set language c++
call MallocExtension::instance()->GetStats($mem, 1048575)
set $fd = open("/tmp/malloc-stats", 512 + 64 + 1, 0644)
call write($fd, $mem, memchr($mem, 0, 1048575) - $mem)
call close($fd)
call free($mem)