Skip to content

Instantly share code, notes, and snippets.

@useit015
Last active November 15, 2020 22:08
Show Gist options
  • Save useit015/771eda45c760bdb6b53a61c11bae51e3 to your computer and use it in GitHub Desktop.
Save useit015/771eda45c760bdb6b53a61c11bae51e3 to your computer and use it in GitHub Desktop.
# Default editor
export EDITOR="/usr/bin/vim"
# Omzh home
export ZSH="$HOME/.oh-my-zsh"
# Omzh theme
ZSH_THEME="avit"
# Omzh Plugings
plugins=(git z zsh-autosuggestions)
source $HOME/.cpv
source $ZSH/oh-my-zsh.sh
source $HOME/.betterGitLog
source $HOME/.nesConfig
source $HOME/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Favorites
alias bb='npm'
alias please='sudo'
alias shut="systemctl poweroff -i"
alias studio="$HOME/Downloads/android-studio/bin/studio.sh"
function o() {
SELECTION=$(/bin/ls -1 $1 | dmenu)
xdg-open "$1/$SELECTION" 2>/dev/null
}
source $HOME/.dir
# Shell configuration
alias zconf="code ~/.zshrc && echo 'Saving configuration ...' && source ~/.zshrc"
alias ohmyzsh="vim ~/.oh-my-zsh"
# Keyboard defaults
alias gg="sudo msiklm green high"
alias rr="sudo msiklm red high"
# Better ls
alias l='exa -la --color=always -I="node_modules|.git" --git --group-directories-first'
alias ll='exa -l --color=always -I="node_modules|.git" --git --group-directories-first'
alias lt='exa -lT --color=always -I="node_modules|.git" --git --group-directories-first'
alias ls='exa --color=always -I="node_modules|.git" --git --group-directories-first'
# Ctrl + a to ls
bindkey -s '^a' 'l\n'
# Path to bins
export PATH=$PATH:$HOME/.cargo/bin
# SDKMAN CONFIG
export SDKMAN_DIR="/home/useit015/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
# GIT
alias g="git"
alias ga='git add'
alias gm='git commit'
alias gst='git status'
alias glo='git log --oneline'
# NPM
alias npdev="npm run start:dev"
alias npprod="NODE_ENV=production npm run start:prod"
# VARIABLES
export PEER="$HOME/Desktop/peer"
export PEER_BACK="$PEER/peer_backend"
export PEER_FRONT="$PEER/peer_frontend"
export FLUTTER_HOME="$HOME/dev/flutter"
export DENO_INSTALL="$HOME/.deno"
export EDITOR="/usr/bin/vim"
# PATH
export PATH="$DENO_INSTALL/bin:$FLUTTER_HOME/bin:$PATH"
# FUNCS
function PEER_DB() {
sudo systemctl start mongod
sudo systemctl start redis
}
function PEER_CLIENT_DEV() {
(
cd $PEER_BACK &&
npdev
)
}
function PEER_CLIENT_PROD() {
(
cd $PEER_BACK &&
npm run build &&
npprod
)
}
function depl() {
PEER="/var/www/html/hello/backend-server/peer_backend"
CMD="cd $PEER && git pull && npm i && npm run build && pm2 startOrRestart $PEER/ecosystem.config.js --env development && pm2 save"
ssh [email protected] $CMD
}
# clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment