Reduce repetitive typing tasks with Dash
Dash is a free OSX app that allows you to save text snippets and input them anywhere using custom keywords.
For example, if you have to enter a console command 20 times a day, you can save this command as a snippet in Dash, and title it `my_command. If you want to change a variable in this command each time, you can signify a manual entry point by using “__” on either side of the variable:
When you run the snippet by typing `my_command in the console, a box will pop up showing the full snippet being entered, with a prompt to enter your variable (in this case, the last name value) manually:
Dash works within ANY application on OSX, I highly recommend it to reduce typing and speed up those repetetive tasks.
Using the npm serve package, it only takes a few minutes to set up.
- Install the web server:
- Edit your host file (/etc/hosts) to include a hostname other than localhost:
Why add a new host name? When your browser connects to a hostname other than localhost, it treats it as an external internet addressable server. This is important for replicating a live environment.
- Create a directory containing the pages you want to test:
- In terminal, go to that directory, and serve it:
If successful, you should see:
serving /Users/Pages on port 3000
- In a web browser, open that directory from the server: http://www.l.grandrounds.com:3000/
In your browser, you should see the directory being served, and be able to view your pages from here in a live environment.