The first is a Bash script to reconnect the Raspberry Pi to wifi, if it gets disconnected.
The second is a Bash script to reconnect and email the IP addresses to your email.
Instructions on setting this to run automatically as a cronjob are at aruljohn.com.