EEG study performed on patient at time of death showed high-cognitive demand activity, similar to concentration or recall. This may be the external equivalent of "life flashing before one's eyes".
Direct link to academic paper, "Enhanced Interplay of Neuronal Coherence and Coupling in the Dying Human Brain".