This tweet mentions using code snippets whilst doing live demos to make them easier and less risky:
Writing hella VSCode snippets for my @LaraconUS talk.
I saw @joetannenbaum live coding with safety and ease in India and knew I'd need some of that swag for US.
Joe's talk was recorded but won't be published until after LaraconUS, but I also remembered this talk by Micheal Heap at PHP UK 2018, where he used Vim snippets and shell aliases to show how to go from nothing to a deployed Laravel application using Jenkins.
I'd like to use this approach more when doing my live coding demos, such as in my Sculpin talk.
TODO: update this note with a link to Joe's talk once it's published.