<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>taroxd&apos;s Blog</title>
    <description>姑且算是个博客吧……</description>
    <link>https://taroxd.github.io/</link>
    <atom:link href="https://taroxd.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sun, 26 Oct 2025 06:09:08 +0000</pubDate>
    <lastBuildDate>Sun, 26 Oct 2025 06:09:08 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>OneDrive 个人保管库离线备份（PC）</title>
        <description>&lt;p&gt;来自自己的需求，以及&lt;a href=&quot;https://www.reddit.com/r/onedrive/comments/gcxnaz/offline_backup_for_personal_vault/fwvxzjd/&quot;&gt;我在 reddit 上的回复&lt;/a&gt;。&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Unlock the vault when you are online.&lt;/li&gt;
  &lt;li&gt;Open disk management tool (Press Win+R and enter ‘diskmgmt.msc’ without the quotes). You should see a partition called ‘OneDrive Personal Vault’.&lt;/li&gt;
  &lt;li&gt;Assign a drive letter to OneDrive Personal Vault. See &lt;a href=&quot;https://docs.microsoft.com/en-us/windows-server/storage/disk-management/change-a-drive-letter&quot;&gt;https://docs.microsoft.com/en-us/windows-server/storage/disk-management/change-a-drive-letter&lt;/a&gt;. I will assume that the letter is O in the following steps.&lt;/li&gt;
  &lt;li&gt;Start command line prompt as administrator.&lt;/li&gt;
  &lt;li&gt;Run the command ‘manage-bde -protectors -add O: -pw’ (change O to the letter assigned in Step 3). This allows unlocking the partition in the vhdx file with a password. For more options, run ‘manage-bde -protectors -add -?’ and read the output message.&lt;/li&gt;
  &lt;li&gt;When you need to unlock the vault offline later, open &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\OneDriveTemp&lt;/code&gt;, find the vhdx file that contains the vault and unlock the partition inside with the password set in Step 5. When unlocking the vault online as usual, be sure &lt;strong&gt;NOT&lt;/strong&gt; to mount the vhdx file, or you will encounter an error message when unlocking.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Important note: this method is not officially supported. Make a backup before performing these steps.&lt;/p&gt;
</description>
        <pubDate>Sun, 05 Jul 2020 00:00:00 +0000</pubDate>
        <link>https://taroxd.github.io/note/offline-backup-for-OneDrive-personal-vault.html</link>
        <guid isPermaLink="true">https://taroxd.github.io/note/offline-backup-for-OneDrive-personal-vault.html</guid>
        
        
        <category>note</category>
        
      </item>
    
      <item>
        <title>Epub 阅读器简单评测</title>
        <description>&lt;style&gt;
.epub-reader-tooltip {
  position: relative;
  display: inline-block;
  font-size: 0.8em;
  vertical-align: super;
  font-weight: bold;
  color: #960014;
  cursor: pointer;
}

.epub-reader-tooltip .epub-reader-tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #424242;
  color: #f2f2f2;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  opacity: 0;
  position: absolute;
  z-index: 1;
  transition: opacity, 0.3s;
  top: -4px;
  left: 150%; 
}

.epub-reader-tooltip .epub-reader-tooltiptext::after {
  content: &quot; &quot;;
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent #424242 transparent transparent;
}
&lt;/style&gt;

&lt;script&gt;
;(function() {
    function toggle_tooltip() {
        for (const child of this.getElementsByClassName(&apos;epub-reader-tooltiptext&apos;)) {
            if (child.style.visibility === &apos;visible&apos;) {
                child.style.visibility = &apos;&apos;
                child.style.opacity = 0
            } else {
                child.style.visibility = &apos;visible&apos;
                child.style.opacity = 1
            }
        }
    }

    window.addEventListener(&apos;load&apos;, function() {
        for (const tooltip of document.getElementsByClassName(&apos;epub-reader-tooltip&apos;)) {
            tooltip.addEventListener(&apos;click&apos;, toggle_tooltip.bind(tooltip))
        }
    })
})()
&lt;/script&gt;

&lt;p&gt;为了阅读一些排版精良的和排版糟糕的 epub，我试了一圈各种 epub 阅读器，结果并没有完全满意的。下面就我关心的几个方面展开评测，评测内容既有主观内容也有客观内容。&lt;/p&gt;

&lt;h3 id=&quot;评测项目说明&quot;&gt;评测项目说明&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;【注音】形如“&lt;ruby&gt;&lt;rb&gt;写作 A&lt;/rb&gt;&lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;读作 B&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;&lt;/ruby&gt;”的格式支持。A 表示完全支持。&lt;/li&gt;
  &lt;li&gt;【注释】形如&lt;span class=&quot;epub-reader-tooltip&quot;&gt;注&lt;span class=&quot;epub-reader-tooltiptext&quot;&gt;注释内容&lt;/span&gt;&lt;/span&gt;的格式支持。A 表示完全支持。&lt;/li&gt;
  &lt;li&gt;【CSS】对各种 CSS 样式的支持程度。对于排版优秀的书籍，CSS 支持良好时才能得到最佳的阅读体验。? 表示我没有仔细测试。&lt;/li&gt;
  &lt;li&gt;【排版】是否可以调整段首缩进、行距、段间距、页边距、字体样式、颜色等等。对于排版糟糕的书籍，该项能调整的范围越大才能得到更好的阅读体验。&lt;/li&gt;
  &lt;li&gt;【其他】不属于上述范围的部分。&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;windows&quot;&gt;Windows&lt;/h2&gt;

