I can't find any way to write
~ on a Mac. So every time I need it I have to copy paste it from somewhere.
I am using a Spanish keyboard, so maybe that is the issue.
This has been answered in the comments, its ⎇ + ñ (+ shift does not work) followed by space. I find the keyboard viewer usefull, you can place a symbol in your menu bar for quick access: Open System Preferences -> Language and Text -> Input Sources -> [x] "Show input menu in menur bar".
This will give you this:
It will update its layout with the modifier keys pressed. Blind keys are marked orange.