Other articles

  1. What's inside a backup file of IPMIView on Android?

    IPMIView is a handy tool to monitor status of multiple servers at once. It provides a backup feature to export settings and credentials. Per file and bsdtar commands, the backup file /sdcard/Supermicro/IPMIViewBackup_YYYYMMDDHHMMSS.smc is a password-protected zip archive. Assuming the password can be extracted from the APK, I …

    read more
  2. Removal from HSTS preload list for my domain


    Since long time ago, I host my website on my own server. As time goes by, the maintaining cost for this website appears to increase indefinitely with complexity from Podman, Ansible, Buildbot and so on. I have once tried use GitLab pages to host my website. However, it does …

    read more
  3. 犀利仁師觀後雜感


    這幾天找了些時間在 …

    read more
  4. 解決macOS分享的Wi-Fi使Line Points無法使用的問題

    Line Points的頁面用Linux hostapd分享出來的Wi-Fi可以正常運作,然而用macOS的網路分享功能無法瀏覽。這個問題困擾了我好久。之前要開Line Points都是先切換成4G,等到要下載App或看影片再換回Wi-Fi。

    某天在PTT上看到有人Wi-Fi環境下用Line無法上傳圖片。鄉民建議改MTU。我參考這篇找出最佳MTU值 …

    read more
  5. macOS上df無法正確顯示中文


    第一個出現問題的是zsh下,ssh的hostname自動完成。按 …

    read more
  6. 網站搬家

    今天收到Let's Encrypt的通知信,說chyen.cc和*.chyen.cc的SSL憑證20天後過期。我這個網域名稱是在Namesilo買的。由於Let's Encrypt的wildcard certificate需要用DNS認證,然而certbot還不支援Namesilo,所以我上次是手動把TXT紀錄一個一個(註:每個domain name會對應一個DNS challenge …

    read more
  7. 在Firefox 59上使用郵局的WebATM

    1. 安裝郵局提供給Firefox/Chrome/Edge用的元件
    2. 啟動元件
    3. 匯入根憑證cacert.pem

    進階玩法:VirtualBox NAT port forwarding


    read more
  8. 解決scrcpy crash的問題


    經過一番測試,發現似乎SDL(scrcpy用的GUI library)會嘗試載入ibus,而強制指定export SDL_IM_MODULE=fcitx後可以正常執行scrcpy。正 …

    read more
  9. Firefox Sync無法同步的問題

    TL;DR security.nocertdb設定為true會讓Firefox Sync無法運作,改回false即可

    最近發現我的Firefox Sync無法正常運作,在一台電腦上新加的addon沒有同步到其他電腦上。


    1520939110858   Sync.Service    INFO    User logged in successfully - verifying login.
    1520939110862   Sync.BrowserIDManager   DEBUG   unlockAndVerifyAuthState: user declined to unlock …
    read more
  10. 安裝 Pelican



    1. Deploy - 用git hook似乎是個選項
    2. Themes - http://www.pelicanthemes.com/上面滿多選擇的
    3. Git設定 - .gitignore, 放到Github等等
    4. 設定文章網址,讓他裡面有 …
    read more
  11. Mac shortcuts are broken with UTF-8

    I was trying to enable copying and pasting between Linux and macOS via SSH. I followed several guides (1 2 3) and set up a local server to handle exchanged clipboard data. OK, things look good.

    However, soon I found that pasting CJK brings question marks. A tip suggests setting …

    read more
  12. Network is down after logged out

    Recently I got a mysterious bug. I have a server, and whenever I logouts all sessions, its network is broken. I can neither ping it nor ssh into it.

    The culprit is NetworkManager. "All users may connect to this network" is not checked, so only my account can access the …

    read more
  13. Select printer with lpr

    On Arch Linux, I use the following command to print documents:

    PRINTER="the_printer_name" lpr ~/my_doc.pdf

    It was always working yet broken with the latest version. A mysterious error appears:

    $ PRINTER="the_printer_name" lpr ~/my_doc.pdf
    lpr: Error - scheduler not responding.

    By tracing the codes, seems $PRINTER does not work. Now …

    read more
  14. Installing Octopress

    弄個部落格放一些技術文章是我一直想做的事。之前試過幾個平台,例如PTT,Wordpress等等,都覺得差強人意。主要是貼code很不方便。有一次看到有 …

    read more
  15. Welcome to Jekyll!

    You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site …

    read more
  16. Compiling ZTE OPEN kernel on Arch Linux

    I need to modify kernel source codes of Firefox OS for my project. Currently I have a ZTE OPEN device (NOTE: it's different from ZTE OPEN C). ZTE have lots of kernel sources released to public, but this device is not included. After several e-mails, ZTE engineers finally release the …

    read more
  17. Placement new

    For advanced C++ programmers, placement new is nothing special. It can initialize a pre-allocated memory block. However, placement new is more than what you think. It accpets an arbitrary number of arguments of arbitrary types.

    See the following code snippet:

    #include <iostream>
    #include <string>
    #include <vector>
    void* operator new(size_t …
    read more
  18. 孤單北半球

    有一天在和幾個同學唸書,有人忽然 …

    read more
  19. OpenCV: strange return value of cvWaitKey()

    In OpenCV, cvWaitKey() might be one of most frequently used functions in interactive applications. For example (code in C++):

        if(cvWaitKey() == 27) // 27 is the key code of Escape

    This works in Windows, but not work in Ubuntu. Both C++ version and python version can't catch …

    read more
  20. SFTP initial path

    Google "sftp default path",大多數是用chroot的方式。但我的需求是一開始先切換到某個home以外的目錄,而不是將user鎖在某個目錄底下。轉念一想,sftp-server也只是一個用user的身份執行的process,其實只要從.bashrc或.profile之類的檔案下手即可。

    首先看看Ubuntu的default .bashrc的前幾行(在 …

    read more
  21. Hello world!

    Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

    It's the second time I install WordPress on my Apache server. The first time is not long ago, but everything seems easier then ever! WordPress is primarily written in PHP, so a little knowledge for …

    read more