跳到主要內容

發表文章

目前顯示的是有「window」標籤的文章

grep & findstr 系統內建的強大文本搜尋工具

如果想找出某些含有定字串的檔案, 除了用肉眼去一個一個找之外, 還有什麼辦法呢!? 在Ubuntu 上, 使用 grep 指令 grep - r ' notepad ' . 註: -r 表示遞迴地搜尋整個資料夾包含子目錄 若是使用Windows 的作業系統, 可以使用 findstr 指令去找 findstr /s " notepad " *.* 註: /s 表示遞迴地搜尋整個資料夾包含子目錄 若是只想輸出檔案名稱, 可以加入參數 /m  如下 findstr /s /m " notepad " *.* 若是搜尋的字串中含有空白, 那我們必須加入參數 /c 使用指定字串來搜尋 列如: findstr /s /c: " notepad open " *.*

如何在IIS上架一個NodeJS的服務

第一步:安裝 NodeJS https://nodejs.org/en/ 第二步:安裝 iisnode https://github.com/azure/iisnode/wiki/iisnode-releases 第三步:安裝 URL Rewrite 第四步:在IIS 建立一個網站 將你的nodejs檔案放到網站的資料夾底下 加入Web.config, 並指定啟動node js程式的檔案(此範例使用 index.js) < configuration > < system.webServer > <!-- indicates that the server.js file is a node.js application to be handled by the iisnode module -->  < handlers >   < add   name = "iisnode"   path = "index.js"   verb = "*"   modules = "iisnode"  />  </ handlers > < rewrite >  < rules >   < rule   name = "sendToNode" >    < match   url = "/*"  />    < action   type = "Rewrite"   url = "index.js"  />   </ rule >  </ rules > </ rewrite > ...