-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
106 lines (59 loc) · 22 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Yoleen的博客</title>
<subtitle>为学日益,为道日损。</subtitle>
<link href="https://yoletpig.github.io/atom.xml" rel="self"/>
<link href="https://yoletpig.github.io/"/>
<updated>2023-05-12T08:59:16.742Z</updated>
<id>https://yoletpig.github.io/</id>
<author>
<name>Yoleen</name>
</author>
<generator uri="https://hexo.io/">Hexo</generator>
<entry>
<title>Github Failed to connect to github.com port 443:Timed out</title>
<link href="https://yoletpig.github.io/Github%20Failed%20to%20connect%20to%20git.luolix.top%20port%20443%20Timed%20out/"/>
<id>https://yoletpig.github.io/Github%20Failed%20to%20connect%20to%20git.luolix.top%20port%20443%20Timed%20out/</id>
<published>2023-05-12T05:26:07.000Z</published>
<updated>2023-05-12T08:59:16.742Z</updated>
<content type="html"><![CDATA[<h2 id="问题描述"><a href="#问题描述" class="headerlink" title="问题描述"></a>问题描述</h2><p>部署Hexo博客到Github上时,出现 Failed to connect to github.com port 443: Timed out</p><span id="more"></span><h2 id="问题分析"><a href="#问题分析" class="headerlink" title="问题分析"></a>问题分析</h2><blockquote><p>超时问题一般都是网络问题。</p></blockquote><p>首先<code>ping github.com</code>看能不能连接上。如果没ping通可以参考我这篇文章<a href="https://yoletpig.github.io/%E4%B8%8D%E4%BC%9A%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91%E6%80%8E%E4%B9%88%E8%AE%BF%E9%97%AEGitHub/">《不会科学上网怎么访问Github》</a></p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ping github.com</span><br></pre></td></tr></table></figure><p><img src="/Github%20Failed%20to%20connect%20to%20git.luolix.top%20port%20443%20Timed%20out/image-20230512142555131.png" alt="image-20230512142555131"></p><p>ok,连接没问题,再次分析会不会是代理导致https连接不上。</p><p>首先关闭ssl验证:</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git config --global http.sslverify false</span><br></pre></td></tr></table></figure><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git config --list</span><br></pre></td></tr></table></figure><p>发现设置了<code>https.proxy=127.0.0.1:1080</code>,因为我在本机使用的是Clash进行代理,而Clash的代理端口为7890,因此我们把git的代理地址修改一下:</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git config --global https.proxy 127.0.0.1:7890</span><br><span class="line">git config --global http.proxy 127.0.0.1:7890</span><br></pre></td></tr></table></figure><p>而如果你是使用V2rayN进行代理,则应该把端口换成10809,即:</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git config --global https.proxy 127.0.0.1:10809</span><br><span class="line">git config --global http.proxy 127.0.0.1:10809</span><br></pre></td></tr></table></figure><p>当然,你也可以关闭代理软件,使用git默认的端口进行访问,另外,如果你找不到自己的代理端口也可以关闭git代理:</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git config --global --unset http.proxy</span><br><span class="line">git config --global --unset https.proxy</span><br></pre></td></tr></table></figure><p>最后,推荐使用SSH的方式进行git操作。</p>]]></content>
<summary type="html"><h2 id="问题描述"><a href="#问题描述" class="headerlink" title="问题描述"></a>问题描述</h2><p>部署Hexo博客到Github上时,出现 Failed to connect to github.com port 443: Timed out</p></summary>
<category term="辣么多的BUG" scheme="https://yoletpig.github.io/categories/%E8%BE%A3%E4%B9%88%E5%A4%9A%E7%9A%84BUG/"/>
<category term="Github" scheme="https://yoletpig.github.io/tags/Github/"/>
<category term="Hexo" scheme="https://yoletpig.github.io/tags/Hexo/"/>
</entry>
<entry>
<title>不会科学上网怎么访问GitHub</title>
<link href="https://yoletpig.github.io/%E4%B8%8D%E4%BC%9A%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91%E6%80%8E%E4%B9%88%E8%AE%BF%E9%97%AEGitHub/"/>
<id>https://yoletpig.github.io/%E4%B8%8D%E4%BC%9A%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91%E6%80%8E%E4%B9%88%E8%AE%BF%E9%97%AEGitHub/</id>
<published>2023-05-12T05:18:52.000Z</published>
<updated>2023-05-12T09:12:35.154Z</updated>
<content type="html"><![CDATA[<h2 id="获取IP地址"><a href="#获取IP地址" class="headerlink" title="获取IP地址"></a>获取IP地址</h2><p>分别访问下面4个网址获取对应的IP地址:</p><span id="more"></span><p><a href="https://ipaddress.com/website/github.com">https://ipaddress.com/website/github.com</a><br><a href="https://ipaddress.com/website/gibhut.global.ssl.Fastly.net">https://ipaddress.com/website/gibhut.global.ssl.Fastly.net</a><br><a href="https://ipaddress.com/website/assets-cnd.github.com">https://ipaddress.com/website/assets-cnd.github.com</a><br><a href="https://ipaddress.com/website/objects.githubusercontent.com">https://ipaddress.com/website/objects.githubusercontent.com</a></p><h2 id="修改Hosts文件"><a href="#修改Hosts文件" class="headerlink" title="修改Hosts文件"></a>修改Hosts文件</h2><h3 id="windows"><a href="#windows" class="headerlink" title="windows"></a>windows</h3><p>用管理员权限打开<code>C:\Windows\System32\drivers\etc\hosts</code>添加如下内容:</p><figure class="highlight plaintext"><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></pre></td><td class="code"><pre><span class="line">140.82.113.4 github.com</span><br><span class="line">151.101.1.194 github.global.ssl.fastly.net </span><br><span class="line">185.199.108.153 assets-cdn.github.com </span><br><span class="line">185.199.109.153 assets-cdn.github.com </span><br><span class="line">185.199.110.153 assets-cdn.github.com </span><br><span class="line">185.199.111.153 assets-cdn.github.com</span><br><span class="line">185.199.108.133 objects.githubusercontent.com</span><br></pre></td></tr></table></figure><p>保存后即可访问Github。</p><h3 id="Centos7"><a href="#Centos7" class="headerlink" title="Centos7"></a>Centos7</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo vim /etc/hosts</span><br></pre></td></tr></table></figure><p>同样添加上面的IP地址,保存后即可访问Github。</p>]]></content>
<summary type="html"><h2 id="获取IP地址"><a href="#获取IP地址" class="headerlink" title="获取IP地址"></a>获取IP地址</h2><p>分别访问下面4个网址获取对应的IP地址:</p></summary>
<category term="辣么多的BUG" scheme="https://yoletpig.github.io/categories/%E8%BE%A3%E4%B9%88%E5%A4%9A%E7%9A%84BUG/"/>
<category term="Github" scheme="https://yoletpig.github.io/tags/Github/"/>
</entry>
<entry>
<title>(一)本地搭建Hexo博客</title>
<link href="https://yoletpig.github.io/%EF%BC%88%E4%B8%80%EF%BC%89%E6%9C%AC%E5%9C%B0%E6%90%AD%E5%BB%BAhexo%E5%8D%9A%E5%AE%A2/"/>
<id>https://yoletpig.github.io/%EF%BC%88%E4%B8%80%EF%BC%89%E6%9C%AC%E5%9C%B0%E6%90%AD%E5%BB%BAhexo%E5%8D%9A%E5%AE%A2/</id>
<published>2023-05-11T13:37:29.000Z</published>
<updated>2023-05-12T04:24:12.617Z</updated>
<content type="html"><![CDATA[<h2 id="安装Node-js"><a href="#安装Node-js" class="headerlink" title="安装Node.js"></a>安装Node.js</h2><p><code>Node.js</code>是一个开源的,跨平台的<code>Js</code>运行环境,安装<code>Node.js</code>后才可以在上面运行hexo框架。</p><p>下载地址:<a href="https://nodejs.org/zh-cn">https://nodejs.org/zh-cn</a> 或者 <a href="https://registry.npmmirror.com/binary.html?path=node/latest-v18.x/">https://registry.npmmirror.com/binary.html?path=node/latest-v18.x/</a></p><p>这里可以下载18.16长期支持版,windows用户下载msi格式,安装过程中勾选add to path添加环境变量,安装完成后,打开命令行输入</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">node -v && npm -v</span><br></pre></td></tr></table></figure><p>查看<code>Node.js</code>和<code>npm</code>的版本信息。</p><h2 id="安装Git"><a href="#安装Git" class="headerlink" title="安装Git"></a>安装Git</h2><p>Git应该是每个程序员必备的工具,还不会使用的同学,可以看看这篇文章,<a href="https://zhuanlan.zhihu.com/p/369486197">知乎:《Github万字图文教程》</a></p><p>Git下载地址:<a href="https://git-scm.com/download/win">https://git-scm.com/download/win</a></p><p>如果访问不了上面地址,可以通过淘宝的镜像地址下载,目前最新的版本为2.40.1,<a href="https://registry.npmmirror.com/binary.html?path=git-for-windows/v2.40.1.windows.1/">Git-2.40.1-64-bit.exe下载</a></p><h2 id="安装Hexo"><a href="#安装Hexo" class="headerlink" title="安装Hexo"></a>安装Hexo</h2><p><code>Hexo</code>是快速、简洁且高效的博客框架,拥有380+博客模板,支持第三方插件,十分nice!</p><p>切换到想安装<code>Hexo</code>的目录,这个目录后续会保存你的博客文章,安装方式十分简单,运行下面命令安装:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-cli -g</span><br></pre></td></tr></table></figure><p>安装完毕后我们就可以使用hexo命令去初始化博客。</p><h2 id="初始化项目"><a href="#初始化项目" class="headerlink" title="初始化项目"></a>初始化项目</h2><figure class="highlight bash"><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><span class="line">hexo init blob</span><br><span class="line"><span class="built_in">cd</span> blob</span><br><span class="line">npm install</span><br></pre></td></tr></table></figure><p>这里 blob 就是你要创建的博客名,上述命令会在当前目录下创建一个 blob 文件夹,里面结构如下:</p><figure class="highlight plaintext"><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><span class="line">.</span><br><span class="line">├── _config.yml</span><br><span class="line">├── package.json</span><br><span class="line">├── scaffolds</span><br><span class="line">├── source</span><br><span class="line">| ├── _drafts</span><br><span class="line">| └── _posts</span><br><span class="line">└── themes</span><br></pre></td></tr></table></figure><p><strong>_config.yml:</strong>保存博客的配置,可以设置博客名称,作者,个人简介,部署方式等等。</p><p><strong>scaffolds:</strong>保存新建文章的模板文件,在你新建markdown文章时,会自动填充scaffolds下post.md的内容到新建的md文件里面。</p><p><strong>source:</strong>存放用户资源的地方,即保存草稿、Page页面和你的markdown文章。</p><p><strong>themes:</strong>保存主题,Hexo会根据主题内容生成静态页面。</p><h2 id="启动项目"><a href="#启动项目" class="headerlink" title="启动项目"></a>启动项目</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo server</span><br></pre></td></tr></table></figure><p>在命令行运行上述命令即可成功启动我们的博客,<code>hexo server</code>也可以简写成<code>hexo s</code></p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo s -p 5000</span><br></pre></td></tr></table></figure><p><strong>-p:</strong>可以指定访问的端口。</p><p><img src="/%EF%BC%88%E4%B8%80%EF%BC%89%E6%9C%AC%E5%9C%B0%E6%90%AD%E5%BB%BAhexo%E5%8D%9A%E5%AE%A2/image-20230512120008308.png" alt="image-20230512120008308"></p><p>至此本地搭建<code>Hexo</code>博客已经完成,下一节对本地博客进行个性化配置,使我们的博客更加美观好用。</p>]]></content>
<summary type="html">哪个程序员不想拥有属于自己的博客呢?</summary>
<category term="零成本搭建属于自己的博客" scheme="https://yoletpig.github.io/categories/%E9%9B%B6%E6%88%90%E6%9C%AC%E6%90%AD%E5%BB%BA%E5%B1%9E%E4%BA%8E%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/"/>
<category term="Hexo" scheme="https://yoletpig.github.io/tags/Hexo/"/>
</entry>
<entry>
<title>(最新+详细+Pycharm远程调试GUI程序)解决qt.qpa.xcb:could not connect to display问题</title>
<link href="https://yoletpig.github.io/%E8%BF%9C%E7%A8%8Bgui/"/>
<id>https://yoletpig.github.io/%E8%BF%9C%E7%A8%8Bgui/</id>
<published>2023-05-11T08:02:02.000Z</published>
<updated>2023-05-11T09:42:14.172Z</updated>
<content type="html"><![CDATA[<h1 id="出现原因"><a href="#出现原因" class="headerlink" title="出现原因"></a>出现原因</h1><p>在ubuntu服务器上运行cv.imshow()方法时就会报以下错误</p><figure class="highlight bash"><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><span class="line">qt.qpa.xcb: could not connect to display</span><br><span class="line">qt.qpa.plugin: Could not load the Qt platform plugin <span class="string">"xcb"</span> <span class="keyword">in</span> <span class="string">"/root/anaconda3/lib/python3.8/site-packages/cv2/qt/plugins"</span> even though it was found.</span><br><span class="line">This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.</span><br><span class="line"></span><br><span class="line">Available platform plugins are: xcb, eglfs, minimal, minimalegl, offscreen, vnc</span><br></pre></td></tr></table></figure><span id="more"></span><h1 id="解决方法"><a href="#解决方法" class="headerlink" title="解决方法"></a>解决方法</h1><p>因为用的是云服务器,我也不能去他那里外接个显示器,而且我也是没有装图形化界面的,如果有图形化界面可以使用vnc连接就解决了,我不想装图形化界面就打算使用MobaXTerm来使远程服务器的显示内容显示到本地windows上。</p><h1 id="步骤"><a href="#步骤" class="headerlink" title="步骤"></a>步骤</h1><h2 id="下载MobaXTerm"><a href="#下载MobaXTerm" class="headerlink" title="下载MobaXTerm"></a>下载MobaXTerm</h2><p>MobaXTerm内置了X server,在服务器上的图形化应用可以在本地轻松展示。<a href="https://mobaxterm.mobatek.net/download-home-edition.html">MobaXTerm下载地址</a><br>这里我们下载Portable版本这个免安装,下载下来就一个exe文件。</p><h2 id="连接服务器"><a href="#连接服务器" class="headerlink" title="连接服务器"></a>连接服务器</h2><p>打开下载的MobaXTerm,右上角Session->SSH,Remote host输入服务器地址,勾选Specify username输入连接的用户名,Port输入端口号,然后在下面Advanced Settings高级设置那里勾选X11-forwarding,就是需要X11-forwarding去转发服务器显示内容。<br><img src="/%E8%BF%9C%E7%A8%8Bgui/bc5082da42fc49c1a6598ea16f0bdcda-1683797861418-7.png" alt="连接服务器"></p><h2 id="安装Xorg和打开X11-forwarding"><a href="#安装Xorg和打开X11-forwarding" class="headerlink" title="安装Xorg和打开X11-forwarding"></a>安装Xorg和打开X11-forwarding</h2><p>连接好服务器后可以发现我们的X11-forwarding服务是没有打开的<br><img src="/%E8%BF%9C%E7%A8%8Bgui/8dad3a8f3e974c0c9d8a133e51306460.png" alt="X11-forwarding"><br>首先我们先安装Xorg,Xorg是X11的实现,负责连接到Xserver进行输入和输出。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install xorg</span><br></pre></td></tr></table></figure><p>然后我们打开X11-forwarding服务,在命令行输入</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vi /etc/ssh/sshd_config</span><br></pre></td></tr></table></figure><p>修改两个配置项</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">X11Forwarding <span class="built_in">yes</span></span><br><span class="line">X11UseLocalhost no</span><br></pre></td></tr></table></figure><p>之后重启ssh服务</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">service ssh restart</span><br></pre></td></tr></table></figure><p>重新连接服务器后可以发现支持X11-forwarding了<br><img src="/%E8%BF%9C%E7%A8%8Bgui/98642e99adf84ebc978a5b6eae72bd22.png" alt="支持x11"><br>在命令行输入xclock测试能否传输GUI界面到本地</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">xclock</span><br></pre></td></tr></table></figure><p><img src="/%E8%BF%9C%E7%A8%8Bgui/459ac778e244442ea74330023af8731a.png" alt="xclock"><br><em><strong>成功!</strong></em></p><h1 id="附录"><a href="#附录" class="headerlink" title="附录"></a>附录</h1><p>如何在Pycharm上面远程调试GUI程序呢?</p><h2 id="设置共享目录"><a href="#设置共享目录" class="headerlink" title="设置共享目录"></a>设置共享目录</h2><p>可参考这篇文章<br><a href="https://www.autodl.com/docs/pycharm/">PyCharm远程开发</a></p><h2 id="修改环境"><a href="#修改环境" class="headerlink" title="修改环境"></a>修改环境</h2><p>在设置好远程开发后修改环境信息<br>在PyCharm中打开Run->Edit Configurations,当然也可以在右上角运行按钮旁边直接点。然后在Environment variables添加DISPLAY变量。<br><img src="/%E8%BF%9C%E7%A8%8Bgui/93a90ddd192648bdafab4cbc24442de6.png" alt="修改环境"></p><p>变量值是从服务器获取的。在命令行输入echo $DISPLAY就行。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">echo</span> <span class="variable">$DISPLAY</span></span><br></pre></td></tr></table></figure><p><img src="/%E8%BF%9C%E7%A8%8Bgui/9ff8e22ecb2c41ba8a1f40b2707b4965.png" alt="在这里插入图片描述"></p>]]></content>
<summary type="html"><h1 id="出现原因"><a href="#出现原因" class="headerlink" title="出现原因"></a>出现原因</h1><p>在ubuntu服务器上运行cv.imshow()方法时就会报以下错误</p>
<figure class="highlight bash"><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><span class="line">qt.qpa.xcb: could not connect to display</span><br><span class="line">qt.qpa.plugin: Could not load the Qt platform plugin <span class="string">&quot;xcb&quot;</span> <span class="keyword">in</span> <span class="string">&quot;/root/anaconda3/lib/python3.8/site-packages/cv2/qt/plugins&quot;</span> even though it was found.</span><br><span class="line">This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.</span><br><span class="line"></span><br><span class="line">Available platform plugins are: xcb, eglfs, minimal, minimalegl, offscreen, vnc</span><br></pre></td></tr></table></figure></summary>
<category term="辣么多的BUG" scheme="https://yoletpig.github.io/categories/%E8%BE%A3%E4%B9%88%E5%A4%9A%E7%9A%84BUG/"/>
<category term="GUI" scheme="https://yoletpig.github.io/tags/GUI/"/>
</entry>
</feed>