<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>工程效能 on Yuanjie-跑步爱好者，IT从业者。</title><link>https://shiyuanjie.cn/categories/%E5%B7%A5%E7%A8%8B%E6%95%88%E8%83%BD/</link><description>Recent content in 工程效能 on Yuanjie-跑步爱好者，IT从业者。</description><image><title>Yuanjie-跑步爱好者，IT从业者。</title><url>https://shiyuanjie.cn/og-default.png</url><link>https://shiyuanjie.cn/og-default.png</link></image><generator>Hugo -- 0.151.0</generator><language>zh-CN</language><lastBuildDate>Mon, 27 Oct 2025 21:00:00 +0800</lastBuildDate><atom:link href="https://shiyuanjie.cn/categories/%E5%B7%A5%E7%A8%8B%E6%95%88%E8%83%BD/index.xml" rel="self" type="application/rss+xml"/><item><title>Chrome时区调整</title><link>https://shiyuanjie.cn/posts/Tools/Chrome%E6%97%B6%E9%97%B4%E8%B0%83%E6%95%B4/</link><pubDate>Mon, 27 Oct 2025 21:00:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/Chrome%E6%97%B6%E9%97%B4%E8%B0%83%E6%95%B4/</guid><description>&lt;h2 id="场景"&gt;场景&lt;/h2&gt;
&lt;p&gt;前端页面中的显示时间，是按当前用户的时区进行转换和显示。所以如果用户在中国大陆访问一个美国网站，看到的时间会是美国时间转换为北京时间后的结果。&lt;/p&gt;
&lt;p&gt;这样不利于查看时间进展，尤其是一些需要近期的时间节点，因为美国的时间比国内晚很多小时。&lt;/p&gt;
&lt;h2 id="解决方案"&gt;解决方案&lt;/h2&gt;
&lt;p&gt;Chrome插件：&lt;code&gt;Change Timezone for Google Chrome&lt;/code&gt;，可以直接通过改变浏览器的时区，刷新页面即可获取当前设置的时区，而不需要调整电脑的时间。&lt;/p&gt;</description></item><item><title>2021总结</title><link>https://shiyuanjie.cn/posts/Flags/2021%E6%80%BB%E7%BB%93/</link><pubDate>Fri, 21 May 2021 20:00:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Flags/2021%E6%80%BB%E7%BB%93/</guid><description>&lt;p&gt;写于&lt;code&gt;成都&lt;/code&gt;出差中。&lt;/p&gt;
&lt;h2 id="flag-in-2020"&gt;Flag in 2020&lt;/h2&gt;
&lt;h4 id="家庭"&gt;家庭&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;陪家人出去游玩 -&amp;gt; Delay,疫情严重没有机会出去&lt;/li&gt;
&lt;li&gt;学习5道新菜 -&amp;gt; 完成2/5，还要再努力&lt;/li&gt;
&lt;li&gt;带儿子参加2次跑步比赛 -&amp;gt; 疫情基本都荒废了&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;整体完成30%，还需要再努力！
&lt;/code&gt;&lt;/pre&gt;&lt;h4 id="学习"&gt;学习&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;读书30本 -&amp;gt;7/30，终究还是自己太懒&lt;/li&gt;
&lt;li&gt;跑步800公里 -&amp;gt;200/800.基本没太跑。现在也快荒废了。&lt;/li&gt;
&lt;li&gt;学习观察与谈判 -&amp;gt;学会了在沟通中的一些细小动作，太整体进步不大。&lt;/li&gt;
&lt;li&gt;驾照 -&amp;gt;8月份完成&lt;/li&gt;
&lt;li&gt;培养孩子主动学习 -&amp;gt;孩子的学习还行，主动性还不行。需要继续培养&lt;/li&gt;
&lt;li&gt;输出20篇文章 -&amp;gt;输出23篇，包含读书笔记&lt;/li&gt;
&lt;li&gt;一场马拉松 -&amp;gt;未完成&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;整体完成40%，还缺失很多。。
&lt;/code&gt;&lt;/pre&gt;&lt;h4 id="工作"&gt;工作&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;PMP证书 -&amp;gt;未通过&lt;/li&gt;
&lt;li&gt;DA(Role Model:亚维) -&amp;gt; 尝试了多项目管理，但重大事项的处理，还缺失处理策略&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;20%完成度，加油！
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="2021-tbd"&gt;2021 TBD&lt;/h2&gt;
&lt;h3 id="家庭-1"&gt;家庭&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;孩子回老家上学了，媳妇也回老家陪孩子，多陪陪家人。每月回家至少一次&lt;/li&gt;
&lt;li&gt;带孩子出去游玩一次&lt;/li&gt;
&lt;li&gt;抽空多给老爸打打电话&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="学习-1"&gt;学习&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;读书10本，产出读书笔记&lt;/li&gt;
&lt;li&gt;学会一个新技能&lt;/li&gt;
&lt;li&gt;每个月写一篇文章，内容不限。从5月开始&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="工作-1"&gt;工作&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;不要逃避，有困难赢难而上&lt;/li&gt;
&lt;li&gt;多关注客户的业务与项目组管理&lt;/li&gt;
&lt;li&gt;每2个月与项目全体成员沟通一次，确保人员成长有推动&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="回顾"&gt;回顾&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://shiyuanjie.cn/posts/Flags/2020%E6%80%BB%E7%BB%93/"&gt;2020总结&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://shiyuanjie.cn/posts/Flags/2019%E6%80%BB%E7%BB%93/"&gt;2019总结&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://shiyuanjie.cn/posts/Flags/2018%E6%80%BB%E7%BB%93/"&gt;2018总结&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://shiyuanjie.cn/posts/Flags/2017%E6%80%BB%E7%BB%93/"&gt;2017总结&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>ECS Tips</title><link>https://shiyuanjie.cn/posts/Aliyun/ECS-tips/</link><pubDate>Thu, 26 Mar 2020 17:21:38 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Aliyun/ECS-tips/</guid><description>&lt;h2 id="ssh"&gt;SSH&lt;/h2&gt;
&lt;h3 id="设置密钥对后无法使用账号登录"&gt;设置&lt;code&gt;密钥对&lt;/code&gt;后，无法使用账号登录&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;设置使用SSH的&lt;code&gt;密钥对&lt;/code&gt;登录后，无法正常使用&lt;code&gt;账号+密码&lt;/code&gt;的方式进行登录&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;官方解释：
如果使用SSH密钥对登录Linux实例，将会禁用密码登录，以提高安全性。
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;参考：&lt;a href="https://help.aliyun.com/document_detail/51792.html?spm=5176.2020520101.0.0.182e4df5e0J5S6"&gt;https://help.aliyun.com/document_detail/51792.html?spm=5176.2020520101.0.0.182e4df5e0J5S6&lt;/a&gt;&lt;/p&gt;</description></item><item><title>一行命令连接ECS</title><link>https://shiyuanjie.cn/posts/Aliyun/one-command-connect-ecs/</link><pubDate>Wed, 25 Mar 2020 16:40:04 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Aliyun/one-command-connect-ecs/</guid><description>&lt;p&gt;&lt;strong&gt;目标：一行命令，直接连接至阿里云的ECS。不需要手动输入IP/Port/User/Pwd。&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="ecs"&gt;ECS&lt;/h2&gt;
&lt;h3 id="创建密钥对"&gt;创建密钥对&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;打开ECS的&amp;quot;网络与安全&amp;quot;..&amp;gt;&amp;ldquo;密钥对&amp;rdquo;&lt;/li&gt;
&lt;li&gt;左上角“创建密钥对”，完成密钥&lt;code&gt;创建&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;保存生成的&lt;code&gt;密钥对&lt;/code&gt;至&lt;code&gt;本机&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="绑定密钥对"&gt;绑定密钥对&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;在生成的密钥中，点击&lt;code&gt;绑定密钥对&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;完成密钥与实例的绑定&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="ssh"&gt;SSH&lt;/h2&gt;
&lt;h3 id="配制config"&gt;配制Config&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;修改&lt;code&gt;*.pem&lt;/code&gt;文件的属性，支持可执行&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;chmod 400 *.pem
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;找到本机的ssh config文件，没有可直接创建，路径参考&lt;code&gt;~/.ssh/config&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;完成config文件的配制，内容参考如下：&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Host aliyun
HostName ECS公网IP
User root
Port 22
IdentityFile ~/.ssh/*.pem
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="连通测试"&gt;连通测试&lt;/h3&gt;
&lt;p&gt;命令行打开，输入&lt;code&gt;ssh aliyun&lt;/code&gt;，可直接连接至阿里云的ECS&lt;/p&gt;</description></item><item><title>Flutter学习</title><link>https://shiyuanjie.cn/posts/Android/learn-flutter/</link><pubDate>Tue, 17 Mar 2020 11:30:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Android/learn-flutter/</guid><description>&lt;h2 id="什么是flutter"&gt;什么是Flutter&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;是什么
&lt;ul&gt;
&lt;li&gt;UI 组件库&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;做什么
&lt;ul&gt;
&lt;li&gt;使用一套代码&lt;/li&gt;
&lt;li&gt;构建美观、本地话编译的应用程序&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;适用平台
&lt;ul&gt;
&lt;li&gt;mobile&lt;/li&gt;
&lt;li&gt;web&lt;/li&gt;
&lt;li&gt;desktop&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="使用flutter"&gt;使用Flutter&lt;/h2&gt;
&lt;h2 id="最佳实践flutter"&gt;最佳实践Flutter&lt;/h2&gt;
&lt;h2 id="参考"&gt;参考&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://flutter.dev/"&gt;Flutter官方地址&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://flutter.cn/"&gt;Flutter中文官方地址&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Alfred中的Workflow配制</title><link>https://shiyuanjie.cn/posts/Tools/Alfred_Workflows/</link><pubDate>Sat, 11 Jan 2020 12:00:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/Alfred_Workflows/</guid><description>&lt;h2 id="是什么"&gt;是什么&lt;/h2&gt;
&lt;h3 id="alfred"&gt;Alfred&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://www.alfredapp.com/"&gt;https://www.alfredapp.com/&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;官方定义：&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Alfred is an award-winning app for macOS which boosts your efficiency with hotkeys, keywords, text expansion and more. Search your Mac and the web, and be more productive with custom actions to control your Mac.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;自己理解&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;通过&lt;code&gt;定制化&lt;/code&gt;的方法，&lt;code&gt;提高&lt;/code&gt;使用&lt;code&gt;macOS&lt;/code&gt; &lt;code&gt;效率&lt;/code&gt;的工具。&lt;/p&gt;
&lt;p&gt;补充：
Alfred提供了Powerpack的&lt;code&gt;收费&lt;/code&gt;功能，用于&lt;code&gt;深度&lt;/code&gt;定制。
建议购买&lt;code&gt;Powerpack&lt;/code&gt;。&lt;/p&gt;
&lt;h3 id="workflows"&gt;Workflows&lt;/h3&gt;
&lt;p&gt;Workflows是用于定制Alfred与操作系统交互，可将一个或多个&lt;code&gt;流程性&lt;/code&gt;/&lt;code&gt;重复性&lt;/code&gt;的操作定制为Workflow。如每天上班后，打开IDEA、邮件等。&lt;/p&gt;</description></item><item><title>PDF转换神器</title><link>https://shiyuanjie.cn/posts/Tools/PDF%E8%BD%AC%E6%8D%A2%E7%A5%9E%E5%99%A8/</link><pubDate>Thu, 26 Dec 2019 18:30:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/PDF%E8%BD%AC%E6%8D%A2%E7%A5%9E%E5%99%A8/</guid><description>&lt;h3 id="前情"&gt;前情&lt;/h3&gt;
&lt;h4 id="背景今天要处理公司的一个会签材料两个pdf文件近70页的内容两个文件中分别有一处小错误需要修正后再合并为一个pdf文件"&gt;背景：今天要处理公司的一个会签材料，两个PDF文件，近70页的内容。两个文件中分别有一处小错误，需要修正后，再合并为一个PDF文件。&lt;/h4&gt;
&lt;h4 id="处理方法"&gt;处理方法&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;在原文件中，把小错误改了&lt;/li&gt;
&lt;li&gt;再把错误页单独打印&lt;/li&gt;
&lt;li&gt;再&lt;code&gt;全部扫描&lt;/code&gt;，从第一页到70页，扫了10分钟&lt;/li&gt;
&lt;li&gt;发给审核人员。被告知，有一个小错误没有修复好，MMP，我想骂人&lt;/li&gt;
&lt;li&gt;再次&lt;code&gt;Repeat&lt;/code&gt; 1-4步骤，10几分钟过去了&amp;hellip;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;内心各种CNM，有没有人来拯救我&lt;/p&gt;</description></item><item><title>更新package中依赖包版本</title><link>https://shiyuanjie.cn/posts/Tools/%E6%9B%B4%E6%96%B0package%E4%B8%AD%E4%BE%9D%E8%B5%96%E5%8C%85%E7%89%88%E6%9C%AC/</link><pubDate>Thu, 26 Dec 2019 09:20:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/%E6%9B%B4%E6%96%B0package%E4%B8%AD%E4%BE%9D%E8%B5%96%E5%8C%85%E7%89%88%E6%9C%AC/</guid><description>&lt;pre tabindex="0"&gt;&lt;code&gt;需求：更新package.json中dependencies的版本号至最新
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="解决方案"&gt;解决方案&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;安装npm-check-updates&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;npm install -g npm-check-updates
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href="https://www.npmjs.com/package/npm-check-updates?activeTab=dependents"&gt;https://www.npmjs.com/package/npm-check-updates&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;运行&lt;code&gt;ncu -u&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;更新package.json中依赖包版本&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;以上需求已解决&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id="参考"&gt;参考&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://flaviocopes.com/update-npm-dependencies/"&gt;https://flaviocopes.com/update-npm-dependencies/&lt;/a&gt;&lt;/p&gt;</description></item><item><title>2020总结</title><link>https://shiyuanjie.cn/posts/Flags/2020%E6%80%BB%E7%BB%93/</link><pubDate>Tue, 24 Dec 2019 20:00:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Flags/2020%E6%80%BB%E7%BB%93/</guid><description>&lt;h2 id="summary-in-2019"&gt;Summary in 2019&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;4道菜&lt;/li&gt;
&lt;li&gt;3个交付项目，5个售前项目&lt;/li&gt;
&lt;li&gt;1场Workshop+BQTime，1个Community&lt;/li&gt;
&lt;li&gt;21本书
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Flags/2020%E6%80%BB%E7%BB%93/Book-1_hu_e875a7468258588f.webp" type="image/webp"&gt;&lt;img alt="Book1/2" loading="lazy" src="https://shiyuanjie.cn/posts/Flags/2020%E6%80%BB%E7%BB%93/Book-1.png"&gt;&lt;/picture&gt;
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Flags/2020%E6%80%BB%E7%BB%93/Book-2_hu_6d053483837bbeb8.webp" type="image/webp"&gt;&lt;img alt="Book2/2" loading="lazy" src="https://shiyuanjie.cn/posts/Flags/2020%E6%80%BB%E7%BB%93/Book-2.png"&gt;&lt;/picture&gt;&lt;/li&gt;
&lt;li&gt;620公里
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Flags/2020%E6%80%BB%E7%BB%93/RunRecord_hu_abce9b035d48f46a.webp" type="image/webp"&gt;&lt;img alt="Run" loading="lazy" src="https://shiyuanjie.cn/posts/Flags/2020%E6%80%BB%E7%BB%93/RunRecord.png"&gt;&lt;/picture&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>网易蜗牛读书会员</title><link>https://shiyuanjie.cn/posts/Tools/%E7%BD%91%E6%98%93%E8%9C%97%E7%89%9B%E8%AF%BB%E4%B9%A6%E4%BC%9A%E5%91%98/</link><pubDate>Sat, 13 Jul 2019 17:10:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/%E7%BD%91%E6%98%93%E8%9C%97%E7%89%9B%E8%AF%BB%E4%B9%A6%E4%BC%9A%E5%91%98/</guid><description>&lt;p&gt;8本文为购买&lt;code&gt;网易蜗牛读书&lt;/code&gt;会员的过程，记录下来。&lt;/p&gt;
&lt;p&gt;&lt;img loading="lazy" src="https://yuedust.yuedu.126.net/snail_st/static/images/web_intro/logo_header.png?11ac8d10"&gt;&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;时间出新知
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>我购买的收费软件</title><link>https://shiyuanjie.cn/posts/Tools/%E6%88%91%E8%B4%AD%E4%B9%B0%E7%9A%84%E6%94%B6%E8%B4%B9%E8%BD%AF%E4%BB%B6/</link><pubDate>Fri, 28 Jun 2019 15:00:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/%E6%88%91%E8%B4%AD%E4%B9%B0%E7%9A%84%E6%94%B6%E8%B4%B9%E8%BD%AF%E4%BB%B6/</guid><description>&lt;p&gt;最近几年，自己也开始为一些软件付费。把&lt;code&gt;自己付费&lt;/code&gt;的软件梳理下来，为后续的软件再付费做参考。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;软件排名不分先后&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id="爱奇艺"&gt;爱奇艺&lt;/h3&gt;
&lt;h5 id="功能说明"&gt;功能说明&lt;/h5&gt;
&lt;p&gt;视频网站，支持手机、IPad、电视。&lt;/p&gt;
&lt;h5 id="付费动机"&gt;付费动机&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;媳妇当时想看一个综艺节目，不付费的话需要等好几天。&lt;/li&gt;
&lt;li&gt;家里老大一直看的一个动画片，突然不付费的话，只能看前面两集。&lt;/li&gt;
&lt;li&gt;广告时间太长。&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="费用"&gt;费用&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;100RMB+/年&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="收益"&gt;收益&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;再也没有广告了，很爽&lt;/li&gt;
&lt;li&gt;没有节目限制，孩子和媳妇想看什么就看什么。除部分新上映电影&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="是否续费"&gt;是否续费&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;是&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>放弃Keep</title><link>https://shiyuanjie.cn/posts/Tools/%E6%94%BE%E5%BC%83Keep/</link><pubDate>Thu, 06 Jun 2019 17:00:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/%E6%94%BE%E5%BC%83Keep/</guid><description>&lt;h2 id="放弃keep"&gt;放弃Keep&lt;/h2&gt;
&lt;p&gt;从2016年开始使用Keep来跑步，断断续续的有3年时间了。但最近我把Keep拉入黑名单了。&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/%E6%94%BE%E5%BC%83Keep/Keep%E4%BD%BF%E7%94%A8_hu_301fe8a6392fba29.webp" type="image/webp"&gt;&lt;img loading="lazy" src="https://shiyuanjie.cn/posts/Tools/%E6%94%BE%E5%BC%83Keep/Keep%E4%BD%BF%E7%94%A8.png"&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/%E6%94%BE%E5%BC%83Keep/Keep%E6%95%B0%E6%8D%AE_hu_7d64780b7aca2a1e.webp" type="image/webp"&gt;&lt;img loading="lazy" src="https://shiyuanjie.cn/posts/Tools/%E6%94%BE%E5%BC%83Keep/Keep%E6%95%B0%E6%8D%AE.png"&gt;&lt;/picture&gt;&lt;/p&gt;</description></item><item><title>2019总结</title><link>https://shiyuanjie.cn/posts/Flags/2019%E6%80%BB%E7%BB%93/</link><pubDate>Sat, 12 Jan 2019 16:16:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Flags/2019%E6%80%BB%E7%BB%93/</guid><description>&lt;h2 id="回顾"&gt;回顾&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://shiyuanjie.cn/2018/01/08/2018%E6%80%BB%E7%BB%93/"&gt;2018总结&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://shiyuanjie.cn/2016/12/28/2017%E6%80%BB%E7%BB%93/"&gt;2017总结&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="2018规划"&gt;2018规划&lt;/h3&gt;
&lt;h4 id="生活"&gt;生活&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;带 &lt;code&gt;大宝&lt;/code&gt; 去参加一次跑步比赛 &amp;ndash;Done&lt;/li&gt;
&lt;li&gt;带 家人 出去旅游 一次。 &amp;ndash;Delay&lt;/li&gt;
&lt;li&gt;学会做更多的饭菜，让家人可以吃到更多的美味 &amp;ndash;Delay&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>七牛床图迁移至Github</title><link>https://shiyuanjie.cn/posts/Tools/%E4%B8%83%E7%89%9B%E5%BA%8A%E5%9B%BE%E8%BF%81%E7%A7%BB%E8%87%B3Github/</link><pubDate>Thu, 18 Oct 2018 15:10:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/%E4%B8%83%E7%89%9B%E5%BA%8A%E5%9B%BE%E8%BF%81%E7%A7%BB%E8%87%B3Github/</guid><description>&lt;p&gt;问题由于网站的大部分床图一直使用的是七牛的，近期&lt;a href="https://developer.qiniu.com/fusion/kb/1319/test-domain-access-restriction-rules"&gt;官网更新&lt;/a&gt;，导致原测试域名已失效，之前在测试域名存储的图片无法&lt;code&gt;访问、查看、下载&lt;/code&gt;，网站文章关联的图片无法正常查看。所以决定&lt;strong&gt;把图片从七牛迁移至Github来存储，弃用七牛云&lt;/strong&gt;。&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;七牛融合 CDN 测试域名（以 clouddn.com/qiniucdn.com/qiniudn.com/qnssl.com/qbox.me 结尾），每个域名每日限总流量 10GB，
每个测试域名自创建起 30 个自然日后系统会自动回收，仅供测试使用，详情查看 七牛测试域名使用规范 。
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>印象笔记支持Markdown</title><link>https://shiyuanjie.cn/posts/Tools/%E5%8D%B0%E8%B1%A1%E7%AC%94%E8%AE%B0%E6%94%AF%E6%8C%81Markdown/</link><pubDate>Thu, 23 Aug 2018 14:50:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/%E5%8D%B0%E8%B1%A1%E7%AC%94%E8%AE%B0%E6%94%AF%E6%8C%81Markdown/</guid><description>&lt;pre tabindex="0"&gt;&lt;code&gt;最近很长一断时间都比较喜欢用Markdown来编写文件，自己日常的工作和记录也一直都在用Evernote来进行.
看到Evernote在8.20发布的Mac 8.2.0 beta1版本支持Markdown格式的笔记了，赶紧来试下用。
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="版本支持"&gt;版本支持&lt;/h2&gt;
&lt;p&gt;仅&lt;strong&gt;Mac的Beta版本&lt;/strong&gt;支持此功能&lt;/p&gt;
&lt;h2 id="版本下载"&gt;版本下载&lt;/h2&gt;
&lt;p&gt;地址：&lt;a href="https://cdn.yinxiang.com/mac-smd/prerelease/YinxiangBiji_BETA_8.2.0_beta_1_457096.dmg"&gt;https://cdn.yinxiang.com/mac-smd/prerelease/YinxiangBiji_BETA_8.2.0_beta_1_457096.dmg&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;PS：如果电脑里面已经有之前的版本，安装结束后，会共存&lt;strong&gt;两个&lt;/strong&gt;版本。&lt;/p&gt;
&lt;!-- more --&gt;
&lt;h2 id="使用markdown笔记"&gt;使用Markdown笔记&lt;/h2&gt;
&lt;h3 id="创建markdown笔记"&gt;创建Markdown笔记&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;在新版本中，左上角会有一个&amp;quot;New Markdown Note&amp;quot;的按钮，点击即可新增一&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/%E5%8D%B0%E8%B1%A1%E7%AC%94%E8%AE%B0%E6%94%AF%E6%8C%81Markdown/NewMarkdownNote_hu_9c69eae9959d71e0.webp" type="image/webp"&gt;&lt;img alt="New Markdown Note" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/%E5%8D%B0%E8%B1%A1%E7%AC%94%E8%AE%B0%E6%94%AF%E6%8C%81Markdown/NewMarkdownNote.png"&gt;&lt;/picture&gt;&lt;/p&gt;</description></item><item><title>我的工具集</title><link>https://shiyuanjie.cn/posts/Tools/%E6%88%91%E7%9A%84%E5%B7%A5%E5%85%B7%E9%9B%86/</link><pubDate>Wed, 21 Mar 2018 14:30:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/%E6%88%91%E7%9A%84%E5%B7%A5%E5%85%B7%E9%9B%86/</guid><description>&lt;pre tabindex="0"&gt;&lt;code&gt;把自己经常使用的工具和网址梳理出来，进行一个较完整的回顾。
Last Update:20200323，持续维护...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/%E6%88%91%E7%9A%84%E5%B7%A5%E5%85%B7%E9%9B%86/%E6%88%91%E7%9A%84%E5%B7%A5%E5%85%B7%E9%9B%86_hu_83a256ebb3d16aab.webp" type="image/webp"&gt;&lt;img alt="我的工具集" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/%E6%88%91%E7%9A%84%E5%B7%A5%E5%85%B7%E9%9B%86/%E6%88%91%E7%9A%84%E5%B7%A5%E5%85%B7%E9%9B%86.png"&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;工具下载地址(持续更新)：
&lt;ul&gt;
&lt;li&gt;链接: &lt;a href="https://pan.baidu.com/s/1z9NNFc2XQeqbPDq8jdcQhQ"&gt;https://pan.baidu.com/s/1z9NNFc2XQeqbPDq8jdcQhQ&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;提取码: wgav&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;我的设备&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;PC：Mac
手机：Android
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>2017Calendar中的提示</title><link>https://shiyuanjie.cn/posts/Flags/2017CalendarTips/</link><pubDate>Thu, 18 Jan 2018 17:30:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Flags/2017CalendarTips/</guid><description>&lt;pre tabindex="0"&gt;&lt;code&gt;2017年中的时候，想把自己针对孩子的教育方式和沟通方式调整下，所以在家里的 Calendar 中每个月都给自己一句话，来提醒自己。
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Flags/2017CalendarTips/6%E6%9C%88_hu_613017874bf14d48.webp" type="image/webp"&gt;&lt;img alt="6月" loading="lazy" src="https://shiyuanjie.cn/posts/Flags/2017CalendarTips/6%E6%9C%88.jpeg"&gt;&lt;/picture&gt;&lt;/p&gt;</description></item><item><title>2018总结</title><link>https://shiyuanjie.cn/posts/Flags/2018%E6%80%BB%E7%BB%93/</link><pubDate>Mon, 08 Jan 2018 19:10:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Flags/2018%E6%80%BB%E7%BB%93/</guid><description>&lt;blockquote&gt;
&lt;p&gt;2018年已经过了好几天，这几天终于闲下来，把今年的事情总结下。&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id="回顾2017计划"&gt;回顾2017计划&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://shiyuanjie.cn/2016/12/28/2017%E6%80%BB%E7%BB%93/"&gt;2017总结&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="工作"&gt;工作&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;更多的尝试其他角色&lt;/li&gt;
&lt;li&gt;将更多的测试新技术应用至项目实践中&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;在两个项目中，尝试并实践了 PM、BA 的工作，自己现在对其它角色有更加深入的认识。
测试新技术的话，实践较多的还是 E2E 和性能测试。
今年在一个项目中，有机会带领2个QA 新人，终于有机会带新人。
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>MarkDown保存至印象笔记</title><link>https://shiyuanjie.cn/posts/Tools/MarkDown%E4%BF%9D%E5%AD%98%E8%87%B3%E5%8D%B0%E8%B1%A1%E7%AC%94%E8%AE%B0/</link><pubDate>Sun, 15 Oct 2017 14:30:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/MarkDown%E4%BF%9D%E5%AD%98%E8%87%B3%E5%8D%B0%E8%B1%A1%E7%AC%94%E8%AE%B0/</guid><description>&lt;pre tabindex="0"&gt;&lt;code&gt;通过 Sumlime Text3 来实现将 MarkDown 文件完美保存至 印象笔记中。
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id="step1-安装evernote包"&gt;Step1: 安装Evernote包&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;打开 Sumlime Text3&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cmd + shift + p&lt;/code&gt;打开command pattern&lt;/li&gt;
&lt;li&gt;输入&lt;code&gt;Package Controll: Install Package&lt;/code&gt;，回车&lt;/li&gt;
&lt;li&gt;输入Evernote，等待安装成功。Evernote包地址：&lt;a href="https://packagecontrol.io/packages/Evernote"&gt;https://packagecontrol.io/packages/Evernote&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;安装结束后，在&lt;code&gt;Package Setting&lt;/code&gt;中会有&lt;code&gt;Evernote&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cmd + shift + p&lt;/code&gt;打开command pattern，输入Evernote，查看是否有Evernote对应的功能列表显示&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="step2-获取印象笔记的developer-token"&gt;Step2: 获取印象笔记的Developer Token&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;登录&lt;a href="https://app.yinxiang.com/api/DeveloperToken.action"&gt;https://app.yinxiang.com/api/DeveloperToken.action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;如果没有内容，选择新增一个developer token&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="step3-配制sublime-text中的-evernote"&gt;Step3: 配制Sublime Text中的 Evernote&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Package Settings&lt;/code&gt; &amp;ndash;&amp;gt; &lt;code&gt;Evernote&lt;/code&gt; &amp;ndash;&amp;gt; &lt;code&gt;Settings User&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;默认打开内容为空，设置内容如下(Step2中获取的内容)&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-json" data-lang="json"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;token&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Token内容，那一串长的字符&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;noteStoreUrl&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;StoreUrl&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;至此，已经配制&lt;code&gt;完成&lt;/code&gt;。&lt;/p&gt;</description></item><item><title>获取Chrome浏览器</title><link>https://shiyuanjie.cn/posts/Tools/%E8%8E%B7%E5%8F%96Chrome%E6%B5%8F%E8%A7%88%E5%99%A8/</link><pubDate>Wed, 18 Jan 2017 14:50:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/%E8%8E%B7%E5%8F%96Chrome%E6%B5%8F%E8%A7%88%E5%99%A8/</guid><description>&lt;h2 id="由来"&gt;由来&lt;/h2&gt;
&lt;p&gt;项目的测试需求，需要针对64位 Chrome 42+的各个&lt;code&gt;稳定版&lt;/code&gt;本进行测试,但安装环境又无法&lt;code&gt;直接访问外网&lt;/code&gt;进行&lt;code&gt;在线版本&lt;/code&gt;安装，因此需要搜集已发布的&lt;code&gt;离线安装&lt;/code&gt;版本。作为&lt;code&gt;安装源&lt;/code&gt;。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;首先，来认识下Chrome到底有哪些版本。&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id="chrome-vs-chromium"&gt;&lt;a href="www.google.com/chrome"&gt;Chrome&lt;/a&gt; VS &lt;a href="www.chromium.org"&gt;Chromium&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="区别"&gt;区别&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;The Chromium projects include Chromium and Chromium OS, the open-source projects behind the Google Chrome browser and Google Chrome OS, respectively. This site houses the documentation and code related to the Chromium projects and is intended for developers interested in learning about and contributing to the open-source projects.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;简而言之，Chrome是基于 &lt;strong&gt;开源项目&lt;/strong&gt; Chromium的 。新功能会优先在Chromium发布。&lt;/p&gt;</description></item><item><title>2017总结</title><link>https://shiyuanjie.cn/posts/Flags/2017%E6%80%BB%E7%BB%93/</link><pubDate>Wed, 28 Dec 2016 11:20:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Flags/2017%E6%80%BB%E7%BB%93/</guid><description>&lt;blockquote&gt;
&lt;p&gt;2016还有几天就结束了，公司的Review基本做完，自己再做个总结。便于对新的一年有整体的规划。&lt;/p&gt;&lt;/blockquote&gt;
&lt;h1 id="2016"&gt;2016&lt;/h1&gt;
&lt;h2 id="工作"&gt;工作&lt;/h2&gt;
&lt;h3 id="专业技能"&gt;专业技能&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;测试技能&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;掌握&lt;code&gt;Protractor&lt;/code&gt;对Angular项目的测试&lt;/li&gt;
&lt;li&gt;掌握&lt;code&gt;SuperTest&lt;/code&gt;进行API测试&lt;/li&gt;
&lt;li&gt;熟悉项目中应用&lt;code&gt;Docker&lt;/code&gt;，进行容器化部署的全流程&lt;/li&gt;
&lt;li&gt;更加深入的掌握&lt;code&gt;JMeter&lt;/code&gt;在性能测试中的功能&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;其它角色&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;实践PM、BA角色在项目中的经验&lt;/li&gt;
&lt;li&gt;实践公司项目&lt;code&gt;售前&lt;/code&gt;的操作方法&lt;/li&gt;
&lt;li&gt;利用自己的&lt;a href="https://github.com/aimer1124/JianshuSpider"&gt;个人项目&lt;/a&gt;，体验敏捷项目中，其它各角色的工作方式&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="业务"&gt;业务&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;了解银行&lt;code&gt;账号系统、借贷系统&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;了解市面主流&lt;code&gt;敏捷看板&lt;/code&gt;工具，及各自优缺点&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Android UI自动化测试神器-Espresso录制</title><link>https://shiyuanjie.cn/posts/Android/Android-UI%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF%95%E7%A5%9E%E5%99%A8-Espresso%E5%BD%95%E5%88%B6/</link><pubDate>Fri, 25 Nov 2016 13:46:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Android/Android-UI%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF%95%E7%A5%9E%E5%99%A8-Espresso%E5%BD%95%E5%88%B6/</guid><description>&lt;p&gt;Espresso Test Recorder的好处&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;直接录制与APP的所有交互操作&lt;/li&gt;
&lt;li&gt;支持在录制过程中添加断言&lt;/li&gt;
&lt;li&gt;可直接生成&lt;code&gt;可回放&lt;/code&gt;的测试脚本，基本不需要做任何修改&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;原文地址: &lt;a href="https://developer.android.com/studio/test/espresso-test-recorder.html"&gt;Create UI Tests with Espresso Test Recorder&lt;/a&gt;，以下为正文&lt;/p&gt;
&lt;hr&gt;
&lt;blockquote&gt;
&lt;p&gt;注意: Espresso Test Recorder在AndroidStudio 2.2 Beta版本之后才有。&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Espresso Test Recorder可以在不写一行代码的情况下创建UI测试。通过录制一个测试场景，你可以记录设备的交互并在APP的部分快照中添加断言来验证元素。Espresso Test Recorder会保存录制并自动生成对应的UI测试，并可直接运行来测试你的APP。&lt;/p&gt;
&lt;p&gt;Espresso Test Recorder编写的测试基于&lt;a href="https://google.github.io/android-testing-support-library/docs/espresso/"&gt;Espresso Testing framework&lt;/a&gt;，API在&lt;a href="https://developer.android.com/topic/libraries/testing-support-library/index.html"&gt;Android Testing Support Library&lt;/a&gt;。Espresso API鼓励你创建基于用户操作的简洁且可信赖的UI测试。通过使用expectations、interactions和assertions而不是底层APP的Activity和Views，这样的结构防止了测试的脆弱性并优化测试运行速度。&lt;/p&gt;</description></item><item><title>Android模拟器环境搭建</title><link>https://shiyuanjie.cn/posts/Android/Android%E6%A8%A1%E6%8B%9F%E5%99%A8%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/</link><pubDate>Tue, 22 Nov 2016 14:20:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Android/Android%E6%A8%A1%E6%8B%9F%E5%99%A8%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA/</guid><description>&lt;h2 id="目的"&gt;目的&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Mac电脑上面搭建Android模拟器&lt;/li&gt;
&lt;li&gt;将APP运行在模拟器中&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;自己最近刚把电脑重新安装，顺便梳理下整修安装过程。为后面研究&lt;a href="https://developer.android.com/training/testing/ui-testing/espresso-testing.html"&gt;Espresso&lt;/a&gt;做准备&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>性能测试与持续集成</title><link>https://shiyuanjie.cn/posts/CICD/%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95%E4%B8%8E%E6%8C%81%E7%BB%AD%E9%9B%86%E6%88%90/</link><pubDate>Sun, 07 Aug 2016 14:23:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/CICD/%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95%E4%B8%8E%E6%8C%81%E7%BB%AD%E9%9B%86%E6%88%90/</guid><description>&lt;h2 id="目的"&gt;目的&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;将性能测试与持续集成挂接起来&lt;/li&gt;
&lt;li&gt;性能测试： &lt;a href="http://jmeter.apache.org/"&gt;JMeter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;持续集成： &lt;a href="https://jenkins.io/"&gt;Jenkins&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>简书爬虫</title><link>https://shiyuanjie.cn/posts/Tools/%E7%AE%80%E4%B9%A6%E7%88%AC%E8%99%AB/</link><pubDate>Tue, 19 Jul 2016 19:50:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/%E7%AE%80%E4%B9%A6%E7%88%AC%E8%99%AB/</guid><description>&lt;h2 id="简书爬虫"&gt;简书爬虫&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;此功能纯粹为个人&lt;strong&gt;意想&lt;/strong&gt;功能,利用业余时间来学习Node。&lt;code&gt;所有内容&lt;/code&gt;均已&lt;code&gt;开源&lt;/code&gt;,欢迎各种&lt;code&gt;PR&lt;/code&gt;和&lt;code&gt;Fork&lt;/code&gt;。最后更新时间: &lt;code&gt;20161129&lt;/code&gt;。&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id="项目"&gt;项目&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;源代码&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/aimer1124/JianshuSpider"&gt;https://github.com/aimer1124/JianshuSpider&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;需求&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.teambition.com/project/57a1802f767c4b360c918e49/tasks/scrum/57a1802f767c4b360c918e4c"&gt;Teambition-简书爬虫&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;效果图&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.processon.com/view/link/57a1c693e4b0de6d056db518"&gt;Home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.processon.com/view/link/57a2d0f1e4b0358f8ad7f03b"&gt;Article&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.processon.com/diagraming/5819751de4b03a76e94bea6f"&gt;Author&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.processon.com/diagraming/5819746ae4b06e7dcfc9b338"&gt;Collections&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.processon.com/apps/58197ab8e4b03400d95e4c62"&gt;Search&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ShowCase&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Home
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/%E7%AE%80%E4%B9%A6%E7%88%AC%E8%99%AB/Home_hu_676343e9d700216b.webp" type="image/webp"&gt;&lt;img alt="HomePage" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/%E7%AE%80%E4%B9%A6%E7%88%AC%E8%99%AB/Home.png"&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Articles&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Authors&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Collections
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/%E7%AE%80%E4%B9%A6%E7%88%AC%E8%99%AB/Collections_hu_9a6d598cbf36ccab.webp" type="image/webp"&gt;&lt;img alt="Collections" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/%E7%AE%80%E4%B9%A6%E7%88%AC%E8%99%AB/Collections.png"&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Search
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/%E7%AE%80%E4%B9%A6%E7%88%AC%E8%99%AB/UnSearch_hu_db85b0fd612288ff.webp" type="image/webp"&gt;&lt;img alt="UnSearch" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/%E7%AE%80%E4%B9%A6%E7%88%AC%E8%99%AB/UnSearch.png"&gt;&lt;/picture&gt;
&lt;br&gt;
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/%E7%AE%80%E4%B9%A6%E7%88%AC%E8%99%AB/Search_hu_23ba1f00b4445d3.webp" type="image/webp"&gt;&lt;img alt="Search" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/%E7%AE%80%E4%B9%A6%E7%88%AC%E8%99%AB/Search.png"&gt;&lt;/picture&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="代码"&gt;代码&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;启动&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;DB: &lt;code&gt;sudo mongod&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;程序: &lt;code&gt;gulp&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;测试: &lt;code&gt;gulp test&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;版本&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Node: 4.4.3&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Mongo: 3.0.3&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;引用包列表&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Backend&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;express: &lt;a href="http://expressjs.com/"&gt;http://expressjs.com/&lt;/a&gt;,node web框架&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;body-parser: 请求数据体的转换&lt;code&gt;中间件&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;cookie-parser: 请求头的&lt;code&gt;cookie&lt;/code&gt;管理&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;debug: 调试工具&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;morgan: 日志中间件&lt;/p&gt;</description></item><item><title>Chrome设置网络延迟与带宽</title><link>https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/</link><pubDate>Wed, 09 Mar 2016 20:20:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/</guid><description>&lt;h1 id="developer-tools开发者工具查看网络请求"&gt;Developer Tools&lt;code&gt;开发者工具&lt;/code&gt;查看网络请求&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Windows: F12键&lt;/li&gt;
&lt;li&gt;Mac OS: option+command+i键
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.DeveoperTools_hu_d2253151396e0f32.webp" type="image/webp"&gt;&lt;img alt="开发者工具" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.DeveoperTools.png"&gt;&lt;/picture&gt;&lt;/li&gt;
&lt;li&gt;打开网络请求&lt;code&gt;Network&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;请求网址&lt;a href="http://aimer1124.github.io/"&gt;http://aimer1124.github.io/&lt;/a&gt;后，&lt;code&gt;Network&lt;/code&gt;中便会有本次的网络请求内容
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.Networks_hu_2d49ee2d27773704.webp" type="image/webp"&gt;&lt;img alt="NetWorks" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.Networks.png"&gt;&lt;/picture&gt;&lt;/li&gt;
&lt;li&gt;点击第一条请求&lt;code&gt;http://aimer1124.github.io/&lt;/code&gt;，可查看到此网络请求的详细信息Request/Response&lt;/li&gt;
&lt;li&gt;切换到&lt;code&gt;Timing&lt;/code&gt;栏中，显示具体的请求时间消耗
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.Timing_hu_6db43487e8e44bf2.webp" type="image/webp"&gt;&lt;img alt="Timing" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.Timing.png"&gt;&lt;/picture&gt;&lt;/li&gt;
&lt;li&gt;切换&lt;code&gt;Headers&lt;/code&gt;、&lt;code&gt;Preview&lt;/code&gt;、&lt;code&gt;Response&lt;/code&gt;、&lt;code&gt;Cookies&lt;/code&gt;，也可直接查看对应的信息&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- more --&gt;
&lt;h1 id="设置网络延迟和带宽"&gt;设置网络延迟和带宽&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;点击&lt;code&gt;No throttling&lt;/code&gt;会显示出&lt;code&gt;Chrome&lt;/code&gt;已提前设置好常用的网络延迟和带宽，供直接选择&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: center"&gt;网络类型&lt;/th&gt;
&lt;th style="text-align: center"&gt;带宽&lt;/th&gt;
&lt;th style="text-align: center"&gt;延迟&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;Offline&lt;/td&gt;
&lt;td style="text-align: center"&gt;0kb/s&lt;/td&gt;
&lt;td style="text-align: center"&gt;0ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;GPRS&lt;/td&gt;
&lt;td style="text-align: center"&gt;50kb/s&lt;/td&gt;
&lt;td style="text-align: center"&gt;500ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;Regular 2G&lt;/td&gt;
&lt;td style="text-align: center"&gt;250kb/s&lt;/td&gt;
&lt;td style="text-align: center"&gt;300ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;Good 2G&lt;/td&gt;
&lt;td style="text-align: center"&gt;450kb/s&lt;/td&gt;
&lt;td style="text-align: center"&gt;150ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;Regular 3G&lt;/td&gt;
&lt;td style="text-align: center"&gt;750kb/s&lt;/td&gt;
&lt;td style="text-align: center"&gt;100ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;Good 3G&lt;/td&gt;
&lt;td style="text-align: center"&gt;1Mb/s&lt;/td&gt;
&lt;td style="text-align: center"&gt;40ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;Regular 4G&lt;/td&gt;
&lt;td style="text-align: center"&gt;4Mb/s&lt;/td&gt;
&lt;td style="text-align: center"&gt;20ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;DSL&lt;/td&gt;
&lt;td style="text-align: center"&gt;2Mb/s&lt;/td&gt;
&lt;td style="text-align: center"&gt;5ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;WiFi&lt;/td&gt;
&lt;td style="text-align: center"&gt;30Mb/s&lt;/td&gt;
&lt;td style="text-align: center"&gt;2ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;选择&lt;code&gt;GRPS&lt;/code&gt;，clear网络请求，再次刷新页面，查看请求&lt;code&gt;http://aimer1124.github.io/&lt;/code&gt;的&lt;code&gt;Timing&lt;/code&gt;
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.Latancy_hu_bf1aaf4754d14fa1.webp" type="image/webp"&gt;&lt;img alt="Latency" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.Latancy.png"&gt;&lt;/picture&gt;&lt;/li&gt;
&lt;li&gt;此时，可查看到对应的网络延迟已经&lt;code&gt;生效&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="自定义网络延迟和带宽"&gt;自定义网络延迟和带宽&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;点击&lt;code&gt;No throttling&lt;/code&gt;-&lt;code&gt;Custom&lt;/code&gt;-&lt;code&gt;add&lt;/code&gt;进入&lt;code&gt;Network Throttling Profiles&lt;/code&gt;设置页面&lt;/li&gt;
&lt;li&gt;设置&lt;code&gt;Profile Name&lt;/code&gt;：slow1S，&lt;code&gt;Throughput&lt;/code&gt;：10，&lt;code&gt;Latency&lt;/code&gt;为：1000
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.setNetwork_hu_f99565a87e06927f.webp" type="image/webp"&gt;&lt;img alt="setNetwork" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.setNetwork.png"&gt;&lt;/picture&gt;&lt;/li&gt;
&lt;li&gt;关闭设置框，切换&lt;code&gt;No throttling&lt;/code&gt;为&lt;code&gt;slow1S&lt;/code&gt;，自定义网络延迟与带宽设置完成
&lt;picture&gt;&lt;source srcset="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.setCustomNetwork_hu_e9bfbb1b9399b86f.webp" type="image/webp"&gt;&lt;img alt="setCustomNetwork" loading="lazy" src="https://shiyuanjie.cn/posts/Tools/Chrome%E8%AE%BE%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%BB%B6%E8%BF%9F%E4%B8%8E%E5%B8%A6%E5%AE%BD/github.Chrome.setCustomNetwork.png"&gt;&lt;/picture&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="参考"&gt;参考&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;Measure Resource Loading Times:&lt;a href="https://developers.google.com/web/tools/chrome-devtools/profile/network-performance/resource-loading#network-panel-overview"&gt;https://developers.google.com/web/tools/chrome-devtools/profile/network-performance/resource-loading#network-panel-overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Device Mode &amp;amp; Mobile Emulation:&lt;a href="https://developer.chrome.com/devtools/docs/device-mode"&gt;https://developer.chrome.com/devtools/docs/device-mode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Git添加ignore文件</title><link>https://shiyuanjie.cn/posts/Tools/Git%E6%B7%BB%E5%8A%A0ignore%E6%96%87%E4%BB%B6/</link><pubDate>Tue, 08 Mar 2016 20:57:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/Git%E6%B7%BB%E5%8A%A0ignore%E6%96%87%E4%BB%B6/</guid><description>&lt;h1 id="git-ignore"&gt;Git Ignore&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;忽略特殊指定的文件&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;gitignore - Specifies intentionally untracked files to ignore&lt;/code&gt;&lt;/p&gt;
&lt;h1 id="操作"&gt;操作&lt;/h1&gt;
&lt;h2 id="全局忽略"&gt;全局忽略&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;直接使用命令&lt;code&gt;git config --global core.excludesfile ~/.gitignore_global&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- more --&gt;
&lt;h2 id="未添加到仓库的文件"&gt;未添加到仓库的文件&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;直接在仓库根目录创建&lt;code&gt;.gitignore&lt;/code&gt;文件&lt;/li&gt;
&lt;li&gt;在文件中配制所需要&lt;code&gt;ignore&lt;/code&gt;的文件清单&lt;/li&gt;
&lt;li&gt;还原的话，直接在&lt;code&gt;.gitignore&lt;/code&gt;中删除对应的&lt;code&gt;配制行&lt;/code&gt;即可&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="已提交到仓库的文件"&gt;已提交到仓库的文件&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;先更新仓库至最新版本&lt;/li&gt;
&lt;li&gt;添加指定指定的忽略文件&lt;code&gt;git update-index --assume-unchanged Gruntfile.js&lt;/code&gt;，此处忽略&lt;code&gt;Gruntfile.js&lt;/code&gt;文件&lt;/li&gt;
&lt;li&gt;还原的话，使用命令&lt;code&gt;git update-index --no-assume-unchanged Gruntfile.js&lt;/code&gt;，重新添加对&lt;code&gt;Gruntfile.js&lt;/code&gt;文件的追踪&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="建议"&gt;建议&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Github&lt;/code&gt;官方提供的常用各种&lt;code&gt;ignore&lt;/code&gt;文件大全，&lt;a href="https://github.com/github/gitignore"&gt;https://github.com/github/gitignore&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;将&lt;code&gt;.gitignore&lt;/code&gt;文件提交到远程仓库中，便于整个项目的管理&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.gitignore&lt;/code&gt;添加文件的原则&lt;/li&gt;
&lt;li&gt;临时生成的文件&lt;/li&gt;
&lt;li&gt;本地调度需要经常变更的文件&lt;/li&gt;
&lt;li&gt;日志文件&lt;/li&gt;
&lt;li&gt;编译生成的中间文件，如&lt;code&gt;Java&lt;/code&gt;的&lt;code&gt;.class&lt;/code&gt;文件&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="参考"&gt;参考&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Git之ignore文件: &lt;a href="http://www.douban.com/note/476292319/?type=like"&gt;http://www.douban.com/note/476292319/?type=like&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Git官方推荐&lt;code&gt;ignore&lt;/code&gt;内容：&lt;a href="https://github.com/github/gitignore"&gt;https://github.com/github/gitignore&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Git官方配制&lt;code&gt;ignore&lt;/code&gt;方法：&lt;a href="http://git-scm.com/docs/gitignore"&gt;http://git-scm.com/docs/gitignore&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Jenkins with Grunt</title><link>https://shiyuanjie.cn/posts/CICD/Jenkins-with-SuperTest-and-Grunt/</link><pubDate>Thu, 03 Mar 2016 20:45:38 +0800</pubDate><guid>https://shiyuanjie.cn/posts/CICD/Jenkins-with-SuperTest-and-Grunt/</guid><description>&lt;h1 id="jenkins"&gt;Jenkins&lt;/h1&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;In a nutshell, Jenkins is the leading open source automation server.
Built with Java, it provides hundreds of plugins to support building,
testing, deploying and automation for virtually any project
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex="0"&gt;&lt;code&gt;Jenkins是一个开源软件项目，旨在提供一个开放易用的软件平台，使软件的持续集成变成可能。
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>Node.js时间格式处理</title><link>https://shiyuanjie.cn/posts/Tools/Node-js%E6%97%B6%E9%97%B4%E6%A0%BC%E5%BC%8F%E5%A4%84%E7%90%86/</link><pubDate>Tue, 26 Jan 2016 22:18:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/Node-js%E6%97%B6%E9%97%B4%E6%A0%BC%E5%BC%8F%E5%A4%84%E7%90%86/</guid><description>&lt;h2 id="moment库"&gt;moment库&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;专门用于Javascript的时间转化、验证、处理、展示&lt;/li&gt;
&lt;li&gt;安装moment&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;npm install moment
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="使用moment"&gt;使用moment&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;引用moment&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;moment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;moment&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;!-- more --&gt;
&lt;ul&gt;
&lt;li&gt;转化时间&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;//将时间格式转化为：2016-01-22 21:21:26
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;()).&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;YYYY-MM-DD HH:mm:ss&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;MMMM Do YYYY, h:mm:ss a&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// January 26th 2016, 10:25:00 pm
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;dddd&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Tuesday
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;MMM Do YY&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Jan 26th 16
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;YYYY [escaped] YYYY&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 2016 escaped 2016
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// 2016-01-26T22:25:24+08:00
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;相对时间&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;20111031&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;YYYYMMDD&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;fromNow&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// 4 years ago
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;20120620&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;YYYYMMDD&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;fromNow&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// 4 years ago
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;startOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;day&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;fromNow&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// a day ago
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;endOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;day&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;fromNow&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// in 2 hours
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;startOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;hour&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;fromNow&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;日历时间&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;subtract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;days&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// 01/16/2016
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;subtract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;days&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Last Wednesday at 10:27 PM
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;subtract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;days&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Last Saturday at 10:27 PM
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;subtract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;days&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Yesterday at 10:27 PM
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Today at 10:27 PM
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;days&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Tomorrow at 10:27 PM
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;days&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Friday at 10:27 PM
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;days&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;calendar&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;其它应用&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;L&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 01/26/2016
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;l&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 1/26/2016
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;LL&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// January 26, 2016
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;ll&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Jan 26, 2016
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;LLL&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// January 26, 2016 10:28 PM
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;lll&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Jan 26, 2016 10:28 PM
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;LLLL&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Tuesday, January 26, 2016 10:28 PM
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt;&lt;span class="nx"&gt;moment&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;llll&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;其它使用：&lt;a href="http://momentjs.com/docs/"&gt;官方文档&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="api测试应用nodejs"&gt;API测试应用：Node.js&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;日期判断、对比&lt;/li&gt;
&lt;li&gt;日期格式转化&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Node.js调用数据库:Mysql</title><link>https://shiyuanjie.cn/posts/Tools/JS%E8%B0%83%E7%94%A8%E6%95%B0%E6%8D%AE%E5%BA%93/</link><pubDate>Tue, 26 Jan 2016 22:01:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/JS%E8%B0%83%E7%94%A8%E6%95%B0%E6%8D%AE%E5%BA%93/</guid><description>&lt;h2 id="安装mysql包"&gt;安装Mysql包&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;npm install mysql
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="调用-mysql包"&gt;调用 Mysql包&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;mysql&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;mysql&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="数据库查询"&gt;数据库查询&lt;/h2&gt;
&lt;!-- more --&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;mysql&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;mysql&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;connection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;mysql&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createConnection&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;host&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;10.29.10.29&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3307&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;root&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;password&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;database&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;emall&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;//charset : &amp;#39;UTF8_GENERAL_CI&amp;#39;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt; &lt;span class="nx"&gt;debug&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;use emall&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;select id from users&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="数据库插入"&gt;数据库插入&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;mysql&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;mysql&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;connection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;mysql&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createConnection&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;host&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;10.29.10.29&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3307&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;root&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;password&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;database&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;emall&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c1"&gt;//charset : &amp;#39;UTF8_GENERAL_CI&amp;#39;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;&lt;/span&gt; &lt;span class="nx"&gt;debug&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;use emall&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;insertUser2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;INSERT INTO `sms_verification_code` (`phone_number`, `code`) VALUES (&amp;#39;18392520000&amp;#39;, &amp;#39;018227&amp;#39;);&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;insertUser2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;field&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;end&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="api测试应用nodejs"&gt;API测试应用：Node.js&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;初始化数据&lt;/li&gt;
&lt;li&gt;数据CRUD&lt;/li&gt;
&lt;li&gt;获取部分无返回值的Post结果，如：查询创建用户后，获取用户的ID&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>find</title><link>https://shiyuanjie.cn/posts/Tools/find/</link><pubDate>Wed, 20 Jan 2016 21:27:00 +0800</pubDate><guid>https://shiyuanjie.cn/posts/Tools/find/</guid><description>&lt;h1 id="find"&gt;find&lt;/h1&gt;
&lt;p&gt;查找文件，可指定遍历路径&lt;/p&gt;
&lt;h1 id="用法举例"&gt;用法举例&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;查看当前目录下具体的文件&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;~ find a.txt
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;在指定目录查找文件&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- more --&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;~ find ./Download -name &amp;#34;*.jpg&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;查看目录下所有包括a的文件列表&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;~ find . -name &amp;#34;Thought*&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;查找大于100K的文件表列&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;~ find . -name &amp;#34;Thought*&amp;#34; -size +100k
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;查找创建时间大于2天的&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;~ find . -name &amp;#34;*.txt&amp;#34; -mtime +2
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id="查看find的详细用法"&gt;查看find的详细用法&lt;/h1&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;
FIND(1) BSD General Commands Manual FIND(1)
NAME
find -- walk a file hierarchy
SYNOPSIS
find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]
DESCRIPTION
The find utility recursively descends the directory tree for each path
listed, evaluating an expression (composed of the ``primaries&amp;#39;&amp;#39; and
``operands&amp;#39;&amp;#39; listed below) in terms of each file in the tree.
The options are as follows:
-E Interpret regular expressions followed by -regex and -iregex pri-
maries as extended (modern) regular expressions rather than basic
regular expressions (BRE&amp;#39;s). The re_format(7) manual page fully
describes both formats.
-H Cause the file information and file type (see stat(2)) returned
for each symbolic link specified on the command line to be those
of the file referenced by the link, not the link itself. If the
referenced file does not exist, the file information and type
will be for the link itself. File information of all symbolic
links not on the command line is that of the link itself.
-L Cause the file information and file type (see stat(2)) returned
for each symbolic link to be those of the file referenced by the
link, not the link itself. If the referenced file does not
exist, the file information and type will be for the link itself.
This option is equivalent to the deprecated -follow primary.
-P Cause the file information and file type (see stat(2)) returned
for each symbolic link to be those of the link itself. This is
the default.
-X Permit find to be safely used in conjunction with xargs(1). If a
file name contains any of the delimiting characters used by
xargs(1), a diagnostic message is displayed on standard error,
and the file is skipped. The delimiting characters include sin-
gle (`` &amp;#39; &amp;#39;&amp;#39;) and double (`` &amp;#34; &amp;#39;&amp;#39;) quotes, backslash (``\&amp;#39;&amp;#39;),
space, tab and newline characters.
However, you may wish to consider the -print0 primary in conjunc-
tion with ``xargs -0&amp;#39;&amp;#39; as an effective alternative.
-d Cause find to perform a depth-first traversal, i.e., directories
are visited in post-order and all entries in a directory will be
acted on before the directory itself. By default, find visits
directories in pre-order, i.e., before their contents. Note, the
default is not a breadth-first traversal.
This option is equivalent to the -depth primary of IEEE Std
1003.1-2001 (``POSIX.1&amp;#39;&amp;#39;). The -d option can be useful when find
is used with cpio(1) to process files that are contained in
directories with unusual permissions. It ensures that you have
write permission while you are placing files in a directory, then
sets the directory&amp;#39;s permissions as the last thing.
-f Specify a file hierarchy for find to traverse. File hierarchies
may also be specified as the operands immediately following the
options.
-s Cause find to traverse the file hierarchies in lexicographical
order, i.e., alphabetical order within each directory. Note:
`find -s&amp;#39; and `find | sort&amp;#39; may give different results.
-x Prevent find from descending into directories that have a device
number different than that of the file from which the descent
began.
This option is equivalent to the deprecated -xdev primary.
PRIMARIES
All primaries which take a numeric argument allow the number to be pre-
ceded by a plus sign (``+&amp;#39;&amp;#39;) or a minus sign (``-&amp;#39;&amp;#39;). A preceding plus
sign means ``more than n&amp;#39;&amp;#39;, a preceding minus sign means ``less than n&amp;#39;&amp;#39;
and neither means ``exactly n&amp;#39;&amp;#39;.
-Bmin n
True if the difference between the time of a file&amp;#39;s inode cre-
ation and the time find was started, rounded up to the next full
minute, is n minutes.
-Bnewer file
Same as -newerBm.
-Btime n[smhdw]
If no units are specified, this primary evaluates to true if the
difference between the time of a file&amp;#39;s inode creation and the
time find was started, rounded up to the next full 24-hour
period, is n 24-hour periods.
If units are specified, this primary evaluates to true if the
difference between the time of a file&amp;#39;s inode creation and the
time find was started is exactly n units. Please refer to the
-atime primary description for information on supported time
units.
-acl May be used in conjunction with other primaries to locate files
with extended ACLs. See acl(3) for more information.
-amin n
True if the difference between the file last access time and the
time find was started, rounded up to the next full minute, is n
minutes.
-anewer file
Same as -neweram.
-atime n[smhdw]
If no units are specified, this primary evaluates to true if the
difference between the file last access time and the time find
was started, rounded up to the next full 24-hour period, is n
24-hour periods.
If units are specified, this primary evaluates to true if the
difference between the file last access time and the time find
was started is exactly n units. Possible time units are as fol-
lows:
s second
m minute (60 seconds)
h hour (60 minutes)
d day (24 hours)
w week (7 days)
Any number of units may be combined in one -atime argument, for
example, ``-atime -1h30m&amp;#39;&amp;#39;. Units are probably only useful when
used in conjunction with the + or - modifier.
-cmin n
True if the difference between the time of last change of file
status information and the time find was started, rounded up to
the next full minute, is n minutes.
-cnewer file
Same as -newercm.
-ctime n[smhdw]
If no units are specified, this primary evaluates to true if the
difference between the time of last change of file status infor-
mation and the time find was started, rounded up to the next full
24-hour period, is n 24-hour periods.
If units are specified, this primary evaluates to true if the
difference between the time of last change of file status infor-
mation and the time find was started is exactly n units. Please
refer to the -atime primary description for information on sup-
ported time units.
-d Same as depth. GNU find implements this as a primary in mistaken
emulation of FreeBSD find(1).
-delete
Delete found files and/or directories. Always returns true.
This executes from the current working directory as find recurses
down the tree. It will not attempt to delete a filename with a
``/&amp;#39;&amp;#39; character in its pathname relative to ``.&amp;#39;&amp;#39; for security
reasons. Depth-first traversal processing is implied by this
option. Following symlinks is incompatible with this option.
-depth Always true; same as the -d option.
-depth n
True if the depth of the file relative to the starting point of
the traversal is n.
-empty True if the current file or directory is empty.
-exec utility [argument ...] ;
True if the program named utility returns a zero value as its
exit status. Optional arguments may be passed to the utility.
The expression must be terminated by a semicolon (``;&amp;#39;&amp;#39;). If you
invoke find from a shell you may need to quote the semicolon if
the shell would otherwise treat it as a control operator. If the
string ``{}&amp;#39;&amp;#39; appears anywhere in the utility name or the argu-
ments it is replaced by the pathname of the current file.
Utility will be executed from the directory from which find was
executed. Utility and arguments are not subject to the further
expansion of shell patterns and constructs.
-exec utility [argument ...] {} +
Same as -exec, except that ``{}&amp;#39;&amp;#39; is replaced with as many path-
names as possible for each invocation of utility. This behaviour
is similar to that of xargs(1).
-execdir utility [argument ...] ;
The -execdir primary is identical to the -exec primary with the
exception that utility will be executed from the directory that
holds the current file. The filename substituted for the string
``{}&amp;#39;&amp;#39; is not qualified.
-execdir utility [argument ...] {} +
Same as -execdir, except that ``{}&amp;#39;&amp;#39; is replaced with as many
pathnames as possible for each invocation of utility. This be-
haviour is similar to that of xargs(1).
-flags [-|+]flags,notflags
The flags are specified using symbolic names (see chflags(1)).
Those with the &amp;#34;no&amp;#34; prefix (except &amp;#34;nodump&amp;#34;) are said to be
notflags. Flags in flags are checked to be set, and flags in
notflags are checked to be not set. Note that this is different
from -perm, which only allows the user to specify mode bits that
are set.
If flags are preceded by a dash (``-&amp;#39;&amp;#39;), this primary evaluates
to true if at least all of the bits in flags and none of the bits
in notflags are set in the file&amp;#39;s flags bits. If flags are pre-
ceded by a plus (``+&amp;#39;&amp;#39;), this primary evaluates to true if any of
the bits in flags is set in the file&amp;#39;s flags bits, or any of the
bits in notflags is not set in the file&amp;#39;s flags bits. Otherwise,
this primary evaluates to true if the bits in flags exactly match
the file&amp;#39;s flags bits, and none of the flags bits match those of
notflags.
-fstype type
True if the file is contained in a file system of type type. The
lsvfs(1) command can be used to find out the types of file sys-
tems that are available on the system. In addition, there are
two pseudo-types, ``local&amp;#39;&amp;#39; and ``rdonly&amp;#39;&amp;#39;. The former matches
any file system physically mounted on the system where the find
is being executed and the latter matches any file system which is
mounted read-only.
-gid gname
The same thing as -group gname for compatibility with GNU find.
GNU find imposes a restriction that gname is numeric, while
find(1) does not.
-group gname
True if the file belongs to the group gname. If gname is numeric
and there is no such group name, then gname is treated as a group
ID.
-ignore_readdir_race
This option is for GNU find compatibility and is ignored.
-ilname pattern
Like -lname, but the match is case insensitive. This is a GNU
find extension.
-iname pattern
Like -name, but the match is case insensitive.
-inum n
True if the file has inode number n.
-ipath pattern
Like -path, but the match is case insensitive.
-iregex pattern
Like -regex, but the match is case insensitive.
-iwholename pattern
The same thing as -ipath, for GNU find compatibility.
-links n
True if the file has n links.
-lname pattern
Like -name, but the contents of the symbolic link are matched
instead of the file name. Note that this only matches broken
symbolic links if symbolic links are being followed. This is a
GNU find extension.
-ls This primary always evaluates to true. The following information
for the current file is written to standard output: its inode
number, size in 512-byte blocks, file permissions, number of hard
links, owner, group, size in bytes, last modification time, and
pathname. If the file is a block or character special file, the
device number will be displayed instead of the size in bytes. If
the file is a symbolic link, the pathname of the linked-to file
will be displayed preceded by ``-&amp;gt;&amp;#39;&amp;#39;. The format is identical to
that produced by ``ls -dgils&amp;#39;&amp;#39;.
-maxdepth n
Always true; descend at most n directory levels below the command
line arguments. If any -maxdepth primary is specified, it
applies to the entire expression even if it would not normally be
evaluated. ``-maxdepth 0&amp;#39;&amp;#39; limits the whole search to the com-
mand line arguments.
-mindepth n
Always true; do not apply any tests or actions at levels less
than n. If any -mindepth primary is specified, it applies to the
entire expression even if it would not normally be evaluated.
``-mindepth 1&amp;#39;&amp;#39; processes all but the command line arguments.
-mmin n
True if the difference between the file last modification time
and the time find was started, rounded up to the next full
minute, is n minutes.
-mnewer file
Same as -newer.
-mount The same thing as -xdev, for GNU find compatibility.
-mtime n[smhdw]
If no units are specified, this primary evaluates to true if the
difference between the file last modification time and the time
find was started, rounded up to the next full 24-hour period, is
n 24-hour periods.
If units are specified, this primary evaluates to true if the
difference between the file last modification time and the time
find was started is exactly n units. Please refer to the -atime
primary description for information on supported time units.
-name pattern
True if the last component of the pathname being examined matches
pattern. Special shell pattern matching characters (``[&amp;#39;&amp;#39;,
``]&amp;#39;&amp;#39;, ``*&amp;#39;&amp;#39;, and ``?&amp;#39;&amp;#39;) may be used as part of pattern. These
characters may be matched explicitly by escaping them with a
backslash (``\&amp;#39;&amp;#39;).
-newer file
True if the current file has a more recent last modification time
than file.
-newerXY file
True if the current file has a more recent last access time
(X=a), inode creation time (X=B), change time (X=c), or modifica-
tion time (X=m) than the last access time (Y=a), inode creation
time (Y=B), change time (Y=c), or modification time (Y=m) of
file. In addition, if Y=t, then file is instead interpreted as a
direct date specification of the form understood by cvs(1). Note
that -newermm is equivalent to -newer.
-nogroup
True if the file belongs to an unknown group.
-noignore_readdir_race
This option is for GNU find compatibility and is ignored.
-noleaf
This option is for GNU find compatibility. In GNU find it dis-
ables an optimization not relevant to find(1), so it is ignored.
-nouser
True if the file belongs to an unknown user.
-ok utility [argument ...] ;
The -ok primary is identical to the -exec primary with the excep-
tion that find requests user affirmation for the execution of the
utility by printing a message to the terminal and reading a
response. If the response is not affirmative (`y&amp;#39; in the
``POSIX&amp;#39;&amp;#39; locale), the command is not executed and the value of
the -ok expression is false.
-okdir utility [argument ...] ;
The -okdir primary is identical to the -execdir primary with the
same exception as described for the -ok primary.
-path pattern
True if the pathname being examined matches pattern. Special
shell pattern matching characters (``[&amp;#39;&amp;#39;, ``]&amp;#39;&amp;#39;, ``*&amp;#39;&amp;#39;, and
``?&amp;#39;&amp;#39;) may be used as part of pattern. These characters may be
matched explicitly by escaping them with a backslash (``\&amp;#39;&amp;#39;).
Slashes (``/&amp;#39;&amp;#39;) are treated as normal characters and do not have
to be matched explicitly.
-perm [-|+]mode
The mode may be either symbolic (see chmod(1)) or an octal num-
ber. If the mode is symbolic, a starting value of zero is
assumed and the mode sets or clears permissions without regard to
the process&amp;#39; file mode creation mask. If the mode is octal, only
bits 07777 (S_ISUID | S_ISGID | S_ISTXT | S_IRWXU | S_IRWXG |
S_IRWXO) of the file&amp;#39;s mode bits participate in the comparison.
If the mode is preceded by a dash (``-&amp;#39;&amp;#39;), this primary evaluates
to true if at least all of the bits in the mode are set in the
file&amp;#39;s mode bits. If the mode is preceded by a plus (``+&amp;#39;&amp;#39;),
this primary evaluates to true if any of the bits in the mode are
set in the file&amp;#39;s mode bits. Otherwise, this primary evaluates
to true if the bits in the mode exactly match the file&amp;#39;s mode
bits. Note, the first character of a symbolic mode may not be a
dash (``-&amp;#39;&amp;#39;).
-print This primary always evaluates to true. It prints the pathname of
the current file to standard output. If none of -exec, -ls,
-print, -print0, or -ok is specified, the given expression shall
be effectively replaced by ( given expression ) -print.
-print0
This primary always evaluates to true. It prints the pathname of
the current file to standard output, followed by an ASCII NUL
character (character code 0).
-prune This primary always evaluates to true. It causes find to not
descend into the current file. Note, the -prune primary has no
effect if the -d option was specified.
-regex pattern
True if the whole path of the file matches pattern using regular
expression. To match a file named ``./foo/xyzzy&amp;#39;&amp;#39;, you can use
the regular expression ``.*/[xyz]*&amp;#39;&amp;#39; or ``.*/foo/.*&amp;#39;&amp;#39;, but not
``xyzzy&amp;#39;&amp;#39; or ``/foo/&amp;#39;&amp;#39;.
-samefile name
True if the file is a hard link to name. If the command option
-L is specified, it is also true if the file is a symbolic link
and points to name.
-size n[ckMGTP]
True if the file&amp;#39;s size, rounded up, in 512-byte blocks is n. If
n is followed by a c, then the primary is true if the file&amp;#39;s size
is n bytes (characters). Similarly if n is followed by a scale
indicator then the file&amp;#39;s size is compared to n scaled as:
k kilobytes (1024 bytes)
M megabytes (1024 kilobytes)
G gigabytes (1024 megabytes)
T terabytes (1024 gigabytes)
P petabytes (1024 terabytes)
-type t
True if the file is of the specified type. Possible file types
are as follows:
b block special
c character special
d directory
f regular file
l symbolic link
p FIFO
s socket
-uid uname
The same thing as -user uname for compatibility with GNU find.
GNU find imposes a restriction that uname is numeric, while
find(1) does not.
-user uname
True if the file belongs to the user uname. If uname is numeric
and there is no such user name, then uname is treated as a user
ID.
-wholename pattern
The same thing as -path, for GNU find compatibility.
-xattr True if the file has any extended attributes.
-xattrname name
True if the file has an extended attribute with the specified
name.
OPERATORS
The primaries may be combined using the following operators. The opera-
tors are listed in order of decreasing precedence.
( expression )
This evaluates to true if the parenthesized expression evaluates
to true.
! expression
-not expression
This is the unary NOT operator. It evaluates to true if the
expression is false.
-false Always false.
-true Always true.
expression -and expression
expression expression
The -and operator is the logical AND operator. As it is implied
by the juxtaposition of two expressions it does not have to be
specified. The expression evaluates to true if both expressions
are true. The second expression is not evaluated if the first
expression is false.
expression -or expression
The -or operator is the logical OR operator. The expression
evaluates to true if either the first or the second expression is
true. The second expression is not evaluated if the first
expression is true.
All operands and primaries must be separate arguments to find. Primaries
which themselves take arguments expect each argument to be a separate
argument to find.
ENVIRONMENT
The LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES and LC_TIME environ-
ment variables affect the execution of the find utility as described in
environ(7).
EXAMPLES
The following examples are shown as given to the shell:
find / \! -name &amp;#34;*.c&amp;#34; -print
Print out a list of all the files whose names do not end in .c.
find / -newer ttt -user wnj -print
Print out a list of all the files owned by user ``wnj&amp;#39;&amp;#39; that are
newer than the file ttt.
find / \! \( -newer ttt -user wnj \) -print
Print out a list of all the files which are not both newer than
ttt and owned by ``wnj&amp;#39;&amp;#39;.
find / \( -newer ttt -or -user wnj \) -print
Print out a list of all the files that are either owned by
``wnj&amp;#39;&amp;#39; or that are newer than ttt.
find / -newerct &amp;#39;1 minute ago&amp;#39; -print
Print out a list of all the files whose inode change time is more
recent than the current time minus one minute.
find / -type f -exec echo {} \;
Use the echo(1) command to print out a list of all the files.
find -L /usr/ports/packages -type l -exec rm -- {} +
Delete all broken symbolic links in /usr/ports/packages.
find /usr/src -name CVS -prune -o -depth +6 -print
Find files and directories that are at least seven levels deep in
the working directory /usr/src.
find /usr/src -name CVS -prune -o -mindepth 7 -print
Is not equivalent to the previous example, since -prune is not
evaluated below level seven.
COMPATIBILITY
The -follow primary is deprecated; the -L option should be used instead.
See the STANDARDS section below for details.
SEE ALSO
chflags(1), chmod(1), cvs(1), locate(1), lsvfs(1), whereis(1), which(1),
xargs(1), stat(2), acl(3), fts(3), getgrent(3), getpwent(3), strmode(3),
re_format(7), symlink(7)
STANDARDS
The find utility syntax is a superset of the syntax specified by the IEEE
Std 1003.1-2001 (``POSIX.1&amp;#39;&amp;#39;) standard.
All the single character options except -H and -L as well as -amin,
-anewer, -cmin, -cnewer, -delete, -empty, -fstype, -iname, -inum,
-iregex, -ls, -maxdepth, -mindepth, -mmin, -path, -print0, -regex and all
of the -B* birthtime related primaries are extensions to IEEE Std
1003.1-2001 (``POSIX.1&amp;#39;&amp;#39;).
Historically, the -d, -L and -x options were implemented using the pri-
maries -depth, -follow, and -xdev. These primaries always evaluated to
true. As they were really global variables that took effect before the
traversal began, some legal expressions could have unexpected results.
An example is the expression -print -o -depth. As -print always evalu-
ates to true, the standard order of evaluation implies that -depth would
never be evaluated. This is not the case.
The operator -or was implemented as -o, and the operator -and was imple-
mented as -a.
Historic implementations of the -exec and -ok primaries did not replace
the string ``{}&amp;#39;&amp;#39; in the utility name or the utility arguments if it had
preceding or following non-whitespace characters. This version replaces
it no matter where in the utility name or arguments it appears.
The -E option was inspired by the equivalent grep(1) and sed(1) options.
HISTORY
A find command appeared in Version 1 AT&amp;amp;T UNIX.
BUGS
The special characters used by find are also special characters to many
shell programs. In particular, the characters ``*&amp;#39;&amp;#39;, ``[&amp;#39;&amp;#39;, ``]&amp;#39;&amp;#39;,
``?&amp;#39;&amp;#39;, ``(&amp;#39;&amp;#39;, ``)&amp;#39;&amp;#39;, ``!&amp;#39;&amp;#39;, ``\&amp;#39;&amp;#39; and ``;&amp;#39;&amp;#39; may have to be escaped from
the shell.
As there is no delimiter separating options and file names or file names
and the expression, it is difficult to specify files named -xdev or !.
These problems are handled by the -f option and the getopt(3) ``--&amp;#39;&amp;#39; con-
struct.
The -delete primary does not interact well with other options that cause
the file system tree traversal options to be changed.
The -mindepth and -maxdepth primaries are actually global options (as
documented above). They should probably be replaced by options which
look like options.
BSD September 28, 2011 BSD
&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>