杂七杂八的笔记

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
说明:
第一行:设置成命令行模式,设置完成后代码高亮会消失;
第二行:设置代码高亮。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值