Using Alfred, you can map a global keyboard shortcut to the process of cloning a lesson template repo and firing up your demo.
Instructor: [0:00] While typing "+vanilla my new lesson" is really fast, let's see if we can make this even faster by creating a blank workflow in Alfred, naming this New Egghead Lesson with whatever ID. Click create. We'll right click to add a hotkey. Let's say command ALT L. Hit save.
[0:25] We want command ALT L to open an input. We'll use keyword of lesson. It doesn't really matter what you put there since we're using the keyboard shortcut. Leave "with space" and "argument required" as defaults. Hit save there, and we can link these together.
[0:42] The last thing we want it to do is run a script. We'll make this ZSH. We need to make sure to source our .zshrc, so we can grab the +vanilla command, and then $1 will be that first argument which it will get from here. We'll connect these. If you look at the debugger, once I hit command ALT L, this will pop up.
[1:06] I can type my-amazing-lesson, hit enter. You'll see it passing the output to my run script. In the background, now it is cloning and installing everything from my Vanilla template as we configured. Now it's done, and I didn't touch anything. It popped open code and a window running anything I type here.
Member comments are a way for members to communicate, interact, and ask questions about a lesson.
The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io
Be on-Topic
Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.
Avoid meta-discussion
Code Problems?
Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context
Details and Context
Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!