&lt;h3 id=&quot;calibre-5140&quot;&gt;Calibre (5.14.0)&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;【注音】A&lt;/li&gt;
  &lt;li&gt;【注释】A&lt;/li&gt;
  &lt;li&gt;【CSS】B?&lt;/li&gt;
  &lt;li&gt;【排版】A。可调整边距、颜色。可用户自定义字体。由于支持用户样式表，实质上支持一切排版调整。&lt;/li&gt;
  &lt;li&gt;【其他】支持大量其他电子书格式。初次打开一本书时较慢。&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;总评：A。&lt;/p&gt;

&lt;h3 id=&quot;microsoft-edge-44183622670&quot;&gt;Microsoft Edge (44.18362.267.0)&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;【注音】A&lt;/li&gt;
  &lt;li&gt;【注释】A&lt;/li&gt;
  &lt;li&gt;【CSS】A&lt;/li&gt;
  &lt;li&gt;【排版】C。可在预定义的几种字体中选择。可调整颜色。不可调整行距、边距、段首缩进等。&lt;/li&gt;
  &lt;li&gt;【其他】排版性能低下，容易卡顿；在 Chromium 版本推出之后，Edge 应该就不再支持 epub 了，且用且珍惜；不支持 Windows 8.1 及以前的版本。&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;总评：A。虽然调整排版的支持不佳，但是在 PC 环境下，排版的支持并没有那么重要。&lt;/p&gt;

&lt;h2 id=&quot;ios&quot;&gt;iOS&lt;/h2&gt;

&lt;h3 id=&quot;apple-books-ios-12&quot;&gt;Apple Books (iOS 12)&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;【注音】A&lt;/li&gt;
  &lt;li&gt;【注释】A&lt;/li&gt;
  &lt;li&gt;【CSS】A，但阅读器设置的字体常常会覆盖 CSS 中设置的字体。&lt;/li&gt;
  &lt;li&gt;【排版】C。可在预定义的几种字体中选择。可调整颜色。不可调整行距、边距、段首缩进等。&lt;/li&gt;
  &lt;li&gt;【其他】如果 epub 文件的语言元数据设置错误，那么可选择的字体会变成从对应的字体中选择，可能会非常难看；支持有声读物。&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;总评：A-。如果遇到制作糟糕的电子书，用 Apple Books 可能会很难受。&lt;/p&gt;

&lt;h3 id=&quot;kybook-3-v078&quot;&gt;Kybook 3 (v0.7.8)&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;【注音】C&lt;/li&gt;
  &lt;li&gt;【注释】A&lt;/li&gt;
  &lt;li&gt;【CSS】B?&lt;/li&gt;
  &lt;li&gt;【排版】A。可使用自定义的字体，可调整颜色、行距、边距、段首缩进等。支持自定义样式表，实质上支持一切排版调整。&lt;/li&gt;
  &lt;li&gt;【其他】不知为什么，登录功能无法使用，但这个和阅读没什么关系；支持大量其他电子书格式；不支持竖排（会变成横排）。&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;总评：A-。制作糟糕的电子书首选这个。&lt;/p&gt;

&lt;h3 id=&quot;多看阅读-550&quot;&gt;多看阅读 (5.5.0)&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;【注音】A&lt;/li&gt;
  &lt;li&gt;【注释】B（通过私有样式支持）&lt;/li&gt;
  &lt;li&gt;【CSS】C&lt;/li&gt;
  &lt;li&gt;【排版】B。可在预定义的几种字体中选择，但都不怎么好看。可调整颜色、行距、边距、段首缩进等。&lt;/li&gt;
  &lt;li&gt;【其他】与 iOS 版本不同，Android 版本支持自定义字体；不支持竖排（文字会消失？）；支持语音朗读。&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;总评：B。如果书籍专为多看阅读优化，那么可以使用。看日文书基本没法用（字体难看，而且不支持竖排）。&lt;/p&gt;

&lt;h3 id=&quot;marvin-312&quot;&gt;Marvin (3.1.2)&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;【注音】A&lt;/li&gt;
  &lt;li&gt;【注释】C&lt;/li&gt;
  &lt;li&gt;【CSS】?&lt;/li&gt;
  &lt;li&gt;【排版】B。可在预定义的几种字体中选择，但其中没有中文字体。可调整颜色、行距、边距、段首缩进等。&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;总评：B-。没有中文字体，不建议使用。阅读英文电子书可以考虑一用。&lt;/p&gt;

&lt;h3 id=&quot;bookwalker-512&quot;&gt;BookWalker (5.1.2)&lt;/h3&gt;

&lt;p&gt;虽然能看 epub，但中文支持非常糟糕，不予评测。&lt;/p&gt;

&lt;h2 id=&quot;android&quot;&gt;Android&lt;/h2&gt;

&lt;p&gt;因为我自己不用安卓，所以以下内容都是从其他人口中得知。&lt;/p&gt;

&lt;h3 id=&quot;多看阅读&quot;&gt;多看阅读&lt;/h3&gt;

&lt;p&gt;与 iOS 版基本一致，但支持了自定义字体。&lt;/p&gt;

&lt;h3 id=&quot;静读天下&quot;&gt;静读天下&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;【注音】A&lt;/li&gt;
  &lt;li&gt;【注释】A&lt;/li&gt;
  &lt;li&gt;【CSS】C&lt;/li&gt;
  &lt;li&gt;【排版】?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;掌阅&quot;&gt;掌阅&lt;/h3&gt;

&lt;p&gt;无评测&lt;/p&gt;

&lt;h3 id=&quot;lithium&quot;&gt;Lithium&lt;/h3&gt;

&lt;p&gt;无评测&lt;/p&gt;

&lt;h2 id=&quot;总结&quot;&gt;总结&lt;/h2&gt;

