On July 23, 2012, the Earth had a near miss with a solar flare. Had it occurred a week earlier, it would’ve wiped out communication networks, GPS and electrical grids.