Generate Morse Code from ASCII

The Morse code, named after its inventor Samuel Morse, was used for long distance communication.
It is largely believed that it is now obsolete, yet some prisoners still find it useful. (banging a shoe on a pipe)
Learn more about it at Wikipedia.

Anyway here is the script
# - generate morse code from ascii
# you can contact me at:
# --. .-. ..- .-.. --- ... .--.-. --. -- .- .. .-.. 
# .-.-.- -.-. --- --

HTTP authentication, base64 encoding

In the previous post - dyndns update client, I faced a problem: I had to authenticate to but didn't want to use lynx, links or any other external tool.
For HTTP authentication to work I need to base64 encode the string "username:password"
I will try to explain each step.