Commit 2cceb393 authored by 胡小根's avatar 胡小根

coding

parent 833946a1
# 毫末科技.zshrc配置
gitapp() {
git add . && git commit -m "coding" && git pull && git push
}
gitacpp(){
git add . && git commit -m "$1" && git pull && git push
}
killp(){
kill -9 `ps -ef|grep -v grep|grep "$1"|awk '{print $1}'`
}
initp() {
git clone git@115.28.80.125:templates/projectfiletemplate.git $1
cd $1
git remote remove origin
rm -rf .git
git init && git add . && git commit -m "init"
}
initdoc() {
git clone ssh://git@gitlab.haomo-studio.com:15822/ProjectDocs/ProjectDocTemplate.git $1
cd $1
git remote remove origin
rm -rf .git
git init && git add . && git commit -m "init"
}
db() {
docker exec -it $1 /bin/bash
}
dbr() {
docker exec -u root -it $1 /bin/bash
}
# 默认推送到公司的阿里云仓库
dcp () {
docker commit $1 $2
docker tag $2 registry.cn-beijing.aliyuncs.com/haomo/$2:$3
docker push registry.cn-beijing.aliyuncs.com/haomo/$2:$3
}
dcud() {
docker-compose up -d
}
dcd() {
docker-compose down
}
dip() {
docker inspect $1|grep IPAddress
}
tat() {
tmux attach -t $1
}
tns() {
tmux new -s $1
}
netls() {
netstat -plant|grep LISTEN
}
alias chrome-cors='open -a "Google Chrome" --args --disable-web-security'
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
PROMPT='%(!.%{%F{yellow}%}.)$USER@%{$fg[white]%}%M %{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
#!/bin/bash
# 普通用户开启docker权限
sudo groupadd docker
sudo gpasswd -a ${USER} docker
sudo service docker restart
sudo chmod a+rw /var/run/docker.sock
#!/bin/bash
# 启用nginx location路径密码
echo -n "$1:" >> $3/.htpasswd
openssl passwd -apr1 >> $3/.htpasswd
cat $3/.htpasswd
apt-get install apache2-utils
htpasswd -c $3/.htpasswd $1 $2
cat $3/.htpasswd
echo "请在nginx的配置文件的location中增加两行:\nauth_basic \"请找UI负责人授权\";\nauth_basic_user_file /etc/nginx/.htpasswd;"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment