vim 的virsual mode , 如何滑鼠按右鍵就複製

其實我也很不懂vim的v-mode , virsual mode , 反正屎用docker時候, 好多container 需要另外安裝vim ,
安裝結束後, 我就卡關了 XD ,
因為我習慣按滑鼠右鍵, 就把複製的文字貼上去 , 但是常常出現(insert) virsual 錯誤無法貼上
網上找了好久, 找到一種方式, 輸入 set mouse-=a , 就可以解決了

https://gist.github.com/u0d7i/01f78999feff1e2a8361

快速新增網域ldap通訊錄(outlook 2016)

以前要新增ldap通訊錄,非常麻煩, 一堆設定, 昨天找了一些資源, 包括想要從registry方面下手都失敗, 好險有人寫了一個超方便的程式, 可以快速新增ldap 通訊錄, 感謝啊!

https://github.com/andreighita/MAPIToolkit

官網很詳細寫了說明, 我也整理了一下給大家下載

安裝roundcube心得

前陣子弄了docker image postfixad , 可以讓我簡單架設可與網域主控站整合的郵件服務器.


既然有了郵件服務器, 通常還要提供roundcube這類的webmail ,

但是我不想使用webmail的最大問題: 就是帳號跟郵件不一致

登入webmail的帳號與email不相同時, 就很麻煩, 例如:
登入的帳號是 001 , 可是emai卻變成 001@kafeiou.pw , 而不是網域在mail屬性建立的william@kafeiou.pw
這困擾我很久, 甚至想要自己寫一個roundcube的plugin , 想要登入的時候, 改寫email,

後來發現roundcube有個plugin很好用, 就是 new_user_dialog , 啟用後,第一次登入,會強迫設定名字與email, 雖然帳號與email不相同, 就讓麻瓜自行更改吧, 哈

以下列出docker 安裝roundcube方式

docker run --restart always --name roundcubemail -e ROUNDCUBEMAIL_DEFAULT_HOST=tls://<郵件主機> -e ROUNDCUBEMAIL_SMTP_SERVER=tls://<郵件主機> -p 8080:80 -d roundcube/roundcubemail


安裝wordpress權當公司內部訊息公告網站

以前安裝wordpress(包括目前這個網站)都只用陽春功能, 沒遇到什麼問題,也可以一直更新到最新版.

直到最近想要幫公司裝一個簡單的內部訊息公告網站, 需要安裝兩個插件, 但其中一個插件需要額外安裝php 7.x extension ,
安裝extension這倒是沒什麼問題, 問題是官方的wordpress居然安裝失敗, 要用很多方法才能解決, 實在有夠麻煩.

這個插件就是用來新訊息公告的時候, 可以自動發信給相關的人 , 請參考 mailpoet , 這個插件乾脆就自己弄一個wordpress, 直接將相關的插件都裝起來
雖然mailpoet對於安裝沒有過多的著墨, 其實就跟自己手動安裝一樣簡單, 交由wordrepss wizard就可以了

貼上自己簡單的安裝方式

1. 安裝mariadb container(name:mariadb)
   安裝完畢記得新增一個database名稱叫做wordpress    
   create database wordperss character set utf8mb4 collate utf8mb4_unicode_ci
2. 安裝mailpoet/wordpress
   docker volume create wp-content
   docker run --name mywordpress -v wp-content:/var/www/html/wp-content -p 8080:80 \\
   -d --restart always  mailpoet/wordpress:wp-5.4_php7.4_20200617.1
3. 停用mywordpress , mariadb
   docker stop mywordperss
4. 讓mywordpress與mariadb成為羈絆
   docker network connect myNetwork mariadb
   docker network connect myNetwork mywordpress
5. 啟用mywordpress, mariadb , 進入網頁的wizard , 就可以輸入mariadb的名字進行安裝了
   docker start mariadb
   docker start mywordpress
   

單一docker server,多個Container如何互相認識

安裝非官方的wordpress(mailpoet/wordpress) , 發現指定mysql的ip失敗(一樣是docker) , 原來是忘了將mysql與wordpress這兩個container 綁定相同網路, 這樣兩個container可以互相ping對方的名字, 也可以互相認識了

docker network connect myNetwork <container name>

myNetwork 可修改

製作客製esxi安裝檔出現WinError 10054

先前曾寫過 (ESXi)如何自製加上客製驅動程式之iso檔案 一直都沒有問題
直到最近因需要重做esxi安裝檔, 出現 winerror 10054錯誤, https://twitter.com/vfrontde/status/998868087586934785 上面說明是PWOER SHELL 改用 TLS1.2 造成的
可改用離線版的製作方式, 把相關檔案先下載到本地端, 就可以避開線上製作造成WinError 10054的問題

  1. 先準備好製作環境 ( windows powershell 3.0 or above )
    # 安裝 vmware powercli ( powershell 需以管理者身分執行 ) 
    set-executionpolicy unrestricted
    Install-Module -Name VMware.PowerCLI
    Import-Module VMware.ImageBuilder
    Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $true
  2. 製作客製iso檔
    以下最新版 ESXi-6.7.0-20211104001-standard 版本, 可至 https://esxi-patches.v-front.de/ 查詢
#設定變數
$StandardImageProfileName="ESXi-6.7.0-20200604001-standard"
$CustImageProfileName="ESXi-6.7.0-20200604001-william-20200729"
$CustVendorName="kafeiou.pw"
#匯出原版esxi
Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
Export-ESXImageProfile -ImageProfile $StandardImageProfileName -ExportToBundle -filepath "$StandardImageProfileName.zip"
Remove-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
#加入相關檔案
Add-EsxSoftwareDepot "$StandardImageProfileName.zip"
# 支援6.5,6.7
Add-EsxSoftwareDepot .\vibs\net55-r8168-8.045a-napi-offline_bundle.zip
Add-EsxSoftwareDepot .\vibs\net-igb-5.3.2-99-offline_bundle.zip
Add-EsxSoftwareDepot .\vibs\sata-xahci-1.42-1-offline_bundle.zip
#設定(權限)
New-EsxImageProfile -CloneProfile $StandardImageProfileName -name $CustImageProfileName -Vendor $CustVendorName
Set-EsxImageProfile -Name $CustImageProfileName -ImageProfile $CustImageProfileName -AcceptanceLevel CommunitySupported
#啟用額外功能 , 支援6.5,6.7
Add-EsxSoftwarePackage -ImageProfile $CustImageProfileName -SoftwarePackage "net55-r8168"
Add-EsxSoftwarePackage -ImageProfile $CustImageProfileName -SoftwarePackage "net-igb"
Add-EsxSoftwarePackage -ImageProfile $CustImageProfileName -SoftwarePackage "sata-xahci"
#匯出客製esxi
Export-ESXImageProfile -ImageProfile $CustImageProfileName -ExportToIso -filepath "$CustImageProfileName.iso"

3. 第三方來源
https://vibsdepot.v-front.de/wiki/index.php/List_of_currently_available_ESXi_packages

ps. 相關patch檔案下載
https://customerconnect.vmware.com/patch#search

windows 10 (2004) 無法更新office 2016

最近發現office 2016的outlook收信出現信收到了, 但是有些卻看不到, 改用webmail卻又正常顯示出來, 查看一下發生的情境應該是 windows 10 (2004版本) + office 2016 , 因為office 2016安裝完畢無法進行更新, 所以出現無法正常收信的情形, 因此必須讓系統能自動更新office.

官網上寫說兩個步驟
1. 執行office任一程式, 如word , excel , 第一次執行的時候會詢問更新策略, 選擇自動更新
2. windows 內建的更新功能, 選取進階選項, 確認更新時,接收其他microsoft產品更新


若還是不行, 可自行修改registry

HKEY_LOCAL_MACHINE\software\policies\microsoft\office\16.0\common\OfficeUpdate
DWORD: EnableAutomaticUpdates
Value: 1

或是執行別人做好的更新程式
https://kafeiou.pw/wp-content/uploads/2020/07/Office2016_C2R_RegUpdate.zip

docker快速建立支援Active Directory的Mail Server

每次需要建立一套 Active Directory + Postfix Mail Server + amavisd , 都會讓我覺得困擾, 因為設定複雜, 枯燥也乏味

因此弄了一個docker 版 postfix mailserver 支援微軟網域伺服器, 這樣就方便多了
功能不多, 但基本防毒, 簡易擋廣告, 加密證書(Let’s Encrypt), aliases, 信箱限制內部使用, open dkim等等都支援.

Dockerfile 源碼
—-
https://github.com/WilliamFromTW/docker-Postfix-AD

docker image
—-

https://hub.docker.com/r/inmethod/docker-postfix-ad

1 ... 35 36 37 38 39 ... 73