Browse Source

Added README for /scripts

pull/1/head
Muthu Kumar 7 years ago
parent
commit
ae36184b68
  1. 33
      README.md
  2. 36
      scripts/README.md
  3. 6
      scripts/mkr.sh

33
README.md

@ -31,6 +31,39 @@ sudo apt-get update
sudo apt-get install firmware-iwlwifi 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
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. 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.

36
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 <package-name>`
- `install <package-name>`
- `update`
- `purge <package-name>`
- `ar` / `autoremove`
- Directories
- `mk <dir>`
- `rmd [dir]`
- git
- `commit <commit-message>`
- `push <commit-message> [remote branch]`
- systemctl
- `status <daemon>`
- `start <daemon>`
- `stop <daemon>`

6
scripts/mkr.sh

@ -3,6 +3,10 @@
## Read carefully, use at your own risk ## Read carefully, use at your own risk
## Add 'source path/to/mkr.sh' in your ~/.bashrc or ~/.zshrc ## Add 'source path/to/mkr.sh' in your ~/.bashrc or ~/.zshrc
# Actually clear your terminal
alias cls='printf "\033c"'
# Simpler apt commands # Simpler apt commands
alias update="sudo apt-get update" alias update="sudo apt-get update"
@ -81,4 +85,4 @@ start () {
## Usage: stop <daemon> ## Usage: stop <daemon>
stop () { stop () {
sudo systemctl stop "$1" sudo systemctl stop "$1"
} }

Loading…
Cancel
Save