I was working on a remote machine and while I was away, the machine was restarted. Lost the scripts I had unsaved, or so I thought; and then I came up with this - was a life saver!
SELECT TOP 10
FROM sys.dm_exec_query_stats EQS
CROSS APPLY sys.dm_exec_sql_text(eqs.handle) EST
WHERE EST.text LIKE '%text%'
ORDER BY last_execution_time DESC