2022/12/06

中文輸入的靈異事件


前一陣子臉書改版後
用 chrome 在每篇文回文時,畫面會跳上跳下的,就是看不到我輸入的焦點文章
找到問題點是 chrome 的擴充套件 stylebot 造成
就算沒有啟用 css 覆寫,它仍然會有這種異常

後來索性改用 stylus,反正和 firefox 共用,也不用處理兩種擴充套件的不同邏輯

另一件事是 win10 不知道什麼時候開始
輸入中文字非常的慢,常常我打完五個字了,還看到輸入法在那邊慢慢的拆碼,一個字一個字的慢慢輸入,這對一秒鍾三十個字以上(有證照)的我來說,瞬間變成輸入三個字要一秒鐘!真的是孰可忍,孰不可忍!!

雖然透過常用 windows 除錯法,找到治標的作法,砍掉 explorer.exe ,會好一陣子,大概十幾分,但還是很困擾

昨天用 ime laggy 找到一篇解法,請出 win10 後幾呈退休的 msconfig,看到常駐的服務有什麼

先隱藏所有 microsoft 服務,免得誤停造成系統異常
雖然上面的東西看起來嚇死人的多,但多試幾次就知道那個 EasyAntiCheat 就是罪魁禍首!
踪觀遊戲史這麼多年,防盜和防作弊,基本效用不大
大多只會搞到乖乖守法的人,此一定理過了二十年仍沒有被推翻
EasyAntiCheat 忘記是哪個遊戲裝的,好像是 ubisoft 還是 cyberpunk ,要不是當初要去裝 mod 不能執行,我還沒發現
結果它還躲在服務裡面!?這混帳東西...


2022/03/04

AmoK - The Art of Coding | Donations


嘗試捐款後的幾天,透過 paypal 付款的信用卡就被盜刷了 5 次  29xx
幸好沒成功


不支援捐款

那就沒辦法了


AmoK - The Art of Coding | Donations
All programs are provided by us under the Freeware license. That means our software is 100% free of charge for private and commercial use and, of course, free of spyware and viruses. Despite quite a lot of time we spent developing our software, we have some expenses for webspace and the software development tools we need. Therefore, we are thankfully for any donations you make! Three possibilities exist to donate money: Money transfer Please indicate with your money transfer for which program the donation is and optionally your email address. The bank contact is as following:

2022/01/06

鼠鬚管 注音+行列

終於... 解決

一個問題,沒有人寫解法,要嘛太過困難沒人寫的出來
要嘛太過簡單,沒有人覺得應該要寫下來 U_Ub

有趣的是,通常遇到前者的機率要低的多

安裝 squirrel (鼠鬚管)
!!官網上的 pkg 檔,在 12.1 monterrey (14" arm) 仍舊無法執行,錯誤訊息是無法驗證
此 app 的發行者
因此要用 homebrew 安裝
brew install --cask squirrel

安裝行列
curl -fsSL https://git.io/rime-install | bash -s -- array emoji custom:add:
schema=array30

注意,安裝完 array30 後,default.custom.yaml 目前內容如下:
__patch:
# Rx: custom:add:schema=array30 {
  - patch/+:
      schema_list/+/+:
        - schema: array30
# }

要修正成這樣
patch:
      schema_list:
      - schema: array30
      - schema: bopomofo_tw

然後重新部署就可以了

default.yaml 官網不建議修改,應新增一個 default.custom.yaml 再修改成你要的樣子
你沒寫在 default.custom.yaml ,預設會套用 default.yaml 的設定 (我猜的)
 

---

mbp 14 monterey 12.2

昨天弄了很久,鼠鬚管仍然是這幾種輸入法
朙月拼音、地球拼音、注音
五筆畫、倉頡、速成、五筆

我想要的是只要
注音 台灣
行列

昨天去 rime 官網下的 squirrel.pkg 不行用,後來爬文裝了另一篇 #520 樓的
有成功裝起來
但是不管怎麼調整 ~/Library/Rime 底下的 default.yaml / default.custom.yaml
就算刪掉所有輸入法只留 bopomo tw (都有重新開機、重新部署鼠鬚管)

輸入法的數量都沒有變

是不是調錯設定了?  


mkvtools dts to ac3

mkvtools dts to ac3


ffmpeg 參數有點多,麻煩了點,另一支程式 eac3to 滿好用的,很單純
tested: eac3to Interstellar.2014.1080p.BluRay.x264.AC3-WiKi.mkv Interstellar.2014.1080p.BluRay.x264.AC3-WiKi.ac3

先把 dts 轉出

用指令將 dts mka 檔轉成 ac3 檔
eac3to 放在 K:\OneDrive\_greensoft\mkvtoolnix-64-bit-53.0.0\eac3to
進 cmd 時要先修改 path
path=%path%;K:\OneDrive\_greensoft\mkvtoolnix-64-bit-53.0.0\eac3to
這樣不管 cd 到哪邊都可以執行 eac3to 指令

回 mkvtools ,把剛剛 eac3to 轉完的 ac3 檔加回來 
語言是 und (fined) ,記得修一下

最後再合併成一個檔


參考資料
I have no idea why you're using some external tool to extract the streams from mkv, re encode the audio, remux and then copy to the USB stick separately when you could just do it all in one ffmpeg command:

ffmpeg -i input.mkv -c:v copy -c:a ac3 -b:a 320k /path/to/usb/output.mkv
Replac 320k with 640k if you have a 5.1 channel stream, input.mkv with your source file and /path/to/usb/ with the path to the folder on your USB that you want the file in.

I have never encoded with that codec nor audio with >2 channels, so I don't know whether or not it needs some special parameters to work, but I believe it should work just fine.
tested: ffmpeg -i Interstellar.2014.1080p.BluRay.x264.AC3-WiKi.mkv -c:v copy -c:a ac3 -b:a 640k E:\ac3.mkv

2019/03/14

linux mint 19 昇級問題

linux mint 18.1 用了.. 什麼?居然才三年?

因為關機異常的緩慢,amule 持績性的 crash,firefox 的音效有雜音,好久沒看到可愛的 (?) 更新圖示了

遂起了昇級的念頭

上一次 是 16 -> 18
這一次是 18 -> 19

看來昇級的週期變慢了 (我是說 linux mint 的版次)

算一算從 12 用到現在好象也八年了

2018/09/28

windows 10 重裝注意事項




用 rufus 燒光碟映像檔到 usb disk

要注意 partition 格式,早期的機器 (約 2012年前後) BIOS 認不得 GPT 格式

重開機時會卡住,畫面全黑,只有一個游標在閃

因此要燒成 MBR 格式,才能夠正常開機

2017/12/06

sublime 昇級:2 -> 3

sublime 真的是很好用的編輯器

要不是費用實在太高 (畢竟我只是拿來代替記事本)

還真的很想付費支持 (美金 $80 啊 .. 如果真的有用到那麼多功能  想必收入也不錯吧)

在這邊懺悔一下 (sublime 很大方的,沒付費也讓你用,只是偶爾跳個警告訊息)

2017/11/02

sapgui 安裝問題



昇到 windows 1709 之後

sapgui 莫名不穩定,主要的問題是 sapgui 視窗中的 componet (button) refresh 速度過慢,變成我每次按按鈕都要等 refresh (約1~3秒)

2017/10/18

離離人員帳號停用、信箱隱藏、移除群組



# 程式目的
#
# 1 移除使用者所屬的所有群組,只留下 domain user; 這是主要群組,無法移除 (也沒必要)
# 2 將使用者從 exchange 全域通訊錄隱藏
# 3 將帳戶設為停用
#
"注意,程式將自動處理 OU=停用,OU=Users,OU=MyBusiness,DC=motorpro-sbs,DC=local 底下的所有使用者"
"請確定已將使用者移動到 停用 這個 OU 中"
read-host "按 [enter] 繼續按 [ctrl + c] 中止"

Import-Module ActiveDirectory
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010

$GroupsOU = 'OU=停用,OU=Users,OU=MyBusiness,DC=motorpro-sbs,DC=local'
$ou = Get-ADUser -SearchBase $GroupsOU -Filter *

foreach ($user in $ou) {
    $UserDN = $user.DistinguishedName
    Get-ADGroup -LDAPFilter "(member=$UserDN)" | foreach-object {
    "移除 $UserDN 的所有群組"
    remove-adgroupmember -identity $_.name -member $UserDN -Confirm:$False}

    $username = $user.Name
    "在 exchange GAL 中將 $username 的 email 設為隱藏"
    Set-Mailbox -HiddenFromAddressListsEnabled $true -Identity $username

    $userAccount = $user.SamAccountName 
    "將帳戶 $userAccount 設為停用"
    Disable-ADAccount -Identity $userAccount
}

2017/09/22

linux 遷移



這是在做 fail2ban 時想到的

原本的順序是
  • mail
  • mailscanner
  • spamassassin
  • mailscanner-mrtg
當初是覺的 mail 的服務比較重要,所以要讓它先起來,後續的幾個服務再慢慢 debug

結果 mail 服務雖然起來了,但因為 mailscanner 的設定,postfix 會把信件放到 hold 區,等待 mailscanner 檢查;如果 mailscanner 設定不正確,導致無法正常運作,信件會永遠留在 hold 區,無法遞交給 exchange ,對使用者來說,就是沒有收到信件,就是問題。

所以有另外一個想法, 先處理相對不重要的服務,再慢慢 debug (就是和上面的順序相反)

之前會這樣做,主因是因為 linux 遷移後,hostname 和 ip 就會更換,更換後沒有過渡期,直接上線

這樣的做法會導致沒有辦法測試,也就沒辦法確保服務正常執行

正常的公司應該是要先確保服務正常執行再做遷移

程序應該是
  • 建置 lnx06 VM
  • 指定外部 ip 和外部 dns name
  • 按最初的列表,進行相關 config 
    • mail
    • mailscanner
    • spamassassin 
    • mailscanner-mrtg
  • config 完進行測試,可以慢慢測
    • 這樣可以排除到目前為止遇到的各種問題
    • 全部都測完再上線即可