I hereby claim:
- I am nathanalderson on github.
- I am nathanalderson (https://keybase.io/nathanalderson) on keybase.
- I have a public key ASBP9xFSfLVNtJGyW29cOTqbgbOxY3BQL8yydMCT3A3rqAo
To claim this, I am signing this object:
# delete the bad host key from the previous ssh command | |
purgehostkey() { | |
cmd=$history[$((HISTCMD-1))] | |
lineno=$(eval $cmd 2>&1 | grep -oP 'known_hosts:\K\d+') | |
known_hosts=~/.ssh/known_hosts | |
host=$(sed -n "${lineno}p" $known_hosts | cut --delimiter=' ' --fields=1) | |
sed -i -e "${lineno}d" $known_hosts | |
echo "Deleted $host from known_hosts:$lineno 🖥️🔑💥" | |
eval $cmd -o StrictHostKeyChecking=accept-new | |
} |
from typing import List, Tuple | |
def parse_table(table: str) -> Tuple[Tuple, List[Tuple]]: | |
""" | |
Uses the second row of the table to determine column locations, then returns the headers and | |
records based on that. See testcase at bottom. | |
""" | |
rows = table.splitlines() | |
spans = _get_spans(rows[1]) | |
headers = _span_vals(rows[0], spans) |
» strace bcompare | |
execve("/usr/bin/bcompare", ["bcompare"], 0x7ffd78084240 /* 65 vars */) = 0 | |
brk(NULL) = 0x55e71f458000 | |
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd33a19250) = -1 EINVAL (Invalid argument) | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=206302, ...}) = 0 | |
mmap(NULL, 206302, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0eb2e70000 | |
close(3) = 0 | |
openat(AT_FDCWD, "/usr/lib/libreadline.so.8", O_RDONLY|O_CLOEXEC) = 3 |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env bash | |
xclip -selection clipboard -o | pandoc --from markdown --to html | xclip -selection clipboard -target text/html |