Upvote for “sudo !!” No one ever seems to know about “!!” And it’s such a useful command.
I personally found out about it when I wrote a bash script that contained a password with two exclamation marks and I wondered why the last command kept being concatenated to the end of the password.
Also checkout thefuck for fixing other various typos