How to insert a codeblock to copy?

Use the insert code button in the composer:

a = [1..10].shuffle