Posts

  • go mod 使用私有仓库

    使用 go env 配置私有仓库地址 go env -w GOPRIVATE=gitlab.test.com 如果私有仓库是 http 的,使用以下命令 go env -w GOINSECURE=gitlab.test.com 使用 git config 替换拉取地址 git config --global url."http://user:pass@gitlab.test.com/".insteadOf "http://gitlab.test.com/"
  • 使用 frp 将请求转发到内网的 https

    问题 使用 frps 转发 https,在 nginx 中这样配置是不起作用的。 proxy_pass https://127.0.0.1:7043 因为对于 SSL, frps 无法获取 hostname,即使设置了 proxy_set_header Host $host; 可以设置 proxy_ssl_name,使 frps 可以识别正确的 host 解决方案 frps.toml bindPort = 7000 auth.token = "123456" vhostHT...
  • 学习方法

    遗忘曲线 https://baike.baidu.com/item/遗忘曲线 番茄工作法 https://baike.baidu.com/item/番茄工作法/6353502 Articles 【TED】 Josh Kaufman:20小时学习法则(The First 20 Hours):https://mp.weixin.qq.com/s/Pmd5P_DCKEPm084ZZ4b8TA
  • robots 协议

    robots协议也称爬虫协议、爬虫规则等 robots协议并不是一个规范,而只是约定俗成的,所以并不能保证网站的隐私。 robots协议:https://baike..com/item/robots协议 示例 https://baike.baidu.com/robots.txt https://www.baidu.com/robots.txt Refrences https://baike.baidu.com/item/robots协议
  • 解决 idea CPU 占用过高的问题

    可以通过查看idea自带的监控来观测是什么进程占用了CPU资源 Help » Diagnostic Tools » Activity Monitor JIT 导致CPU占用过高 修改 idea.vmoptions 文件 #-Xms128m #-Xmx750m -XX:ReservedCodeCacheSize=512m -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=50 #-XX:CICompilerCount=2 -XX:+HeapDumpOn...
  • Midjourney prompt 怎么写?

    https://blog.csdn.net/weixin_39679367/article/details/129929657 Midojourney Prompt Helper: https://promptfolder.com/midjourney-prompt-helper/
  • 限制用户访问父级目录

    将父级目录权限设置为 771 子目录 拥有者用户组给用户
  • proc

    $ ls /proc 1 12850 174 24 3574 569 604 8833 cpuinfo interrupts kpagecount pagetypeinfo sysrq-trigger 10 12972 175 25 4 570 606 9 crypto iomem kpageflags partitions sysvipc 107 12978 18 255 445...
  • 配置 git 服务仓库

    服务端: $ groupadd git $ useradd git -M -g git -s /sbin/nologin $ mkdir -p /data/git $ cd /data/git $ git init --bare testrepo.git useradd -s 指定用户登录后使用的shell useradd -M not create home 不创建home目录 客户端: $ git clone root@aliyun:/data/git/testrepo.g...
  • 批量修改权限

    find -type d|xargs chmod 755 find -type f|xargs chmod 644 上面这个命令如果碰到带有空格的文件名会出错 find . -type d -exec chmod -fv 755 {} \; find . -type f -exec chmod -fv 644 {} \; https://askubuntu.com/questions/604489/what-are-the-default-permissions-of-direc...