&lt;p&gt;对于制作精美的 epub 电子书，建议按照发布者的推荐来选择阅读器。如果发布者没有推荐，建议使用 Microsoft Edge (Windows) / Apple Books (iOS) / 多看阅读 (Android)。&lt;/p&gt;

&lt;p&gt;对于排版糟糕的 epub 电子书，建议使用 Calibre (Windows) / Kybook 3 (iOS) / 多看阅读、静读天下 (Android)。&lt;/p&gt;

&lt;p&gt;关于我自己制作的电子书，不会用到过于精致的排版，但往往会使用注音和注释等功能。因此，建议使用 Microsoft Edge、Calibre（Windows）/ Apple Books (iOS) / 静读天下 (Android)。&lt;/p&gt;
</description>
        <pubDate>Wed, 28 Aug 2019 00:00:00 +0000</pubDate>
        <link>https://taroxd.github.io/default/epub-reader-review.html</link>
        <guid isPermaLink="true">https://taroxd.github.io/default/epub-reader-review.html</guid>
        
        
        <category>default</category>
        
      </item>
    
      <item>
        <title>用 ruby 实现简单的并行处理</title>
        <description>&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;num_threads&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;arg_list&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;foo&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;bar&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# and probably more&lt;/span&gt;
&lt;span class=&quot;no&quot;&gt;Thread&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;abort_on_exception&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;queue&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;arg_list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;each_with_object&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;q&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;q&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;threads&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;num_threads&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;Thread&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;until&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;empty?&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;arg&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;shift&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;do_something_with&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;threads&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;each&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Thu, 12 Jul 2018 00:00:00 +0000</pubDate>
        <link>https://taroxd.github.io/note/ruby-parallel-task.html</link>
        <guid isPermaLink="true">https://taroxd.github.io/note/ruby-parallel-task.html</guid>
        
        
        <category>note</category>
        
      </item>
    
      <item>
        <title>建立 WSL 程序的快捷方式</title>
        <description>&lt;p&gt;安装 WSL 后，里面的 ssh 等程序本身就是一个非常好的 ssh 客户端。但是如果要从 cmd 环境运行的话，需要输入 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bash -c &quot;ssh user@host&quot;&lt;/code&gt;，比较麻烦。把下面的 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ssh.cmd&lt;/code&gt; 加入到 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PATH&lt;/code&gt; 可以简化掉前面的 bash -c，变为 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ssh user@host&lt;/code&gt; 以减少输入的长度。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ssh.cmd&lt;/strong&gt;:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@SETLOCAL EnableDelayedExpansion
@SET args=%*
@SET args=!args:\=\\!
@SET args=!args:&quot;=\&quot;!
@bash -c &quot;%~n0 %args%&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;这段 cmd 脚本不只可以用来做 ssh 的快捷方式，也可以拿来做 scp 等程序的快捷方式（但使用绝对路径时需要用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/mnt/c/path/to/file&lt;/code&gt; 的形式）。使用该脚本可以方便地在 cmd 环境中调用 WSL 中的程序。&lt;/p&gt;

&lt;p&gt;脚本只做了最简单的转义，但在日常中应该是足够使用了。&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;2017/11/01 追记：&lt;/p&gt;

&lt;p&gt;Windows 10 秋季创意者更新版可以使用原生的 ssh 和 scp 了。美中不足的是不支持 rsa 密钥。&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;2018/06/14 追记：&lt;/p&gt;

&lt;p&gt;Windows 10 1803 版本已经支持了 rsa 密钥。此外，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bash -c&lt;/code&gt; 可以简单地替换为 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wsl&lt;/code&gt;，转义之类的操作应该也不再需要了。&lt;/p&gt;
</description>
        <pubDate>Wed, 18 Oct 2017 00:00:00 +0000</pubDate>
        <link>https://taroxd.github.io/note/forwarding-to-WSL.html</link>
        <guid isPermaLink="true">https://taroxd.github.io/note/forwarding-to-WSL.html</guid>
        
        
        <category>note</category>
        
      </item>
    
      <item>
        <title>多媒体处理 Cheatsheet</title>
        <description>&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Image format conversion&lt;/span&gt;
magick input.gif output.png
magick %03d.png[0-255] output.pdf
magick %03d.png[0-255] &lt;span class=&quot;nt&quot;&gt;-delay&lt;/span&gt; 2 &lt;span class=&quot;nt&quot;&gt;-loop&lt;/span&gt; 0 output.gif
magick mogrify &lt;span class=&quot;nt&quot;&gt;-format&lt;/span&gt; jpg &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;.png
gs &lt;span class=&quot;nt&quot;&gt;-dSAFER&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-dBATCH&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-dNOPAUSE&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-dEPSCrop&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-r300&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-sDEVICE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;pngalpha &lt;span class=&quot;nt&quot;&gt;-sOutputFile&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;output.png input.eps
rsvg-convert &lt;span class=&quot;nt&quot;&gt;-z&lt;/span&gt; 2 &lt;span class=&quot;nt&quot;&gt;--no-keep-image-data&lt;/span&gt; input.svg output.png

&lt;span class=&quot;c&quot;&gt;# Batch Processing&lt;/span&gt;
magick &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;.png &lt;span class=&quot;nt&quot;&gt;-set&lt;/span&gt; filename:f &lt;span class=&quot;s2&quot;&gt;&quot;%f&quot;&lt;/span&gt; +adjoin &lt;span class=&quot;nt&quot;&gt;-other-options&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;path/to/output/%[filename:f]&quot;&lt;/span&gt;
magick mogrify &lt;span class=&quot;nt&quot;&gt;-path&lt;/span&gt; path/to/output &lt;span class=&quot;nt&quot;&gt;-other-options&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;.png

&lt;span class=&quot;c&quot;&gt;# Transparenting white background&lt;/span&gt;
magick input.png &lt;span class=&quot;nt&quot;&gt;-transparent&lt;/span&gt; white output.png

&lt;span class=&quot;c&quot;&gt;# Zeroing all transparent background&lt;/span&gt;
magick input.png &lt;span class=&quot;nt&quot;&gt;-background&lt;/span&gt; none &lt;span class=&quot;nt&quot;&gt;-alpha&lt;/span&gt; Background output.png

&lt;span class=&quot;c&quot;&gt;# Cropping&lt;/span&gt;
magick input.png[32x32+16+16] output.png
magick input.png &lt;span class=&quot;nt&quot;&gt;-crop&lt;/span&gt; 32x32+16+16 output.png

&lt;span class=&quot;c&quot;&gt;# Resizing&lt;/span&gt;
magick input.png[64x64] output.png
magick input.png &lt;span class=&quot;nt&quot;&gt;-filter&lt;/span&gt; box &lt;span class=&quot;nt&quot;&gt;-resize&lt;/span&gt; 50% output.png

&lt;span class=&quot;c&quot;&gt;# Composition&lt;/span&gt;
magick destination.png source.png &lt;span class=&quot;nt&quot;&gt;-geometry&lt;/span&gt; +32+32 &lt;span class=&quot;nt&quot;&gt;-compose&lt;/span&gt; Over &lt;span class=&quot;nt&quot;&gt;-composite&lt;/span&gt; output.png
magick input1.png input2.png &lt;span class=&quot;nt&quot;&gt;-composite&lt;/span&gt; input3.png &lt;span class=&quot;nt&quot;&gt;-composite&lt;/span&gt; output.png

&lt;span class=&quot;c&quot;&gt;# Removing alpha channel&lt;/span&gt;
magick input.png &lt;span class=&quot;nt&quot;&gt;-alpha&lt;/span&gt; off output.png

&lt;span class=&quot;c&quot;&gt;# Clearing a rectangle&lt;/span&gt;
magick input.png &lt;span class=&quot;nt&quot;&gt;-alpha&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-size&lt;/span&gt; 32x32 xc: &lt;span class=&quot;nt&quot;&gt;-geometry&lt;/span&gt; +32+32 &lt;span class=&quot;nt&quot;&gt;-compose&lt;/span&gt; DstOut &lt;span class=&quot;nt&quot;&gt;-composite&lt;/span&gt; output.png

&lt;span class=&quot;c&quot;&gt;# Conversion from video to image&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#   Every frame&lt;/span&gt;
ffmpeg &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.mp4 &lt;span class=&quot;s2&quot;&gt;&quot;output_%04d.png&quot;&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#   With fixed fps&lt;/span&gt;
ffmpeg &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.mp4 &lt;span class=&quot;nt&quot;&gt;-vf&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;select=&apos;between(t,10,20)&apos;,fps=30,crop=1024:768:0:0&quot;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;output_%04d.png&quot;&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Merging video and audio&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#   Without re-encoding&lt;/span&gt;
ffmpeg &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.mp4 &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; audio.m4a &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; copy output.mp4
&lt;span class=&quot;c&quot;&gt;#   With re-encoding&lt;/span&gt;
ffmpeg &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.mp4 &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; audio.wav &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:v copy &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:a aac output.mp4

&lt;span class=&quot;c&quot;&gt;# Cutting, cropping and scaling video&lt;/span&gt;
ffmpeg &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.mp4 &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt; copy &lt;span class=&quot;nt&quot;&gt;-ss&lt;/span&gt; 00:11:22 &lt;span class=&quot;nt&quot;&gt;-to&lt;/span&gt; 00:33:44 &lt;span class=&quot;nt&quot;&gt;-vf&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;crop=1920:1080:0:0,scale=1024:720&quot;&lt;/span&gt; output.mp4

&lt;span class=&quot;c&quot;&gt;# Delay video or audio with re-encoding&lt;/span&gt;
ffmpeg &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.mp4 &lt;span class=&quot;nt&quot;&gt;-itsoffset&lt;/span&gt; 1.0 &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.mp4 &lt;span class=&quot;nt&quot;&gt;-map&lt;/span&gt; 1:v &lt;span class=&quot;nt&quot;&gt;-map&lt;/span&gt; 0:a &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:v libx265 &lt;span class=&quot;nt&quot;&gt;-crf&lt;/span&gt; 28 &lt;span class=&quot;nt&quot;&gt;-preset&lt;/span&gt; veryslow &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:a copy movie-video-delayed.mp4
ffmpeg &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.mp4 &lt;span class=&quot;nt&quot;&gt;-itsoffset&lt;/span&gt; 1.0 &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.mp4 &lt;span class=&quot;nt&quot;&gt;-map&lt;/span&gt; 0:v &lt;span class=&quot;nt&quot;&gt;-map&lt;/span&gt; 1:a &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:v libx265 &lt;span class=&quot;nt&quot;&gt;-crf&lt;/span&gt; 28 &lt;span class=&quot;nt&quot;&gt;-preset&lt;/span&gt; veryslow &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:a copy movie-audio-delayed.mp4

