-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
232 lines (229 loc) · 10 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://ityuany.com</id>
<title>深夜食堂</title>
<updated>2022-02-23T12:03:29.393Z</updated>
<generator>https://github.com/jpmonette/feed</generator>
<link rel="alternate" href="https://ityuany.com"/>
<link rel="self" href="https://ityuany.com/atom.xml"/>
<subtitle>落霞与孤鹜齐飞、秋水共长天一色</subtitle>
<logo>https://ityuany.com/images/avatar.png</logo>
<icon>https://ityuany.com/favicon.ico</icon>
<rights>All rights reserved 2022, 深夜食堂</rights>
<entry>
<title type="html"><![CDATA[【Babel插件】访问器]]></title>
<id>https://ityuany.com/post/babel-cha-jian-fang-wen-qi/</id>
<link href="https://ityuany.com/post/babel-cha-jian-fang-wen-qi/">
</link>
<updated>2022-02-20T14:31:47.000Z</updated>
<content type="html"><![CDATA[<h2 id="访问器是什么">访问器是什么 🤔</h2>
<p><a href="https://babeljs.io/"><code>babel</code></a> 在解析语法树的过程中,会去不停的循环 <a href="https://github.com/estree/estree"><code>estree</code></a> 的所有节点 , 而访问器指的是去定义这些 <a href="https://github.com/estree/estree"><code>estree</code></a>的节点的处理函数,用来做语法上的转义。</p>
<pre><code class="language-js">
import babelCore from '@babel/core';
import nodePath from 'path';
const CSS_EXTNAMES = ['.css', '.less', '.sass', '.scss'];
export default function (babel) {
return {
name: 'autoCssModules',
visitor: {
ImportDeclaration(path) {
const specifiers = path.get('specifiers');
const source = path.get('source');
if (
specifiers.length &&
CSS_EXTNAMES.includes(nodePath.extname(source.node.value))
) {
source.replaceWith(
babel.types.stringLiteral(`${source.node.value}?modules`),
);
}
},
},
};
}
</code></pre>
<h2 id="访问器也是有切面的">访问器也是有切面的 🤡</h2>
<p>每一个访问器都是存在 <code>enter</code>、<code>exit</code> 两个切面的,可以有选择性的选择在其中的某一个切面做某些事。</p>
<pre><code class="language-js">export default function (){
return {
visitor:{
ImportDeclaration:{
enter(){
// some thing
},
exit(){
// some thing
}
}
}
}
}
</code></pre>
<h2 id="单个插件对象的全局属性">单个插件对象的全局属性</h2>
<p>在访问器中,我们可以动态的往全局的this上面<code>挂载</code>、<code>修正</code>一些全局属性。用作单个插件的所有访问器共享。</p>
<pre><code class="language-js">export default function (){
return {
Program:{
enter(){
this.enableHoc = true;
// do some thing
}
},
ImportDeclaration(){
// do some thing
if(this.enableHoc){
// do some thing
}else{
this.enableHoc = "xxxx"
}
}
}
}
</code></pre>
<h2 id="巧用访问器的切面">巧用访问器的切面</h2>
<p>在某些业务场景下,我们尽可能的去巧妙的运用访问器的切面,从而去规避一些<code>性能低效</code>或<code>逻辑冗余</code>。</p>
<pre><code class="language-js">export default function (){
return {
Program:{
enter(){
this.inspectorHocName = undefined
// do some thing
},
exit(){
if(this.inspectorHocName){
// do some thing
}
// do some thing
}
},
ImportDeclaration(){
// do some thing
this.inspectorHocName = "xxxxxxx"
// do some thing
}
}
}
</code></pre>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[MacOS中的Rootless机制]]></title>
<id>https://ityuany.com/post/macos-zhong-de-rootless-ji-zhi/</id>
<link href="https://ityuany.com/post/macos-zhong-de-rootless-ji-zhi/">
</link>
<updated>2022-02-20T04:20:45.000Z</updated>
<content type="html"><![CDATA[<h2 id="是什么">是什么?</h2>
<p>Mac OS X EL Capitan 10.11 版本的操作系统开始使用 Rootless 机制,这玩意主要就是限制了不允许用户针对以下 3 个目录的文件进行修改操作</p>
<ul>
<li>/system</li>
<li>/sbin</li>
<li>/usr</li>
</ul>
<h2 id="怎么开关-rootless-机制">怎么开关 Rootless 机制?</h2>
<p>重启 Mac , 听到开机启动声之后按下 command + R 进入恢复模式,在实用工具中打开 Termial(终端工具)</p>
<ul>
<li>关闭 Rootless<pre><code class="language-bash"> csrutil disable
</code></pre>
</li>
<li>开启 Rootless<pre><code class="language-bash"> csrutil enable
</code></pre>
</li>
</ul>
<p>回车、重启、生效</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Linux系统下SSH命令的使用]]></title>
<id>https://ityuany.com/post/linux-xi-tong-xia-ssh-ming-ling-de-shi-yong/</id>
<link href="https://ityuany.com/post/linux-xi-tong-xia-ssh-ming-ling-de-shi-yong/">
</link>
<updated>2022-02-20T04:05:00.000Z</updated>
<content type="html"><![CDATA[<h2 id="是什么">是什么?</h2>
<p>主要是用来生成两个文件,用来实现免密访问远程主机.</p>
<ul>
<li>公钥 🔒<br>
一般公钥存储在自己需要访问的远程主机,存储路径为:~/.ssh/authorized_keys 。</li>
<li>秘钥 🔐<br>
一般留存在本地主机上 。通常我们的存储路径为: ~/.ssh/id_rsa</li>
</ul>
<blockquote>
<p>我们这里说的所有存储路径通常指的都是默认情况下。</p>
</blockquote>
<h2 id="怎么用">怎么用?</h2>
<p>命令行直接敲</p>
<pre><code class="language-bash">ssh-keygen
</code></pre>
<p>当然,我们也可以在命令行后面跟着一些常用的设置项,比如:</p>
<ul>
<li>指定密钥类型,默认即 rsa ,可以省略<pre><code class="language-bash"> ssh-keygen -t rsa
</code></pre>
</li>
<li>C 设置注释文字,比如你的邮箱,可以省略<pre><code class="language-bash"> ssh-keygen -C "ityuany"
</code></pre>
</li>
</ul>
<p>回车之后,可以进行确认修改的选项为:</p>
<ul>
<li>私钥的位置、名称</li>
<li>SSH 秘钥的访问密码(用于使用 ssh 登录时的密码,图省事的话可以不写,直接回车)</li>
</ul>
<p>最终我们将得到两个文件</p>
<ul>
<li>id_rsa (私钥)</li>
<li>id_rsa.pub (公钥)</li>
</ul>
<p>默认情况下,他们一般位于 ~/.ssh 目录下面。 此时我们只要将 公钥放置在我们需要访问的远程服务端上对应的位置上即可</p>
<blockquote>
<ul>
<li>公钥在需要访问的远程服务器,通常我们放置在 : ~/.ssh/authorized_keys</li>
<li>在一些软件平台中,也是支持直接配置 SSH 登录的,比如 GitHub、GitLab,只要将公钥配置进入即可。</li>
</ul>
</blockquote>
<h2 id="将公钥快捷的传输给远程服务器">将公钥快捷的传输给远程服务器</h2>
<pre><code class="language-bash">ssh-copy-id [USER]@[HOST]
</code></pre>
<p>回车之后一般通常会要求输入远程服务器的访问密码。</p>
<blockquote>
<p>默认情况下,传输到远程服务器的位置为: ~/.ssh/authorized_keys</p>
</blockquote>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Hello Gridea]]></title>
<id>https://ityuany.com/post/hello-gridea/</id>
<link href="https://ityuany.com/post/hello-gridea/">
</link>
<updated>2018-12-11T16:00:00.000Z</updated>
<summary type="html"><![CDATA[<p>👏 欢迎使用 <strong>Gridea</strong> !<br>
✍️ <strong>Gridea</strong> 一个静态博客写作客户端。你可以用它来记录你的生活、心情、知识、笔记、创意... ...</p>
<pre><code class="language-ts">import React from "react"
</code></pre>
]]></summary>
<content type="html"><![CDATA[<p>👏 欢迎使用 <strong>Gridea</strong> !<br>
✍️ <strong>Gridea</strong> 一个静态博客写作客户端。你可以用它来记录你的生活、心情、知识、笔记、创意... ...</p>
<pre><code class="language-ts">import React from "react"
</code></pre>
<!-- more -->
<p><a href="https://github.com/getgridea/gridea">Github</a><br>
<a href="https://gridea.dev/">Gridea 主页</a><br>
<a href="http://fehey.com/">示例网站</a></p>
<h2 id="特性">特性👇</h2>
<p>📝 你可以使用最酷的 <strong>Markdown</strong> 语法,进行快速创作</p>
<p>🌉 你可以给文章配上精美的封面图和在文章任意位置插入图片</p>
<p>🏷️ 你可以对文章进行标签分组</p>
<p>📋 你可以自定义菜单,甚至可以创建外部链接菜单</p>
<p>💻 你可以在 <strong>Windows</strong>,<strong>MacOS</strong> 或 <strong>Linux</strong> 设备上使用此客户端</p>
<p>🌎 你可以使用 <strong>𝖦𝗂𝗍𝗁𝗎𝖻 𝖯𝖺𝗀𝖾𝗌</strong> 或 <strong>Coding Pages</strong> 向世界展示,未来将支持更多平台</p>
<p>💬 你可以进行简单的配置,接入 <a href="https://github.com/gitalk/gitalk">Gitalk</a> 或 <a href="https://github.com/SukkaW/DisqusJS">DisqusJS</a> 评论系统</p>
<p>🇬🇧 你可以使用<strong>中文简体</strong>或<strong>英语</strong></p>
<p>🌁 你可以任意使用应用内默认主题或任意第三方主题,强大的主题自定义能力</p>
<!-- more -->
<!-- more -->
<p>🖥 你可以自定义源文件夹,利用 OneDrive、百度网盘、iCloud、Dropbox 等进行多设备同步</p>
<p>🌱 当然 <strong>Gridea</strong> 还很年轻,有很多不足,但请相信,它会不停向前 🏃</p>
<p>未来,它一定会成为你离不开的伙伴</p>
<p>尽情发挥你的才华吧!</p>
<p>😘 Enjoy~</p>
]]></content>
</entry>
</feed>