Editing hosts file on a Mac

Pretty often, I have a need for editing my hosts file on my Mac. Mostly when i’m moving...