&lt;span class=&quot;c&quot;&gt;# Submit to bilibili&lt;/span&gt;
ffmpeg &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.mp4 &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:v libx264 &lt;span class=&quot;nt&quot;&gt;-pass&lt;/span&gt; 1 &lt;span class=&quot;nt&quot;&gt;-fastfirstpass&lt;/span&gt; 0 &lt;span class=&quot;nt&quot;&gt;-b&lt;/span&gt;:v 2990k &lt;span class=&quot;nt&quot;&gt;-preset&lt;/span&gt; placebo &lt;span class=&quot;nt&quot;&gt;-tune&lt;/span&gt; animation &lt;span class=&quot;nt&quot;&gt;-vf&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;yuv420p &lt;span class=&quot;nt&quot;&gt;-psy-rd&lt;/span&gt; 0:0 &lt;span class=&quot;nt&quot;&gt;-aq-strength&lt;/span&gt; 0.8 &lt;span class=&quot;nt&quot;&gt;-aq-mode&lt;/span&gt; 2 &lt;span class=&quot;nt&quot;&gt;-g&lt;/span&gt; 540 &lt;span class=&quot;nt&quot;&gt;-bf&lt;/span&gt; 9 &lt;span class=&quot;nt&quot;&gt;-b_strategy&lt;/span&gt; 2 &lt;span class=&quot;nt&quot;&gt;-qcomp&lt;/span&gt; 0.75 &lt;span class=&quot;nt&quot;&gt;-trellis&lt;/span&gt; 2 &lt;span class=&quot;nt&quot;&gt;-subq&lt;/span&gt; 10 &lt;span class=&quot;nt&quot;&gt;-refs&lt;/span&gt; 4 &lt;span class=&quot;nt&quot;&gt;-8x8dct&lt;/span&gt; 1 &lt;span class=&quot;nt&quot;&gt;-partitions&lt;/span&gt; all &lt;span class=&quot;nt&quot;&gt;-qdiff&lt;/span&gt; 7 &lt;span class=&quot;nt&quot;&gt;-me_method&lt;/span&gt; tesa &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:a copy &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; mp4 NUL
ffmpeg &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; input.mp4 &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:v libx264 &lt;span class=&quot;nt&quot;&gt;-pass&lt;/span&gt; 2 &lt;span class=&quot;nt&quot;&gt;-b&lt;/span&gt;:v 2990k &lt;span class=&quot;nt&quot;&gt;-preset&lt;/span&gt; placebo &lt;span class=&quot;nt&quot;&gt;-tune&lt;/span&gt; animation &lt;span class=&quot;nt&quot;&gt;-vf&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;yuv420p &lt;span class=&quot;nt&quot;&gt;-psy-rd&lt;/span&gt; 0:0 &lt;span class=&quot;nt&quot;&gt;-aq-strength&lt;/span&gt; 0.8 &lt;span class=&quot;nt&quot;&gt;-aq-mode&lt;/span&gt; 2 &lt;span class=&quot;nt&quot;&gt;-g&lt;/span&gt; 540 &lt;span class=&quot;nt&quot;&gt;-bf&lt;/span&gt; 9 &lt;span class=&quot;nt&quot;&gt;-b_strategy&lt;/span&gt; 2 &lt;span class=&quot;nt&quot;&gt;-qcomp&lt;/span&gt; 0.75 &lt;span class=&quot;nt&quot;&gt;-trellis&lt;/span&gt; 2 &lt;span class=&quot;nt&quot;&gt;-subq&lt;/span&gt; 10 &lt;span class=&quot;nt&quot;&gt;-refs&lt;/span&gt; 4 &lt;span class=&quot;nt&quot;&gt;-8x8dct&lt;/span&gt; 1 &lt;span class=&quot;nt&quot;&gt;-partitions&lt;/span&gt; all &lt;span class=&quot;nt&quot;&gt;-qdiff&lt;/span&gt; 7 &lt;span class=&quot;nt&quot;&gt;-me_method&lt;/span&gt; tesa &lt;span class=&quot;nt&quot;&gt;-c&lt;/span&gt;:a copy output.mp4

&lt;span class=&quot;c&quot;&gt;# Optimize PNG image&lt;/span&gt;
optipng &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; 0 &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; 7 &lt;span class=&quot;nt&quot;&gt;-zm&lt;/span&gt; 1-9 &lt;span class=&quot;nt&quot;&gt;-strip&lt;/span&gt; all input.png
pngcrush &lt;span class=&quot;nt&quot;&gt;-blacken&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-brute&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-reduce&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-remove&lt;/span&gt; alla &lt;span class=&quot;nt&quot;&gt;-ow&lt;/span&gt; input.png

&lt;span class=&quot;c&quot;&gt;# Remove exif data&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#  one file&lt;/span&gt;
exiftool &lt;span class=&quot;nt&quot;&gt;-all&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; input.jpg
&lt;span class=&quot;c&quot;&gt;#  recursively (. for current directory)&lt;/span&gt;
exiftool &lt;span class=&quot;nt&quot;&gt;-all&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-r&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-overwrite_original&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-ext&lt;/span&gt; jpg &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Thu, 15 Jun 2017 00:00:00 +0000</pubDate>
        <link>https://taroxd.github.io/note/media-processing-cheatsheet.html</link>
        <guid isPermaLink="true">https://taroxd.github.io/note/media-processing-cheatsheet.html</guid>
        
        
        <category>note</category>
        
      </item>
    
      <item>
        <title>本博客已改用 flex 布局</title>
        <description>&lt;p&gt;本博客已改用 flex 布局，解决了一些基本不存在的 bug，并&lt;del&gt;象征性地&lt;/del&gt;适配了移动端&lt;del&gt;虽然并没有什么卵用&lt;/del&gt;。&lt;/p&gt;

&lt;p&gt;IE？不存在的。&lt;/p&gt;
</description>
        <pubDate>Sun, 04 Jun 2017 00:00:00 +0000</pubDate>
        <link>https://taroxd.github.io/default/switch-to-flex.html</link>
        <guid isPermaLink="true">https://taroxd.github.io/default/switch-to-flex.html</guid>
        
        
        <category>default</category>
        
      </item>
    
      <item>
        <title>用浏览器阅读 txt 电子书</title>
        <description>&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;charset=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;#txt&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;80%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;-apple-system&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BlinkMacSystemFont&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&quot;Segoe UI&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Helvetica&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Arial&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sans-serif&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&quot;Apple Color Emoji&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&quot;Segoe UI Emoji&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&quot;Segoe UI Symbol&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;20px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;#txt&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;white-space&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pre-wrap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;text-indent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2em&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;txt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHTML&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;txt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerHTML&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/.+/g&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;lt;p&amp;gt;$&amp;amp;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;txt&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
将 txt 电子书的内容放在这里，并将这段代码保存成 html 文件。
用浏览器打开该 html 文件，即可开始阅读电子书。阅读体验相对于文本编辑器（如 nodepad）会有一定的提升。
txt 电子书中，段首无需空格。如果电子书中段首已经空格，可以将 css 中的 &quot;text-indent: 2em;&quot; 删去，以防止额外的段首缩进。
可以自由地更改 CSS 代码以获得最佳的阅读效果。
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;效果示例&quot;&gt;效果示例：&lt;/h3&gt;

&lt;script&gt;
var post = document.currentScript.parentNode
var code = post.getElementsByClassName(&apos;highlight&apos;)[0].innerText
var text = code.match(/&lt;div id=&quot;txt&quot;&gt;([^]+)&lt;\/div&gt;/)[1]
var html = text.replace(/.+/g, &quot;&lt;p&gt;$&amp;&lt;/p&gt;&quot;)
var css = code.match(/&lt;style&gt;([^]+)&lt;\/style&gt;/)[1]
var styleElem = document.createElement(&apos;style&apos;)
if (styleElem.styleSheet) {
  styleElem.styleSheet.cssText = css
} else {
  styleElem.appendChild(document.createTextNode(css))
}
var head = document.getElementsByTagName(&apos;head&apos;)[0]
head.appendChild(styleElem)

document.write(&apos;&lt;div id=&quot;txt&quot;&gt;&apos;, html, &quot;&lt;/div&gt;&quot;)
&lt;/script&gt;

</description>
        <pubDate>Thu, 30 Mar 2017 00:00:00 +0000</pubDate>
        <link>https://taroxd.github.io/note/web-browser-as-txt-reader.html</link>
        <guid isPermaLink="true">https://taroxd.github.io/note/web-browser-as-txt-reader.html</guid>
        
        
        <category>note</category>
        
      </item>
    
      <item>
        <title>制作便携版 RPG Maker</title>
        <description>&lt;p&gt;由于 RPG Maker MV 的程序并没有管理员权限的需求，因此只要将 RPGMV 下的所有文件复制一份即可。
可以使用下面的脚本（cmd）设置关联。&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@ECHO OFF

@SET HCUSC=HKEY_CURRENT_USER\Software\Classes

REG add &quot;%HCUSC%\.rpgproject&quot; /ve /t REG_SZ /d &quot;RPGMV.Project&quot; /f
REG add &quot;%HCUSC%\RPGMV.Project&quot; /ve /t REG_SZ /d &quot;RPGMV Project&quot; /f
REG add &quot;%HCUSC%\RPGMV.Project\DefaultIcon&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGMV.exe\&quot;,1&quot; /f
REG add &quot;%HCUSC%\RPGMV.Project\shell\open\command&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGMV.exe\&quot; \&quot;%%1\&quot;&quot; /f
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;RPG Maker MZ 版：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@ECHO OFF

@SET HCUSC=HKEY_CURRENT_USER\Software\Classes

REG add &quot;%HCUSC%\.rmmzproject&quot; /ve /t REG_SZ /d &quot;RPGMZ.Project&quot; /f
REG add &quot;%HCUSC%\RPGMZ.Project&quot; /ve /t REG_SZ /d &quot;RPGMZ Project&quot; /f
REG add &quot;%HCUSC%\RPGMZ.Project\DefaultIcon&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGMZ.exe\&quot;,1&quot; /f
REG add &quot;%HCUSC%\RPGMZ.Project\shell\open\command&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGMZ.exe\&quot; \&quot;%%1\&quot;&quot; /f
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;而 RPG Maker VX Ace 依赖于 rtp 的安装，所以需要管理员权限。&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@ECHO OFF

SET &quot;INSTALLDIR=%~dp0&quot;
SET &quot;INSTALLDIR=%INSTALLDIR:~0,-1%&quot;
@SET HCUSC=HKEY_CURRENT_USER\Software\Classes

REG add &quot;HKLM\SOFTWARE\enterbrain\rgss3\rtp&quot; /v &quot;rpgvxace&quot; /t REG_SZ /d &quot;%~dp0rtp&quot; /f /reg:32
REG add &quot;HKLM\SOFTWARE\enterbrain\rpgvxace&quot; /v &quot;applicationpath&quot; /t REG_SZ /d &quot;%INSTALLDIR%&quot; /f /reg:32
REG add &quot;%HCUSC%\.rvproj2&quot; /ve /t REG_SZ /d &quot;RPGVXAce.Project&quot; /f
REG add &quot;%HCUSC%\.rvdata2&quot; /ve /t REG_SZ /d &quot;RPGVXAce.Data&quot; /f
REG add &quot;%HCUSC%\.rgss3a&quot; /ve /t REG_SZ /d &quot;RPGVXAce.Archive&quot; /f
REG add &quot;%HCUSC%\rpgvxace.project&quot; /ve /t REG_SZ /d &quot;RPGVXAce Project&quot; /f
REG add &quot;%HCUSC%\rpgvxace.project\defaulticon&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVXAce.exe\&quot;,1&quot; /f
REG add &quot;%HCUSC%\rpgvxace.project\shell\open\command&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVXAce.exe\&quot;  \&quot;%%1\&quot;&quot; /f
REG add &quot;%HCUSC%\rpgvxace.archive&quot; /ve /t REG_SZ /d &quot;RGSS Encrypted Archive&quot; /f
REG add &quot;%HCUSC%\rpgvxace.archive\defaulticon&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVXAce.exe\&quot;,3&quot; /f
REG add &quot;%HCUSC%\rpgvxace.archive\shell\open\command&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVXAce.exe\&quot; /n \&quot;%%1\&quot;&quot; /f
REG add &quot;%HCUSC%\rpgvxace.data&quot; /ve /t REG_SZ /d &quot;RPGVXAce Data&quot; /f
REG add &quot;%HCUSC%\rpgvxace.data\defaulticon&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVXAce.exe\&quot;,2&quot; /f
REG add &quot;%HCUSC%\rpgvxace.data\shell\open\command&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVXAce.exe\&quot; /n \&quot;%%1\&quot;&quot; /f
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;RPG Maker VX 版：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@ECHO OFF

SET &quot;INSTALLDIR=%~dp0&quot;
SET &quot;INSTALLDIR=%INSTALLDIR:~0,-1%&quot;
@SET HCUSC=HKEY_CURRENT_USER\Software\Classes

REG add &quot;HKLM\SOFTWARE\enterbrain\rgss2\rtp&quot; /v &quot;rpgvx&quot; /t REG_SZ /d &quot;%~dp0rtp&quot; /f /reg:32
REG add &quot;HKLM\SOFTWARE\enterbrain\rpgvx&quot; /v &quot;applicationpath&quot; /t REG_SZ /d &quot;%INSTALLDIR%&quot; /f /reg:32
REG add &quot;%HCUSC%\.rvproj&quot; /ve /t REG_SZ /d &quot;RPGVX.Project&quot; /f
REG add &quot;%HCUSC%\.rvdata&quot; /ve /t REG_SZ /d &quot;RPGVX.Data&quot; /f
REG add &quot;%HCUSC%\.rgss2a&quot; /ve /t REG_SZ /d &quot;RPGVX.Archive&quot; /f
REG add &quot;%HCUSC%\rpgvx.project&quot; /ve /t REG_SZ /d &quot;RPGVX Project&quot; /f
REG add &quot;%HCUSC%\rpgvx.project\defaulticon&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVX.exe\&quot;,1&quot; /f
REG add &quot;%HCUSC%\rpgvx.project\shell\open\command&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVX.exe\&quot;  \&quot;%%1\&quot;&quot; /f
REG add &quot;%HCUSC%\rpgvx.archive&quot; /ve /t REG_SZ /d &quot;RGSS Encrypted Archive&quot; /f
REG add &quot;%HCUSC%\rpgvx.archive\defaulticon&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVX.exe\&quot;,3&quot; /f
REG add &quot;%HCUSC%\rpgvx.archive\shell\open\command&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVX.exe\&quot; /n \&quot;%%1\&quot;&quot; /f
REG add &quot;%HCUSC%\rpgvx.data&quot; /ve /t REG_SZ /d &quot;RPGVX Data&quot; /f
REG add &quot;%HCUSC%\rpgvx.data\defaulticon&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVX.exe\&quot;,2&quot; /f
REG add &quot;%HCUSC%\rpgvx.data\shell\open\command&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGVX.exe\&quot; /n \&quot;%%1\&quot;&quot; /f
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;RPG Maker XP 版：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;@ECHO OFF

SET &quot;INSTALLDIR=%~dp0&quot;
SET &quot;INSTALLDIR=%INSTALLDIR:~0,-1%&quot;
@SET HCUSC=HKEY_CURRENT_USER\Software\Classes

REG add &quot;HKLM\SOFTWARE\enterbrain\RGSS\RTP&quot; /v &quot;Standard&quot; /t REG_SZ /d &quot;%~dp0rtp&quot; /f /reg:32
REG add &quot;HKLM\SOFTWARE\enterbrain\RPGXP&quot; /v &quot;applicationpath&quot; /t REG_SZ /d &quot;%INSTALLDIR%&quot; /f /reg:32
REG add &quot;%HCUSC%\.rxproj&quot; /ve /t REG_SZ /d &quot;RPGXP.Project&quot; /f
REG add &quot;%HCUSC%\.rxdata&quot; /ve /t REG_SZ /d &quot;RPGXP.Data&quot; /f
REG add &quot;%HCUSC%\.rgssad&quot; /ve /t REG_SZ /d &quot;RPGXP.Archive&quot; /f
REG add &quot;%HCUSC%\RPGXP.Project&quot; /ve /t REG_SZ /d &quot;RPGXP Project&quot; /f
REG add &quot;%HCUSC%\RPGXP.Project\DefaultIcon&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGXP.exe\&quot;,1&quot; /f
REG add &quot;%HCUSC%\RPGXP.Project\shell\open\command&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGXP.exe\&quot;  \&quot;%%1\&quot;&quot; /f
REG add &quot;%HCUSC%\RPGXP.Archive&quot; /ve /t REG_SZ /d &quot;RGSS Encrypted Archive&quot; /f
REG add &quot;%HCUSC%\RPGXP.Archive\DefaultIcon&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGXP.exe\&quot;,3&quot; /f
REG add &quot;%HCUSC%\RPGXP.Archive\shell\open\command&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGXP.exe\&quot; /n \&quot;%%1\&quot;&quot; /f
REG add &quot;%HCUSC%\RPGXP.Data&quot; /ve /t REG_SZ /d &quot;RPGXP Data&quot; /f
REG add &quot;%HCUSC%\RPGXP.Data\DefaultIcon&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGXP.exe\&quot;,2&quot; /f
REG add &quot;%HCUSC%\RPGXP.Data\shell\open\command&quot; /ve /t REG_SZ /d &quot;\&quot;%~dp0RPGXP.exe\&quot; /n \&quot;%%1\&quot;&quot; /f
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Thu, 09 Jun 2016 00:00:00 +0000</pubDate>
        <link>https://taroxd.github.io/note/make-RPG-Maker-portable.html</link>
        <guid isPermaLink="true">https://taroxd.github.io/note/make-RPG-Maker-portable.html</guid>
        
        
        <category>note</category>
        
      </item>
    
      <item>
        <title>Windows 10 相关 Cheatsheet</title>
        <description>&lt;p&gt;设置 Powershell Profile：&lt;/p&gt;

&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Load posh git&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Import-Module&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;D:\local\posh-git\src\posh-git.psd1&apos;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;# Customize git prompt&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;Global&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;GitPromptSettings&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;BranchIdenticalStatusSymbol&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$null&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;BranchAheadStatusSymbol&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$null&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;BranchBehindStatusSymbol&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$null&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;BranchGoneStatusSymbol&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$null&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;BranchBehindAndAheadStatusSymbol&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$null&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;BranchBehindAndAheadDisplay&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Minimal&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;LocalWorkingStatusSymbol&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$null&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;LocalStagedStatusSymbol&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$null&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;WindowTitle&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$null&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;DefaultPromptAbbreviateHomeDirectory&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;设置网络属性为专用网络：&lt;/p&gt;

&lt;div class=&quot;language-powershell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;Get-NetConnectionProfile&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Set-NetConnectionProfile&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-InterfaceIndex&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;number&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-NetworkCategory&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Private&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;清理组件：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Mon, 14 Dec 2015 00:00:00 +0000</pubDate>
        <link>https://taroxd.github.io/note/windows-10-kickstart.html</link>
        <guid isPermaLink="true">https://taroxd.github.io/note/windows-10-kickstart.html</guid>
        
        
        <category>note</category>
        
      </item>
    
      <item>
        <title>Windows 下 Ruby 编译 C 扩展</title>
        <description>&lt;p&gt;注：大部分代码来源于 &lt;a href=&quot;https://github.com/seattlerb/rubyinline&quot;&gt;rubyinline&lt;/a&gt;。&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;#!/usr/bin/env ruby -wKU&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# usage: ruby path/to/this/script path/to/your/c/source&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;rbconfig&quot;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;MKCMD&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;base_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;base_name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.c&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;base_name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.so&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;cmd&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;initialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;src_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;so_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;vi&quot;&gt;@src_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;src_name&lt;/span&gt;
    &lt;span class=&quot;vi&quot;&gt;@so_name&lt;/span&gt;  &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;so_name&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;cmd&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;hdrdir&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;sx&quot;&gt;%w(srcdir includedir archdir rubyhdrdir)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;map&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
      &lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;find&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;dir&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;exist?&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;ruby.h&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;abort&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;ERROR: Can&apos;t find header dir for ruby. Exiting...&quot;&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;config_hdrdir&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;rubyarchhdrdir&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;-I &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;rubyarchhdrdir&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;elsif&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;RUBY_VERSION&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;1.9&apos;&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;-I &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;join&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hdrdir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;arch&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
      &lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;LDSHARED&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
      &lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;CFLAGS&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;&apos;-I&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;hdrdir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;config_hdrdir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;&apos;-I&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;includedir&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
      &lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;expand_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;vi&quot;&gt;@src_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;inspect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;crap_for_windoze&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;LDFLAGS&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
      &lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;CCDLFLAGS&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;compact&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos; &apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;# odd compilation error on clang + freebsd 10. Ruby built w/ rbenv.&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;gsub!&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/-Wl,-soname,\$@/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;-Wl,-soname,&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;basename&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@so_name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;# strip off some makefile macros for mingw 1.9&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;gsub!&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/\$\(.*\)/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;RUBY_PLATFORM&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=~&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/mingw/&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;


  &lt;span class=&quot;kp&quot;&gt;private&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;crap_for_windoze&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;# gawd windoze land sucks&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;RUBY_PLATFORM&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/mswin32/&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot; -link /OUT:&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;so_name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; /LIBPATH:&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;libdir&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; /DEFAULTLIB:&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;LIBRUBY&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; /INCREMENTAL:no /EXPORT:Init_&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;module_name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/mingw32/&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;RbConfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;CONFIG&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot; -Wl,--enable-auto-import -L&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;libdir&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; -l&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;c&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;RUBY_SO_NAME&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; -o &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;vi&quot;&gt;@so_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;inspect&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/i386-cygwin/&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;&apos; -L/usr/local/lib -lruby.dll&apos;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;
      &lt;span class=&quot;s1&quot;&gt;&apos;&apos;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;system&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;MKCMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;ARGV&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;gets&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;chomp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;chomp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;.c&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;vg&quot;&gt;$0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;__FILE__&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Thu, 06 Aug 2015 00:00:00 +0000</pubDate>
        <link>https://taroxd.github.io/note/Make-C-extension-of-Ruby-in-Windows.html</link>
        <guid isPermaLink="true">https://taroxd.github.io/note/Make-C-extension-of-Ruby-in-Windows.html</guid>
        
        
        <category>note</category>
        
      </item>
    
  </channel>
</rss>
