Immediately suspended cards
A sample of cards I've created and immediately suspended. Explanation here: https://timot.cool/personal-memory-systems-2020
child = pexpect.spawn("command")
-> raw output in child.before and child.after (referring to regex)
child.sendline() / child.send()
apply a command (like rm -f myfile) to all commits
git filter-branch --tree-filter 'command' HEAD
(gdb) GEF: configure what's displayed on each breakpoint, or change order
gef config context.layout "-legend regs stack code args -source -threads -trace extra memory"
To hide a feature, prepend with - or omit from the list.
date: YYYY-MM-DD format
regex flow in python
use raw strings (r"...")
regex = r"my regex"
string = "my matching string"
result = re.match(regex, string)
(no need for separate compilation step if only a few regex are used at a time, as their compiled versions are cached)
result.group("named group 1", "named group 2")
result.group(0) # entire match
seconds to human-readable time (HH:MM:SS) using datetime
(arch) show all the useless packages on the system (dependencies that weren't removed with the packages)
d: installed as dependencies
t: not required by anything
q: quiet (only package name))
(net) (tls) commands to analyze a TLS-protected Firefox session
sudo tcpdump -w /tmp/capture.pcap -i <interface>
SSLKEYLOGFILE=/tmp/secrets.txt firefox -P --no-remote (using a different profile than the usual one)
editcap --inject-secrets tls,/tmp/secrets.txt /tmp/capture.pcap /tmp/capture-secrets.pcapng