Last active
July 18, 2019 02:28
-
-
Save danielnass/4d7d60869b3e0c9cd48a0975afbe80cc to your computer and use it in GitHub Desktop.
bash profile
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
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion | |
if [ -f "/usr/local/opt/bash-git-prompt/share/gitprompt.sh" ]; then | |
__GIT_PROMPT_DIR="/usr/local/opt/bash-git-prompt/share" | |
source "/usr/local/opt/bash-git-prompt/share/gitprompt.sh" | |
fi | |
whoami() { | |
echo -e "\nYou are logged on ${RED}$HOST" | |
echo -e "\nAdditionnal information:$NC " ; uname -a | |
echo -e "\n${RED}Users logged on:$NC " ; w -h | |
echo -e "\n${RED}Current date :$NC " ; date | |
echo -e "\n${RED}Machine stats :$NC " ; uptime | |
echo -e "\n${RED}Current network location :$NC " ; scselect | |
echo -e "\n${RED}Public facing IP Address :$NC " ;myip | |
} | |
# IO | |
alias ll='ls -laF ${colorflag}' | |
alias ls='ls -la ${colorFlag}' | |
# Git | |
alias g='git' | |
alias gck='git checkout' | |
alias gs='git status' | |
alias gc='git commit' | |
alias gcm='git commit -m ' | |
alias gl='git log --all --decorate --oneline --graph' | |
alias gp='git push' | |
alias gpl='git pull' | |
alias gd='git diff --color-words --color' | |
alias ga='git add' | |
alias gf='git fetch --all' | |
alias gbpurge='git branch --merged | grep -v "\*" | grep -v "master" | grep -v "sandbox" | grep -v "master-litb" | grep -v "master-newcheckout" | xargs -n 1 git branch -d' | |
alias gca='git commit --amend --no-edit' | |
alias grb='git pull origin master --rebase' | |
# Docker | |
alias dk='docker' | |
alias dc='docker-compose' | |
alias dcu='docker-compose up' | |
alias dkstop='docker stop $(docker ps -qa)' | |
alias dkclean='docker rm $(docker ps -qa --no-trunc --filter "status=exited")' | |
dke() { | |
docker exec -ti $1 bash | |
} | |
# Homebrew | |
alias brew-diag='brew doctor && brew missing' | |
alias brew-wash='brew update && brew upgrade && brew cleanup -s && brew cask cleanup && brew-diag' | |
#NPM | |
alias ni='npm install' | |
nr() { | |
npm run $1 | |
} | |
nid() { | |
npm install -D $1 | |
} | |
nig() { | |
npm install -g $1 | |
} | |
movtogif() { | |
ffmpeg -i "$1" -vf scale=800:-1 -r 10 -f image2pipe -vcodec ppm - |\ | |
convert -delay 5 -layers Optimize -loop 0 - "${1%.*}.gif" | |
} | |
export PATH="/usr/local/sbin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Before using movtogif, install brew in your mac, then in the terminal run:
brew update
brew install ffmpeg
brew install imagemagick