網頁

2022年3月13日 星期日

解決Firefox觀看twitch、youtube直播時的卡頓問題

        由於Firefox預設會開啟硬碟快取功能,以降低記憶體的使用量。但觀看twitch與youtube直播時,會使用到大量的硬碟快取,導致卡頓問題發生。 因此我們需要將快取功能改為只使用記憶體即可,詳細可參考此篇文章--Firefox 關閉硬碟快取

2021年6月1日 星期二

程式三大定律

 最近閱讀「我Rust我驕傲」,書中提到程式的三大定律

  1.  程式必須正確
  2.  程式必須可維護,但不能違反第一項定律
  3.  程式必須高效,但不能違反前兩項定律
    在功能開發的過程中,我發現這三個定律其實滿有用的。由於時常會有可維護性與高效性的選擇,而這三大定律很清楚的告知我們,可以首先選擇可維護性,再考慮效率的問題。

2019年3月29日 星期五

Doom emacs installation

Doom emacs installation

    git clone https://github.com/hlissner/doom-emacs ~/.emacs.d
    cd ~/.emacs.d
    git checkout develop
    cd bin/
    ~/.emacs.d/bin/doom -y quickstart
    ~/.emacs.d/bin/doom -y refresh

2019年3月20日 星期三

cscope and gtags

cscope

find ./ -name "*.c" -o -name "*.h" | awk '{printf("\"%s\"\n", $0)}' > cscope.files
cscope -Rbq -i cscope.files

we need to deal with spaces in the path for cscope.

global gtags

find ./ -name "*.c" -o -name "*.h" > gtags.files
gtags