This is worth bookmarking. Have you forgotten that ultra complicated wifi password you setup, well here are some ways (have to run as admin or sudo depending on the system) to get it from the computer.
Linux
security find-generic-password -ga "ssid"
Windows:
netsh wlan show profile name=ssid key=clear
Mac
security find-generic-password -ga ssid | grep password
replace ssid with your wifi name.
http://lifehacker.com/find-the-wi-fi-password-for-your-current-network-with-t-1717978747