<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>其他 on Two Tigers Engineering</title>
    <link>https://blog.twotigers.xyz/series/%E5%85%B6%E4%BB%96/</link>
    <description>Recent content in 其他 on Two Tigers Engineering</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 12 Feb 2023 22:00:08 +0800</lastBuildDate><atom:link href="https://blog.twotigers.xyz/series/%E5%85%B6%E4%BB%96/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>caddy</title>
      <link>https://blog.twotigers.xyz/posts/caddy/</link>
      <pubDate>Sun, 12 Feb 2023 22:00:08 +0800</pubDate>
      
      <guid>https://blog.twotigers.xyz/posts/caddy/</guid>
      <description>caddy 是什么 golang 编写的反向代理服务器, 并提供了很多的插件, 可以自动注册 https 证书, 对懒人极度友好
版本选择 目前分为 v1, v2 两个版本, 本人迁移发现 v1,v2 版本并不兼容(Caddyfile), 建议使用 V2 版本, 但是目前中文教程里面使用 v1 版本的还是有很多 v1 版本密码认证是明文, v2 是一个 hash 后的密文
下载 &amp;amp;&amp;amp; 安装 下载 在很早的时候 caddy 跟 cloudflare 不太兼容, 会导致无法注册 https 证书, 虽然概率不高, 但是遇见了就比较蛋疼, 建议选择上 caddy-dns/cloudflare 插件 安装 下载完二进制文件后, 建议配置 systemd, 参考 官方文档 以下是我自己使用的配置文件, 大家可以参考下
# caddy.service # # For using Caddy with a config file. # # Make sure the ExecStart and ExecReload commands are correct # for your installation.</description>
    </item>
    
    <item>
      <title>常用 git 命令</title>
      <link>https://blog.twotigers.xyz/posts/git/command/</link>
      <pubDate>Tue, 19 Oct 2021 10:40:25 +0800</pubDate>
      
      <guid>https://blog.twotigers.xyz/posts/git/command/</guid>
      <description>git log -p | grep &amp;#39;xxx&amp;#39; -B 300 // 查询修改历史 git push origin branch_name // 推送 git commit -m &amp;#34;commit_message&amp;#34; // 提交 commit git add -A . // add 文件 </description>
    </item>
    
    <item>
      <title>Vaultwarden 搭建</title>
      <link>https://blog.twotigers.xyz/posts/blog/vaultwarden/</link>
      <pubDate>Mon, 11 Oct 2021 14:00:08 +0800</pubDate>
      
      <guid>https://blog.twotigers.xyz/posts/blog/vaultwarden/</guid>
      <description>准备 docker nginx/caddy 启动 docker run -d --name vaultwarden -v `pwd`:/data -p 8088:80 vaultwarden/server:latest 此时打开 http://yourhost:8088, 就可以看到页面
配置 在工作目录(即上述执行的目录, 如果 -v 指定了目录, 则为其指定目录)中, 增加一个 config.json 其中 signups_allowed 为是否允许注册, 注册完第一个账号之后建议关闭 admin_token 为 /admin 管理页面的 token, 建议配置完之后将其置空(即不开启 /admin) { &amp;#34;domain&amp;#34;: &amp;#34;http://localhost&amp;#34;, &amp;#34;sends_allowed&amp;#34;: false, &amp;#34;disable_icon_download&amp;#34;: false, &amp;#34;signups_allowed&amp;#34;: true, &amp;#34;signups_verify&amp;#34;: false, &amp;#34;signups_verify_resend_time&amp;#34;: 3600, &amp;#34;signups_verify_resend_limit&amp;#34;: 6, &amp;#34;invitations_allowed&amp;#34;: false, &amp;#34;password_iterations&amp;#34;: 100000, &amp;#34;show_password_hint&amp;#34;: false, &amp;#34;admin_token&amp;#34;: &amp;#34;token&amp;#34;, &amp;#34;invitation_org_name&amp;#34;: &amp;#34;Vaultwarden&amp;#34;, &amp;#34;ip_header&amp;#34;: &amp;#34;X-Real-IP&amp;#34;, &amp;#34;icon_cache_ttl&amp;#34;: 2592000, &amp;#34;icon_cache_negttl&amp;#34;: 259200, &amp;#34;icon_download_timeout&amp;#34;: 10, &amp;#34;icon_blacklist_non_global_ips&amp;#34;: true, &amp;#34;disable_2fa_remember&amp;#34;: false, &amp;#34;authenticator_disable_time_drift&amp;#34;: false, &amp;#34;require_device_email&amp;#34;: false, &amp;#34;reload_templates&amp;#34;: false, &amp;#34;log_timestamp_format&amp;#34;: &amp;#34;%Y-%m-%d %H:%M:%S.</description>
    </item>
    
    <item>
      <title>博客搭建</title>
      <link>https://blog.twotigers.xyz/posts/blog/set_up/</link>
      <pubDate>Sat, 09 Oct 2021 22:00:08 +0800</pubDate>
      
      <guid>https://blog.twotigers.xyz/posts/blog/set_up/</guid>
      <description>准备 hugo github nginx/caddy hugo 注意: 安装 extended 版本, 否则使用第三方主题时会有问题
hugo new site quickstart cd quickstart git clone https://github.com/flysnow-org/maupassant-hugo themes/maupassant echo theme = \&amp;#34;maupassant\&amp;#34; &amp;gt;&amp;gt; config.toml hugo new posts/my-first-post.md // 测试 hugo server -D // 生成静态文件 hugo -D github 创建 repo
设置 webhook
将上面的 quickstart 文件夹整体进行版本管理(其实只管理 content 也行, 要是为了方便换主题, 可以直接搞整个)
在 server 上启动 webhook server eg.
package main import ( &amp;#34;crypto/hmac&amp;#34; &amp;#34;crypto/sha1&amp;#34; &amp;#34;encoding/hex&amp;#34; &amp;#34;fmt&amp;#34; &amp;#34;io/ioutil&amp;#34; &amp;#34;net/http&amp;#34; &amp;#34;os/exec&amp;#34; ) var ( key []byte ) func sha1Data(data []byte) string { h := hmac.</description>
    </item>
    
  </channel>
</rss>
