Skip to content

Instantly share code, notes, and snippets.

Nathan Alderson nathanalderson

Block or report user

Report or block nathanalderson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nathanalderson / purgehostkey.zsh
Last active Jul 17, 2019
zsh function for deleting the bad host key from the previous ssh command
View purgehostkey.zsh
# delete the bad host key from the previous ssh command
purgehostkey() {
lineno=$(eval $history[$((HISTCMD-1))] 2>&1 | grep -oP 'known_hosts:\K\d+')
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 🖥️🔑💥"
View gist:74b415d243ff98574eeda00b76a957e6
» 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/", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/", 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/", O_RDONLY|O_CLOEXEC) = 3
nathanalderson /
Created Sep 1, 2018
verifying myself on

Keybase proof

I hereby claim:

  • I am nathanalderson on github.
  • I am nathanalderson ( on keybase.
  • I have a public key ASBP9xFSfLVNtJGyW29cOTqbgbOxY3BQL8yydMCT3A3rqAo

To claim this, I am signing this object:

nathanalderson /
Created May 5, 2018
Tansform clipboard contents from markdown to HTML
#!/usr/bin/env bash
xclip -selection clipboard -o | pandoc --from markdown --to html | xclip -selection clipboard -target text/html
You can’t perform that action at this time.