mysql 表id 清零命令:
truncate table 你的表名
postgres表id 清零命令:
Truncate table “表名” RESTART IDENTITY CASCADE;
git操作
# 能够将所有未提交的修改(工作区和暂存区)保存至堆栈中,用于后续恢复当前工作目录。
git stash
# 删除一些没有 git add 的文件:
git clean -d -fx
vue element ui 使用click:
@click.native=" function"
docker 容器中文乱码
临时更改:
export LANG="en_US.UTF-8"
source /etc/profile
永久更改:
cd ~
vi .bashrc
export LANG="C.UTF-8"
source ~/.bashrc
nginx 部署项目只能访问根目录
修改nginx.conf配置文件,在server结构下的location的结构下,添加 try_files $uri $uri/ /index.html; ,之后重启nginx即可
vim /etc/nginx/conf.d/default.conf
server {
listen 80;
listen [::]:80;
server_name localhost;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
git提交 上传命令:
git remote set-url origin https://<your_token>@github.com/<USERNAME>/<REPO>.git
例子:
git remote set-url origin https://ghp_pLMYRVb1H6DA4cUMfuTMTkKqSzAosssdam11IRShW@github.com/yutu-75/chart_analysis.git
xshell无法在vim中用鼠标复制黏贴
编辑文件(默认没有这个文件)
vim ~/.vimrc
set mouse=c
syntax on
说明:
第一行:设置成命令行模式,设置完成后代码高亮会消失;
第二行:设置代码高亮。