2026年6月6日 星期六

Microsoft將Rust Coreutils,也就是常見的Linux操作指令,移植到了Windows 11

ref: https://www.facebook.com/share/p/17oZbJ4VPX/

 

GNU/Windows現在是真的了。Microsoft將Rust Coreutils,也就是常見的Linux操作指令,移植到了Windows 11。未來可以在Windows Terminal直接使用這些工具。
現在可以使用winget指令安裝: winget install Microsoft.Coreutils
根據Microsoft說法這是為了讓開發者更願意使用Windows開發軟體。這樣以後甚至不用開WSL就有熟悉的ls、cp、rm、cat指令能用了。

 

 

 

2026年3月31日 星期二

Claude 筆記

/agents 

  1. debug
  2. code-review
  3. planner
  4. Generator
  5. Evaluator

 

https://github.com/juliusbrussee/caveman 

 

 

 

 

 

 

2026年3月12日 星期四

一位麻省理工學院學生使用NotebookLM在48小時內掌握了整個領域

FB看到的,留存~~ 
https://www.facebook.com/share/p/18k3xY6Eef/

 

 一位麻省理工學院學生使用NotebookLM在48小時內掌握了整個領域

1. Most people use NotebookLM for summaries. Boring.
​He dropped in textbooks, papers, and a full lecture series.
​Then he ignored the facts and went for the "how."
“What mental frameworks do the top researchers in this field actually use to solve problems?”
1. 大多數人只用 NotebookLM 做摘要。這太無趣了。
他丟進了教科書、論文和完整的系列講座紀錄。
接著,他忽略了單純的事實資訊,直搗核心問「方法論」:
「這個領域的頂尖研究員,實際上是用什麼樣的思考框架來解決問題的?」

2. His next move: Finding the friction.
​“Where do the leading voices here completely disagree? Give me the best evidence for both sides.”
​In 20 minutes, he had a map of the intellectual battleground.
That kind of clarity usually takes a PhD student a year to build.
2. 他的下一步:尋找矛盾與衝突。
「這裡的領軍人物在哪些點上完全無法達成共識?請給我雙方最核心的論據。」
短短 20 分鐘內,他就理出了一張知識戰場的地圖。
這種程度的洞察力,通常需要博士生花上一整年才能建立。

3. Then the stress test:
​“Write 10 questions that separate someone who understands this from someone just memorizing it.”
​He spent 6 hours answering them. Every time he slipped up, he’d ask:
“Break down exactly why I’m wrong and what concept I’m missing.”
3. 接著是壓力測試:
「請出 10 個問題,用來區分出哪些人是真的『理解』,哪些人只是『死背』。」
他花了 6 個小時回答這些問題。每當他出錯,他就會追問:
「請精確地拆解我為什麼錯了,以及我遺漏了哪個關鍵概念?」

4.48 hours later, he was holding his own in a theory debate with his advisor.
​It’s the same tool everyone has access to. The difference was the interrogation strategy.
​He didn't treat it like a search bar; he treated it like an immortal professor who’s read everything.
4. 48 小時後,他已經能在理論辯論中與指導教授平起平坐。
工具是每個人都能使用的,差別在於提問策略(Interrogation Strategy)。
他沒有把 AI 當成搜尋列,而是把它當成一位讀過萬卷書、長生不死的博學教授。

5. A semester vs. 48 hours isn’t about working harder.
​It’s about asking the right questions, in the right sequence, to the right "brain."
5. 一個學期 vs. 48 小時,這無關乎誰更努力。
這關乎於:在正確的序列下,向正確的「大腦」提出正確的問題。

我的觀察與建議
這份案例體現了 「第一原理思考」 在 AI 時代的威力。如果你也想嘗試這種學習方式,除了 NotebookLM,這種「蘇格拉底式提問法」在 Gemini 或 Claude 上同樣非常強大。

需要我幫你針對某個特定領域,設計一套類似的「48 小時深度提問清單」嗎?




MySQL/MariaDB 備份資料庫在還原時,若發生 FK 錯誤的狀況

 MySQL/MariaDB 備份資料庫在還原時,若發生 FK 錯誤的狀況時,可以用以下的方式備份資料庫,在匯入還原時就可以正常匯入。 

 

mysqldump --single-transaction --routines --triggers --disable-keys databaseName -uUserName -pPassword  > backup.sql
          

 

2025年11月29日 星期六

RIME 輸入法的設定

 C:\Users\wangjenmin\AppData\Roaming\Rime 資料夾裡的 default.custom.yaml 檔案,加入以下藍色文字,可以設定候選字有九個,也可以關閉 shift 的切換中英文的動作。

customization:
  distribution_code_name: Weasel
  distribution_version: 0.17.4
  generator: "Rime::SwitcherSettings"
  modified_time: "Sat Nov 29 11:12:31 2025"
  rime_version: 1.13.1
patch:
  "menu/page_size": 9
  schema_list:
    - {schema: scj6}
  ascii_composer/switch_key: {
    Caps_Lock: noop, 
    Control_L: noop, 
    Control_R: noop, 
    Eisu_toggle: clear, 
    Shift_L: noop, 
    Shift_R: noop
  }

 

C:\Users\wangjenmin\AppData\Roaming\Rime 資料夾裡的 scj6.schema.yaml ,底下藍色的設定值改為 1 ,可以預設為 英文 模式。

 

# Rime schema settings
# encoding: utf-8

schema:
  schema_id: scj6
  name: 快速倉頡
  version: "0.9"
  author:
    - 麥志洪 <makchehu@netvigator.com>
  description: |
    快速倉頡輸入法第六代
    網址: http://www.scj2000.com
    Copyright (C) 2002-2009 麥志洪 <makchehu@netvigator.com>
    授權方式: GPL version 3
  dependencies:
    - luna_quanpin

switches:
  - name: ascii_mode
    reset: 1
    states: [ 中文, 西文 ]
  - name: full_shape
    states: [ 半角, 全角 ]
  - name: simplification
    states: [ 漢字, 汉字 ]
  - name: ascii_punct
    states: [ 。,, ., ]
 

候選字會依據使用量大的時候往前移動,很麻煩,可以做以下設定
新建或修改 scj6.custom.yaml 檔案,內容如下

patch:
  translator/enable_user_dict: false
   

 

 

2025年10月27日 星期一

du 指令

 

 

以下指令,可以列出目前資料夾的每一個目錄的容量。 

du  -sh  ./*

 

承上,再依容量大小排序。 

 du -sh ./* | sort -h

 

2025年10月18日 星期六

Vibe Coding 無法處理所有事

 

參考以下內容
https://tools.wingzero.tw/article/sn/3591

這是 Vibe Coding 推廣者的說法 
https://gizmodo.com/even-the-inventor-of-vibe-coding-says-vibe-coding-cant-cut-it-2000672821 

 

2025年7月19日 星期六

Install GVM Vulnerability Scanner on Ubuntu 24.04 Using Containers

 在 Ubuntu 下使用 Docker 安裝 OpenVAS 

參考來源:  https://medium.com/@ma7moudsabra/install-gvm-vulnerability-scanner-on-ubuntu-24-04-using-containers-fd38935b7121

 

  1. Set up Docker’s apt repository.
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable"
| \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

 如果是使用 Linux Mint 22.1 的環境,上面的 $VERSION_CODENAME 這裡會不正確,手動改為 noble 就可以了。 

 

2. Install the Docker and dependencies packages.

sudo apt-get install gnupg docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

3. Verify that the installation is successful by running the hello-world image:

sudo docker run hello-world

 

 

4. Manage Docker as a non-root user

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

5. Verify that you can run docker commands without sudo.

docker run hello-world

6. For downloading the Greenbone Community Edition docker compose file, a destination directory should be created.

export DOWNLOAD_DIR=$HOME/greenbone-community-container && mkdir -p $DOWNLOAD_DIR

7. Download the file

cd $DOWNLOAD_DIR && curl -f -L https://greenbone.github.io/docs/latest/_static/docker-compose-22.4.yml -o docker-compose.yml

 

 

8. To allow remote access to the Greenbone Web Interface, you need to modify the docker compose file to configure the web server (gsad) to listen on all network interfaces.

  gsa:
image: greenbone/gsa:stable
restart: on-failure
ports:
- 127.0.0.1:9392:80 #before
volumes:
- gvmd_socket_vol:/run/gvmd
depends_on:
- gvmd
----
gsa:
image: greenbone/gsa:stable
restart: on-failure
ports:
- 9392:80 #After
volumes:
- gvmd_socket_vol:/run/gvmd
depends_on:
- gvmd

9. Start the Greenbone Community Edition container.

docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition up -d

Accessing OpenVAS

OpenVAS is now installed and running on your Ubuntu 24.04 LTS system. To access the OpenVAS web interface:

1. Open a web browser and navigate to http://localhost:9392.

2. Log in using the default credentials:

  • Username: admin
  • Password: admin

 

 

 

 

 

 

 

 

Linux Mint / Ubuntu 的 GPG error

VSCode

 參考這篇 https://medium.com/@lpramithamj/fixing-the-gpg-key-error-for-visual-studio-code-on-ubuntu-f29562a38182

 How to Fix the GPG Key Error

Step 1: Download and Install the Microsoft GPG Key 

 wget -qO - https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft.gpg

Step 2: Update the Microsoft Repository List

echo "deb [signed-by=/usr/share/keyrings/microsoft.gpg arch=amd64] https://packages.microsoft.com/repos/code stable main" | sudo tee /etc/apt/sources.list.d/vscode.list

Step 3: Update and Upgrade Packages

sudo apt update && sudo apt upgrade -y

以上動作應該就可以修正 VSCode 的問題。

 

 

 

 

 

 

2025年6月5日 星期四

ubuntu bind9 設定

 ref: https://www.linuxbabe.com/ubuntu/set-up-local-dns-resolver-ubuntu-20-04-bind9

 

這篇說明的還滿好的,簡單、明瞭,直接實作、除錯、檢測。 

sudo journalctl -eu named

這個指令,抓到我的設定檔的問題。 

2025年4月2日 星期三

ubuntu 24.04 install LAMP

 

sudo apt update
sudo apt upgrade

sudo apt install apache2 mariadb-server php8.3-fpm php8.3 libapache2-mod-php8.3 php8.3-common php8.3-mysql php8.3-xml php8.3-xmlrpc php8.3-curl php8.3-gd php8.3-imagick php8.3-cli php8.3-imap php8.3-mbstring php8.3-opcache php8.3-soap php8.3-zip php8.3-intl php8.3-bcmath unzip phpmyadmin python3-certbot-apache

sudo systemctl enable apache2
apache2 -v

sudo systemctl enable mariadb
sudo mysql_secure_installation
mariadb --version
sudo mysql -uroot -p
grant all on *.* to root@localhost identified by '123456';


sudo gedit /etc/php/8.1/apache2/php.ini
  upload_max_filesize = 2000M
  max_file_uploads = 2000
  post_max_size = 2000M
  max_execution_time = 600
  max_input_time = 1000
  max_input_vars = 3000
  memory_limit = 1024M
  session.gc_maxlifetime = 86400







2025年2月12日 星期三

iptables 設定拒絕所有連線,只允許 80, 443 連線

# 清除現有規則  
sudo iptables -F  

# 設置預設策略為拒絕  
sudo iptables -P INPUT DROP  
sudo iptables -P FORWARD DROP  
sudo iptables -P OUTPUT ACCEPT  

# 允許回環接口  
sudo iptables -A INPUT -i lo -j ACCEPT  

# 允許已建立的連接  
sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT  

# 允許HTTP和HTTPS流量  
sudo iptables -A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT

# 保存以上的設定
service iptables save
 

2024年10月19日 星期六

How to Change the Default System Font on Windows 11

 

ref: https://www.buildwindows.com/change-windows-font/

2024年7月18日 星期四

Adjust Trackpoint speed on Ubuntu 22.04

 ref: https://askubuntu.com/questions/1432996/adjust-trackpoint-speed-on-lenovo-p70-ubuntu-22-04


Here's what worked for me; your mileage may vary. First, find your device:

$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=12   [slave  pointer  (2)]
⎜   ↳ Synaptics TM3053-004                      id=11   [slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                          id=9    [slave  pointer  (2)]
...

On my system, I see it as TPPS/2 IBM TrackPoint. Next, find the acceleration property:

$ xinput list-props 'TPPS/2 IBM TrackPoint' | grep Accel
    libinput Accel Speed (342): 0.000000
    libinput Accel Speed Default (343): 0.000000
    libinput Accel Profiles Available (344):    1, 1
    libinput Accel Profile Enabled (345):   1, 0
    libinput Accel Profile Enabled Default (346):   1, 0

Here, I see it as Accel Speed (342), and the 342 is what I need. After some experimentation, I was able to determine that the value, by default 0.000000 is expected to be in the range [-1, 1]. For me, -0.2 ended up being a good speed:

$ xinput set-prop 'TPPS/2 IBM TrackPoint' 342 -0.2
 
 

2023年11月1日 星期三

ubuntu 22.04 disable trackpoint middle button paste

 ref: https://gist.github.com/bumbummen99/fcab50dad5638399375693a70a8c17f4

先執行 

xinput --list

確認 TrackPoint 的 id 是多少,假設是 15,就執行以下指令:

xinput set-button-map 15 1 0 3 4 5 6 7

就可以關掉中鍵貼上的動作了。

2022年12月23日 星期五

Asus 筆電

根據詢問 Asus 的結果,華碩的 ExpertBook 筆電,以我這台 ExpertBook BM2402來看,是確定 SensePoint 不支援 Linux 環境的 ,其他例如藍芽、網路、音效等,也有可能不支援在 Linux 環境下使用! 

我自己的 BM2402 ,不支援 SensePoint 和 藍芽!

2022年10月8日 星期六

開源、強大的 Windows 設置工具

 

支援 Windows 11 22H2 的版本。

https://github.com/Sophia-Community/SophiApp

 

2022年10月4日 星期二

老祖宗留下的28件寶貝

老祖宗留下的28件寶貝!

  1. 飽不洗頭,餓不洗澡。冷水洗臉,美容保健。汗水沒落,冷水莫澆。溫水刷牙,防敏固齒。
  2. 吃米帶糠,吃菜帶幫。男不離韭,女不離藕。青紅蘿蔔,生克熟補。食不過飽,飽不急臥。
  3. 養生在動,養心在靜。心不清淨,思慮妄生。心神安寧,病從何生。閉目養神,靜心益智。
  4. 藥補食補,莫忘心補。以財為草,以身為寶。煙薰火燎,不吃為好。油炸醃泡,少吃為妙。
  5. 臭魚爛蝦,索命冤家。食服常溫,一體皆春。冷勿冰齒,熱勿灼唇。物熟始食,水沸始飲。
  6. 多食果菜,少食肉類。飲食有節,起居有時。頭部宜冷,足部宜熱。知足常樂,無求常安。
  7. 養生在勤,養心在靜。
  8. 人到老年,必須鍛練,散步慢跑,練拳舞劍;莫怕嚴寒,清掃庭院,繪畫添趣,心胸廣寬;
  9. 聞雞起舞,床不可貪,種花養鳥,習書覽篇;奕棋唱戲,房事莫貪,私事勿念,便宜勿占;
  10. 活動身體,貴在經常,心情舒暢,長壽健康;遇事勿怒,勞勿過偏,茶水勿濃,學習勿念;
  11. 飲食勿暴,少吃晚餐,吃飯勿語,切勿吸煙;低鹽低糖,勿食太鹹,少吃脂肪,飯莫過量;
  12. 每日三餐,調劑適當,蔬菜水果,多吃無防;按時入睡,定時起床,起身要慢,勿急勿慌;
  13. 飲酒勿過,名利勿鑽,閒氣勿生,胸懷要寬。
  14. 心無病,防為早,心裡健康身體好;心平衡,要知曉,情緒穩定疾病少;
  15. 練身體,動與靜,彈性生活健心妙;要食養,八分飽,臟腑輕鬆自疏導;
  16. 人生氣,易衰老,適當宣洩人歡笑;品書畫,溪邊釣,選擇愛好自由挑;
  17. 動腦筋,不疲勞,思睡養心少熱鬧;有規律,健身好,正常生活要協調;
  18. 常搓手,可健腦,防止凍瘡和感冒。
  19. 夏不睡石,秋不睡板。春不露臍,冬不蒙頭。白天多動,夜裡少夢。
  20. 睡前洗腳,勝吃補藥。晚上開窗,一覺都香。貪涼失蓋,不病才怪。
  21. 早睡早起,怡神爽氣,貪房貪睡,添病減歲。夜裡磨牙,肚裡蟲爬。
  22. 一天吃一頭豬,不如床上打呼嚕。
  23. 三天吃一隻羊,不如洗腳再上床。
  24. 枕頭不選對,越睡人越累。先睡心,後睡人,睡覺睡出大美人。
  25. 頭對風,暖烘烘;腳對風,請郎中。
  26. 睡覺莫睡巷,最毒穿堂風。
  27. 睡覺不點燈,早起頭不暈。
  28. 要想睡得人輕鬆,切莫腳朝西來頭朝東。

 

2022年9月16日 星期五

Greenbone Community Edition ( GSA, 舊名 OpenVAS) 的安裝方式

 建議使用全新的 Ubuntu 22.04 的系統環境,安裝流程參閱以下文章。

官方安裝文件:

https://greenbone.github.io/docs/latest/22.4/source-build/index.html

2022年8月21日 星期日

Angry IP Scanner

網路 IP 掃描工具,滿好用的!

官網: https://angryip.org/

ref: https://walker-a.com/archives/4626