<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>技术工具 on 危墙</title>
		<link>https://weiqiang.org/xy/tech/</link>
		<description>Recent content in 技术工具 on 危墙</description>
		<generator>Hugo</generator>
		<language>zh-CN</language>
		
		
		
		
			<lastBuildDate>Thu, 18 Jul 2019 00:00:00 +0800</lastBuildDate>
		
			<atom:link href="https://weiqiang.org/xy/tech/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Emacs 学习笔记</title>
				<link>https://weiqiang.org/xy/tech/emacs-notes/</link>
				<pubDate>Thu, 18 Jul 2019 00:00:00 +0800</pubDate>
				<guid>https://weiqiang.org/xy/tech/emacs-notes/</guid>
				<description>&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-2&#34;&gt;&#xA;&lt;h2 id=&#34;headline-1&#34;&gt;&#xA;Emacs tutorial 学习笔记&#xA;&lt;/h2&gt;&#xA;&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-2&#34;&gt;&#xA;&lt;p&gt;&#xA;Learn emacs from tutorial. 学习emacs从内置指南开始。&lt;/p&gt;&#xA;&lt;div id=&#34;outline-container-headline-2&#34; class=&#34;outline-3&#34;&gt;&#xA;&lt;h3 id=&#34;headline-2&#34;&gt;&#xA;useful commands 快捷键&#xA;&lt;/h3&gt;&#xA;&lt;div id=&#34;outline-text-headline-2&#34; class=&#34;outline-text-3&#34;&gt;&#xA;&lt;p&gt;&#xA;记录常用快捷键，C代表CTRL，M代表META/ALT。&lt;/p&gt;&#xA;&lt;div id=&#34;outline-container-headline-3&#34; class=&#34;outline-4&#34;&gt;&#xA;&lt;h4 id=&#34;headline-3&#34;&gt;&#xA;控制屏幕&#xA;&lt;/h4&gt;&#xA;&lt;div id=&#34;outline-text-headline-3&#34; class=&#34;outline-text-4&#34;&gt;&#xA;&lt;p&gt;&#xA;C-v 下一屏&#xA;M-v 上一屏&#xA;C-l 清屏，以光标所在位置居中，再次按C-l，光标跳到屏幕顶端，接着再按C-l光标跳到屏幕底部&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-4&#34; class=&#34;outline-4&#34;&gt;&#xA;&lt;h4 id=&#34;headline-4&#34;&gt;&#xA;控制光标&#xA;&lt;/h4&gt;&#xA;&lt;div id=&#34;outline-text-headline-4&#34; class=&#34;outline-text-4&#34;&gt;&#xA;&lt;p&gt;&#xA;C-p 跳到上一行 Previous line&#xA;C-b 倒退一个字 Backward&#xA;C-f 向前一个字 Forward&#xA;C-n 跳到下一行 Next line&#xA;M-f 向前一个词&#xA;M-b 倒退一个词&#xA;C-a 移动到行首&#xA;C-e 移动到行末&#xA;M-a 移动到句首&#xA;M-e 移动到句末&#xA;M-&amp;lt; 移动到文件开始处&#xA;M-&amp;gt; 移动到文件末尾处&#xA;C-u + 数字 + 快捷键 重复后面“快捷键”次数（数字） 对C-v M-v无效&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-5&#34; class=&#34;outline-4&#34;&gt;&#xA;&lt;h4 id=&#34;headline-5&#34;&gt;&#xA;取消&#xA;&lt;/h4&gt;&#xA;&lt;div id=&#34;outline-text-headline-5&#34; class=&#34;outline-text-4&#34;&gt;&#xA;&lt;p&gt;&#xA;C-g 停止或取消前次命令&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-6&#34; class=&#34;outline-4&#34;&gt;&#xA;&lt;h4 id=&#34;headline-6&#34;&gt;&#xA;窗口(Windows)&#xA;&lt;/h4&gt;&#xA;&lt;div id=&#34;outline-text-headline-6&#34; class=&#34;outline-text-4&#34;&gt;&#xA;&lt;p&gt;&#xA;C-x 1 保留1个窗口（当前光标所在窗口），删除其他窗口&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-7&#34; class=&#34;outline-4&#34;&gt;&#xA;&lt;h4 id=&#34;headline-7&#34;&gt;&#xA;插入和删除&#xA;&lt;/h4&gt;&#xA;&lt;div id=&#34;outline-text-headline-7&#34; class=&#34;outline-text-4&#34;&gt;&#xA;&lt;p&gt;&#xA;&amp;lt;DEL&amp;gt; 删除光标前一个字符&#xA;C-d 删除光标后一个字符&#xA;M-&amp;lt;DEL&amp;gt; 删除光标前的字符（以下四个均是kill，保留在剪切版，还能插入，类似cut）&#xA;M-d 删除光标后的字符&#xA;C-k 删除光标所在位置到行末&#xA;M-k 删除光标所在位置到句末&#xA;C-y 在光标处插入之前剪切版的内容（yank，类似paste）&#xA;M-y 在光标处插入更早删除的内容&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-8&#34; class=&#34;outline-4&#34;&gt;&#xA;&lt;h4 id=&#34;headline-8&#34;&gt;&#xA;撤销&#xA;&lt;/h4&gt;&#xA;&lt;div id=&#34;outline-text-headline-8&#34; class=&#34;outline-text-4&#34;&gt;&#xA;&lt;p&gt;&#xA;C-/ 撤销&#xA;C-_ 同上&#xA;C-x u 同上&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-9&#34; class=&#34;outline-4&#34;&gt;&#xA;&lt;h4 id=&#34;headline-9&#34;&gt;&#xA;文件&#xA;&lt;/h4&gt;&#xA;&lt;div id=&#34;outline-text-headline-9&#34; class=&#34;outline-text-4&#34;&gt;&#xA;&lt;p&gt;&#xA;C-x C-f 文件名  打开文件，如果无该文件则新建&#xA;C-x C-s 保存&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-10&#34; class=&#34;outline-4&#34;&gt;&#xA;&lt;h4 id=&#34;headline-10&#34;&gt;&#xA;BUFFERS&#xA;&lt;/h4&gt;&#xA;&lt;div id=&#34;outline-text-headline-10&#34; class=&#34;outline-text-4&#34;&gt;&#xA;&lt;p&gt;&#xA;C-x C-b 显示buffer列表&#xA;C-x b buffer名称 &amp;lt;Enter&amp;gt; 进入buffer&#xA;C-x s 保存多个buffer&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-11&#34; class=&#34;outline-4&#34;&gt;&#xA;&lt;h4 id=&#34;headline-11&#34;&gt;&#xA;X command (extend)&#xA;&lt;/h4&gt;&#xA;&lt;div id=&#34;outline-text-headline-11&#34; class=&#34;outline-text-4&#34;&gt;&#xA;&lt;p&gt;&#xA;C-x 一个字符&#xA;M-x 一个名字（命令）&#xA;C-z suspends emacs&#xA;M-x recover-this-file &amp;lt;Return&amp;gt; 恢复文件&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-12&#34; class=&#34;outline-4&#34;&gt;&#xA;&lt;h4 id=&#34;headline-12&#34;&gt;&#xA;搜索&#xA;&lt;/h4&gt;&#xA;&lt;div id=&#34;outline-text-headline-12&#34; class=&#34;outline-text-4&#34;&gt;&#xA;&lt;p&gt;&#xA;C-s&#xA;C-r&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-13&#34; class=&#34;outline-4&#34;&gt;&#xA;&lt;h4 id=&#34;headline-13&#34;&gt;&#xA;表格&#xA;&lt;/h4&gt;&#xA;&lt;div id=&#34;outline-text-headline-13&#34; class=&#34;outline-text-4&#34;&gt;&#xA;&lt;p&gt;&#xA;表格功能强大，下面是快捷键。目前发现问题是无法对齐，不知道导出html时是什么情况。&lt;/p&gt;&#xA;&lt;table&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;快捷键&lt;/td&gt;&#xA;&lt;td&gt;描述&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;C-c l&lt;/td&gt;&#xA;&lt;td&gt;创建表格&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;C-c C-c&lt;/td&gt;&#xA;&lt;td&gt;重新调整表格缩进&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;Tab&lt;/td&gt;&#xA;&lt;td&gt;移动至下一个区域，必要时（行尾）创建一行&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;S-Tab&lt;/td&gt;&#xA;&lt;td&gt;移动至上一个区域&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;S-Enter&lt;/td&gt;&#xA;&lt;td&gt;移动至下一行，必要时（行尾）创建一行&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;M-Left/Right&lt;/td&gt;&#xA;&lt;td&gt;移动列&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;M-Up/Down&lt;/td&gt;&#xA;&lt;td&gt;移动行&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;M-S-Left/Right&lt;/td&gt;&#xA;&lt;td&gt;删除/插入行&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;M-S-Up/Down&lt;/td&gt;&#xA;&lt;td&gt;删除/插入列&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td&gt;C-c -&lt;/td&gt;&#xA;&lt;td&gt;插入水平分割线&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;</description>
			</item>
			<item>
				<title>Linux Memos(备忘)</title>
				<link>https://weiqiang.org/xy/tech/linux-memos/</link>
				<pubDate>Wed, 12 Jul 2017 00:00:00 +0800</pubDate>
				<guid>https://weiqiang.org/xy/tech/linux-memos/</guid>
				<description>&lt;p&gt;&#xA;使用Linux已经有段时间，都是断断续续，没有很好地将这一过程中的知识积累和更新，所以基本没有进步。年过三十，已知积累之重要，知识持续更新之难能，因此立此文件以为积累更新之用，名之曰：Memos。&lt;/p&gt;&#xA;&lt;div id=&#34;outline-container-headline-1&#34; class=&#34;outline-2&#34;&gt;&#xA;&lt;h2 id=&#34;headline-1&#34;&gt;&#xA;Linux basic&#xA;&lt;/h2&gt;&#xA;&lt;div id=&#34;outline-text-headline-1&#34; class=&#34;outline-text-2&#34;&gt;&#xA;&lt;div id=&#34;outline-container-headline-2&#34; class=&#34;outline-3&#34;&gt;&#xA;&lt;h3 id=&#34;headline-2&#34;&gt;&#xA;目录操作&#xA;&lt;/h3&gt;&#xA;&lt;div id=&#34;outline-text-headline-2&#34; class=&#34;outline-text-3&#34;&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;cd&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;用来切换目录，用法：&lt;/p&gt;&#xA;&lt;div class=&#34;src src-text&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;cd (选项) (参数)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-3&#34; class=&#34;outline-3&#34;&gt;&#xA;&lt;h3 id=&#34;headline-3&#34;&gt;&#xA;DDE(deepin-desktop-environment)&#xA;&lt;/h3&gt;&#xA;&lt;div id=&#34;outline-text-headline-3&#34; class=&#34;outline-text-3&#34;&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;caps ctrl swap (ctrl和caps互换)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;gsettings &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; com.deepin.dde.keybinding.mediakey capslock &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;gsettings &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; com.deepin.dde.keyboard layout-options &lt;span class=&#34;s2&#34;&gt;&amp;#34;[&amp;#39;ctrl:swapcaps&amp;#39;]&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-4&#34; class=&#34;outline-2&#34;&gt;&#xA;&lt;h2 id=&#34;headline-4&#34;&gt;&#xA;一些实用工具及用法&#xA;&lt;/h2&gt;&#xA;&lt;div id=&#34;outline-text-headline-4&#34; class=&#34;outline-text-2&#34;&gt;&#xA;&lt;p&gt;&#xA;记录一些日常可能用到的小工具。&lt;/p&gt;&#xA;&lt;div id=&#34;outline-container-headline-5&#34; class=&#34;outline-3&#34;&gt;&#xA;&lt;h3 id=&#34;headline-5&#34;&gt;&#xA;将 Markdown 文件转为 Org 文件&#xA;&lt;/h3&gt;&#xA;&lt;div id=&#34;outline-text-headline-5&#34; class=&#34;outline-text-3&#34;&gt;&#xA;&lt;p&gt;&#xA;使用 pandoc 这个工具来转换，代码：&lt;/p&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pandoc -f markdown -t org -o new-org-file-name.org origin-markdown-file.md&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-6&#34; class=&#34;outline-3&#34;&gt;&#xA;&lt;h3 id=&#34;headline-6&#34;&gt;&#xA;base64解码&#xA;&lt;/h3&gt;&#xA;&lt;div id=&#34;outline-text-headline-6&#34; class=&#34;outline-text-3&#34;&gt;&#xA;&lt;p&gt;&#xA;看到有博客留邮箱用的一串码，说明是要base64解码的，百度了一下，使用方法如下(macos下)：&lt;/p&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;需解码的字符&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; base64 -D  &lt;span class=&#34;c1&#34;&gt;#解码&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;需加码的字符&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; base64&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;&#xA;另一种方法(看到评论说有缺陷)， chromium 内核的浏览器自带，打开开发者工具， Console 下输入：&lt;/p&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;btoa&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;hello,world&amp;#39;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;#编码&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;//&lt;span class=&#34;s1&#34;&gt;&amp;#39;aGVsbG8sd29ybGQ=&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;atob&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;aGVsbG8sd29ybGQ=&amp;#39;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;#解码&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;//&lt;span class=&#34;s1&#34;&gt;&amp;#39;hello,world&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;&#xA;base64是什么：&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Base64是一种用64个字符来表示任意二进制数据的方法。&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-7&#34; class=&#34;outline-3&#34;&gt;&#xA;&lt;h3 id=&#34;headline-7&#34;&gt;&#xA;Mac OS&#xA;&lt;/h3&gt;&#xA;&lt;div id=&#34;outline-text-headline-7&#34; class=&#34;outline-text-3&#34;&gt;&#xA;&lt;p&gt;解决 .DS_Store 文件问题：&#xA;禁止生成使用下列代码&lt;/p&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;重新生成使用下列代码&lt;/p&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool FALSE&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;&#xA;删除文件夹下 .DS_Store 文件：&lt;/p&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;find . -name ‘.DS_Store’ -type f -delete / find ~ -name &lt;span class=&#34;s2&#34;&gt;&amp;#34;.DS_Store&amp;#34;&lt;/span&gt; -delete&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-8&#34; class=&#34;outline-3&#34;&gt;&#xA;&lt;h3 id=&#34;headline-8&#34;&gt;&#xA;SSH 免密登录&#xA;&lt;/h3&gt;&#xA;&lt;div id=&#34;outline-text-headline-8&#34; class=&#34;outline-text-3&#34;&gt;&#xA;&lt;p&gt;&#xA;SSH 登录： ssh 用户名@目标主机ip/域名，此时回车后一般需要输入密码验证通过才能登录。&lt;/p&gt;&#xA;&lt;p&gt;&#xA;目标：本地主机 A 免密登录目标主机 B；方式：本地主机上生成公钥文件与私钥文件，传递公钥文件到目标主机，实现免密登录。&lt;/p&gt;&#xA;&lt;p&gt;&#xA;步骤：&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;本地主机上生成密钥对： &lt;code class=&#34;verbatim&#34;&gt;ssh-keygen&lt;/code&gt; ；&lt;/li&gt;&#xA;&lt;li&gt;拷贝公钥到目标主机： &lt;code class=&#34;verbatim&#34;&gt;ssh-copy-id 目标主机ip&lt;/code&gt; ，会在目标主机生成 &lt;code class=&#34;verbatim&#34;&gt;.ssh/authorized_keys&lt;/code&gt; 文件；&lt;/li&gt;&#xA;&lt;li&gt;直接登录： &lt;code class=&#34;verbatim&#34;&gt;ssh 用户名@目标主机ip&lt;/code&gt; 。&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-9&#34; class=&#34;outline-3&#34;&gt;&#xA;&lt;h3 id=&#34;headline-9&#34;&gt;&#xA;文本替换&#xA;&lt;/h3&gt;&#xA;&lt;div id=&#34;outline-text-headline-9&#34; class=&#34;outline-text-3&#34;&gt;&#xA;&lt;p&gt;把 org 文件中的 &lt;code class=&#34;verbatim&#34;&gt;原文本&lt;/code&gt; 替换为 &lt;code class=&#34;verbatim&#34;&gt;现文本&lt;/code&gt; ，使用 &lt;code class=&#34;verbatim&#34;&gt;find&lt;/code&gt;, &lt;code class=&#34;verbatim&#34;&gt;xargs&lt;/code&gt; 和 &lt;code class=&#34;verbatim&#34;&gt;sed&lt;/code&gt; 实现。&lt;/p&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;find . -name &lt;span class=&#34;s2&#34;&gt;&amp;#34;*.org&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; xargs sed -i &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/原文本/现文本/g&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-10&#34; class=&#34;outline-3&#34;&gt;&#xA;&lt;h3 id=&#34;headline-10&#34;&gt;&#xA;git 相关&#xA;&lt;/h3&gt;&#xA;&lt;div id=&#34;outline-text-headline-10&#34; class=&#34;outline-text-3&#34;&gt;&#xA;&lt;p&gt;&#xA;创建 submodule&lt;/p&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git submodule add &amp;lt;submodule_url&amp;gt; path &lt;span class=&#34;c1&#34;&gt;# git submodule add git@github.com:username/xxx.git path&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;&#xA;获取 submodule&lt;/p&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; path&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone url --recurse-submodules&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;或者&lt;/p&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git submodule init&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git submodule update&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;outline-container-headline-11&#34; class=&#34;outline-3&#34;&gt;&#xA;&lt;h3 id=&#34;headline-11&#34;&gt;&#xA;rsync 文件同步&#xA;&lt;/h3&gt;&#xA;&lt;div id=&#34;outline-text-headline-11&#34; class=&#34;outline-text-3&#34;&gt;&#xA;&lt;p&gt;&#xA;https://www.ruanyifeng.com/blog/2020/08/rsync.html&lt;/p&gt;&#xA;&lt;div class=&#34;src src-shell&#34;&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ rsync -av --delete source/ destination&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;将 source 文件夹内容同步到 destination 文件夹内。 &lt;code class=&#34;verbatim&#34;&gt;--delete&lt;/code&gt; 参数会使 destination 成为 source 的一个镜像。&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;</description>
			</item>
	</channel>
</rss>
