Skip to content

Instantly share code, notes, and snippets.

@z9gmoon
Last active October 3, 2018 10:00
Show Gist options
  • Save z9gmoon/99a96c61becf6a3fd5a0c9e4d6aa3bd6 to your computer and use it in GitHub Desktop.
Save z9gmoon/99a96c61becf6a3fd5a0c9e4d6aa3bd6 to your computer and use it in GitHub Desktop.
ubuntu config
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
# if [ "$color_prompt" = yes ]; then
# PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\] $(parse_git_branch)\[\033[00m\]\$ '
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;33m\] $(parse_git_branch)\[\033[00m\]\$ '
# else
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
# fi
# end change
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
---------------new
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
parse_git_tag() {
git describe --tag --abbrev=0 2> /dev/null | sed -e 's/\(.*\)/(\1)/'
}
# if [ "$color_prompt" = yes ]; then
# PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\] $(parse_git_branch)\[\033[00m\]\$ '
# PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;33m\] $(parse_git_branch)\[\033[00m\]\$ '
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;33m\] $(parse_git_branch)\e[35m$(parse_git_tag)\[\033[00m\] \$ '
# else
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
# fi
# end change
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
window.onload = function(){
document.getElementById('js-flash-container').remove();
192.168.10.10 site1.test
192.168.10.10 homestead.test
192.168.10.10 lara1.test
192.168.10.10 clinic.test
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
# - map: ~/code
# to: /home/vagrant/code
- map: /home/long/Workspace/LaravelBox/site1
to: /home/vagrant/code/site1
- map: /home/long/Workspace/LaravelBox/lara1
to: /home/vagrant/code/lara1
- map: /home/long/Workspace/LaravelBox/clinic
to: /home/vagrant/code/clinic
- map: /home/long/Workspace/LaravelBox/testFolder
to: /home/vagrant/code/testFolder
sites:
# - map: homestead.test
# to: /home/vagrant/code/public
- map: site1.test
to: /home/vagrant/code/site1/controller
- map: clinic.test
to: /home/vagrant/code/clinic/public
- map: lara1.test
to: /home/vagrant/code/lara1/public
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
git (lastest git)(config user)
apt update, upgrade (ibus) (chrome,slack,vscode(sync config)) (.bashrc)
install php, mysql-workbench,composer (set bin folder global)
homestead (v6.3, tag 7.17.0), virtualBox 5.2, vagrant 2.1.15
config homestead yaml, hosts
copy src
window.onload = function(){
document.getElementById('js-flash-container').remove();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment