<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>「庫」</title>
  
  
  <link href="/atom.xml" rel="self"/>
  
  <link href="https://ku.io/"/>
  <updated>2018-05-10T07:24:10.434Z</updated>
  <id>https://ku.io/</id>
  
  <author>
    <name>Jing Su</name>
    
  </author>
  
  <generator uri="http://hexo.io/">Hexo</generator>
  
  <entry>
    <title>A Brief Comparison of OpenVAS and Acunetix</title>
    <link href="https://ku.io/a-brief-comparison-of-openvas-and-acunetix/"/>
    <id>https://ku.io/a-brief-comparison-of-openvas-and-acunetix/</id>
    <published>2018-05-04T07:51:55.000Z</published>
    <updated>2018-05-10T07:24:10.434Z</updated>
    
    <content type="html"><![CDATA[<h1 id="Background"><a href="#Background" class="headerlink" title="Background"></a>Background</h1><p>In last time I used OpenVAS as my vulnerability scanning tool, and made a concise test report. This time I am writing a brief comparison of OpenVAS and Acunetix in three aspects: Ease of use, Scanner Customizability, Task Report.</p><h1 id="Comparison"><a href="#Comparison" class="headerlink" title="Comparison"></a>Comparison</h1><h2 id="Ease-of-use"><a href="#Ease-of-use" class="headerlink" title="Ease of use"></a>Ease of use</h2><p>Both of them are using web based user interface. The web-based interface makes them run smoother, and also unlocks the potential of offering role-based access to multiple users within the organization. It is a very popular trends in recent scanner tools.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/75438705.png" alt="OpenVAS Login"></p><p>From the aesthetic perspective, the design style Acunetix is more modern and minimalism, also it provided some instruction when first login, that makes it more new user friendly.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/8d224899.png" alt="Acunetix Login"></p><p>The OpenVAS is linux system only, while Acunetix is windows system only. But installment process is very easy. For OpenVAS, if you are use Debian Linux (include Kali, Ubuntu, etc), just use built-in APT package tool can complete the  installment. For Acunetix, open the install EXE file downloaded from its official website and follow the instruction steps.</p><p>Overall, Acunetix has better organized interface elements and more easy to use compare to OpenVAS. However, OpenVAS provided CLI (Command-line Interface) that makes it more productive for power user.</p><h2 id="Scanner-Customizability"><a href="#Scanner-Customizability" class="headerlink" title="Scanner Customizability"></a>Scanner Customizability</h2><p>In the new scan interface, the OpenVAS is absolutely more customizable. It provided abundant of options to let you control your scan task. In most case, if you feel scan progress increase speed too slow, try to increase the maximum concurrently executed and maximum concurrently scanned value always helps.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/a6d16158.png" alt="OpenVAS Task Config"></p><p>The Acunetix provided less options, only the Scan Type, Report Template, and schedule time. Although this is good for newbies who does not understand every options meaning, it makes us take little control of our scan tasks.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/c50ef658.png" alt="Acunetix New Task"></p><p>From this aspect, OpenVAS has lots of options for every scan mission that makes it more professional and more customizable.</p><h2 id="Task-Report"><a href="#Task-Report" class="headerlink" title="Task Report"></a>Task Report</h2><p>After scan task done, the most thing we care about is the task report. OpenVAS displays very detailed report, include many parameters during the scan. We can know almost everything about a scan task. It is good for deep research, but it also like a double-edged sword, because full of screen information makes it hard to recognize the important part.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/970ba3e6.png" alt="OpenVAS Report"></p><p>The Acunetix follow its minimalism, reveal only a little information about a scan but crucial. It is easy to find the core info about a task, and know the vulnerable level straightforwardly.</p><p>However, Acunetix can let you export you report by HTML or PDF format. The PDF format report has relative professional details, you can directly use it for your customers and audiences.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/8d245152.png" alt="Acunetix Report"></p><h1 id="Conclusion"><a href="#Conclusion" class="headerlink" title="Conclusion"></a>Conclusion</h1><p>In my opinion, OpenVAS is suitable for security industry experts, it provides powerful customize options and generate comprehensive report. Besides, it is open source and free!</p><p>The Acunetix is appropriate for amateurs. For example, web developer can utilize Acunetix to build robust and secure websites. But it is commercial software and has a relative expensive price. During its 14 days trial period, a lot of details in the report is unavailable.</p>]]></content>
    
    <summary type="html">
    
      
      
        &lt;h1 id=&quot;Background&quot;&gt;&lt;a href=&quot;#Background&quot; class=&quot;headerlink&quot; title=&quot;Background&quot;&gt;&lt;/a&gt;Background&lt;/h1&gt;&lt;p&gt;In last time I used OpenVAS as my vuln
      
    
    </summary>
    
    
      <category term="en_US" scheme="https://ku.io/tags/en-us/"/>
    
  </entry>
  
  <entry>
    <title>Acunetix Web Vulnerability Scanner</title>
    <link href="https://ku.io/acunetix-web-vulnerability-scanner/"/>
    <id>https://ku.io/acunetix-web-vulnerability-scanner/</id>
    <published>2018-05-03T09:48:57.000Z</published>
    <updated>2018-05-10T07:10:30.933Z</updated>
    
    <content type="html"><![CDATA[<h1 id="Introduction"><a href="#Introduction" class="headerlink" title="Introduction"></a>Introduction</h1><p>Acunetix is an automated web application security testing tool that audits your web applications by checking for vulnerabilities like SQL Injection, Cross site scripting and other exploitable vulnerabilities. In general, Acunetix scans any website or web application that is accessible via a web browser and uses the HTTP/HTTPS protocol.</p><p>Acunetix offers a strong and unique solution for analyzing off-the-shelf and custom web applications including those utilizing JavaScript, AJAX and Web 2.0 web applications. Acunetix has an advanced crawler that can find almost any file.</p><p>Its functions and modules looks like Burp Suite, but not cross platform. However, compare to Burp Suite, Acunetix has higher detection rate and lower false positives. Besides, it use modern web based user interface, which is more easy to learn and convenient to use.</p><p>We can obtain Acunetix from its <a href="https://www.acunetix.com/vulnerability-scanner/download/" rel="external nofollow noopener noreferrer" target="_blank">official website</a> directly, it offers 14 day free trial. After submit trial form, you can get a download link from email. The download link is point to a EXE format file. Since it only provide Windows platform distribution, you need use virtual machine if working on other operating system or use the <a href="https://www.acunetix.com/vulnerability-scanner/online-scanner/" rel="external nofollow noopener noreferrer" target="_blank">online scanner</a>.</p><p>In this case, since I am working on macOS, I will use a <a href="https://developer.microsoft.com/en-us/windows/downloads/virtual-machines" rel="external nofollow noopener noreferrer" target="_blank">Windows 10 Developer VM</a> as backend to run Acunetix and show some usage examples.</p><h1 id="Installment"><a href="#Installment" class="headerlink" title="Installment"></a>Installment</h1><p>First of all, we need install the trial version to our machine, it is very simple, just click the EXE file and follow the instructions.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/12c2c6db.png" alt="Installment Setup"></p><p>During the install process, the setup wizard will ask for input a email and password for the administrator account. After install process, we can simply click the Acunetix icon in desktop or windows start menu to run Acunetix, it will automatic open system default web browser to localhost:13443 if you have not change the default port during the install process.</p><h1 id="Configuration"><a href="#Configuration" class="headerlink" title="Configuration"></a>Configuration</h1><p>When first open the web user interface, it will prompt a login form, just input the administrator account information we set before and we can sign in the dashboard. The data between the browser and the server, whether used directly on a computer running Acunetix or via the local network, is transferred via TLS/SSL. A unique certificate authority for your environment is generated during the installation procedure.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/8d224899.png" alt="Sign In"></p><p>After sign in, it will show dashboard page. There are some statistical data about targets and scan tasks, we can obtain abstract status about this system. It rates vulnerabilities for high, medium and low severity level. And we can know which is most vulnerable target, that is very helpful when we evaluate a system which includes several sub-domains. Besides, we can gain valuable insights from the top vulnerabilities data after we scanned considerable targets. The interface is fast and responsive, with a strong focus on functionality.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/edea07a6.png" alt="Dashboard Empty"></p><p>To begin a scan task, we need add a target first. Click the <h-char unicode="201c" class="biaodian cjk bd-open punct">“</h-char>Targets<h-char unicode="201d" class="biaodian cjk bd-close bd-end punct">”</h-char> label in the left sidebar, then click <h-char unicode="201c" class="biaodian cjk bd-open punct">“</h-char>Add Target<h-char unicode="201d" class="biaodian cjk bd-close bd-end punct">”</h-char> button, it will prompt a modal form to let us input address and description information. The description is optional and just works like comment.</p><p>We can start our first scan task after add a target, I use my <a href="https://jing.su" target="_blank" rel="noopener">personal website</a> here to conduct an authorized scan task since unauthorized scan may cause illegal risk.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/15cee372.png" alt="Add Target"></p><p>Before begin a scan, we can explore the <h-char unicode="201c" class="biaodian cjk bd-open punct">“</h-char>Settings<h-char unicode="201d" class="biaodian cjk bd-close bd-end punct">”</h-char> page, just click the corresponding label in left sidebar. And Acunetix provides some very basic settings option. You can set proxy now if you do not want expose yourself. I recommend you launch a Tor onion proxy locally and pass all the scan traffic flow through it for anonymous demand. Moreover, you can set a SMTP server in <h-char unicode="201c" class="biaodian cjk bd-open punct">“</h-char>Notifications Settings<h-char unicode="201d" class="biaodian cjk bd-close bd-end punct">”</h-char>, then you can get notified when a task finished or other events occurred.</p><p>In addition, if you install Acunetix in a server and want to share with your teammates like a cloud service, you can just simply create different user and user group for easily management. It is also a good practice to isolate different penetrate projects.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/ce4d38e1.png" alt="Proxy Settings"></p><p>Since scanner task normally cost sizable time and network resources, Acunetix provide <h-char unicode="201c" class="biaodian cjk bd-open punct">“</h-char>Excluded Hours<h-char unicode="201d" class="biaodian cjk bd-close bd-end punct">”</h-char> to let us manual schedule our background tasks peacefully.</p><h1 id="Usage"><a href="#Usage" class="headerlink" title="Usage"></a>Usage</h1><p>Back to the <h-char unicode="201c" class="biaodian cjk bd-open punct">“</h-char>Targets<h-char unicode="201d" class="biaodian cjk bd-close bd-end punct">”</h-char> page, we can select one or multi target and click scan button to config a scan task. It provides 6 different scan type including Full Scan, High Rank Vulnerabilities, Cross-site Scripting Vulnerabilities, SQL Injection Vulnerabilities, Weak Passwords and Crawl Only. By default, Acunetix defaults work for most sites, so you can start the scan without any further customizing at all. In this case, I choose the Full Scan selection.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/53a621fb.png" alt="Choose Scanning Options"></p><p>In this options model form, we can also set report type and schedule time. The report type does not matter at this time because we can generate any type after scan task done.</p><p>We will receive notification when our task done, and the report is waiting for us. In the summary part, the report marked threat level as HIGH.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/27d31115.png" alt="Report Header"></p><p>Then we can inspect the whole report. In fact, we can assess website performance according to Avg. Response Time. In the target information, it will display some detected fingerprint to infer server software, os and web framework, etc. However, these information can only use as a reference since we can easily modify HTTP response header and some other feature to deceive the scanner.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/8d245152.png" alt="Report Body"></p><p>In the bottom part of the summary page, it display latest discovered vulnerabilities and ordered by time, it use different colors to mark different alert level.</p><p>Besides, the scanner use crawler to follow links in website page, and list all of external domain in the hosts, we can straightforward add these hosts as target for further side-channel attack.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/023d8051.png" alt="Report Footer"></p><p>After complete scan, we can get a site structure tree generated by crawler, based on this site structure, we can dig in extra information, like find XSS or CSRF vulnerability or SQL injection point.</p><p>Furthermore, in this view it classified vulnerabilities by URL path, therefore we can research potential hidden danger in some path, it is extremely useful when target is a dynamic website.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/0f404ec9.png" alt="Site Structure"></p><p>Every vulnerabilities title is clickable, we can view the details about each vulnerability. In the detail page, we can know about the vulnerability description, it  has explained the causes and particulars. Also we can evaluate the urgency of fix this vulnerability based on the impact of this vulnerability.</p><p>Fortunately, Acunetix provided recommend solution to fix each vulnerability. In most case, we can simply follow the instruction to done the fix works. In the bottom of this page, we can see CWE and CVSS classification and some references.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/628f0ad2.png" alt="Simple Detail"></p><p>All reports can be downloaded in PDF and HTML formats, and if you want to customize your scanning to an even greater degree, just go into Settings &gt; Scan types, and create a new preset by selecting items from a long list of vulnerability classes and subclasses.</p><p>Moreover, the issue tracking functionality is a nice addition and can be integrated with Microsoft Team Foundation Server, Atlassian<h-char unicode="2019" class="biaodian cjk bd-close bd-end punct">’</h-char>s JIRA, and GitHub, that can be involved in the software development cycle.</p><h1 id="Conclusion"><a href="#Conclusion" class="headerlink" title="Conclusion"></a>Conclusion</h1><p>To sum up, Acunetix is very suitable for collaboration with tester and auditor, and it provide solid access control for different user. The web-based interface makes it run smoother, and also unlocks the potential of offering role-based access to multiple users within the organization.</p><p>Since it has web based user interface, it is feasible to build a private cloud vulnerabilities scanner service. This is a remarkable feature compare to Burp Suite and some other similar products.</p><p>During the testing phase, the most challenge occurred is to figure out differences between each scan types, we need know our true demand and then we can start a scan. Fortunately, Acunetix has provided detailed document and manual, therefore we can finally achieve our goals.</p><p>Also, if Acunetix can provide more customized option like Burp Suite, it will be more professional and works well in a variety of specific circumstances.</p><h1 id="References"><a href="#References" class="headerlink" title="References"></a>References</h1><p>[1] <a href="https://www.acunetix.com/support/docs/introduction/" rel="external nofollow noopener noreferrer" target="_blank">https://www.acunetix.com/support/docs/introduction/</a><br>[2] <a href="https://www.helpnetsecurity.com/2017/07/10/acunetix-11-review/" rel="external nofollow noopener noreferrer" target="_blank">https://www.helpnetsecurity.com/2017/07/10/acunetix-11-review/</a><br>[3] <a href="https://www.acunetix.com/resources/wvsmanual.pdf" rel="external nofollow noopener noreferrer" target="_blank">https://www.acunetix.com/resources/wvsmanual.pdf</a></p>]]></content>
    
    <summary type="html">
    
      
      
        &lt;h1 id=&quot;Introduction&quot;&gt;&lt;a href=&quot;#Introduction&quot; class=&quot;headerlink&quot; title=&quot;Introduction&quot;&gt;&lt;/a&gt;Introduction&lt;/h1&gt;&lt;p&gt;Acunetix is an automated web a
      
    
    </summary>
    
    
      <category term="en_US" scheme="https://ku.io/tags/en-us/"/>
    
  </entry>
  
  <entry>
    <title>Using A HPC as Google CoLab Runtime</title>
    <link href="https://ku.io/using-a-hpc-as-google-colab-runtime/"/>
    <id>https://ku.io/using-a-hpc-as-google-colab-runtime/</id>
    <published>2018-04-12T20:08:21.000Z</published>
    <updated>2018-05-16T05:46:58.403Z</updated>
    
    <content type="html"><![CDATA[<h1 id="Background"><a href="#Background" class="headerlink" title="Background"></a>Background</h1><p>In the past time, I used <a href="https://cocalc.com/" rel="external nofollow noopener noreferrer" target="_blank">CoCalc</a> to complete the Machine Learning in Python course lab with my teammates. Indeed, its real-time collaboration is very fantastic. However, its modified Jupyter kernel sometimes act weird, and I have to use its <h-char unicode="201c" class="biaodian cjk bd-open punct">“</h-char>Plain Jupyter Server<h-char unicode="201d" class="biaodian cjk bd-close bd-end punct">”</h-char> mode, but this mode is a normal Jupyter without collaboration. Besides, it lacks GPU accelerate and doubled its Standard Plan price after my first billing cycle. Therefore, I have sought for an alternative product. Finally, I found <a href="https://colab.research.google.com/" rel="external nofollow noopener noreferrer" target="_blank">Google Colab</a> which provided free GPU accelerate and modern material user interface.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/280dca4b.png" alt="Hello CoLab"></p><p>The CoLab is very easy to use, and it stores the <code>.ipynb</code> file in Google Drive, we can easily share with friends and sync between multi devices. Its mechanism is very similar to Google Docs. It provides decent CPU quota and 12 GB RAM, also sufficient GPU quota for a small project. Since it is totally free, it is an excellent product for data scientist beginner!</p><p><img src="//cdn-ku.b0.upaiyun.com/post/7321a2cb.png" alt="GPU Playground"></p><p>With the increase of complexity of neuron network, the CoLab<h-char unicode="2019" class="biaodian cjk bd-close bd-end punct">’</h-char>s hosted backend cost intolerable time for calculation, especially on vast epochs. Moreover, its 12 GB RAM limited dataset transform, particularly use convolutional neuron network.</p><p>Fortunately, Professor <a href="http://eclarson.com/" rel="external nofollow noopener noreferrer" target="_blank">Dr. Larson</a> approved my access request to <a href="https://faculty.smu.edu/csc/documentation/about.html" rel="external nofollow noopener noreferrer" target="_blank">SMU ManeFrame II</a>, it is a kind of HPC includes 36 accelerator nodes with NVIDIA P100 GPU, each node has 256 GB of DDR4-2400 RAM. The hardware equipment performs blazing fast for calculation works. It based on CentOS 7.x and use <a href="https://slurm.schedmd.com/" rel="external nofollow noopener noreferrer" target="_blank">Slurm</a> manage user workload.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/9b2fde1d.png" alt="SMU ManeFrame II"></p><p>Although we can use port forward to use HPC plain Jupyter server on our local machine, it would be fascinating if we can use HPC works with CoLab together! Thankfully, Google CoLab team added local runtime support feature, and we can use the <code>jupyter_http_over_ws</code> plugin published by them to makes it work.</p><h1 id="Walkthrough"><a href="#Walkthrough" class="headerlink" title="Walkthrough"></a>Walkthrough</h1><p>I will use SMU ManeFrame II as the example, but this procedure will theoretically work on other HPC that use Slurm. Also, you can skip the HPC part and use it on your AWS GPU EC2 Instance, etc.</p><h2 id="Conda-Environment"><a href="#Conda-Environment" class="headerlink" title="Conda Environment"></a>Conda Environment</h2><p>First of all, we need to create a <a href="https://conda.io/docs/" rel="external nofollow noopener noreferrer" target="_blank">Conda</a> virtual environment to let us easily maintain our library version and install packages. In ManeFrame II, the system GPU conda environment is in path <code>/hpc/applications/anaconda/3/envs/tensorflow_gpu</code>. Therefore we can simply clone this environment to our home directory and use <code>-n</code> parameter to name it <code>tf</code>, you can change the name to whatever you like.</p><pre class="line-numbers language-bash"><code class="language-bash">conda create -n tf --clone<span class="token operator">=</span><span class="token string">"/hpc/applications/anaconda/3/envs/tensorflow_gpu"</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre><p>After setup the conda env, you can update Python to latest version use:</p><pre class="line-numbers language-bash"><code class="language-bash">conda update -n tf python<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre><p>Also, you can update TensorFlow or Keras version as the same. And if you want to install a new package like OpenCV, use:</p><pre class="line-numbers language-bash"><code class="language-bash">conda <span class="token function">install</span> -y -c conda-forge -n tf opencv<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre><p>Since the Jupyter is running on the server side, you may want to use a password instead of token for convenience:</p><pre class="line-numbers language-bash"><code class="language-bash">jupyter notebook --generate-configjupyter notebook password<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre><p>This two command above will create the Jupyter folder if necessary, and create notebook configuration file, then prompt you for your password and record the hashed password in your <code>jupyter_notebook_config.json</code>.</p><h2 id="Request-GPU-Node"><a href="#Request-GPU-Node" class="headerlink" title="Request GPU Node"></a>Request GPU Node</h2><p>Then we can write a sbatch file to let Slurm request node for us:</p><pre class="line-numbers language-bash"><code class="language-bash"><span class="token shebang important">#!/bin/bash</span><span class="token comment" spellcheck="true">#SBATCH -J jupyter</span><span class="token comment" spellcheck="true">#SBATCH -o tf_jupyter_%j.out</span><span class="token comment" spellcheck="true">#SBATCH -p gpgpu-1</span><span class="token comment" spellcheck="true">#SBATCH --gres=gpu:1</span><span class="token comment" spellcheck="true">#SBATCH --mem=250G</span><span class="token comment" spellcheck="true">#SBATCH --exclusive</span>module purgemodule load tensorflow<span class="token function">source</span> activate tflogin_node<span class="token operator">=</span><span class="token string">"login05.m2.smu.edu"</span>unset XDG_RUNTIME_DIRport<span class="token operator">=</span>60099jupyter notebook --no-browser --NotebookApp.allow_origin<span class="token operator">=</span><span class="token string">'https://colab.research.google.com'</span> --port<span class="token operator">=</span><span class="token variable">${port}</span> <span class="token operator">&amp;</span><span class="token function">sleep</span> 30s<span class="token function">ssh</span> -N -R <span class="token variable">${port}</span>:localhost:<span class="token variable">${port}</span> <span class="token variable">${login_node}</span> <span class="token operator">&amp;</span><span class="token function">wait</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre><p>I saved the sbatch file on <code>~/script/jupyter_gpgpu.sbatch</code>, you can change the login_node or port number to fulfill your demand. After that, submit our request use <code>sbatch</code> command:</p><pre class="line-numbers language-bash"><code class="language-bash">sbatch ~/script/jupyter_gpgpu.sbatch<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre><p>Then this request is in the Slurm queue and wait for resources, you can check the status by the following command:</p><pre class="line-numbers language-bash"><code class="language-bash">squeue -u <span class="token variable"><span class="token variable">`</span><span class="token function">whoami</span><span class="token variable">`</span></span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre><h2 id="Connect-to-CoLab"><a href="#Connect-to-CoLab" class="headerlink" title="Connect to CoLab"></a>Connect to CoLab</h2><p>After Slrum requested corresponding resources for us, we can simply use SSH to forward remote ManeFrame II Jupyter port to our local machine. In this case, since we defined login node to <code>login05</code> and port to <code>60099</code>, we can use this command on our local machine:</p><pre class="line-numbers language-bash"><code class="language-bash"><span class="token function">ssh</span> -L 60099:localhost:60099 your_username@login05.m2.smu.edu<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre><p>And then open <code>http://localhost:60099</code> in your web browser, login by the password you set to let Jupyter write credential information to Cookies. After that, we can open CoLab, and click the arrow down icon in CONNECT button, select <h-char unicode="201c" class="biaodian cjk bd-open punct">“</h-char>Connect to local runtime<h-char unicode="201d" class="biaodian cjk bd-close bd-end punct">”</h-char>, input our port <code>60099</code> in the prompted modal:</p><p><img src="//cdn-ku.b0.upaiyun.com/post/da54e1df.png" alt="Input Port"></p><p>Click the CONNECT button, if everything goes well, it will connect to HPC runtime, and you are all set.</p><p><img src="//cdn-ku.b0.upaiyun.com/post/79a98a40.png" alt="CoLab X SMU ManeFrame II"></p><p>The CoLab will work like a charm, and you can enjoy your training!</p>]]></content>
    
    <summary type="html">
    
      
      
        &lt;h1 id=&quot;Background&quot;&gt;&lt;a href=&quot;#Background&quot; class=&quot;headerlink&quot; title=&quot;Background&quot;&gt;&lt;/a&gt;Background&lt;/h1&gt;&lt;p&gt;In the past time, I used &lt;a href=&quot;http
      
    
    </summary>
    
    
      <category term="en_US" scheme="https://ku.io/tags/en-us/"/>
    
  </entry>
  
  <entry>
    <title>Texas 驾照任务链</title>
    <link href="https://ku.io/texas-driver-license-quests/"/>
    <id>https://ku.io/texas-driver-license-quests/</id>
    <published>2017-08-20T15:39:42.000Z</published>
    <updated>2018-05-05T22:52:18.637Z</updated>
    
    <content type="html"><![CDATA[<h2 id="预备条件"><a href="# 预备条件" class="headerlink" title="预备条件"></a>预备条件 </h2><p> 根据德州法律 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char><code>16 岁以上</code> 就可以考取驾照 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 其中 <h-hws hidden> </h-hws><code>16-17 岁</code> 之间需要满足特殊的前置条件 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char><br> 对于 <h-hws hidden> </h-hws><code>18-24 岁</code> 和<h-hws hidden> </h-hws><code>25 岁及以上 </code> 的申请者有不同的任务链 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char><br><code>18-24 岁</code> 需要强制性完成 <code>Driver Education Course</code> 并拿到证书 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char><br><code>25 岁及以上</code> 则可以直接预约 Road Test<h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char>不需要取得 Permit<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><table><thead><tr><th>年龄段</th><th>支线任务</th></tr></thead><tbody><tr><td>16-17</td><td>满足特殊的前置条件</td></tr><tr><td>18-24</td><td>Driver Education Course; Permit; Road Test</td></tr><tr><td>25-∞</td><td>Road Test</td></tr></tbody></table><p>但是对于所有的申请者 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 都有一个背景条件是必须在美国超过 30 天 <h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya"><h-inner>（</h-inner></h-char> 以 I-94 日期为准 <h-char unicode="ff09" class="biaodian cjk bd-close bd-end bd-jiya"><h-inner>）</h-inner></h-char> 同时有 Texas 的居住地址才可以取得 Permit 或申请驾照<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p>通常都是申请 Class C 驾照 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 此外 Class A 是商业用途 <h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya"><h-inner>（</h-inner></h-char> 巴士 <h-char unicode="3001" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>、</h-inner></h-char> 货车等<h-char unicode="ff09" class="biaodian cjk bd-close bd-end bd-jiya bd-consecutive"><h-inner>）</h-inner></h-char><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-consecutive end-portion bd-hangable" prev="bd-close bd-end"><h-inner>，</h-inner></h-char>Class M 是摩托车驾照<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><h2 id="Quest-1-Driver-Education-Course- 交规课程"><a href="#Quest-1-Driver-Education-Course- 交规课程" class="headerlink" title="Quest 1: Driver Education Course (交规课程)"></a>Quest 1: Driver Education Course (交规课程)</h2><p>Driver Education Course 可以通过自学交规手册然后去到 DPS 现场笔试 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 也可以通过网络看视频学习然后在线考试<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p>通常都是通过网课的方式 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 因为做错了没通过可以立刻从来 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 也不需要特意跑去 DPS<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p>有几个网站都可以上网课 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 一般最常见的是 <a href="http://bit.ly/2vPDQrf" rel="external nofollow noopener noreferrer" target="_blank">I Drive Safely</a> (10% off link)<h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char>通常的是 30-40 USD 左右浮动价格 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 完成了考试后会有证书邮寄到家里 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 通过上面的 Ref 链接加入会有九折<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p>证书制作和邮寄通常需要 2 周左右 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 所以这个任务可以提前完成 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 不需要等到住满 30 天再开始进行 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 也可以选择加钱的方式得到更快的邮寄速度<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p>如果是想自学交规去 DPS 现场考试可以参考 Texas DPS 官方推出的手册 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 免费<h-char unicode="ff1a" class="biaodian cjk bd-end bd-jiya"><h-inner>：</h-inner></h-char></p><blockquote><p><em><h-word class="western"><h-char class="alphabet latin">T</h-char><h-char class="alphabet latin">e</h-char><h-char class="alphabet latin">x</h-char><h-char class="alphabet latin">a</h-char><h-char class="alphabet latin">s</h-char></h-word> <h-word class="western"><h-char class="alphabet latin">D</h-char><h-char class="alphabet latin">r</h-char><h-char class="alphabet latin">i</h-char><h-char class="alphabet latin">v</h-char><h-char class="alphabet latin">e</h-char><h-char class="alphabet latin">r</h-char></h-word> <h-word class="western"><h-char class="alphabet latin">H</h-char><h-char class="alphabet latin">a</h-char><h-char class="alphabet latin">n</h-char><h-char class="alphabet latin">d</h-char><h-char class="alphabet latin">b</h-char><h-char class="alphabet latin">o</h-char><h-char class="alphabet latin">o</h-char><h-char class="alphabet latin">k</h-char><h-char class="punct">:</h-char></h-word></em><br><a href="https://www.dps.texas.gov/internetforms/Forms/DL-7.pdf" rel="external nofollow noopener noreferrer" target="_blank">https://www.dps.texas.gov/internetforms/Forms/DL-7.pdf</a></p></blockquote><h2 id="Quest-2-Permit- 临时驾照"><a href="#Quest-2-Permit- 临时驾照" class="headerlink" title="Quest 2: Permit (临时驾照)"></a>Quest 2: Permit (临时驾照)</h2><p>在居住满了 30 天后 <h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya"><h-inner>（</h-inner></h-char> 以 I-94 上面日期为准 <h-char unicode="ff09" class="biaodian cjk bd-close bd-end bd-jiya bd-consecutive"><h-inner>）</h-inner></h-char><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-consecutive end-portion bd-hangable" prev="bd-close bd-end"><h-inner>，</h-inner></h-char> 就可以去 DPS 填表换取纸质的临时 Permit<h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char>正式的 Permit 会在 2 周内寄到家庭地址 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 现场需要支付 25 USD 的 <strong> 现金 </strong><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 同时需要携带以下材料<h-char unicode="ff1a" class="biaodian cjk bd-end bd-jiya"><h-inner>：</h-inner></h-char></p><ul><li>Driver Education Course Certificate (Quest 1 收到的证书)</li><li>护照</li><li>I-94 打印</li><li>合法身份证明 <h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya"><h-inner>（</h-inner></h-char> 如 I-20 表格)</li><li>Texas 居住证明<h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya"><h-inner>（</h-inner></h-char>Bank Statement/Residential Lease Contract/Utility Bill 任选 2 个即可<h-char unicode="ff09" class="biaodian cjk bd-close bd-end bd-jiya"><h-inner>）</h-inner></h-char></li></ul><p>现场需要拍照 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 提前准备好形象以免悔恨 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 此外 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 将身高 <h-char unicode="3001" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>、</h-inner></h-char> 体重提前换算成英制单位 <h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya"><h-inner>（</h-inner></h-char>inch/lbs<h-char unicode="ff09" class="biaodian cjk bd-close bd-end bd-jiya"><h-inner>）</h-inner></h-char> 会提高现场效率<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><blockquote><p>参考链接<h-char unicode="ff1a" class="biaodian cjk bd-end bd-jiya"><h-inner>：</h-inner></h-char><br><a href="https://www.dps.texas.gov/DriverLicense/residencyReqNonCDL.htm" rel="external nofollow noopener noreferrer" target="_blank">https://www.dps.texas.gov/DriverLicense/residencyReqNonCDL.htm</a></p></blockquote><h2 id="Quest-3-Road-Test- 路考"><a href="#Quest-3-Road-Test- 路考" class="headerlink" title="Quest 3: Road Test (路考)"></a>Quest 3: Road Test (路考)</h2><p>预约好路考后 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 需要自备车辆带齐 Quest 2 中的材料前往 DPS 现场 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 填表排队缴费后等待路考<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p>每次缴费后一共有 3 次机会 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 即第一次没过后还有 2 次免费重新路考的计划<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><blockquote><p>参考链接<h-char unicode="ff1a" class="biaodian cjk bd-end bd-jiya"><h-inner>：</h-inner></h-char><br><a href="http://www.dps.texas.gov/DriverLicense/ScheduleTest.aspx" rel="external nofollow noopener noreferrer" target="_blank">http://www.dps.texas.gov/DriverLicense/ScheduleTest.aspx</a><br><a href="https://www.dmv.org/tx-texas/apply-license.php" rel="external nofollow noopener noreferrer" target="_blank">https://www.dmv.org/tx-texas/apply-license.php</a></p></blockquote>]]></content>
    
    <summary type="html">
    
      
      
        &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; 根据德州法律 &lt;h-char unicode=&quot;ff0c&quot; class=&quot;biaodian cjk bd-end bd
      
    
    </summary>
    
    
      <category term="zh_CN" scheme="https://ku.io/tags/zh-cn/"/>
    
      <category term="日常" scheme="https://ku.io/tags/%E6%97%A5%E5%B8%B8/"/>
    
      <category term="记录" scheme="https://ku.io/tags/%E8%AE%B0%E5%BD%95/"/>
    
  </entry>
  
  <entry>
    <title>Moved from Ghost to Hexo</title>
    <link href="https://ku.io/moved-from-ghost-to-hexo/"/>
    <id>https://ku.io/moved-from-ghost-to-hexo/</id>
    <published>2016-07-22T08:17:07.000Z</published>
    <updated>2018-05-05T22:52:10.957Z</updated>
    
    <content type="html"><![CDATA[<h1 id="Origin"><a href="#Origin" class="headerlink" title="Origin"></a>Origin</h1><p>About two years and a half ago, I had <a href="/goodbye-jekyll-hello-ghost/">moved from Jekyll to Ghost</a>, and met the decent theme Ghostwriter, I modified its primary color and then added some functions and animations to suit the demand of my blog.</p><p>There is a screenshot of modified Ghostwriter:</p><p><img src="//cdn-ku.b0.upaiyun.com/post/dd9cdc39.png" alt="Ghost with Ghostwriter"></p><p>Even when I took a very long break I still kinda blogged, I still love Ghost, but however, in my current opinion, the Ghost is not fun, which means, it is indeed a convenient tool to start writing, but not much attractive to play with. And although it is server side runtime, it provides zero dynamic features and only generates HTML. Therefore why don<h-char unicode="2019" class="biaodian cjk bd-close bd-end punct">’</h-char>t just choose a static site generator like <a href="https://hexo.io" rel="external nofollow noopener noreferrer" target="_blank">Hexo</a>?</p><h1 id="Result"><a href="#Result" class="headerlink" title="Result"></a>Result</h1><p>Because I have kind of nostalgia, so I ported the Ghostwriter theme to Hexo, thankfully it is not difficult to port theme templates from Handlebars to ejs, I finally have done this work, and modified it again with much features like syntax highlight and so on.</p><p>Really hopes I can still keep blogging with much leisure time.</p>]]></content>
    
    <summary type="html">
    
      
      
        &lt;h1 id=&quot;Origin&quot;&gt;&lt;a href=&quot;#Origin&quot; class=&quot;headerlink&quot; title=&quot;Origin&quot;&gt;&lt;/a&gt;Origin&lt;/h1&gt;&lt;p&gt;About two years and a half ago, I had &lt;a href=&quot;/goodby
      
    
    </summary>
    
    
      <category term="en_US" scheme="https://ku.io/tags/en-us/"/>
    
  </entry>
  
  <entry>
    <title>Airplay X Fedora 19 @ CubieBoard2</title>
    <link href="https://ku.io/airplay-x-fedora-19-at-cubieboard2/"/>
    <id>https://ku.io/airplay-x-fedora-19-at-cubieboard2/</id>
    <published>2014-02-22T00:00:00.000Z</published>
    <updated>2018-05-05T22:52:07.061Z</updated>
    
    <content type="html"><![CDATA[<h2 id="Airplay-X-Fedora-19"><a href="#Airplay-X-Fedora-19" class="headerlink" title="Airplay X Fedora 19"></a>Airplay X Fedora 19</h2><p>之前把 Fedora 19 (Schrödinger<h-char unicode="2019" class="biaodian cjk bd-close bd-end punct">’</h-char>s Cat) 装进了 CubieBoard 里面 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 然后挂着一些 python 脚本 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 今天在 github 上发现有大神把 AirPort Express 里面的 Airplay 模块模拟出来了 <h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya"><h-inner>（</h-inner></h-char><a href="https://github.com/abrasive/shairport" rel="external nofollow noopener noreferrer" target="_blank">shairport</a><h-char unicode="ff09" class="biaodian cjk bd-close bd-end bd-jiya bd-consecutive"><h-inner>）</h-inner></h-char><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-consecutive end-portion bd-hangable" prev="bd-close bd-end"><h-inner>，</h-inner></h-char> 不过 <code>README.md</code> 给出的 tutorials 是基于 debian 类系统的 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 用 yum search 搜了一下相关的 rpm 包 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 成功装入了 CubieBoard 上面的 Fedora 系统<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p><img src="//cdn-ku.b0.upaiyun.com/post/1ac2ad43.jpg" alt="My CubieBoard"></p><h2 id="安装依赖库"><a href="# 安装依赖库" class="headerlink" title="安装依赖库"></a>安装依赖库 </h2><p> 首先 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 看到 REAMME.md 里面给出的</p><blockquote><h3 id="Build-Requirements"><a href="#Build-Requirements" class="headerlink" title="Build Requirements"></a>Build Requirements</h3></blockquote><blockquote><h4 id="Required"><a href="#Required" class="headerlink" title="Required:"></a>Required:</h4></blockquote><blockquote><ul><li>OpenSSL</li></ul></blockquote><blockquote><h4 id="Optionally"><a href="#Optionally" class="headerlink" title="Optionally:"></a>Optionally:</h4></blockquote><blockquote><ul><li>libao</li><li>PulseAudio</li><li>avahi</li></ul></blockquote><p>于是安装以上库<h-char unicode="ff1a" class="biaodian cjk bd-end bd-jiya"><h-inner>：</h-inner></h-char> <code>yum install openssl-devel libao-devel  pulseaudio-libs-devel avahi-devel alsa-lib-devel gengetopt -y</code></p><p><em><h-word class="western"><h-char class="alphabet latin">a</h-char><h-char class="alphabet latin">l</h-char><h-char class="alphabet latin">s</h-char><h-char class="alphabet latin">a</h-char></h-word> <h-char class="hanzi cjk">和 </h-char> <h-word class="western"><h-char class="alphabet latin">g</h-char><h-char class="alphabet latin">e</h-char><h-char class="alphabet latin">t</h-char><h-char class="alphabet latin">o</h-char><h-char class="alphabet latin">p</h-char><h-char class="alphabet latin">t</h-char></h-word> <h-char class="hanzi cjk"> 是</h-char><h-char class="hanzi cjk">后 </h-char><h-char class="hanzi cjk"> 来</h-char> <h-word class="western"><h-char class="alphabet latin">c</h-char><h-char class="alphabet latin">o</h-char><h-char class="alphabet latin">n</h-char><h-char class="alphabet latin">f</h-char><h-char class="alphabet latin">i</h-char><h-char class="alphabet latin">g</h-char><h-char class="alphabet latin">u</h-char><h-char class="alphabet latin">r</h-char><h-char class="alphabet latin">e</h-char></h-word> <h-char class="hanzi cjk">提 </h-char><h-char class="hanzi cjk"> 示</h-char> <h-word class="western"><h-char class="alphabet latin">n</h-char><h-char class="alphabet latin">o</h-char><h-char class="alphabet latin">t</h-char></h-word> <h-jinze class="wei"><h-word class="western"><h-char class="alphabet latin">f</h-char><h-char class="alphabet latin">o</h-char><h-char class="alphabet latin">u</h-char><h-char class="alphabet latin">n</h-char><h-char class="alphabet latin">d</h-char></h-word><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char></h-jinze><h-cs hidden class="jinze-outer jiya-outer hangable-outer"> </h-cs><h-char class="hanzi cjk">于 </h-char><h-char class="hanzi cjk"> 是</h-char><h-char class="hanzi cjk">一 </h-char><h-char class="hanzi cjk"> 并</h-char><h-char class="hanzi cjk">加 </h-char><h-char class="hanzi cjk"> 上</h-char><h-char class="hanzi cjk">安 </h-char><h-jinze class="wei"><h-char class="hanzi cjk"> 装</h-char><h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></h-jinze><h-cs hidden class="jinze-outer jiya-outer hangable-outer"> </h-cs></em></p><p><em><h-cs hidden class="jinze-outer jiya-outer"> </h-cs><h-jinze class="tou"><h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya"><h-inner>（</h-inner></h-char><h-char class="hanzi cjk">不 </h-char></h-jinze><h-char class="hanzi cjk"> 推</h-char><h-char class="hanzi cjk">荐 </h-char><h-char class="hanzi cjk"> 安</h-char><h-char class="hanzi cjk">装 </h-char> <h-word class="western"><h-char class="alphabet latin">p</h-char><h-char class="alphabet latin">u</h-char><h-char class="alphabet latin">l</h-char><h-char class="alphabet latin">s</h-char><h-char class="alphabet latin">e</h-char><h-char class="alphabet latin">a</h-char><h-char class="alphabet latin">u</h-char><h-char class="alphabet latin">d</h-char><h-char class="alphabet latin">i</h-char><h-char class="alphabet latin">o</h-char></h-word><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char><h-char class="hanzi cjk"> 有</h-char><h-char class="hanzi cjk">一 </h-char><h-char class="hanzi cjk"> 定</h-char><h-char class="hanzi cjk">几 </h-char><h-char class="hanzi cjk"> 率</h-char><h-char class="hanzi cjk">在 </h-char><h-char class="hanzi cjk"> 后</h-char><h-char class="hanzi cjk">面 </h-char><h-char class="hanzi cjk"> 运</h-char><h-char class="hanzi cjk">行 </h-char><h-char class="hanzi cjk"> 时</h-char><h-char class="hanzi cjk">会 </h-char><h-char class="hanzi cjk"> 提</h-char><h-char class="hanzi cjk">示 </h-char> <code><h-word class="western"><h-char class="alphabet latin">p</h-char><h-char class="alphabet latin">u</h-char><h-char class="alphabet latin">l</h-char><h-char class="alphabet latin">s</h-char><h-char class="alphabet latin">e</h-char><h-char class="alphabet latin">a</h-char><h-char class="alphabet latin">u</h-char><h-char class="alphabet latin">d</h-char><h-char class="alphabet latin">i</h-char><h-char class="alphabet latin">o</h-char></h-word> <h-word class="western"><h-char class="alphabet latin">u</h-char><h-char class="alphabet latin">n</h-char><h-char class="alphabet latin">a</h-char><h-char class="alphabet latin">b</h-char><h-char class="alphabet latin">l</h-char><h-char class="alphabet latin">e</h-char></h-word> <h-word class="western"><h-char class="alphabet latin">t</h-char><h-char class="alphabet latin">o</h-char></h-word> <h-word class="western"><h-char class="alphabet latin">c</h-char><h-char class="alphabet latin">o</h-char><h-char class="alphabet latin">n</h-char><h-char class="alphabet latin">n</h-char><h-char class="alphabet latin">e</h-char><h-char class="alphabet latin">c</h-char><h-char class="alphabet latin">t</h-char></h-word> <h-word class="western"><h-char class="alphabet latin">c</h-char><h-char class="alphabet latin">o</h-char><h-char class="alphabet latin">n</h-char><h-char class="alphabet latin">n</h-char><h-char class="alphabet latin">e</h-char><h-char class="alphabet latin">c</h-char><h-char class="alphabet latin">t</h-char><h-char class="alphabet latin">i</h-char><h-char class="alphabet latin">o</h-char><h-char class="alphabet latin">n</h-char></h-word> <h-jinze class="wei"><h-word class="western"><h-char class="alphabet latin">r</h-char><h-char class="alphabet latin">e</h-char><h-char class="alphabet latin">f</h-char><h-char class="alphabet latin">u</h-char><h-char class="alphabet latin">s</h-char><h-char class="alphabet latin">e</h-char><h-char class="alphabet latin">d</h-char></h-word><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop">，</h-char></h-jinze></code><h-char class="hanzi cjk"> 关</h-char><h-char class="hanzi cjk">闭 </h-char> <h-word class="western"><h-char class="alphabet latin">S</h-char><h-char class="alphabet latin">E</h-char><h-char class="alphabet latin">L</h-char><h-char class="alphabet latin">i</h-char><h-char class="alphabet latin">n</h-char><h-char class="alphabet latin">u</h-char><h-char class="alphabet latin">x</h-char></h-word> <h-char class="hanzi cjk"> 也</h-char><h-char class="hanzi cjk">没 </h-char><h-jinze class="wei"><h-char class="hanzi cjk"> 用</h-char><h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></h-jinze><h-cs hidden class="jinze-outer jiya-outer hangable-outer"> </h-cs> <h-char unicode="ff09" class="biaodian cjk bd-close bd-end bd-jiya"><h-inner>）</h-inner></h-char></em></p><h2 id="编译安装"><a href="# 编译安装" class="headerlink" title="编译安装"></a>编译安装</h2><pre class="line-numbers language-bash"><code class="language-bash"><span class="token function">cd</span> /tmp<span class="token function">git</span> clone https://github.com/abrasive/shairport.git<span class="token function">cd</span> shairport./configure<span class="token function">make</span><span class="token function">cp</span> ./shairport /bin/<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre><h2 id="使用"><a href="# 使用" class="headerlink" title="使用"></a>使用</h2><pre class="line-numbers language-bash"><code class="language-bash">shairport<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre><p>或</p><pre class="line-numbers language-bash"><code class="language-bash">shairport -a <span class="token string">'service name'</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre><p>使用前者 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 在 airplay 输出界面便是 shairport @ hostname<h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char>如果你想要个特别的名字 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 便可以用后面指定服务名<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p>然后打开 iOS 或 OS X 设备的 音乐 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 这时在播放按钮旁边便会多出 airplay 的图标 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 选择并播放即可<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><h2 id="部署图"><a href="# 部署图" class="headerlink" title="部署图"></a>部署图</h2><p><img src="//cdn-ku.b0.upaiyun.com/post/11b43ff1.jpg" alt="CubieBoard @ xbox360"></p><p>把 xbox360 的 HDMI 插到了 CubieBoard 上 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 现在 xbox 完全成了 CubieBoard 的垫板 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-consecutive bd-hangable"><h-inner>。</h-inner></h-char><h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya bd-consecutive end-portion" prev="bd-end bd-cop"><h-inner>（</h-inner></h-char><em><h-char class="hanzi cjk"> 因</h-char><h-char class="hanzi cjk">为 </h-char> <h-word class="western"><h-char class="alphabet latin">G</h-char><h-char class="alphabet latin">T</h-char><h-char class="alphabet latin">A</h-char><h-char class="alphabet latin">5</h-char></h-word> <h-char class="hanzi cjk"> 打</h-char><h-char class="hanzi cjk">腻 </h-char><h-jinze class="wei"><h-char class="hanzi cjk"> 了</h-char><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char></h-jinze><h-cs hidden class="jinze-outer jiya-outer hangable-outer"> </h-cs><h-char class="hanzi cjk">没 </h-char><h-char class="hanzi cjk"> 啥</h-char><h-char class="hanzi cjk">其 </h-char><h-char class="hanzi cjk"> 他</h-char><h-char class="hanzi cjk">好 </h-char><h-char class="hanzi cjk"> 玩</h-char><h-char class="hanzi cjk">的 </h-char><h-jinze class="wei"><h-char class="hanzi cjk"> 了</h-char><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char></h-jinze><h-cs hidden class="jinze-outer jiya-outer hangable-outer"> </h-cs><h-char class="hanzi cjk">之 </h-char><h-char class="hanzi cjk"> 前</h-char><h-char class="hanzi cjk">研 </h-char><h-char class="hanzi cjk"> 究</h-char> <h-word class="western"><h-char class="alphabet latin">K</h-char><h-char class="alphabet latin">i</h-char><h-char class="alphabet latin">n</h-char><h-char class="alphabet latin">e</h-char><h-char class="alphabet latin">c</h-char><h-char class="alphabet latin">t</h-char></h-word> <h-char class="hanzi cjk">编 </h-char><h-char class="hanzi cjk"> 程</h-char><h-char class="hanzi cjk">发 </h-char><h-char class="hanzi cjk"> 现</h-char><h-char class="hanzi cjk">坑 </h-char><h-char class="hanzi cjk"> 太</h-char><h-jinze class="wei"><h-char class="hanzi cjk">多 </h-char><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char></h-jinze><h-cs hidden class="jinze-outer jiya-outer hangable-outer"> </h-cs><h-char class="hanzi cjk"> 弃</h-char><h-char class="hanzi cjk">坑 </h-char><h-jinze class="wei"><h-char class="hanzi cjk"> 了</h-char><h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-consecutive bd-hangable"><h-inner>。</h-inner></h-char></h-jinze><h-cs hidden class="jinze-outer jiya-outer bd-end bd-cop hangable-outer"> </h-cs></em><h-char unicode="ff09" class="biaodian cjk bd-close bd-end bd-jiya bd-consecutive end-portion" prev="bd-end bd-cop"><h-inner>）</h-inner></h-char></p>]]></content>
    
    <summary type="html">
    
      
      
        &lt;h2 id=&quot;Airplay-X-Fedora-19&quot;&gt;&lt;a href=&quot;#Airplay-X-Fedora-19&quot; class=&quot;headerlink&quot; title=&quot;Airplay X Fedora 19&quot;&gt;&lt;/a&gt;Airplay X Fedora 19&lt;/h2&gt;&lt;p&gt;之前
      
    
    </summary>
    
    
      <category term="zh_CN" scheme="https://ku.io/tags/zh-cn/"/>
    
  </entry>
  
  <entry>
    <title>使用 node-inspector 调试 node.js</title>
    <link href="https://ku.io/debug-node-js-by-node-inspector/"/>
    <id>https://ku.io/debug-node-js-by-node-inspector/</id>
    <published>2014-02-09T00:00:00.000Z</published>
    <updated>2018-05-05T22:52:03.189Z</updated>
    
    <content type="html"><![CDATA[<h2 id="介绍"><a href="# 介绍" class="headerlink" title="介绍"></a>介绍 </h2><p> 写 <code>node.js</code> 总是被回调函数绕晕 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 出现 bug 去审查代码也很头疼 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 发现 <code>node.js</code> 社区的开发者都推荐使用 <code>node-inspector</code> 进行调试 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 试了下确实很赞 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 调试界面用的是 <code>chrome</code> 开发者工具的 <code>js</code> 调试界面 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 毫无学习成本<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><h2 id="安装"><a href="# 安装" class="headerlink" title="安装"></a>安装</h2><pre class="line-numbers language-bash"><code class="language-bash"><span class="token function">npm</span> <span class="token function">install</span> -g node-inspector<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre><h2 id="使用"><a href="# 使用" class="headerlink" title="使用"></a>使用</h2><ul><li>启动 node-inspector <h-char unicode="ff1a" class="biaodian cjk bd-end bd-jiya"><h-inner>：</h-inner></h-char><code>node-inspector --save-live-edit</code> <h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya"><h-inner>（</h-inner></h-char>开启 save-live-edit 可实时保存在调试界面所做的修改 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 方便很多<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-consecutive"><h-inner>。</h-inner></h-char><h-char unicode="ff09" class="biaodian cjk bd-close bd-end bd-jiya bd-consecutive end-portion" prev="bd-end bd-cop"><h-inner>）</h-inner></h-char></li><li>加上 –debug 启动参数启动<h-hws hidden> </h-hws><code>node.js</code><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 如<h-hws hidden> </h-hws><code>node --debug app.js</code><h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></li><li>使用 <code>chrome</code> 浏览器打开 <code>http://localhost:8080/debug?port=5858</code></li></ul><p>然后就可以像调试前端 js 文件一样调试 node.js 了<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p>]]></content>
    
    <summary type="html">
    
      
      
        &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; 写 &lt;code&gt;node.js&lt;/code&gt; 总是被回调函数绕晕 &lt;h-char unicode=&quot;ff0c&quot; class=&quot;biao
      
    
    </summary>
    
    
      <category term="zh_CN" scheme="https://ku.io/tags/zh-cn/"/>
    
      <category term="node.js" scheme="https://ku.io/tags/node-js/"/>
    
  </entry>
  
  <entry>
    <title>优化了缓存结构</title>
    <link href="https://ku.io/cache-structure-optimized/"/>
    <id>https://ku.io/cache-structure-optimized/</id>
    <published>2014-01-30T00:00:00.000Z</published>
    <updated>2018-05-05T22:51:59.633Z</updated>
    
    <content type="html"><![CDATA[<p>重新写了下缓存规则 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 通过 <code>ab</code> 压测了一下 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 似乎性能大有提升<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><h3 id="Before"><a href="#Before" class="headerlink" title="Before"></a>Before</h3><p><img src="//cdn-ku.b0.upaiyun.com/post/3cdf8690.png" alt="Before"></p><h3 id="After"><a href="#After" class="headerlink" title="After"></a>After</h3><p><img src="//cdn-ku.b0.upaiyun.com/post/103eafc7.png" alt="Afer"></p>]]></content>
    
    <summary type="html">
    
      
      
        &lt;p&gt;重新写了下缓存规则 &lt;h-char unicode=&quot;ff0c&quot; class=&quot;biaodian cjk bd-end bd-cop bd-jiya bd-hangable&quot;&gt;&lt;h-inner&gt;，&lt;/h-inner&gt;&lt;/h-char&gt; 通过 &lt;code&gt;ab&lt;/code&gt; 
      
    
    </summary>
    
    
      <category term="zh_CN" scheme="https://ku.io/tags/zh-cn/"/>
    
      <category term="日常" scheme="https://ku.io/tags/%E6%97%A5%E5%B8%B8/"/>
    
  </entry>
  
  <entry>
    <title>从日志分析 nginx 缓存状态统计</title>
    <link href="https://ku.io/analyza-nginx-proxy-cache-from-log-file/"/>
    <id>https://ku.io/analyza-nginx-proxy-cache-from-log-file/</id>
    <published>2014-01-30T00:00:00.000Z</published>
    <updated>2018-05-05T22:51:56.071Z</updated>
    
    <content type="html"><![CDATA[<h2 id="神器 -awk"><a href="# 神器 -awk" class="headerlink" title="神器 awk"></a>神器 awk</h2><p>最近想研究下两大神器 awk/sed<h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char>先学习了 awk<h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char>看了这篇 <a href="http://coolshell.cn/articles/9070.html" rel="external nofollow noopener noreferrer" target="_blank">AWK 简明教程 </a><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 写的不错 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 推荐一下<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><h2 id="awk- 分析 -nginx- 日志"><a href="#awk- 分析 -nginx- 日志" class="headerlink" title="awk 分析 nginx 日志"></a>awk 分析 nginx 日志 </h2><p> 于是实践下 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 正好想知道 <code>nginx_proxy_cache</code> 模块的命中状态 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 于是写了这样一条命令来分析当天日志里面的命中率<h-char unicode="ff1a" class="biaodian cjk bd-end bd-jiya"><h-inner>：</h-inner></h-char></p><pre class="line-numbers language-bash"><code class="language-bash"><span class="token function">awk</span> <span class="token string">'{if(<span class="token variable">$NF</span>=="\"HIT\"") hit++; else if(<span class="token variable">$NF</span>=="\"MISS\"") miss++; else if(<span class="token variable">$NF</span>=="\"EXPIRED\"") expired++; else other++} END {printf "KU.IO Nginx Cache Status:\n\nHit Rate: %.2f%\nMiss Rate: %.2f\nExpired Rate: %.2f%\nOther Rate: %.2f%\n",hit/NR*100,miss/NR*100,expired/NR*100,other/NR*100}'</span> /var/log/nginx/ku.io.access.log<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre><p>把 <code>/var/log/nginx/ku.io.access.log</code> 修改为你的日志文件路径即可复用<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p>当然<h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char>nginx 的日志格式应该这样设置<h-char unicode="ff1a" class="biaodian cjk bd-end bd-jiya"><h-inner>：</h-inner></h-char></p><pre class="line-numbers language-nginx"><code class="language-nginx"><span class="token keyword">log_format</span>  main  <span class="token string">'$remote_addr - $remote_user [$time_local]"$request"'</span><span class="token string">'$status $body_bytes_sent "$http_referer" '</span><span class="token string">'"$http_user_agent""$http_x_forwarded_for" '</span><span class="token string">'"$upstream_cache_status"'</span><span class="token punctuation">;</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre><p>其中 <code>Other Rate</code> 包含两项<h-char unicode="ff1a" class="biaodian cjk bd-end bd-jiya"><h-inner>：</h-inner></h-char></p><ul><li>UPDATING</li><li>STALE</li></ul><p>感觉这两项意义不大 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 就没单独输出了<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><blockquote><p>Happy Hacking~ :)</p></blockquote>]]></content>
    
    <summary type="html">
    
      
      
        &lt;h2 id=&quot;神器 -awk&quot;&gt;&lt;a href=&quot;# 神器 -awk&quot; class=&quot;headerlink&quot; title=&quot;神器 awk&quot;&gt;&lt;/a&gt;神器 awk&lt;/h2&gt;&lt;p&gt;最近想研究下两大神器 awk/sed&lt;h-char unicode=&quot;ff0c&quot; class=&quot;bia
      
    
    </summary>
    
    
      <category term="zh_CN" scheme="https://ku.io/tags/zh-cn/"/>
    
      <category term="记录" scheme="https://ku.io/tags/%E8%AE%B0%E5%BD%95/"/>
    
  </entry>
  
  <entry>
    <title>告别 Jekyll， 拥抱 Ghost。</title>
    <link href="https://ku.io/goodbye-jekyll-hello-ghost/"/>
    <id>https://ku.io/goodbye-jekyll-hello-ghost/</id>
    <published>2014-01-29T00:00:00.000Z</published>
    <updated>2018-05-05T22:51:52.535Z</updated>
    
    <content type="html"><![CDATA[<h2 id="为什么告别 -Jekyll"><a href="# 为什么告别 -Jekyll" class="headerlink" title="为什么告别 Jekyll ?"></a>为什么告别 Jekyll ?</h2><p>之前博客托管在 Github Pages<h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 基于 Jekyll 生成页面 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 使用 orca.io 作为内容分发网络<h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya"><h-inner>（</h-inner></h-char> 减少 github 的负担 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 毕竟 Github Pages 本来不是这个用途的 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 还可以加快访问速度 <h-char unicode="ff09" class="biaodian cjk bd-close bd-end bd-jiya bd-consecutive"><h-inner>）</h-inner></h-char><h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-consecutive end-portion bd-hangable" prev="bd-close bd-end"><h-inner>。</h-inner></h-char> 但随着  <code>_posts</code>  目录下 <code>*.md</code>  文件的增多 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 生成速度变得很慢 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 而且有 10 分钟的生成延时<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p>然后就是很麻烦 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 每次在 <a href="http://mouapp.com/" rel="external nofollow noopener noreferrer" target="_blank">Mou</a> 里面写好 MarkDown 以后 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 还要手工加上文件头 <h-char unicode="ff08" class="biaodian cjk bd-open bd-jiya"><h-inner>（</h-inner></h-char> 摘要 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 标签 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 分类等信息 <h-char unicode="ff09" class="biaodian cjk bd-close bd-end bd-jiya bd-consecutive"><h-inner>）</h-inner></h-char><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-consecutive end-portion bd-hangable" prev="bd-close bd-end"><h-inner>，</h-inner></h-char> 接着还要 <code>git add</code> <code>git commit</code> 一系列命令 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 当然 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 以上操作可以在 <a href="http://prose.io/" rel="external nofollow noopener noreferrer" target="_blank">Prose.io</a> 自动完成 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 但他的 MarkDown 实时预览并不好用<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><h2 id="为什么选择 -Ghost-？"><a href="# 为什么选择 -Ghost-？" class="headerlink" title="为什么选择 Ghost ？"></a>为什么选择 Ghost <h-char unicode="ff1f" class="biaodian cjk bd-end bd-jiya"><h-inner>？</h-inner></h-char></h2><p>基于 <code>Node.js</code> <h-char unicode="ff01" class="biaodian cjk bd-end bd-jiya"><h-inner>！</h-inner></h-char><br><code>Node.js</code> 的包管理器 <code>npm</code> 各种方便好用啊<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p>嗯 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 没错 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 我是 <code>Node.js</code> 脑残粉 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char><br> 再加上 <code>Jekyll</code> 基于 <h-hws hidden> </h-hws><code>Ruby</code><h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 以前尝试学 <h-hws hidden> </h-hws><code>Ruby</code><h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 用 <code>Ruby on Rails</code> 练手被各种智商压制 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 实在没好感<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><p>然后 Ghost 的 MarkDown 编辑器很好使 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 界面和 Mou 类似 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 还有各种方便的快捷键 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 大赞啊 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 更棒的是 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 还提供拖拽上传图片 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 再也不用单独去图床上传图片咯<h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char></p><h2 id="截图告别"><a href="# 截图告别" class="headerlink" title="截图告别"></a>截图告别 </h2><p> 嗯<h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char>以前的博客域名已经过期了 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 然后不是很喜欢那个域名也没去续费 <h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>，</h-inner></h-char> 所以无法访问了 <h-char unicode="3002" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>。</h-inner></h-char> 只得去 archive.org 翻了个之前的历史记录截的图<h-char unicode="ff1a" class="biaodian cjk bd-end bd-jiya"><h-inner>：</h-inner></h-char></p><p><img src="//cdn-ku.b0.upaiyun.com/post/39466dc5.png" alt="blv.im history"></p>]]></content>
    
    <summary type="html">
    
      
      
        &lt;h2 id=&quot;为什么告别 -Jekyll&quot;&gt;&lt;a href=&quot;# 为什么告别 -Jekyll&quot; class=&quot;headerlink&quot; title=&quot;为什么告别 Jekyll ?&quot;&gt;&lt;/a&gt;为什么告别 Jekyll ?&lt;/h2&gt;&lt;p&gt;之前博客托管在 Github Pages&lt;h-
      
    
    </summary>
    
    
      <category term="zh_CN" scheme="https://ku.io/tags/zh-cn/"/>
    
      <category term="日常" scheme="https://ku.io/tags/%E6%97%A5%E5%B8%B8/"/>
    
  </entry>
  
</feed>
