diff --git a/README.md b/README.md index 4871ab8..5ced6d3 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,39 @@ sudo apt-get update sudo apt-get install firmware-iwlwifi ``` +### nodejs + +nodejs apt repository is several years behind, so add nodesource repos. nodejs 9.x (current version) + +```bash +# Using Debian +sudo su +curl -sL https://deb.nodesource.com/setup_9.x | bash - +apt-get install -y nodejs +``` + +#### Installing and using nvm + +You may need to use multiple node versions on the same machine. `nvm` will be very useful in this case. + +```bash +# using curl +curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash + +# or wget +wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash + +# Optional: Add "| NVM_DIR=/path/to/nvm bash" to the end of the above line if you need to change install directory +# "| NVM_DIR=/usr/local/nvm bash" for global (all users) install +``` + +And then add this to your `~/.bashrc` or `~/.zshrc`: + +```bash +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" +``` + ### MongoDB MongoDB doesn't have official packages for Debian Stretch at this moment, so we'd have to install from the Jessie repository which will throw an error saying the dependency `libssl1.0.0` will not be satisfied. diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 0000000..6efff75 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,36 @@ +# mkr.sh + +I made this script for my own convenience. Use at your own risk. Plenty of comments are supplied for each command. If you don't understand something, please don't use it. + +## Install + +Add this script to your `~/.bashrc` or `~/.zshrc`: + +```bash +mkdir ~/.mkr && curl https://raw.githubusercontent.com/MKRhere/wiki/master/scripts/mkr.sh -o ~/.mkr/mkr.sh +# if using bash +echo "source ~/.mkr/mkr.sh" >> ~/.bashrc +# or zsh +echo "source ~/.mkr/mkr.sh" >> ~/.zshrc +``` + +## Commands + +- General + - cls +- apt + - `i ` + - `install ` + - `update` + - `purge ` + - `ar` / `autoremove` +- Directories + - `mk ` + - `rmd [dir]` +- git + - `commit ` + - `push [remote branch]` +- systemctl + - `status ` + - `start ` + - `stop ` \ No newline at end of file diff --git a/scripts/mkr.sh b/scripts/mkr.sh index 34a6787..3d9a320 100644 --- a/scripts/mkr.sh +++ b/scripts/mkr.sh @@ -3,6 +3,10 @@ ## Read carefully, use at your own risk ## Add 'source path/to/mkr.sh' in your ~/.bashrc or ~/.zshrc +# Actually clear your terminal + +alias cls='printf "\033c"' + # Simpler apt commands alias update="sudo apt-get update" @@ -81,4 +85,4 @@ start () { ## Usage: stop stop () { sudo systemctl stop "$1" -} \ No newline at end of file +}