If you find yourself running the same code time and time again, Chrome Canary provides a handy 'Snippets' area where you can store code to run from the console.

To find 'Snippets', navigate to the 'Source' tab and it will be next to 'Sources' and 'Content Sources'. Right click in the empty area to find the option to create a new snippet, write your code and then whenever you need to run it, right click and select 'Run'.

The Scratchpad tool has similar functionality and has been built into Firefox since version 6.