Skip to content

Instantly share code, notes, and snippets.

@kn9ts
Created September 15, 2016 20:04
Show Gist options
  • Save kn9ts/6ae3086e24f10503b9cd522134d82cd5 to your computer and use it in GitHub Desktop.
Save kn9ts/6ae3086e24f10503b9cd522134d82cd5 to your computer and use it in GitHub Desktop.
.eugene_mutai.bash
# alias hub (installed with brew to sugar up git) as git
alias git=hub
# sublime aliasing
alias sb=subl
# ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
# other good aliases
alias sites='cd ~/Sites'
alias play="cd ~/Development/playground"
alias andela="cd ~/Development/andela"
alias vitumob="cd ~/Development/vitumob"
alias pylab="cd ~/Development/python-projects"
alias phplab="cd Development/php-projects"
alias ssdir='cd Development/php-projects/silverstripe'
alias frodo="cd ~/Go/src/github.com/kn9ts/frodo"
# SSHES
alias xyz='ssh root@lab5.xyz'
# git aliases as shortcuts
alias gi="git init"
alias ga='git add'
alias ga-all='git add --all'
alias gstart="git add . && git commit -am \"The journey begins\""
alias gc="git commit -m"
alias gca="git commit -am"
alias gci="git commit -am \"The journey begins\""
alias gcam="git commit --amend"
alias gp='git push'
alias gpo='git push origin'
alias gpu="git push --set-upstream origin"
alias gpd='git push dokku master'
alias gph='git push heroku master'
alias gpom='git pull origin master'
alias gpl='git pull'
alias gf='git fetch'
alias gpp='gpl && gp'
alias gs='git status'
alias gb='git branch -av'
alias gdel='find . -type f | grep -i "\.git" | xargs rm'
alias sshadd='ssh-add ~/.ssh/github'
alias goto="git checkout"
alias master='goto master'
alias staging='goto staging'
alias develop='goto develop'
alias gr="git remote add origin"
alias grv="git remote -v"
alias grs="git remote set-url"
alias gd="git diff"
alias create="git create"
alias rebase="git rebase -i --root"
alias gcl="git clone"
alias gb="git branch -a"
alias gf="git fetch origin"
alias gm="git merge"
alias gra="git rebase --abort"
alias grc="git rebase --continue"
#removing folders from all git commits/pushes
alias grf="git filter-branch --tree-filter" #'rm -rf dist test HEAD
alias d2m="git checkout master && git merge --no-ff develop"
alias m2d="git checkout develop && git merge master"
#simple good logging
alias gl="git log --pretty=oneline"
alias gld='git log --oneline --graph --decorate'
alias gconf="git config -l"
#go to git repo on this branch
alias browse="git browse"
alias b="browse"
alias bfg="java -jar bfg-1.11.1.jar"
# Fast editing of the bash script
alias editz='sb ~/.zshrc'
alias editbash='sb ~/.bash_profile'
alias ee='sb ~/.extra'
function lorem() { lorem-ipsum --units words --count $@ --copy ;}
alias upz="source ~/.zshrc"
alias upbash="source ~/.bash_profile"
alias backupz="del ~/zshrc-backup.txt && cat ~/.zshrc >> ~/zshrc-backup.txt"
alias backupbash="del ~/bash-backup.txt && cat ~/.extra >> ~/bash-backup.txt"
# Create useful .gitignore files for your project
# To run gitignore.io from your command line you need an active internet connection an environment function.
# You need to add a function to your environment that lets you access the gitignore.io API.
function ignore() { curl -L -s https://www.gitignore.io/api/$@ ;}
#create an .gitignore file and fill in my basic rules
alias gitignore="touch .gitignore && ignore node,laravel,bower,justcode,linux,osx,jetbrains,sublimetext,vim,xcode >> .gitignore"
# start a web server using PHP
alias phpserve='php -S localhost:1515'
alias pyserve='python -m SimpleHTTPServer 1515'
function serve() { php -S localhost:$@ ;}
function grm() {
git filter-branch --force --index-filter \'git rm --cached --ignore-unmatch dynamics/rds/instance.rb\' --prune-empty --tag-name-filter cat -- --all
}
# delete files and folders
alias del="rm -rf"
alias fldr="mkdir"
alias cs="composer"
alias here="pwd"
alias whereami=here
# Tired of typing all these I swear everytime!!!
alias ni="npm i"
alias bi="bower install"
alias nibi="ni && bi"
alias np='npm prune'
# Run javascript on the console
alias jsc='/System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Resources/jsc'
# Laravel 4 Generator Stuff
alias art="php artisan"
alias lm="art generate:model"
alias lc="art generate:controller"
alias lv="art generate:view"
alias lseed="art generate:seed"
alias lmig="art generate:migration"
alias lr="art generate:resource"
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g"
alias pswdgen="openssl rand -base64 10"
alias cl="clear"
alias post="curl -i -H \"Content-Type: application/json\" -X POST -d"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment