Speedtest internet connection from command line

Source: http://osxdaily.com/2013/07/31/speed-test-command-line/