Skip to content

Instantly share code, notes, and snippets.

@SimoneStefani

SimoneStefani/.bash_rc

Last active Apr 2, 2019
Embed
What would you like to do?
###################
# COMMAND ALIASES #
###################
# Open file with Sublime Text
subl () {
open -a "Sublime Text" $@
}
# Open file or folder with Visual Studio Code
vsc () {
open -a "Visual Studio Code" $@
}
# Clear command alias
alias cl='clear'
# Watch a Git graph
alias logloop='while :; do cl; git lol; sleep 1; done'
alias statusloop='while :; do cl; git st; sleep 1; done'
# Start PostgreSQL
alias postgres='postgres -D /usr/local/var/postgres'
# Start & Stop PGSQL
alias psqlstart='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start'
alias psqlstop='pg_ctl -D /usr/local/var/postgres stop -s -m fast'
# Run PHPUnit
alias phpunit='./vendor/bin/phpunit'
# Git reset
alias nah='git reset --hard && git clean -f -d'
# Run Python 3 as default
alias python=python3
########################
# PROMPT CONFIGURATION #
########################
# Custom prompt
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[34m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
#export PS1="\u@kth \[\033[34m\]\w\[\033[00m\] $ "
##################
# EXPORT TO PATH #
##################
# Path for PHP 7.0
export PATH=/usr/local/php5/bin:$PATH
# Path for Laravel
export PATH=~/.composer/vendor/bin:$PATH
# Path for Rebar
export PATH=/usr/local/rebar/rebar:$PATH
# Path for Go
export PATH=/usr/local/opt/go/libexec/bin:$PATH
######################
# HOMESTEAD COMMANDS #
######################
# Login into Homestead VM though SSH
alias vm='cd ~/Homestead/ && vagrant ssh && cd -'
# Reload Vagrant VM
alias vr='cd ~/Homestead/ && vagrant reload && cd -'
# Suspend Vagrant VM
alias vs='cd ~/Homestead/ && vagrant suspend && cd -'
# Start Vagrant VM
alias vu='cd ~/Homestead/ && vagrant up && cd -'
##################
# GIT COMPLETION #
##################
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
# Ruby RVM
source ~/.rvm/scripts/rvm
@networkspyghana

This comment has been minimized.

Copy link

@networkspyghana networkspyghana commented Apr 2, 2019

hi have seen ur aes encryption in java please how can i encrypte with php with s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment