最近跟老師開會,常常討論太久,超過老師應該要接小孩的時間。要怎麼避免類似的情況再發生呢?我覺得可以在用投影片 …
read moreOther articles
一窺內容農場SEO技巧
[轉載] Containers 系統架構
Migrate Android data from an F-Droid app to a Google Play one
Motivatation
Recently, login for TTRSS-Reader is broken after a server update. A working version is uploaded to Google Play, but it presumably takes a long time for the F-Droid version to be updated. I investigated how to migrate data between Android apps as I cannot live without RSS feeds for …
read moreWhat'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
read morefile
andbsdtar
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 …Removal from HSTS preload list for my domain
Motivation
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 moreUse ECDSA certificate for identification on IRC networks
Motivation
Recently, I noticed that I can no longer make myself as an operator on the OFTC channel #lxqt. It turns out that my current SSL client certificate has expired a few days ago. As it seems that there is no way to extend expiry of an X509 certificate like …
read moreUsing WireGuard kernel module for HTC U11
Background
Recently, there are plenty of introductory articles about the WireGuard VPN on Phoronix as the first stable Linux kernel with WireGuard (5.6) is released. At first I thought it was nothing but yet another VPN protocol like conventional PPTP or L2TP. However, after digging into it, I found …
read moreMigrating Windows 10 from VirtualBox to LibVirt
Motivation
I'd like to run Android emulators on my PC for unit tests of python3-android. However, Android emulators failed to run as the same host already runs a Windows VM using VirtualBox, and VirtualBox VMs cannot run together with KVM-based ones like recent Android system images for x86/x86_64. Thinking …
read moreA workaround for CCStudio 9.2 UI issue - black backgrounds in tooltips
「臺灣學術網路網路語音交換平臺」憑證錯誤的問題
臺灣學術網路網路語音交換平臺 是一個提供 ZOOM 服務的平臺。用 eduroam 帳號登入並登記,就可以三人以上使用 ZOOM 超過 40 分鐘。LAB …
read moreWhat are public_key fields in GitHub gpg_keys API?
GitHub provides an API endpoint for querying users' PGP keys. For example, information about my keys can be found here.
In this JSON document, the raw_key is what programs like GnuPG need. What about public_key fields? GitHub official document says:
The data returned in the public_key response field is not …
read moreGnuTLS無法連上部分台灣網站的問題
TL;DR - 請看最後一段的workaround。
今天台大計中的SSLVPN client pulse-secure升級到9.0r2.0了,我更新完之後測了一下,發現連登入的頁面都連不上
"Unacceptable TLS certificate"
於是開 …
read more犀利仁師觀後雜感
解決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 moremacOS上df無法正確顯示中文
最近心血來潮,把工作環境設定為中文。在Linux下是開一個檔案
~/.config/locale.conf
,寫入LANG=zh_TW.UTF-8
。macOS下,iTerm2會自動設定LANG
和LC_CTYPE
這兩個環境變數。第一個出現問題的是zsh下,ssh的hostname自動完成。按 …
read more網站搬家
今天收到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在Firefox 59上使用郵局的WebATM
- 安裝郵局提供給Firefox/Chrome/Edge用的元件
- 啟動元件
- 匯入根憑證cacert.pem
進階玩法:VirtualBox NAT port forwarding
小小抱怨:WebATM元件一開機就會啟動,也不能取消,微不便
read more解決scrcpy crash的問題
之前聽說scrcpy可以把Android的螢幕同步到電腦上。第一次裝沒跑成功,crash了。
經過一番測試,發現似乎SDL(scrcpy用的GUI library)會嘗試載入ibus,而強制指定
read moreexport SDL_IM_MODULE=fcitx
後可以正常執行scrcpy。正 …Firefox Sync無法同步的問題
TL;DR security.nocertdb設定為true會讓Firefox Sync無法運作,改回false即可
最近發現我的Firefox Sync無法正常運作,在一台電腦上新加的addon沒有同步到其他電腦上。
about:sync-log中的紀錄檔有以下錯誤訊息:
read more1520939110858 Sync.Service INFO User logged in successfully - verifying login. 1520939110862 Sync.BrowserIDManager DEBUG unlockAndVerifyAuthState: user declined to unlock …
解決Arch Linux下emoji的顯示
KeePassXC在entry view裡加了不少欄位,其中一個是paperclip (📎, U+1F4CE)。在macOS正常,但在Arch Linux無法正常顯示,只有一個方框。裝了noto-fonts-emoji之後就正常了。
根據Arch Linux Wiki的說明,fontconfig會自動選一個有emoji的字型,所以理論上系統只 …
read moreAUR cleanup
今天把yan12125/aur裡已經disowned的package都刪掉了。
yan12125/aur@47252d3d8020c1011068587355270d9ae62b9db5
有種斷捨離的感覺...
有些曾經是我追尋的目標,有則完全想不起來當初是用來做什麼的。無論 …
read more解決郵局webatm「請檢查晶片是否已依正確方向插入讀卡機」的問題
郵局的webatm只要一台USB讀卡機和
萬惡的IE,就可以在家裡轉帳、查交易紀錄等等,非常方便。之前我都是用VirtualBox開一個Win7的VM,再用USB轉接功能讓裡面的Win7可以使用讀卡機。在Linux host跟Mac host用過,都沒啥問題 …
read moreRevert Revert Revert Revert
安裝 Pelican
來玩玩自己的部落格~把pelican裝起來,寫篇測試文章
TODO:
- Deploy - 用git hook似乎是個選項
- Themes - http://www.pelicanthemes.com/上面滿多選擇的
- Git設定 -
.gitignore
, 放到Github等等 - 設定文章網址,讓他裡面有 …
有趣的書名
之前有出現過一波「從入門到XX」系列的惡搞書名,例如「PHP: 從入門到出軌」、「C語言:從入門到放棄」等等。這些都是惡搞合成的圖片。不 …
read moreMac shortcuts are broken with UTF-8
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 moreSelect 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
read more$PRINTER
does not work. Now …youtube-dl on Android
最近在研究如何把youtube-dl跑在Android上(youtube-dl#967)。方法大致如下:
- 找一個可以跑的Python interpreter
- 把youtube-dl clone下來或是從yt-dl.org下載最新的tarball
- 用adb shell或terminal emulater執行youtube-dl
針對第一步,Google Play上面很多個,例如 …
read more助教見聞錄 - 沒有回傳值的non-void函數
昨天有位小大一來問問題,他寫的code在local可以跑,但是上傳到Judgegirl都是wrong answer。
我看了一下題目,是要用遞迴計算 \(1^2 + 2^2 + \ldots + n^2\) 。他的code大概長這樣:
read more#include <stdio.h> int …
Installing Octopress
弄個部落格放一些技術文章是我一直想做的事。之前試過幾個平台,例如PTT,Wordpress等等,都覺得差強人意。主要是貼code很不方便。有一次看到有 …
read moreWelcome to Jekyll!
You’ll find this post in your
read more_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 runjekyll serve
, which launches a web server and auto-regenerates your site …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 moreMixed encoding content converter
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:
read more#include <iostream> #include <string> #include <vector> void* operator new(size_t …
Bypass kuwo.cn IP filtering 跳過酷我音樂的IP檢測
kuwo.cn is a popular music sharing platform in China. Chinese users can enjoy latest and high-quality music on it. However, it exploits some trick to prevent users outside Mainland China from listening music flawlessly. For example, when you visit http://www.kuwo.cn/yinyue/112882/ from a country different …
read moreTonalities
Use my ear with the help of vmpk, it's not difficult to determine the tonality of popular songs. Here are results: http://chyen.twbbs.org/yen/pub/major.html
There is a Matlab toolbox developed by University of Jyväskylä named MIRtoolbox, aiming to analyzing music clips with cutting-edge algorithms. It …
read moreQuadcopters from TED.com
http://www.ted.com/talks/raffaello_d_andrea_the_astounding_athletic_power_of_quadcopters.html
A video clip played on the first class of Control Systems.
read more孤單北半球
有一天在和幾個同學唸書,有人忽然 …
read more中和路 and 永和路
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++):
while(true) { doSomething(); if(cvWaitKey() == 27) // 27 is the key code of Escape { break; } }
This works in Windows, but not work in Ubuntu. Both C++ version and python version can't catch …
read moreSFTP initial path
Google "sftp default path",大多數是用chroot的方式。但我的需求是一開始先切換到某個home以外的目錄,而不是將user鎖在某個目錄底下。轉念一想,sftp-server也只是一個用user的身份執行的process,其實只要從.bashrc或.profile之類的檔案下手即可。
首先看看Ubuntu的default .bashrc的前幾行(在 …
read moreHello 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