Fixing dropped wifi connections

So I was experiencing dropped Wifi connectivity every so often after inactivity. At first, I thought it was my wifi adapter but seems like I found the software fix. From the Adafruit learning system:

Fixing WiFI Dropout Issues
If you find your module ‘drops out’ from time to time, you can fix it fairly easily with a command line fix (thanks perseus286!)

Create and edit a new file in /etc/modprobe.d/8192cu.conf

 sudo nano /etc/modprobe.d/8192cu.conf

and paste the following in

# Disable power saving options 8192cu rtw_power_mgnt=0 rtw_enusbss=1 rtw_ips_mode=1
Then reboot with sudo reboot

orignal link: learn.adafruit.com/adafruits-ras … -configure

Hope this helps someone!