2022年5月1日 星期日

Mac Wifi connection Dropping frequently

Recently My laptop MBP 2018 encounter the network issue frequently. The wifi will drop connection randomly. The symptom is lost connection with default gateway. Here is the note that I used to record what I did for troubleshooting.

1.check the wifi status

netwroksetup -getinfo Wi-Fi

netstat -nr -f inet

list all network devices to get wifi device id

networksetup -listhardwareports

The most WiFi device id is en0
networksetup -getairportpower en0

disable airdrop

sudo ifconfig awdl0 down

The Fix:
Disable WiFi
Open Finder
Press
Cmd+Shft+G
to go to the folder
/Library/Preferences/SystemConfiguration/
Delete (or move) the following files:
com.apple.airport.preferences.plist
NetworkInterfaces.plist
preferences.plist
Restart your computer
Re-enable WiFi

2022年4月18日 星期一

What is blockchain(區塊鏈)

甲骨文這個影片介紹大概是我看過能在最短時間介紹blockchaing的影片了,不到一分鐘
區塊(Block)跟鍊(Chain)是兩個不同的東西
https://www.oracle.com/tw/blockchain/what-is-blockchain/

2022年3月29日 星期二

Azure storage queue API return "The value for one of the HTTP headers is not in the correct format."

The cause was possible backward incompatible issue. After the view researching, it could be resolved by changed the request header 'x-ms-version' from the one your library used to old one "2019-07-07"

2022年3月25日 星期五

How to trigger a kubenetes schedule job manually

kubectl create job --from=cronjob/[cronjob name] [new job] -n [namespace]
sometimes you may encounter the error such as
"error: unknown object type *v1beta1.CronJob"
it was caused by the kubectl is different version. you can download the old one to resolve issue

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5", GitCommit:"c285e781331a3785a7f436042c65c5641ce8a9e9", GitTreeState:"clean", BuildDate:"2022-03-16T15:58:47Z", GoVersion:"go1.17.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.15", GitCommit:"0f9140665765825f8a4187cefd055e4b350b4a36", GitTreeState:"clean", BuildDate:"2021-09-17T23:04:02Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.23) and server (1.19) exceeds the supported minor version skew of +/-1

for me, my kubectl client is v1.23.5, but server is older version wiht v1.19.15, therefor I downgraded to the older one to resolve the issue
curl -LO https://dl.k8s.io/release/v1.19.15/bin/linux/amd64/kubectl

2022年3月20日 星期日

以銅為鏡可以正衣冠;以史為鏡可以知興替;以人為鏡可以明得失

人類總來都沒進步到哪裡去,歷史總是一而再再而三地重演,不管是俄侵烏發動的戰爭,或者現在政治上的紛亂,總是逃離不開歷史的重演

2022年3月9日 星期三

How to convert the ^M linebreak in a bash script

Use vim to edit the file and convert it to the unix format
:set ++ff=dos ==> ms-dos format
:set ff=unix ==>.unix format

2022年3月6日 星期日

How to group Ankiweb deck

use "::" to separate it
for example:

  • group1::sub1
  • group1::sub2

it will group decks "sub1" and "sub2" in folder "group1"

demo_article

使用 msty.app 和 Knowledge Stacks 建立個人知識庫系統 說明 嘗試利用local llm自動從文字檔轉成影音檔 利用AI自動對文件檔產生影音檔案 - YouTube 引言 在資訊爆炸的時代,我們每天接收大量的資訊,但如何有效地管理...