Templates is a git repository with usefull template files for most some programming languages
In this repository I'm storing all my template files and folders for some programming languages Currently supported are:
- C
- C++
- Python
- Node-Express
- Vue3
- PHP [Beta]
- Java [Beta]
- C# [Beta]
- Ruby
- Perl
- Haskell
There are two ways to use this repository, if you are mostly working offline you should consider using Method 2 for anyone else Method 1 should be working fine. If you're one of those weirdos how are still using Windows scroll down to Method 3 and 4.
If you don't want to scroll through the installation instructions, you can watch my YouTube instructions video for
Only clone the template.sh file via wget to your /opt folder
wget https://raw.githubusercontent.com/SolonRubens/templates/main/template.sh
Then link it using
sudo ln -s /opt/template.sh /usr/local/bin/template
Or simply add the file to your PATH
If you chose the linking way you have to give yourself permission to execute the file
sudo chmod +x /usr/local/bin/template
If you are mostly working offline or just have slow internet this is your way to go.
Clone the repository via git to your /opt folder
git clone https://github.com/SolonRubens/templates.git
Link the offline template file with the following command
sudo ln -s /opt/templates/template_offline.sh /usr/local/bin/template
In case you already linked to the "normal" template file use this command
sudo ln -s /opt/templates/template_offline.sh /usr/local/bin/template_offline
Either way you have to change permissions for the generated linking file
sudo chmod +x /usr/local/bin/template
or
sudo chmod +x /usr/local/bin/template_offline
Unfortunately Windows has no tool preinstalled for downloading files via the command line so we have to install wget first.
If, by whatever reason, you don't want to install wget you have to use the local version. Windows sucks, I'm sorry.
Don't forget to add wget to your PATH if it doesn't happen automatically
Now you can use wget to download the template.bat file
wget https://raw.githubusercontent.com/SolonRubens/templates/main/template.bat
Wherever you download it to remember to add the folder afterwards to your PATH variable.
At first you have to clone the repository to wherever you want
git clone https://github.com/SolonRubens/template.git
Make sure you add template_offline.bat to your path