A collection of scripts and config files I made that make life easier.
Scripts are written for the bash terminal.
(Work in progress)
- Crun
- Proj
- Foil (Now in its own repo)
- Rainbow-Fart.vim(Now in its own repo)]
- Foxy
- Templates and Configs
Simple script that executes a gcc command for compiling C++ scripts.
Takes inputs from an input.txt, and outputs to both the console and output.txt.
By default, this executes test.cpp, but can also take filename as an argument.
In your .bashrc file, add :
alias crun="<your-directory>/crun.sh"where your-directory is the directory where crun.sh has been downloaded.
Now, to make it runnable as an executable, in your shell, type:
chmod +x <your-directory>/crun.shThis gives executable permissions to crun, and can now be called as a command from wherever in the system.
#Execute default script (test.cpp)
crun
#Execute some other script
crun filename.cppIn the directory with your c++ file, create and input.txt and output.txt as such:
├── input.txt
├── output.txt
└── test.cpp OR filename.cppEven simpler command wrapper script that creates a tag and readme file in a project directory. This was born completely out of my laziness to manage tag files and call ctags and whatnot.
#Create a project called dirname
proj dirnamethis will create a directory called dirname with the following structure
├── tags
├──.gitignore
└── README.mdand adds the files to the .gitignore file.
Does NOT initialize git by default, most projects don't make it out , though probably should add that.
Script for Powershell on windows based systems.
Toggles your proxy.
Opens the proxy login on your browser (By default, is set to open for CHROME)
Also, outputs the ProxyEnable, ProxyServer and ProxyOverride variables.
Just type foxy in the shell.
Stands for F#ck Proxy
Its a vim config, with some of my most used Plugins and a few custom functions.
Only exists because typing vim is more convenient and faster than dual booting or opening some IDE.
-
Maps
<leader>to the,. It just works. Space as a leader was my earlier one, but it caused conflicts, so i settled on this. -
<leader>f: Full file auto indent -
Newcp: takes a template file and copies it onto the file. In this instance, takes from atemplate.cpp -
Copy: Copies the entire file to the wsl clipboard viaClip.exe. "The alternative to this was rebuilding vim with the + register." -
UpdateTags(): Checks for the existence of a tags files, and if present, usesuniversal-ctagsto update them. This is called whenever the file is saved : Potentially slow for a big codebase, but we'll cross that bridge when we get there.