2018年7月9日 星期一

win10 環境變數 path 莫名的坑

今天突然發現,公司桌機無法呼叫到 mvn 指令。
檢查 path 設定正常啊...

Posted on 7/09/2018 04:07:00 下午 | Categories:

2018年3月14日 星期三

使用 notepad++ 做為 git commit 時預設的編輯器

一般來說,git bash 可以經由修改 globle 的 .gitconfig 設定來執行
git config --global core.editor xxxxxxxx
而 notepad++ 直接設定下去,會有時候關掉 notepad++ 卻回不去 cmder 中的情況,所以解決方式:

git config --global core.editor "'c:\Program Files\Notepad++\notepad++.exe' -multiInst -notabbar -nosession -noPlugin '$*'"

其中  'c:\Program Files\Notepad++\notepad++.exe' 為 notepad++ 路徑,
像我最終是改為 'C:\\Program Files (x86)\\Notepad++\\notepad++.exe'
所以我最後的指令是:

git config --global core.editor "'C:\Program Files (x86)\Notepad++\notepad++.exe' -multiInst -notabbar -nosession -noPlugin '$*'"

以上
Posted on 3/14/2018 09:49:00 上午 | Categories:

2017年11月21日 星期二

如何查詢Port被哪個程式佔用了


  • windows
    • 用 netstat 命令

C:\>netstat -ano | findstr 0.0:80

    • 結果

TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       1860


    • 其中 1860 就是佔用 port 的程式 PID,再輸入

C:\>tasklist | findstr 1860
得到如下的資訊

httpd.exe                  1860 Services                0      4,148 K
表示佔用的是 httpd.exe,也就是 Apache Server 還開著。


Posted on 11/21/2017 10:46:00 上午 | Categories: , ,

2017年10月27日 星期五

2017年10月12日 星期四

cmd script 自動產生日期、時間字串,並 copy 到剪貼簿中

要先定義 os.date & os.time 的字串格式

For /f "tokens=1-4 delims=- " %%a in ('date /t') do (set _thisDate=%%a%%b%%c)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set _thisTime=%%a%%b)
set _thisDateTime=%_thisDate%.%_thisTime%

Posted on 10/12/2017 03:12:00 下午 | Categories:

2017年10月5日 星期四

redis monitor

監控 redis 現在被呼叫 (查詢) 的狀況

Posted on 10/05/2017 10:05:00 上午 | Categories:

2017年10月2日 星期一