my-config

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118


alias workspace='cd /Users/thh/workspace'
alias sha='shasum -a 256 '
alias untar='tar -zxvf '
alias vi='vim'
alias wget='wget -c '
alias ipi='ifconfig getifaddr en0'
alias ipe='curl ipinfo.io/ip'
alias c='clear'
alias cls='clear'
alias ipe='curl ipinfo.io/ip'
alias ipi='ifconfig getifaddr en0'
alias ping='ping -c 5'
alias sha='shasum -a 256 '
#alias phpstan='~/tools/vendor/bin/phpstan'
alias rphpstan='phpstan analyse --error-format table -c ~/tools/phpstan.neon'
alias needpwd=' openssl rand -base64 16'
alias showip='cat /etc/resolv.conf'
hello(){
echo "\n"
echo "needpwd\n"
echo "ii\n"
echo "showip\n"
echo "gitcbr\n"
}
gitcbr()
{
$1
git checkout -b $1 origin/$1
}
gitpp()
{
$1
git push origin $1:$1
}

alias upsource="source ~/.zshrc"
alias hosts='code /etc/hosts'
alias phpunit='./vendor/bin/phpunit'

cddr()
{
echo $1
case $1 in
php71 )
docker exec -it php-71 /bin/zsh
;;
p71 )
docker exec -it php-71 /bin/zsh
;;
php72 )
docker exec -it php-72 /bin/zsh
;;
p72 )
docker exec -it php-72 /bin/zsh
;;
php )
docker exec -it php-super /bin/zsh
;;
p )
docker exec -it php-super /bin/zsh
;;
nginx)
docker exec -it nginx /bin/sh
;;
ng)
docker exec -it nginx /bin/sh
;;
php8)
docker exec -it php-80 /bin/zsh
;;
p8)
docker exec -it php-80 /bin/zsh
;;
n)
docker exec -it nginx bash
;;
esac
}

upngconfig(){
docker exec nginx nginx -s reload
}


pdate()
{
php -r 'echo date("Y-m-d H:i:s",time()).PHP_EOL;'
}

ptime()
{
php -r 'echo time();'
}

source ~/.bash_profile

gitsetp()
{
git config --global http.proxy 'http://127.0.0.1:11000'
git config --global https.proxy 'http://127.0.0.1:11000'
}

gitunsetp()
{
git config --global --unset http.proxy
git config --global --unset https.proxy
}

# export PATH=$PATH:/Users/thh/go/bin
# export PATH=$PATH:/Users/thh/.local/platform-tools
# export PATH=$PATH:/Users/thh/.local/bin
# export MAVEN_HOME=/Users/thh/.local/apache-maven-3.8.1
# export PATH=$PATH:$MAVEN_HOME/bin
# export PATH="/opt/homebrew/opt/php@7.4/bin:$PATH"
# export PATH="/opt/homebrew/opt/php@7.4/sbin:$PATH"
# export PATH="/opt/homebrew/opt/node@12/bin:$PATH"