現在做身份確認,常常會使用簡訊來認證,這個已經被認定不是安全的作法,建議改用 App OTP 的認證方式比較安全。
作者: Tsung
Vim 的 Markdown 外掛套件
Vim 寫 Markdown 的外掛套件,有即時一邊修改,一邊在瀏覽器呈現,也有簡單的作法,寫完後執行 Compile 轉換成 HTML 的作法,此篇採用寫完手動轉換成 HTML 的作法。
Linux Markdown 轉 HTML 的程式
Linux 要將 Markdown (.md) 的文件,要轉成 HTML,可以使用 markdown 的程式。
PHP 於 CLI 單行直接執行的用法
PHP 想要像 Perl、Python 可以單行執行,或者是 cat、tail -f 持續餵資料給程式接收,要怎麼做呢?
範例取自:Decoding URL encoding (percent encoding)
- alias urldecode='python -c "import sys, urllib as ul; print ul.unquote_plus(sys.argv[1])"'
- alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"'
- urldecode 'q+werty%3D%2F%3B'
- q werty=/;
- $ urlencode 'q werty=/;'
- q+werty%3D%2F%3B
PTT.cc 如何使用 UTF-8 的模式登入
使用 Percona innobackupex 備份 與 還原 MySQL
MySQL 的 InnoDB 只能用 mysqldump,而沒辦法使用 cp 來備份,這點可以使用 Percona 出的 innobackupex 來解決~
Percona 出很多 MySQL 的工具,可以做同步、快速備份 等等 ..
Linux Bash 出現 bind: warning: line editing not enabled 的問題修復
於 Linux 的 Bash shell 依照此篇文章「Bash 使用 Tab 自動完成 檔案或目錄的輸入」的做法,使用 bind 來做些設定,但是在 scp 到這台 server 時,就會出現下述警告訊息:
bind: warning: line editing not enabled
要如何避免這個訊息呢?
閱讀全文〈Linux Bash 出現 bind: warning: line editing not enabled 的問題修復〉
田.滿:宜蘭五個小學生拍出來的紀錄影片
宜蘭自從雪隧開通後,交通便利、觀光人口也變多,帶動一些很神奇的現象,農田不種稻米,變成種房子了...
這部紀錄片除了紀錄外,更特別的地方是,這是由五位小學生拍出來的,相信老師帶領的也是很辛苦,有空花半個小時來看看這部影片吧!準備拍第二部了~
Golang get 抓取的套件如何移除
Golang 使用 go get 可以抓取套件,而且有 binary 可以直接執行,但是 go get 到底把程式裝在哪邊?要怎麼移除乾淨呢?
MySQL 出現 InnoDB STORAGE ENGINE failed 修復
MySQL 要從備份還原啟動,但是發生啟動失敗,在 mysql 的 error log 裡面看到下述訊息。
Unable to start MySQL service: Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
InnoDB: Using Linux native AIO
InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Unknown/unsupported storage engine: InnoDB
170122 12:01:00 InnoDB: Warning: table 'mysql/innodb_index_stats' InnoDB: in InnoDB data dictionary has unknown flags 50.
170122 12:01:00 InnoDB: Warning: table 'test/collect' InnoDB: in InnoDB data dictionary has unknown flags 50.
170122 12:01:00 [ERROR] /usr/sbin/mysqld: Table './mysql/user' is marked as crashed and should be repaired
170122 12:01:00 [Warning] Checking table: './mysql/user'
170122 12:01:00 [ERROR] 1 client is using or hasn't closed the table properly
170122 12:01:00 InnoDB: Warning: table 'test/users'
InnoDB: in InnoDB data dictionary has unknown flags 50.
要怎麼修復呢?