-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
398 lines (248 loc) · 29.5 KB
/
index.html
File metadata and controls
398 lines (248 loc) · 29.5 KB
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>
GrassSand
</title>
<meta name="description">
<meta property="og:type" content="website">
<meta property="og:title" content="GrassSand">
<meta property="og:url" content="http://grasssand.ml/index.html">
<meta property="og:site_name" content="GrassSand">
<meta property="og:description">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="GrassSand">
<meta name="twitter:description">
<link rel="alternative" href="/atom.xml" title="GrassSand" type="application/atom+xml">
<link rel="icon" href="/favicon.png">
<link rel="stylesheet" href="/styles/main.css">
</head>
<body
>
<div class="mobile-header">
<button class="sidebar-toggle" type="button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="title" href="/">GrassSand</a>
</div>
<div class="main-container">
<div class="sidebar">
<div class="header">
<h1 class="title"><a href="/">GrassSand</a></h1>
<div class="info">
<div class="content">
</div>
<div class="avatar">
<a href="/about"><img src="https://cn.gravatar.com/avatar/511c56271f88da4d877ee481299145a0?s=200"></a>
</div>
</div>
</div>
<div class="body">
<ul class="nav">
<li class="category-list-container">
<a href="javascript:;">分类</a>
</li>
<li class="tag-list-container">
<a href="javascript:;">标签</a>
<ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/GitHub/">GitHub</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Hexo/">Hexo</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Mono/">Mono</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Python/">Python</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Ubuntu/">Ubuntu</a><span class="tag-list-count">2</span></li></ul>
</li>
<li class="archive-list-container">
<a href="javascript:;">归档</a>
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/">2016</a><span class="archive-list-count">3</span></li></ul>
</li>
</ul>
<ul class="nav">
<li>
<a href="/" title="Homepage">Homepage</a>
</li>
</ul>
<ul class="nav">
<li>
<a href="https://github.com/grasssand" title="Github" target="_blank" rel="external">Github</a>
</li>
<li>
<a href="/atom.xml" title="RSS">RSS</a>
</li>
</ul>
</div>
</div>
<div class="main-content">
<div style="max-width: 1000px">
<div class="post-list">
<div class="post-list-item article">
<h3 class="article-header">
<a href="/2016/03/20/ubuntu-hexo/" >
在GitHub Pages使用Hexo搭建博客
</a>
</h3>
<div class="article-info">
<a href="/2016/03/20/ubuntu-hexo/"><span class="article-date">
2016-03-20
</span>
</a>
<span class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/GitHub/">GitHub</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo/">Hexo</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Ubuntu/">Ubuntu</a></li></ul>
</span>
</div>
<div class="article-entry">
<p>把博客搬到了GitHub Pages,就此写写记录其中的过程。操作环境为Ubuntu 14.04 LTS。</p>
<h2 id="Hexo"><a href="#Hexo" class="headerlink" title="Hexo"></a>Hexo</h2><p><a href="https://hexo.io/" target="_blank" rel="external">Hexo</a>是一个快速、简洁且高效的博客框架。Hexo 使用 Markdown(或其他渲染引擎)解析文章,在几秒内,即可利用靓丽的主题生成静态网页。</p>
<p>安装Hexo之前,需要先安装<a href="http://git-scm.com/" target="_blank" rel="external">Git</a>和<a href="http://nodejs.org/" target="_blank" rel="external">Node.js</a>。</p>
<h3 id="安装Git"><a href="#安装Git" class="headerlink" title="安装Git"></a>安装Git</h3><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 git-core</span><br></pre></td></tr></table></figure>
<h3 id="安装Node-js"><a href="#安装Node-js" class="headerlink" title="安装Node.js"></a>安装Node.js</h3><p>使用<a href="https://github.com/creationix/nvm" target="_blank" rel="external">nvm</a>安装Node.js</p>
<p>先使用安装脚本在线安装nvm(需要cURL或Wget)<br><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">$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash</span><br></pre></td></tr></table></figure></p>
<p>或<br><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">$ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash</span><br></pre></td></tr></table></figure></p>
<p>之后可以使用<code>nvm install</code>命令安装<code>Node.js</code>。截至目前,<code>Node.js</code>长期版为<code>4.4.0</code>,稳定版为<code>5.9.0</code><br>这里安装长期版</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">$ nvm install 4</span><br></pre></td></tr></table></figure>
<p>使用<code>nvm ls</code>命令查看已安装版本</p>
<h3 id="安装Hexo"><a href="#安装Hexo" class="headerlink" title="安装Hexo"></a>安装Hexo</h3><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 -g hexo-cli</span><br></pre></td></tr></table></figure>
<h2 id="GitHub-Pages"><a href="#GitHub-Pages" class="headerlink" title="GitHub Pages"></a>GitHub Pages</h2><ul>
<li>创建或登陆GitHub账号</li>
<li>创建一个名为<code><em>username</em>.github.io</code>的<code>repository</code>,<em>username</em>为你的GitHub用户名</li>
<li>之后就可以通过<code><a href="http://username.github.io" target="_blank" rel="external">http://username.github.io</a></code>访问你的主页了</li>
</ul>
<h2 id="建站"><a href="#建站" class="headerlink" title="建站"></a>建站</h2><p>使用以下命令<br><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 blog</span><br><span class="line">$ <span class="built_in">cd</span> blog</span><br><span class="line">$ npm install</span><br></pre></td></tr></table></figure></p>
<p>运行以下命令启动服务器后,浏览器访问<code><a href="http://localhost:4000/" target="_blank" rel="external">http://localhost:4000/</a></code>应该能看到默认的页面了。<br><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">$ hexo server</span><br></pre></td></tr></table></figure></p>
<p>Hexo指令功能<br><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></pre></td><td class="code"><pre><span class="line">$ hexo new [title] <span class="comment">#新建一篇文章,[title]为文章标题,位置在/source/_posts/</span></span><br><span class="line">$ hexo generate <span class="comment">#生成静态文件,在public文件夹内</span></span><br><span class="line">$ hexo publish [filename] <span class="comment">#发表草稿</span></span><br><span class="line">$ hexo clean <span class="comment">#清除缓存文件 (db.json) 和已生成的静态文件 (public)</span></span><br></pre></td></tr></table></figure></p>
<p>更多指令用法查看<a href="https://hexo.io/zh-cn/docs/commands.html" target="_blank" rel="external">文档</a></p>
<h3 id="部署到GitHub"><a href="#部署到GitHub" class="headerlink" title="部署到GitHub"></a>部署到GitHub</h3><p>安装<code>hexo-deployer-git</code><br><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-deployer-git --save</span><br></pre></td></tr></table></figure></p>
<p>修改配置文件<code>_config.yml</code>的<code>Deployment</code>行:<br><figure class="highlight plain"><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">deploy:</span><br><span class="line"> type: git</span><br><span class="line"> repo: <repository url> #repository地址,如https://github.com/username/username.github.io.git</span><br></pre></td></tr></table></figure></p>
<p>部署<br><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">$ hexo deploy</span><br></pre></td></tr></table></figure></p>
<p>访问你的GitHub Pages地址<code><a href="http://username.github.io" target="_blank" rel="external">http://username.github.io</a></code>应该能看到效果了</p>
<h3 id="主题"><a href="#主题" class="headerlink" title="主题"></a>主题</h3><p>官方主题列表:<a href="https://hexo.io/themes/" target="_blank" rel="external">Themes | Hexo</a><br>知乎的一个问答: <a href="https://www.zhihu.com/question/24422335" target="_blank" rel="external">有哪些好看的 Hexo 主题?</a><br>或者创建属于自己的主题:<a href="https://hexo.io/zh-cn/docs/themes.html" target="_blank" rel="external">参考文档</a></p>
<h3 id="More"><a href="#More" class="headerlink" title="More"></a>More</h3><h4 id="Markdown"><a href="#Markdown" class="headerlink" title="Markdown"></a>Markdown</h4><ul>
<li><a href="http://wowubuntu.com/markdown/" target="_blank" rel="external">Markdown 语法说明</a></li>
</ul>
<h4 id="使用自己的域名"><a href="#使用自己的域名" class="headerlink" title="使用自己的域名"></a>使用自己的域名</h4><ul>
<li>在<code>repository</code>创建一个<code>CNAME</code>文件,里面填写你的域名。设置好DNS解析就可以了。</li>
</ul>
</div>
</div>
</div>
<div class="post-list">
<div class="post-list-item article">
<h3 class="article-header">
<a href="/2016/03/20/kukuku/" >
kukuku
</a>
</h3>
<div class="article-info">
<a href="/2016/03/20/kukuku/"><span class="article-date">
2016-03-20
</span>
</a>
<span class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Python/">Python</a></li></ul>
</span>
</div>
<div class="article-entry">
<p><a href="https://github.com/grasssand/py/blob/master/kukuku.py" target="_blank" rel="external">kukuku.py</a>,kukuku岛爬图</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><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><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#!/usr/bin/env python3</span></span><br><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"></span><br><span class="line"><span class="string">'''一个kukukud岛的小爬虫'''</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> os</span><br><span class="line"><span class="keyword">import</span> requests</span><br><span class="line"><span class="keyword">from</span> bs4 <span class="keyword">import</span> BeautifulSoup</span><br><span class="line"></span><br><span class="line"><span class="comment">#版块</span></span><br><span class="line">url = <span class="string">'http://kukuku.cc/综合版1'</span></span><br><span class="line">headers = {<span class="string">'User-Agent'</span>: <span class="string">'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:45.0) Gecko/20100101 Firefox/45.0'</span>}</span><br><span class="line"></span><br><span class="line"><span class="comment">#获取串id 默认10页</span></span><br><span class="line"><span class="function"><span class="keyword">def</span> <span class="title">get_chuan_id</span><span class="params">(url=url, pages=<span class="number">10</span>)</span>:</span></span><br><span class="line"> page = <span class="number">1</span></span><br><span class="line"> <span class="keyword">while</span> page < (pages+<span class="number">1</span>):</span><br><span class="line"> payload = {<span class="string">'page'</span>: page}</span><br><span class="line"> req = requests.get(url, params=payload, headers=headers)</span><br><span class="line"> soup = BeautifulSoup(req.text)</span><br><span class="line"> <span class="keyword">yield</span> [a.attrs.get(<span class="string">'data-threads-id'</span>) <span class="keyword">for</span> a <span class="keyword">in</span> soup.select(<span class="string">'[class~=h-threads-item]'</span>)]</span><br><span class="line"> page += <span class="number">1</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#获取每个串所有图片地址</span></span><br><span class="line"><span class="function"><span class="keyword">def</span> <span class="title">get_image_urls</span><span class="params">()</span>:</span></span><br><span class="line"> <span class="keyword">for</span> chuan_id <span class="keyword">in</span> get_chuan_id():</span><br><span class="line"> <span class="keyword">for</span> id <span class="keyword">in</span> chuan_id:</span><br><span class="line"> chuan_url = <span class="string">'http://kukuku.cc/t/'</span> + str(id)</span><br><span class="line"> req = requests.get(chuan_url, headers=headers)</span><br><span class="line"> soup = BeautifulSoup(req.text)</span><br><span class="line"> last_page = int([a.attrs.get(<span class="string">'href'</span>) <span class="keyword">for</span> a <span class="keyword">in</span> soup.select(<span class="string">'[href*="page"]'</span>)][<span class="number">-1</span>].split(<span class="string">'='</span>)[<span class="number">-1</span>])</span><br><span class="line"> page = <span class="number">1</span></span><br><span class="line"> <span class="keyword">while</span> page < (last_page+<span class="number">1</span>):</span><br><span class="line"> payload = {<span class="string">'page'</span>: page}</span><br><span class="line"> req = requests.get(chuan_url, params=payload, headers=headers)</span><br><span class="line"> soup = BeautifulSoup(req.text)</span><br><span class="line"> <span class="keyword">yield</span> [a.attrs.get(<span class="string">'href'</span>) <span class="keyword">for</span> a <span class="keyword">in</span> soup.find_all(<span class="string">'a'</span>, class_=<span class="string">'h-threads-img-tool-btn uk-button-link'</span>)]</span><br><span class="line"> page += <span class="number">1</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#保存图片</span></span><br><span class="line"><span class="function"><span class="keyword">def</span> <span class="title">save_image</span><span class="params">()</span>:</span></span><br><span class="line"> <span class="keyword">if</span> <span class="keyword">not</span> os.path.isdir(<span class="string">'kukuku'</span>):</span><br><span class="line"> os.mkdir(<span class="string">'kukuku'</span>)</span><br><span class="line"> <span class="keyword">for</span> image_urls <span class="keyword">in</span> get_image_urls():</span><br><span class="line"> <span class="keyword">for</span> image_url <span class="keyword">in</span> image_urls:</span><br><span class="line"> print(image_url,<span class="string">'下载图片'</span>)</span><br><span class="line"> r = requests.get(image_url, headers=headers)</span><br><span class="line"> image_name = image_url.split(<span class="string">'/'</span>)[<span class="number">-1</span>]</span><br><span class="line"> <span class="keyword">with</span> open(<span class="string">'kukuku/'</span>+image_name, <span class="string">'wb'</span>) <span class="keyword">as</span> f:</span><br><span class="line"> f.write(r.content)</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> __name__ == <span class="string">'__main__'</span>:</span><br><span class="line"> save_image()</span><br></pre></td></tr></table></figure>
</div>
</div>
</div>
<div class="post-list">
<div class="post-list-item article">
<h3 class="article-header">
<a href="/2016/03/20/ubuntu-mono-asf/" >
Ubuntu使用 Mono + ASF 挂卡
</a>
</h3>
<div class="article-info">
<a href="/2016/03/20/ubuntu-mono-asf/"><span class="article-date">
2016-03-20
</span>
</a>
<span class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Mono/">Mono</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Ubuntu/">Ubuntu</a></li></ul>
</span>
</div>
<div class="article-entry">
<p><a href="http://www.mono-project.com/" target="_blank" rel="external">Mono</a>是一个开源的.net工具,可以在多平台运行C#程序。<br><a href="https://github.com/JustArchi/ArchiSteamFarm/" target="_blank" rel="external">ArchiSteamFarm</a>是一个c#写的支持多账号的挂卡软件。其他还有<a href="https://github.com/jshackles/idle_master" target="_blank" rel="external">Idel Master</a>(有c#和py,已停止更新)。<font color="white">idle master老登陆不了啊(つд⊂)</font></p>
<h2 id="安装Mono"><a href="#安装Mono" class="headerlink" title="安装Mono"></a>安装Mono</h2><p>官方文档安装使用指导: <a href="http://www.mono-project.com/docs/" target="_blank" rel="external">www.mono-project.com/docs</a></p>
<h3 id="添加Mono安装源和签名密钥"><a href="#添加Mono安装源和签名密钥" class="headerlink" title="添加Mono安装源和签名密钥"></a>添加Mono安装源和签名密钥</h3><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">$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF</span><br><span class="line">$ <span class="built_in">echo</span> <span class="string">"deb http://download.mono-project.com/repo/debian wheezy main"</span> | sudo tee /etc/apt/sources.list.d/mono-xamarin.list</span><br><span class="line">$ sudo apt-get update</span><br></pre></td></tr></table></figure>
<h3 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h3><p>官网提供了4个包:<br><code>mono-devel</code>: 编译源码<br><code>mono-complete</code>: 解决大多数 “assembly not found” 错误<br><code>referenceassemblies-pcl</code>: 提供PCL编译支持<br><code>ca-certificates-mono</code>: HTTPS连接时的SSL证书,当遇到HTTPS连接错误时需要安装</p>
<p>下载安装(下载过程比较久,请耐心等待)</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 mono-devel mono-complete referenceassemblies-pcl ca-certificates-mono</span><br></pre></td></tr></table></figure>
<h3 id="安装完成"><a href="#安装完成" class="headerlink" title="安装完成"></a>安装完成</h3><p>赶紧测试一下<br><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">$ mono -v</span><br></pre></td></tr></table></figure></p>
<h2 id="ASF"><a href="#ASF" class="headerlink" title="ASF"></a>ASF</h2><h3 id="配置ASF"><a href="#配置ASF" class="headerlink" title="配置ASF"></a>配置ASF</h3><p><a href="https://github.com/JustArchi/ArchiSteamFarm/releases/" target="_blank" rel="external">这里</a>下载最新版<code>zip</code>包。解压,修改<code>config</code>文件夹里的配置文件。<br><code>ASF.json</code>是全局配置。<code>example.json</code>和<code>minimal.json</code>是用户配置文件(一般配置/最小配置)。<br><br>复制<code>example.json</code>文件并重命名如<code>aa.json</code>, 修改如下几行</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></pre></td><td class="code"><pre><span class="line"><span class="string">"Enabled"</span>: <span class="literal">true</span>, //启用配置</span><br><span class="line"><span class="string">"SteamLogin"</span>: <span class="string">"username"</span>, //steam登陆用户名</span><br><span class="line"><span class="string">"SteamPassword"</span>: <span class="string">"password"</span>, //登陆密码,值为null时即每次启动ASF需手动输密码</span><br></pre></td></tr></table></figure>
<p>更多详细配置请参考<a href="https://github.com/JustArchi/ArchiSteamFarm/wiki/" target="_blank" rel="external">官方文档</a></p>
<h3 id="启动ASF"><a href="#启动ASF" class="headerlink" title="启动ASF"></a>启动ASF</h3><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">$ mono ASF.exe</span><br></pre></td></tr></table></figure>
<p>ssh连接主机时,结束ssh就会立即结束掉当前终端的进程。因此,还需要安装<code>GUN Screen</code>。<br><code>GUN Screen</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">$ sudo apt-get install screen</span><br></pre></td></tr></table></figure>
<p>运行命令<code>screen -S [screen]</code>新建一个screen,再在screen里运行ASF,如</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">$ screen -S ASF</span><br></pre></td></tr></table></figure>
<p>快捷键<code>ctrl + a</code>和<br><code>d</code> 从当前 screen 会话分离,并保持其后台运行<br><code>?</code> 列出快捷键和帮助<br><code>c</code> 创建另一个screen<br>更多快捷键使用请查看<a href="https://wiki.gentoo.org/wiki/Screen/" target="_blank" rel="external">wiki</a></p>
<p>当从会话分离后,<code>screen -ls</code>列出所有会话 </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></pre></td><td class="code"><pre><span class="line">$ screen -ls</span><br><span class="line">There is a screen on:</span><br><span class="line"> 1750.ASF (Detached)</span><br><span class="line">1 Socket <span class="keyword">in</span> /var/run/screen/S-xxx</span><br></pre></td></tr></table></figure>
<p>恢复会话使用<code>screen -r [screen]</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">$ screen -r ASF</span><br></pre></td></tr></table></figure>
<p>结束当前会话输入<code>exit</code>或<code>kill [进程号]</code></p>
<font color="white">还是第一次写这么长|∀` )</font>
</div>
</div>
</div>
<div class="main-footer">
© 2016 GrassSand - Powered by <a href="http://hexo.io" target="_blank">Hexo</a> - Theme <a href="https://github.com/denjones/hexo-theme-chan" target="_blank">Chan</a>
</div>
</div>
</div>
</div>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<link rel="stylesheet" href="/PhotoSwipe/photoswipe.css">
<link rel="stylesheet" href="/PhotoSwipe/default-skin/default-skin.css">
<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
<!-- Background of PhotoSwipe.
It's a separate element as animating opacity is faster than rgba(). -->
<div class="pswp__bg"></div>
<!-- Slides wrapper with overflow:hidden. -->
<div class="pswp__scroll-wrap">
<!-- Container that holds slides.
PhotoSwipe keeps only 3 of them in the DOM to save memory.
Don't modify these 3 pswp__item elements, data is added later on. -->
<div class="pswp__container">
<div class="pswp__item"></div>
<div class="pswp__item"></div>
<div class="pswp__item"></div>
</div>
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
<div class="pswp__ui pswp__ui--hidden">
<div class="pswp__top-bar">
<!-- Controls are self-explanatory. Order can be changed. -->
<div class="pswp__counter"></div>
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
<button class="pswp__button pswp__button--share" title="Share"></button>
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
<!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
<!-- element will get class pswp__preloader--active when preloader is running -->
<div class="pswp__preloader">
<div class="pswp__preloader__icn">
<div class="pswp__preloader__cut">
<div class="pswp__preloader__donut"></div>
</div>
</div>
</div>
</div>
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
<div class="pswp__share-tooltip"></div>
</div>
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>
<div class="pswp__caption">
<div class="pswp__caption__center"></div>
</div>
</div>
</div>
</div>
<script src="/PhotoSwipe/photoswipe.js"></script>
<script src="/PhotoSwipe/photoswipe-ui-default.js"></script>
<script src="/scripts/main.js"></script>
</body>
</html>