Too early to tell whther this solved my problem but recording for posterity anyway. In theory this will stop my Raspberry Pi from dropping off the network after it has been idle for a while.
pi@dashboard ~ $ iwconfig
wlan0 IEEE 802.11bgn ESSID:"Professor Ping"
Mode:Managed Frequency:2.437 GHz Access Point: B8:E6:25:9B:62:02
Bit Rate=39 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
Link Quality=43/70 Signal level=-67 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:70 Invalid misc:14 Missed beacon:0
lo no wireless extensions.
eth0 no wireless extensions.
Note: Power Management:on
sudo nano /etc/network/interfaces
add line: wireless-power off
pi@dashboard ~ $ iwconfig
wlan0 IEEE 802.11bgn ESSID:"Professor Ping"
Mode:Managed Frequency:2.437 GHz Access Point: B8:E6:25:9B:62:02
Bit Rate=26 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=43/70 Signal level=-67 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:29 Invalid misc:8 Missed beacon:0
lo no wireless extensions.
eth0 no wireless extensions.
Note: Power Management:off
Did gistfile2.md solve your problem?