-
-
Save shadyonline/096ffbe36af230be09bc6a48c3a95b53 to your computer and use it in GitHub Desktop.
simple zshrc config file with Oh-My-ZSH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="[email protected]" | |
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 "[email protected]" | |
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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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