One-click copy function for code snippets

I will record some common code snippets myself, it would be nice to add one-click copy of code snippets