Skip to content

Instantly share code, notes, and snippets.

@pritdeveloper
Last active October 8, 2019 22:50
Show Gist options
  • Save pritdeveloper/2c67911b93387b307af7ce05adb12a6b to your computer and use it in GitHub Desktop.
Save pritdeveloper/2c67911b93387b307af7ce05adb12a6b to your computer and use it in GitHub Desktop.
# common
alias ls='ls --color=auto -F'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias less="less -R "
alias ..="cd ../"
# utils
alias sip='curl ifconfig.me'
# file edit
alias ae='sudo vi ~/.bash_aliases'
alias be='sudo vi ~/.bashrc'
alias acon='sudo vi /etc/apache2/sites-enabled/000-default.conf'
alias gcon='sudo vi ~/.gitconfig'
# git
alias gs='git status'
alias gc='git commit'
alias gd='git diff'
alias gds='git diff --staged'
alias gdc='git diff --color-words'
alias ga='git add'
alias gaa='git add -A'
alias gp='git pull'
alias gpu='git push'
alias gr='git reset'
alias grh='git reset --hard'
# ssh keys
alias ggk='ssh-keygen -t rsa -C ""'
alias gsk='cat ~/.ssh/id_rsa.pub'
# installs
alias ugi='sudo npm install -g ungit'
alias pmai='sudo apt install phpmyadmin -y'
# software use
alias ug='ungit --port 8081'
alias sr='sudo service apache2 restart && sudo service mysql restart'
alias sst='sudo service apache2 stop && sudo service mysql stop'
alias ss='sudo systemctl status apache2'
alias srg='sudo service apache2 restart && sudo service mysql restart && ungit --port 8081'
alias desite='sudo a2dissite 000-default.conf && sudo a2ensite 000-default.conf'
# helpers
alias clrd='sudo rm -rf .[!.]* ..?* && sudo rm -rf ./*'
# web installs
alias wpi='sudo rm -rf .[!.]* ..?* && sudo rm -rf ./* && wget --no-check-certificate -O wp.zip https://wordpress.org/latest.zip && unzip wp.zip && rm -rf wp.zip && mv wordpress/* ./ && rm -rf wordpress/'
alias wci='cd wp-content/plugins/ && rm -rf woocommerce/ && mkdir woocommerce && cd woocommerce && wget --no-check-certificate -O wc.zip https://downloads.wordpress.org/plugin/woocommerce.zip && unzip wc.zip && rm wc.zip && mv woocommerce/* ./ && rm -rf woocommerce/ && cd ../../../'
alias lri='sudo rm -rf .[!.]* ..?* && sudo rm -rf ./* && composer create-project --prefer-dist laravel/laravel ./'
alias cii='sudo rm -rf .[!.]* ..?* && sudo rm -rf ./* && wget --no-check-certificate -O ci.zip https://github.com/bcit-ci/CodeIgniter/archive/develop.zip && unzip ci.zip && rm ci.zip && mv CodeIgniter-develop/* ./ && rm -rf CodeIgniter-develop/'
alias cki='sudo rm -rf .[!.]* ..?* && sudo rm -rf ./* && composer create-project --prefer-dist cakephp/app ./'
alias yii='sudo rm -rf .[!.]* ..?* && sudo rm -rf ./* && composer create-project --prefer-dist yiisoft/yii2-app-basic ./'
# navigation
alias plg='cd /projects/project/wp-content/plugins/'
alias thm='cd /projects/project/wp-content/themes/'
alias ws='cd /projects/project'
alias proj='cd /projects/project'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment