Sunday, April 6, 2025

Setting Javascript Identation in Emacs

 To set the indent width when editing Javascript files in Emacs, set the variable js-indent-level to the desired width.  This can be done by calling setq in the init file, but these days I just invoke the describe variable function by C-h v, then customize the variable there, this also sets the variable in the init file.

  1. C-h v
  2. js-indent-level [Enter]
  3. Focus on the customize link and hit enter
  4. Chang the indent value in the customize page
  5. Focus on the Apply and Save button and hit enter

Enable SSH Agent for Magit in Emacs

  1. M-x package-install [Enter]
  2. ssh-agency [Enter]

This package will invoke SSH Agent for entering private key passphrase when needed such as pushing or fetching.

Monday, December 6, 2021

在Windows將CRT憑證轉換為PFX格式

要在Windows上將CRT格式的憑證轉成PFX格式,可以先將CRT檔案安裝到個人憑證,然後把匯入的憑證再匯出為PFX格式就可以了。

安裝CRT憑證

CRT檔案上按下滑鼠右鍵再點選【安裝憑證】

 

選【目前使用者】再按【下一步】


 選擇【憑證存放區】為【個人】再按【下一步】

 

最後按下【完成】完成憑證安裝 

 

匯出PFX

打開【管理使用者憑證】後,選擇個人憑證,在剛安裝的憑證上按下滑鼠右鍵,再選【所有工作】、【匯出】 


 歡迎使用憑證匯出精靈的畫面按下【下一步】

 

 選擇【是,匯出私密金鑰】後按【下一步】


勾選【如果可能的話,包含憑證路徑中的所有憑證】及【啟用憑證隱私權】後按【下一步】


輸入匯出憑證用的密碼並確認密碼後按【下一步】

輸入或瀏覽最後匯出的檔案路徑後按下【下一步】完成匯出