2018年1月29日 星期一

[Wordpress] 一些參考連結

http://stackoverflow.max-everyday.com/category/wp/

[RPi] 自動 ssh 登入

回答到不想再說了

ssh-keygen -t rsa
ssh-copy-id user@remote.machine




https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=180197

2018年1月28日 星期日

[RPi] aircrack

用 2017-11-29 Raspbian 版本編譯 aircrack-ng-1.2-rc4 一直失敗,會出現類似這樣的訊息

make[1]: Entering directory '/home/pi/probemon/aircrack-ng-1.2-rc3/src'
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude   -c -o aircrack-ng.o aircrack-ng.c
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude   -c -o crypto.o crypto.c
crypto.c: In function ‘calc_mic’:
crypto.c:291:11: error: storage size of ‘ctx’ isn’t known
  HMAC_CTX ctx;
           ^
crypto.c:317:2: warning: implicit declaration of function ‘HMAC_CTX_init’ [-Wimplicit-function-declaration]
  HMAC_CTX_init(&ctx);
  ^
crypto.c:327:2: warning: implicit declaration of function ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration]
  HMAC_CTX_cleanup(&ctx);
  ^
crypto.c:291:11: warning: unused variable ‘ctx’ [-Wunused-variable]
  HMAC_CTX ctx;
           ^
: recipe for target 'crypto.o' failed

後來參考這篇,安裝了 libssl1.0-dev 就可以了

2018年1月25日 星期四

[Ubuntu] 解簡體中文壓縮檔

用預設的 GUI 解壓縮程式沒辦法直接解,需要指定編碼

先安裝 unar
$sudo apt-get install unar

指定使用GB18030解压所有文件
例如: unar -e GB18030 foo.zip

http://blog.sciencenet.cn/blog-685489-826952.html


locale 順便再複習一下吧
http://www.davidpai.tw/ubuntu/2011/ubuntu-set-locale/

2018年1月23日 星期二

[Tips] hackpad to hackmd

要改為 markdown 語法,要一篇一篇改?
https://domchristie.github.io/turndown/

[VIM] YouCompleteMe

還沒有做出標準裝法,但看起來能用了

第一篇發表
http://www.alexeyshmalko.com/2014/youcompleteme-ultimate-autocomplete-plugin-for-vim/

原始程式和安裝教學
https://github.com/Valloric/YouCompleteMe

有幾個步驟不太一樣
https://www.jianshu.com/p/d908ce81017a

最後使用的 .vimrc 是參考這篇
https://hk.saowen.com/a/1a2068242e5ca2ea1e300e8df8652c5e1c872b34e8a4076a01b16efec518e1a1

2018年1月20日 星期六

[VIM] 常用

cheat sheet
https://vim.rtorr.com/lang/zh_tw/

[Linux] - 將vim打造成source insight
http://ivan7645.github.io/2016/07/12/vim_to_si/

用這篇的就可以把 VIM 用得很漂亮,但切到 NERD_tree 要用 shift+j 和 shift+k跳頁
http://ivan7645.github.io/2016/07/12/vim_to_si/


Error when opening nerdtree. Undefined variable: g:NERDTreeGlyphReadOnly, g:NERDTreeDirArrowCollapsible, and s:dirArrows
https://github.com/scrooloose/nerdtree/issues/643