<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>mail_set的铺子</title>
  
  
  <link href="https://blog.mailset.top/atom.xml" rel="self"/>
  
  <link href="https://blog.mailset.top/"/>
  <updated>2025-11-08T15:49:42.000Z</updated>
  <id>https://blog.mailset.top/</id>
  
  <author>
    <name>mail_set</name>
    
  </author>
  
  <generator uri="https://hexo.io/">Hexo</generator>
  
  <entry>
    <title>时隔一年</title>
    <link href="https://blog.mailset.top/%E6%97%B6%E9%9A%94%E4%B8%80%E5%B9%B4/"/>
    <id>https://blog.mailset.top/%E6%97%B6%E9%9A%94%E4%B8%80%E5%B9%B4/</id>
    <published>2025-11-08T15:40:00.000Z</published>
    <updated>2025-11-08T15:49:42.000Z</updated>
    
    <content type="html"><![CDATA[<p>Hi, 我是 mail_set 也许并没有人看，但是我还是发了</p><h2 id="学业"><a href="#学业" class="headerlink" title="学业"></a>学业</h2><p>初中毕业了，现在顺利进入了县里面的重点高中，学习成绩也还可以，走着看吧</p><p>遇到了很好的老师，当上了班长，我觉得我还挺幸运的，期待三年后的我考上个本科…或许是一本？或许是双一流？或许是211？我也许应该相信自己，但这才高一</p><h2 id="博客"><a href="#博客" class="headerlink" title="博客"></a>博客</h2><p>我的Github账号终于被Github还回来了，挺开心的，所以我还是要把这个博客迁移回Github去</p><h2 id="生活"><a href="#生活" class="headerlink" title="生活"></a>生活</h2><p>搬进了新房子，不用爬楼了</p><p>平常感觉想东西淡然了点吧，也许没以前那么计较了</p><hr><p>刚刚还想起来有一堆可以写的，现在咋就全忘完了？</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;Hi, 我是 mail_set 也许并没有人看，但是我还是发了&lt;/p&gt;
&lt;h2 id=&quot;学业&quot;&gt;&lt;a href=&quot;#学业&quot; class=&quot;headerlink&quot; title=&quot;学业&quot;&gt;&lt;/a&gt;学业&lt;/h2&gt;&lt;p&gt;初中毕业了，现在顺利进入了县里面的重点高中，学习成绩也还可以，</summary>
      
    
    
    
    <category term="日常" scheme="https://blog.mailset.top/categories/%E6%97%A5%E5%B8%B8/"/>
    
    
    <category term="博客" scheme="https://blog.mailset.top/tags/%E5%8D%9A%E5%AE%A2/"/>
    
    <category term="日常" scheme="https://blog.mailset.top/tags/%E6%97%A5%E5%B8%B8/"/>
    
    <category term="闲聊" scheme="https://blog.mailset.top/tags/%E9%97%B2%E8%81%8A/"/>
    
  </entry>
  
  <entry>
    <title>解决淘宝买的1.3寸oled花屏的问题</title>
    <link href="https://blog.mailset.top/%E8%A7%A3%E5%86%B3%E6%B7%98%E5%AE%9D%E4%B9%B0%E7%9A%841-3%E5%AF%B8oled%E8%8A%B1%E5%B1%8F%E7%9A%84%E9%97%AE%E9%A2%98/"/>
    <id>https://blog.mailset.top/%E8%A7%A3%E5%86%B3%E6%B7%98%E5%AE%9D%E4%B9%B0%E7%9A%841-3%E5%AF%B8oled%E8%8A%B1%E5%B1%8F%E7%9A%84%E9%97%AE%E9%A2%98/</id>
    <published>2024-11-18T13:30:00.000Z</published>
    <updated>2024-11-18T13:30:51.000Z</updated>
    
    <content type="html"><![CDATA[<p>最近想玩树莓派Pico了，就在淘宝上买了个便宜的1.3寸oled屏，好像是ssd1315主控，但我找遍全网都没找到能用的micropython的驱动，刚刚终于找着了，作此小纪</p><p>访问这个库 <a href="https://github.com/robert-hh/SH1106">robert-hh&#x2F;sh1106</a> 下载sh1106.py，上传到你的pico上，代码范例：</p><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><code class="hljs python"><span class="hljs-keyword">from</span> machine <span class="hljs-keyword">import</span> Pin, I2C<br><span class="hljs-keyword">from</span> utime <span class="hljs-keyword">import</span> sleep<br><span class="hljs-keyword">import</span> sh1106<br><br>pin = Pin(<span class="hljs-string">&quot;LED&quot;</span>, Pin.OUT)<br><br>i2c = I2C(<span class="hljs-number">0</span>, scl=Pin(<span class="hljs-number">13</span>), sda=Pin(<span class="hljs-number">12</span>))<br><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;I2C device: &quot;</span> + <span class="hljs-built_in">str</span>(i2c.scan()))<br>oled = sh1106.SH1106_I2C(<span class="hljs-number">128</span>,<span class="hljs-number">64</span>,i2c)<br>oled.init_display()<br>oled.poweron()<br>stat = <span class="hljs-number">0</span><br>oled.flip(<span class="hljs-literal">True</span>)<br><span class="hljs-keyword">while</span> <span class="hljs-literal">True</span>:<br>    oled.text(<span class="hljs-string">&quot;I2C:&quot;</span> + <span class="hljs-built_in">str</span>(i2c.scan()),<span class="hljs-number">0</span>,<span class="hljs-number">2</span>)<br>    oled.invert(stat)<br>    oled.show()<br>    stat = <span class="hljs-number">0</span> <span class="hljs-keyword">if</span> stat <span class="hljs-keyword">else</span> <span class="hljs-number">1</span><br>    sleep(<span class="hljs-number">0.5</span>)<br></code></pre></td></tr></table></figure><p>有什么错误欢迎大家指正！</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;最近想玩树莓派Pico了，就在淘宝上买了个便宜的1.3寸oled屏，好像是ssd1315主控，但我找遍全网都没找到能用的micropython的驱动，刚刚终于找着了，作此小纪&lt;/p&gt;
&lt;p&gt;访问这个库 &lt;a href=&quot;https://github.com/robert-h</summary>
      
    
    
    
    
    <category term="技术" scheme="https://blog.mailset.top/tags/%E6%8A%80%E6%9C%AF/"/>
    
    <category term="micropython" scheme="https://blog.mailset.top/tags/micropython/"/>
    
    <category term="树莓派" scheme="https://blog.mailset.top/tags/%E6%A0%91%E8%8E%93%E6%B4%BE/"/>
    
    <category term="树莓派Pico" scheme="https://blog.mailset.top/tags/%E6%A0%91%E8%8E%93%E6%B4%BEPico/"/>
    
    <category term="oled" scheme="https://blog.mailset.top/tags/oled/"/>
    
    <category term="嵌入式" scheme="https://blog.mailset.top/tags/%E5%B5%8C%E5%85%A5%E5%BC%8F/"/>
    
  </entry>
  
  <entry>
    <title>解决git commit -S无法签名的问题</title>
    <link href="https://blog.mailset.top/%E8%A7%A3%E5%86%B3git-commit-S%E6%97%A0%E6%B3%95%E7%AD%BE%E5%90%8D%E7%9A%84%E9%97%AE%E9%A2%98/"/>
    <id>https://blog.mailset.top/%E8%A7%A3%E5%86%B3git-commit-S%E6%97%A0%E6%B3%95%E7%AD%BE%E5%90%8D%E7%9A%84%E9%97%AE%E9%A2%98/</id>
    <published>2024-11-15T16:40:00.000Z</published>
    <updated>2025-11-08T15:33:29.000Z</updated>
    
    <content type="html"><![CDATA[<p>刚刚提交git的时候发现<code>git commit -S</code>卡了很长时间，接着失败了，但是笔者探索出来了一个解决方案</p><p>笔者用的是Windows 11系统，GnuPG版本为<code>2.4.5</code></p><h2 id="现象"><a href="#现象" class="headerlink" title="现象"></a>现象</h2><p>在<code>git commit -S -m &quot;aaa&quot;</code>的时候，会卡住很长时间不动，以往是卡完之后commit成功或者不用卡就成功，但今天失败了，输出如下所示：</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><code class="hljs text">error: gpg failed to sign the data:<br>gpg: can&#x27;t connect to the keyboxd: IPC connect call failed?<br>gpg: error opening key DB: No Keybox daemon running?<br>gpg: skipped &quot;XXX&quot;: Input/output error?<br>[GNUPG:] INV_SGNR 0 XXX?<br>[GNUPG:] FAILURE sign 33587249?<br>gpg: signing failed: Input/output error?<br><br>fatal: failed to write commit object<br></code></pre></td></tr></table></figure><h2 id="解决"><a href="#解决" class="headerlink" title="解决"></a>解决</h2><p>我发现的解决方法很简单，新开一个终端，运行：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">gpg-agent --daemon<br></code></pre></td></tr></table></figure><p>输出：</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs text">gpg-agent[pid]: gpg-agent (GnuPG) 2.4.5 started<br></code></pre></td></tr></table></figure><p>这条命令将会卡住终端，切换到原来的终端上继续commit</p><p>再次commit，成功:</p><figure class="highlight txt"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><code class="hljs txt">[main aaa] aaa<br> n files changed, n insertions(+), n deletions(-)<br> create mode 100644 aaa<br> create mode 100644 bbb<br> create mode 100644 ccc<br></code></pre></td></tr></table></figure><p>解决</p><hr><p>如果有什么疑问或者补充可以在下面评论！感谢支持！</p><hr><p>2025&#x2F;11&#x2F;08 补:<br>第二次试了没用了。</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;刚刚提交git的时候发现&lt;code&gt;git commit -S&lt;/code&gt;卡了很长时间，接着失败了，但是笔者探索出来了一个解决方案&lt;/p&gt;
&lt;p&gt;笔者用的是Windows 11系统，GnuPG版本为&lt;code&gt;2.4.5&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&quot;现象&quot;&gt;&lt;a</summary>
      
    
    
    
    
    <category term="技术" scheme="https://blog.mailset.top/tags/%E6%8A%80%E6%9C%AF/"/>
    
    <category term="代码" scheme="https://blog.mailset.top/tags/%E4%BB%A3%E7%A0%81/"/>
    
  </entry>
  
  <entry>
    <title>把网站所有图片资源迁移为webp格式</title>
    <link href="https://blog.mailset.top/%E6%8A%8A%E7%BD%91%E7%AB%99%E6%89%80%E6%9C%89%E5%9B%BE%E7%89%87%E8%B5%84%E6%BA%90%E8%BF%81%E7%A7%BB%E4%B8%BAwebp%E6%A0%BC%E5%BC%8F/"/>
    <id>https://blog.mailset.top/%E6%8A%8A%E7%BD%91%E7%AB%99%E6%89%80%E6%9C%89%E5%9B%BE%E7%89%87%E8%B5%84%E6%BA%90%E8%BF%81%E7%A7%BB%E4%B8%BAwebp%E6%A0%BC%E5%BC%8F/</id>
    <published>2024-10-25T11:30:00.000Z</published>
    <updated>2024-10-25T13:06:58.000Z</updated>
    
    <content type="html"><![CDATA[<p>本网站从此把所有的需要对外显示的图片资源文件全部转换为webp格式</p><p>我为什么这样做？看完文章你就明白了</p><p>我将会先介绍如何把所有图片资源转为webp格式</p><h2 id="cwebp下载"><a href="#cwebp下载" class="headerlink" title="cwebp下载"></a>cwebp下载</h2><p>cwebp是谷歌官方出品的一款将已有图片转换为webp格式文件的软件，用这个软件可以很方便的将已有的很多格式的图片资源文件转换为webp格式文件</p><p>具体的教程可以看<a href="https://developers.google.cn/speed/webp/docs/cwebp">GoogleDocs&#x2F;https://developers.google.cn/speed/webp/docs/cwebp</a>来了解更加详细的信息</p><p>如果想手动编译的话，可以访问<a href="https://chromium.googlesource.com/webm/libwebp/">GoogleGit&#x2F;https://chromium.googlesource.com/webm/libwebp/</a>来寻找源代码，自行编译</p><p>但是如果不想编译的话，谷歌也提供了现成的编译过的release，访问<a href="https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html">GoogleAPIs&#x2F;https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html</a>来直接下载release</p><p>需要注意的是，要获取最新版本，必须<strong>往下翻到底</strong>才能看到</p><p>文件格式如下所示：</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs text">libwebp-version-os-platform.zip<br></code></pre></td></tr></table></figure><p>或者</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs text">libwebp-version-os-platform.tar.gz<br></code></pre></td></tr></table></figure><p>例如：</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs text">libwebp-1.4.0-windows-x64.zip<br></code></pre></td></tr></table></figure><p>按需要下载自己需要的文件</p><h2 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h2><p>下载之后就需要解压了，压缩包中只有一个目录，我们把他解压出来，解压出来后目录结构大致如下：</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br></pre></td><td class="code"><pre><code class="hljs text">libwebp-1.4.0-windows-x64<br>│  README.md<br>│  test.webp<br>│  test_ref.ppm<br>│<br>├─bin<br>│      anim_diff.exe<br>│      anim_dump.exe<br>│      cwebp.exe<br>│      dwebp.exe<br>│      freeglut.dll<br>│      get_disto.exe<br>│      gif2webp.exe<br>│      img2webp.exe<br>│      vwebp.exe<br>│      webpinfo.exe<br>│      webpmux.exe<br>│      webp_quality.exe<br>│<br>├─doc<br>│      api.md<br>│      tools.md<br>│<br>├─include<br>│  └─webp<br>│          decode.h<br>│          demux.h<br>│          encode.h<br>│          mux.h<br>│          mux_types.h<br>│          types.h<br>│<br>└─lib<br>        libwebp.lib<br>        libwebpdemux.lib<br>        libwebpmux.lib<br></code></pre></td></tr></table></figure><p>我们需要的只是bin目录下的cwebp.exe文件，可以讲bin目录加入进环境变量中，这里不再细讲</p><p>打开控制台，查看是否正常</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">cwebp -version<br></code></pre></td></tr></table></figure><p>输出就像：</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs text">1.4.0<br>libsharpyuv: 0.4.0<br></code></pre></td></tr></table></figure><p>正常使用（有损压缩）用法：</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs shell">cwebp -m [可选，压缩品质(0-6)，数字越大越慢，默认为4] -q &lt;品质(0-100)，数字越大品质越好&gt; ./输入文件 -o ./输出.webp<br><span class="hljs-meta prompt_"># </span><span class="language-bash">例如</span><br>cwebp -m 6 -q 95 ./default.png -o ./default.webp<br></code></pre></td></tr></table></figure><p>一般情况下的输出：</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><code class="hljs text">Saving file &#x27;./default.webp&#x27;<br>File:      ./default.png<br>Dimension: 2338 x 1440<br>Output:    367416 bytes Y-U-V-All-PSNR 49.86 52.49 52.66   50.59 dB<br>           (0.87 bpp)<br>block count:  intra4:      12127  (91.66%)<br>              intra16:      1103  (8.34%)<br>              skipped:        26  (0.20%)<br>bytes used:  header:            586  (0.2%)<br>             mode-partition:  52214  (14.2%)<br> Residuals bytes  |segment 1|segment 2|segment 3|segment 4|  total<br>    macroblocks:  |       1%|       5%|      18%|      77%|   13230<br>      quantizer:  |       6 |       6 |       5 |       4 |<br>   filter level:  |       2 |       0 |       0 |       9 |<br></code></pre></td></tr></table></figure><p>想要无损压缩的也可以，用法：</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs shell">cwebp -lossless ./输入文件 -o ./输出.webp<br><span class="hljs-meta prompt_"># </span><span class="language-bash">例如</span><br>cwebp -lossless ./default.png -o ./default.webp<br></code></pre></td></tr></table></figure><p>一般情况下的输出</p><figure class="highlight text"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><code class="hljs text">Saving file &#x27;./default.webp&#x27;<br>File:      ./default.png<br>Dimension: 350 x 350<br>Output:    11240 bytes (0.73 bpp)<br>Lossless-ARGB compressed size: 11240 bytes<br>  * Header size: 1337 bytes, image data size: 9878<br>  * Lossless features used: PREDICTION CROSS-COLOR-TRANSFORM SUBTRACT-GREEN<br>  * Precision Bits: histogram=3 transform=3 cache=0<br></code></pre></td></tr></table></figure><p>压缩后可以使用vwebp查看是否编码正确，用法：</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">vwebp ./输出.webp<br></code></pre></td></tr></table></figure><p>运行后会弹出一个窗口，显示的是当前图片编码后的样式</p><h2 id="为什么用webp"><a href="#为什么用webp" class="headerlink" title="为什么用webp"></a>为什么用webp</h2><p>回到开头，我为什么要用webp而不用传统的png&#x2F;jpg之类的格式呢？</p><p>有一个最大的好处，就是“小”</p><p>例如这个文章的头图，也就是网站的主图，压缩前的大小为3.26MB，而经过95品质的压缩后，大小来到了惊人的<br><strong>358KB</strong><br>即使是使用了无损压缩格式，压缩后也只有<strong>2.4MB</strong>左右</p><p>这样不但可以加快访问速度，还能省下不少的带宽，要知道Vercel免费计划每月为100GB，网站肯定是越精简越好的</p><p>所以你还有什么理由不用webp格式的图片呢</p><hr><p>感谢您阅读此文章，如果有什么不对的地方欢迎再评论区纠正！</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;本网站从此把所有的需要对外显示的图片资源文件全部转换为webp格式&lt;/p&gt;
&lt;p&gt;我为什么这样做？看完文章你就明白了&lt;/p&gt;
&lt;p&gt;我将会先介绍如何把所有图片资源转为webp格式&lt;/p&gt;
&lt;h2 id=&quot;cwebp下载&quot;&gt;&lt;a href=&quot;#cwebp下载&quot; class=&quot;</summary>
      
    
    
    
    <category term="博客" scheme="https://blog.mailset.top/categories/%E5%8D%9A%E5%AE%A2/"/>
    
    
    <category term="技术" scheme="https://blog.mailset.top/tags/%E6%8A%80%E6%9C%AF/"/>
    
    <category term="博客" scheme="https://blog.mailset.top/tags/%E5%8D%9A%E5%AE%A2/"/>
    
  </entry>
  
  <entry>
    <title>网站似乎有点不一样了</title>
    <link href="https://blog.mailset.top/%E7%BD%91%E7%AB%99%E4%BC%BC%E4%B9%8E%E6%9C%89%E7%82%B9%E4%B8%8D%E4%B8%80%E6%A0%B7%E4%BA%86/"/>
    <id>https://blog.mailset.top/%E7%BD%91%E7%AB%99%E4%BC%BC%E4%B9%8E%E6%9C%89%E7%82%B9%E4%B8%8D%E4%B8%80%E6%A0%B7%E4%BA%86/</id>
    <published>2024-10-19T07:32:31.000Z</published>
    <updated>2024-10-25T11:43:27.000Z</updated>
    
    <content type="html"><![CDATA[<p>我现在更新了博客，原因是半年前删Linux的时候没备份，不小心把老博客给删了。。。</p><p>关于内容的话我会尽量充实的，谢谢大家了（</p><p>现在大家看到的这篇文章以前的内容，都是我从我知乎上同时发布的文章里回复下来的，希望能帮到你（</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;我现在更新了博客，原因是半年前删Linux的时候没备份，不小心把老博客给删了。。。&lt;/p&gt;
&lt;p&gt;关于内容的话我会尽量充实的，谢谢大家了（&lt;/p&gt;
&lt;p&gt;现在大家看到的这篇文章以前的内容，都是我从我知乎上同时发布的文章里回复下来的，希望能帮到你（&lt;/p&gt;
</summary>
      
    
    
    
    <category term="博客" scheme="https://blog.mailset.top/categories/%E5%8D%9A%E5%AE%A2/"/>
    
    
    <category term="博客" scheme="https://blog.mailset.top/tags/%E5%8D%9A%E5%AE%A2/"/>
    
  </entry>
  
  <entry>
    <title>在你的网站下面加上运行日期</title>
    <link href="https://blog.mailset.top/%E5%9C%A8%E4%BD%A0%E7%9A%84%E7%BD%91%E7%AB%99%E4%B8%8B%E9%9D%A2%E5%8A%A0%E4%B8%8A%E8%BF%90%E8%A1%8C%E6%97%A5%E6%9C%9F/"/>
    <id>https://blog.mailset.top/%E5%9C%A8%E4%BD%A0%E7%9A%84%E7%BD%91%E7%AB%99%E4%B8%8B%E9%9D%A2%E5%8A%A0%E4%B8%8A%E8%BF%90%E8%A1%8C%E6%97%A5%E6%9C%9F/</id>
    <published>2024-02-05T12:00:00.000Z</published>
    <updated>2024-10-25T11:43:31.000Z</updated>
    
    <content type="html"><![CDATA[<p>交换友链的时候突然看到了这个问题</p><p>对了你下面那个《已运行x天x时x秒》怎么做的，求求</p><p>就在这里简单写一个教程吧</p><h3 id="须知"><a href="#须知" class="headerlink" title="须知"></a>须知</h3><p>此教程主要适用于Hexo，其他框架未经测试</p><h3 id="JS"><a href="#JS" class="headerlink" title="JS"></a>JS</h3><p>在<code>source</code>文件夹下创建<code>js</code>文件夹，并创建文件<code>custom.js</code>，文件内容如下：</p><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><code class="hljs js"><span class="hljs-keyword">var</span> now = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>(); <br>    <span class="hljs-keyword">function</span> <span class="hljs-title function_">createtime</span>(<span class="hljs-params"></span>) &#123; <br>        <span class="hljs-keyword">var</span> grt= <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>(<span class="hljs-string">&quot;02/05/2024 14:00:00&quot;</span>);<span class="hljs-comment">//在此处修改你的建站时间</span><br>        now.<span class="hljs-title function_">setTime</span>(now.<span class="hljs-title function_">getTime</span>()+<span class="hljs-number">250</span>); <br>        days = (now - grt ) / <span class="hljs-number">1000</span> / <span class="hljs-number">60</span> / <span class="hljs-number">60</span> / <span class="hljs-number">24</span>; dnum = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">floor</span>(days); <br>        hours = (now - grt ) / <span class="hljs-number">1000</span> / <span class="hljs-number">60</span> / <span class="hljs-number">60</span> - (<span class="hljs-number">24</span> * dnum); hnum = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">floor</span>(hours); <br>        <span class="hljs-keyword">if</span>(<span class="hljs-title class_">String</span>(hnum).<span class="hljs-property">length</span> ==<span class="hljs-number">1</span> )&#123;hnum = <span class="hljs-string">&quot;0&quot;</span> + hnum;&#125; minutes = (now - grt ) / <span class="hljs-number">1000</span> /<span class="hljs-number">60</span> - (<span class="hljs-number">24</span> * <span class="hljs-number">60</span> * dnum) - (<span class="hljs-number">60</span> * hnum); <br>        mnum = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">floor</span>(minutes); <span class="hljs-keyword">if</span>(<span class="hljs-title class_">String</span>(mnum).<span class="hljs-property">length</span> ==<span class="hljs-number">1</span> )&#123;mnum = <span class="hljs-string">&quot;0&quot;</span> + mnum;&#125; <br>        seconds = (now - grt ) / <span class="hljs-number">1000</span> - (<span class="hljs-number">24</span> * <span class="hljs-number">60</span> * <span class="hljs-number">60</span> * dnum) - (<span class="hljs-number">60</span> * <span class="hljs-number">60</span> * hnum) - (<span class="hljs-number">60</span> * mnum); <br>        snum = <span class="hljs-title class_">Math</span>.<span class="hljs-title function_">round</span>(seconds); <span class="hljs-keyword">if</span>(<span class="hljs-title class_">String</span>(snum).<span class="hljs-property">length</span> ==<span class="hljs-number">1</span> )&#123;snum = <span class="hljs-string">&quot;0&quot;</span> + snum;&#125; <br>        <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">getElementById</span>(<span class="hljs-string">&quot;timeDate&quot;</span>).<span class="hljs-property">innerHTML</span> = <span class="hljs-string">&quot;已运行 &quot;</span>+dnum+<span class="hljs-string">&quot; 天 &quot;</span>; <br>        <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">getElementById</span>(<span class="hljs-string">&quot;times&quot;</span>).<span class="hljs-property">innerHTML</span> = hnum + <span class="hljs-string">&quot; 小时 &quot;</span> + mnum + <span class="hljs-string">&quot; 分 &quot;</span> + snum + <span class="hljs-string">&quot; 秒&quot;</span>; <br>    &#125; <br><span class="hljs-built_in">setInterval</span>(<span class="hljs-string">&quot;createtime()&quot;</span>,<span class="hljs-number">250</span>);<br></code></pre></td></tr></table></figure><p>之后，打开<code>_config.你的theme.yml</code>文件，寻找<code>custom_js</code>或类似的配置，修改为 <code>/js/custom.js</code></p><p>接着，寻找<code>footer</code>或类似的配置，加上</p><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs html"><span class="hljs-tag">&lt;<span class="hljs-name">br</span> /&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">&quot;timeDate&quot;</span>&gt;</span>载入天数...<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">&quot;times&quot;</span>&gt;</span>载入时分秒...<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span><br></code></pre></td></tr></table></figure><p>就可以了</p><hr><p>参考自：<a href="https://blog.csdn.net/wangqingchuan92/article/details/126346205">https://blog.csdn.net/wangqingchuan92/article/details/126346205</a></p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;交换友链的时候突然看到了这个问题&lt;/p&gt;
&lt;p&gt;对了你下面那个《已运行x天x时x秒》怎么做的，求求&lt;/p&gt;
&lt;p&gt;就在这里简单写一个教程吧&lt;/p&gt;
&lt;h3 id=&quot;须知&quot;&gt;&lt;a href=&quot;#须知&quot; class=&quot;headerlink&quot; title=&quot;须知&quot;&gt;&lt;/a&gt;须知&lt;</summary>
      
    
    
    
    <category term="博客" scheme="https://blog.mailset.top/categories/%E5%8D%9A%E5%AE%A2/"/>
    
    
    <category term="技术" scheme="https://blog.mailset.top/tags/%E6%8A%80%E6%9C%AF/"/>
    
    <category term="博客" scheme="https://blog.mailset.top/tags/%E5%8D%9A%E5%AE%A2/"/>
    
  </entry>
  
  <entry>
    <title>AList设置https</title>
    <link href="https://blog.mailset.top/AList%E8%AE%BE%E7%BD%AEhttps/"/>
    <id>https://blog.mailset.top/AList%E8%AE%BE%E7%BD%AEhttps/</id>
    <published>2024-02-05T11:00:00.000Z</published>
    <updated>2024-10-25T12:18:06.000Z</updated>
    
    <content type="html"><![CDATA[<p>看了很多教程，要不就是nginx反代要不就是宝塔，想着出一篇简单的教程</p><p>接上文，在letsencrypt<del>白嫖了</del>申请了自己域名的证书之后，自己Alist网盘的https改怎么设置呢？</p><h3 id="DDNS"><a href="#DDNS" class="headerlink" title="DDNS"></a>DDNS</h3><p>会弄AList的人大多数也会DDNS了，但在这里我还是向大家推荐一个软件：DDNS-GO，具体就请自己搜索了</p><h3 id="配置"><a href="#配置" class="headerlink" title="配置"></a>配置</h3><p>注意：以下方法仅适用于Linux（因为我没有在Windows下使用过AList，更不知道这东西在Windows下的配置文件在哪里，能找到的话可以自己试试看）</p><p>首先，打开命令行，切换到root用户</p><p>如果你是使用一键脚本安装的AList的话，那么他的配置文件大概率在<code>/opt/alist/data</code>目录下，这个目录没有root权限是进不去的</p><p>之后，打开文件<code>/opt/alist/data/config.json</code>，其中有如下内容：</p><figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><code class="hljs json"><span class="hljs-attr">&quot;scheme&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">&#123;</span><br>    <span class="hljs-attr">&quot;address&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;0.0.0.0&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;http_port&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">5244</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;https_port&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">-1</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;force_https&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-literal"><span class="hljs-keyword">false</span></span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;cert_file&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;key_file&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;unix_file&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&quot;</span><span class="hljs-punctuation">,</span><br>    <span class="hljs-attr">&quot;unix_file_perm&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;&quot;</span><br>  <span class="hljs-punctuation">&#125;</span><br></code></pre></td></tr></table></figure><p>你可能注意到了，其中有 cert_file和key_file两条配置，正对应着上次申请证书最后输出的<code>Certificate is saved at:</code>和<code>Key is saved at:</code>，把后面的文件路径填进去，就配置好证书文件了</p><p>但是，先别急着restart，这个<code>https_port</code>还是-1呢，你可以把他变成你想要的数字，像我就把<code>http_port</code>换成了5243，<code>https_port</code>换成了5244，对于我这种记不住端口号的人十分友好</p><p>如果你想要强制使用https，也可以把下面的<code>force_https</code>改为true，不过我倒是没有开，如果哪天https端口炸了。。。</p><h3 id="启用"><a href="#启用" class="headerlink" title="启用"></a>启用</h3><p>大功告成！使用下面的命令重新启动AList</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">systemctl restart alist<br></code></pre></td></tr></table></figure><p>享受有着SSL&#x2F;TLS加持的AList吧</p><hr><p>如果觉得对你有用的话，欢迎到处转发，有什么问题还可以在下面问我</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;看了很多教程，要不就是nginx反代要不就是宝塔，想着出一篇简单的教程&lt;/p&gt;
&lt;p&gt;接上文，在letsencrypt&lt;del&gt;白嫖了&lt;/del&gt;申请了自己域名的证书之后，自己Alist网盘的https改怎么设置呢？&lt;/p&gt;
&lt;h3 id=&quot;DDNS&quot;&gt;&lt;a href=&quot;#</summary>
      
    
    
    
    <category term="网盘" scheme="https://blog.mailset.top/categories/%E7%BD%91%E7%9B%98/"/>
    
    
    <category term="技术" scheme="https://blog.mailset.top/tags/%E6%8A%80%E6%9C%AF/"/>
    
    <category term="网盘" scheme="https://blog.mailset.top/tags/%E7%BD%91%E7%9B%98/"/>
    
  </entry>
  
  <entry>
    <title>letsencrypt免费证书申请--Certbot</title>
    <link href="https://blog.mailset.top/letsencrypt%E5%85%8D%E8%B4%B9%E8%AF%81%E4%B9%A6%E7%94%B3%E8%AF%B7-Certbot/"/>
    <id>https://blog.mailset.top/letsencrypt%E5%85%8D%E8%B4%B9%E8%AF%81%E4%B9%A6%E7%94%B3%E8%AF%B7-Certbot/</id>
    <published>2024-02-05T10:00:00.000Z</published>
    <updated>2024-10-25T12:18:11.000Z</updated>
    
    <content type="html"><![CDATA[<p>刚才找了半天教程找不到，在这里分享一下</p><h3 id="安装-Certbot"><a href="#安装-Certbot" class="headerlink" title="安装 Certbot"></a>安装 Certbot</h3><p>如果你用的是ArchLinux，那么可以通过下面的命令直接安装</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">sudo pacman -S certbot<br></code></pre></td></tr></table></figure><p>如果你用的是其他发行版&#x2F;MacOS&#x2F;Windows，那么请访问<a href="https://certbot.eff.org/">https://certbot.eff.org/</a></p><h3 id="申请证书"><a href="#申请证书" class="headerlink" title="申请证书"></a>申请证书</h3><p>打开终端，输入下面的命令（适用于Linux，Windows用户请去掉sudo）</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs shell">sudo certbot certonly -d &quot;你的域名&quot; --manual --preferred-challenges dns-01<br></code></pre></td></tr></table></figure><p>域名样例： 泛域名：*.mailset.top 单个域名：mailset.top&#x2F;<a href="http://www.mailset.top/">www.mailset.top</a></p><p>如果你是第一次申请，前面两个问题均输入Y即可</p><p>之后，会有输出如下：</p><figure class="highlight txt"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><code class="hljs txt">Please deploy a DNS TXT record under the name:<br><br>_acme-challenge.你的网址.<br><br>with the following value:<br><br>要添加的记录<br><br>Before continuing, verify the TXT record has been deployed. Depending on the DNS<br>provider, this may take some time, from a few seconds to multiple minutes. You can<br>check if it has finished deploying with aid of online tools, such as the Google<br>Admin Toolbox: https://toolbox.googleapps.com/apps/dig/#TXT/_acme-challenge.mailset.top.<br>Look for one or more bolded line(s) below the line &#x27;;ANSWER&#x27;. It should show the<br>value(s) you&#x27;ve just added.<br></code></pre></td></tr></table></figure><p>这时你先别急着回车，先访问你的dns提供商， 在 _acme-challenge.你的网址 添加一个 TXT 记录，内容为上文 要添加记录 中的内容</p><p>添加之后，可以先nslookup一下看看是否成功添加，之后再按回车确认</p><p>如果成功，下文会输出证书的地址，直接用即可</p><h3 id="建议"><a href="#建议" class="headerlink" title="建议"></a>建议</h3><p>第一次使用可以在certbot命令的参数加上 –dry-run，因为一个月同一个域名申请证书的机会是有限的，要是几次验证全没过。。。</p><p>之后就可以去掉 –dry-run，让它实际的申请证书了</p><hr><p>一会儿再写一个alist证书设置，希望对你有用（</p><p>有什么疑问欢迎在下面提问</p>]]></content>
    
    
      
      
    <summary type="html">&lt;p&gt;刚才找了半天教程找不到，在这里分享一下&lt;/p&gt;
&lt;h3 id=&quot;安装-Certbot&quot;&gt;&lt;a href=&quot;#安装-Certbot&quot; class=&quot;headerlink&quot; title=&quot;安装 Certbot&quot;&gt;&lt;/a&gt;安装 Certbot&lt;/h3&gt;&lt;p&gt;如果你用的是ArchL</summary>
      
    
    
    
    <category term="博客" scheme="https://blog.mailset.top/categories/%E5%8D%9A%E5%AE%A2/"/>
    
    
    <category term="技术" scheme="https://blog.mailset.top/tags/%E6%8A%80%E6%9C%AF/"/>
    
    <category term="博客" scheme="https://blog.mailset.top/tags/%E5%8D%9A%E5%AE%A2/"/>
    
  </entry>
  
</feed>
