Skip to content

Instantly share code, notes, and snippets.

@absk1317
Forked from veggiemonk/.gitconfig
Created August 25, 2019 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save absk1317/d8aeac4a0771110c80823de2bbd4ebf6 to your computer and use it in GitHub Desktop.
Save absk1317/d8aeac4a0771110c80823de2bbd4ebf6 to your computer and use it in GitHub Desktop.
simple zshrc config file with Oh-My-ZSH
[user]
name = Julien Bisconti
email = ******
[core]
excludesfile = ~/.gitignore
pager = diff-so-fancy | less --tabs=1,5 -R
editor = /usr/bin/vim
[alias]
wow = log --all --graph --decorate --oneline --simplify-by-decoration
[color]
ui = always
[color "diff"]
meta = yellow bold
commit = green bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = "red bold 52"
newNormal = "green bold"
newHighlight = "green bold 22"
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "status"]
added = yellow
changed = green
untracked = cyan
export PATH=$HOME/bin:/usr/local/bin:$PATH
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="robbyrussell"
plugins=(git tig docker docker-compose golang pip)
plugins+=( history history-substring-search httpie sudo vagrant postgres )
plugins+=( osx lein node npm jump gulp mosh )
plugins+=( k z alias-tips zsh-completions almostontop zsh-autosuggestions )
plugins+=( zsh-syntax-highlighting )
source $ZSH/oh-my-zsh.sh
## ALIAS
alias c="clear"
alias ez="vi $HOME/.zshrc"
alias server="python -m SimpleHTTPServer"
alias socks="ssh -vND 8888 kim"
alias dpsa="docker ps -a"
alias dcup="docker-compose up"
alias dcupd="docker-compose up -d"
## GIT
GIT_AUTHOR_NAME="Julien Bisconti"
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="julienbi@unity3d.com"
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"
# Set a default editor to avoid "Could not execute editor" error
#git config --global core.editor "/usr/bin/vim"
## NPM
npm set init.author.email "julienbi@unity3d.com"
npm set init.author.name "Julien Bisconti"
npm set init.license "MIT"
##### EXPORT
# Node.JS
#export PATH="$PATH:`yarn global bin`"
## JAVA / CLOJURE
export JAVA_HOME=$(/usr/libexec/java_home)
export M2=$HOME/.m2
export PATH=$PATH:$M2
## GO
export GOPATH=$HOME/code/golang
export PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
## PURE
autoload -U promptinit; promptinit
prompt pure
# Make zsh know about hosts already accessed by SSH
zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })'
## CUSTOM FUNCTIONS
# Create a new directory and enter it
function mkd() {
mkdir -p "$@" && cd "$_";
}
function mdt() {
markdown "$*" | lynx -stdin
}
function mdb() {
local TMPFILE=$(mktemp)
markdown "$*" > $TMPFILE && ( xdg-open $TMPFILE > /dev/null 2>&1 & )
}
# Git clone + npm install
function gcn {
url=$1;
if [ -n "${1}" ]; then
echo 'OK'
else
echo 'Koooooooooooooooo'
fi
cd ~/code;
reponame=$(echo $url | awk -F/ '{print $NF}' | sed -e 's/.git$//');
git clone $url $reponame;
cd $reponame;
npm install;
}
#!/usr/bin/env bash
# ask for password before all the scripts
sudo echo "ask for password before all the scripts"
# install homebrew
/usr/bin/ruby -e "(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install oh-my-zsh
brew install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# set .zshrc
wget -O $HOME/.zshrc https://gist.githubusercontent.com/veggiemonk/f7dc67b05400905973e2db050dffd05b/raw/433d43edc07339c181b20b83406d1f5053583688/.zshrc
# install oh-my-zsh plugins
git clone https://github.com/djui/alias-tips.git $HOME/.oh-my-zsh/custom/plugins/alias-tips
git clone https://github.com/supercrabtree/k $HOME/.oh-my-zsh/custom/plugins/k
git clone https://github.com/rupa/z $HOME/.oh-my-zsh/custom/plugins/z
git clone https://github.com/Valiev/almostontop.git $HOME/.oh-my-zsh/custom/plugins/almostontop
git clone https://github.com/zsh-users/zsh-completions $HOME/.oh-my-zsh/custom/plugins/zsh-completions
git clone https://github.com/zsh-users/zsh-syntax-highlighting $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions
## Some utils
brew install coreutils findutils wget curl tree tig git socat ssh-copy-id htop mosh rlwrap maven httpie pv
brew tap caskroom/cask
## Some apps
brew cask install java visual-studio-code google-chrome docker virtualbox vagrant vagrant-manager the-unarchiver
# setup dev env
mkdir -p $HOME/code
# node.js
git clone https://github.com/tj/n.git $HOME/code/n
cd $HOME/code/n && make install
sudo chown -R $USER /usr/local # Not secure if on a server
n lts
# pure prompt & other goodies
npm install -g pure-prompt browser-sync eslint diff-so-fancy ntl ghwd
## MAC CLI
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/guarinogabriel/mac-cli/master/mac-cli/tools/install)"
## FONTS
brew tap caskroom/fonts
brew cask install font-fira-code
git clone https://github.com/powerline/fonts.git $HOME/code/fonts
cd $HOME/code/fonts && ./install.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment