Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GitLabSnippets
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PublicGroup
GitLabSnippets
Commits
2cceb393
Commit
2cceb393
authored
May 13, 2019
by
胡小根
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding
parent
833946a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
0 deletions
+88
-0
.zshrc
.zshrc
+73
-0
enable_docker_for_user.sh
enable_docker_for_user.sh
+6
-0
enable_nginx_auth.sh
enable_nginx_auth.sh
+9
-0
No files found.
.zshrc
0 → 100644
View file @
2cceb393
# 毫末科技.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%}'
enable_docker_for_user.sh
0 → 100644
View file @
2cceb393
#!/bin/bash
# 普通用户开启docker权限
sudo
groupadd docker
sudo
gpasswd
-a
${
USER
}
docker
sudo
service docker restart
sudo chmod
a+rw /var/run/docker.sock
enable_nginx_auth.sh
0 → 100644
View file @
2cceb393
#!/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中增加两行:
\n
auth_basic
\"
请找UI负责人授权
\"
;
\n
auth_basic_user_file /etc/nginx/.htpasswd;"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment