Nginx 想要將每個 request 花費的時間記錄起來,要怎麼設定呢?
作者: Tsung
對新奇的事物都很有興趣, 喜歡簡單的東西, 過簡單的生活.
PHP 使用 SimpleXML 遇到冒號「:」的解法
PHP 使用 SimpleXML 來解析 XML 很方便,解析 RSS 也是輕鬆愉快,不過要解析 WordPress 的 RSS 時,遇到 XML Tag 的名稱有「:」,造成解析不到,要怎麼解決呢?
淘寶 / 天貓 1111(雙11) 光棍節 2016年的紀錄
淘寶(阿里巴巴)在 2016年的光棍節(天貓商城「雙11」全球狂歡節),又破歷年的紀錄,來做點筆記。
中國通過「網路安全法」 - 2016
瑞士、荷蘭有合法 安樂死 的法規
原來現在世界上已經有國家通過安樂死是可以合法化的,瑞士、荷蘭都已經合法化,瑞士甚至可以開放外國人了。
查看自己使用 Google 的活動紀錄
使用 Google 搜尋哪些東西呢?看了哪些網頁?
使用 Google Map 查了什麼?導航去哪邊?
使用 YouTube 看了什麼?
下述這個頁面可以查看,Google 幫你記錄的一清二楚~
Vim 8.0 於 Linux 使用滑鼠選取自動複製的快速鍵
Vim 8.0 於 Linux 的 CLI 環境,使用滑鼠選取文字的話,預設不是 Xwindow 的選取方式,而是 Vim 內部的選取方式(v),所以文字要複製沒辦法使用 Ctrl + c 等等複製到系統的記憶體。
- 註1:預設為 set mouse=a 的模式
- 註2:Debian stretch 目前安裝就是 Vim 8.0,就會遇到此情況
想要複製到系統的記憶體,可以使用下述兩種方式:
- 按住 Shift 後,在用滑鼠選取,可以使用 Ctrl + c 複製,或 此時用滑鼠中間就可以貼上。(再按一下 Shift 選取反白才會消失)
- :set mouse= 或 :set mouse=r 或 :set mouse=v (設定不要為 a 就可以使用標準系統的選取、複製模式)
相關說明
- configuration - Copy text out of vim with set mouse=a enabled
- clipboard - Copy-paste for vim is not working when mouse (:set mouse=a) is on?
- Vim documentation: options
*'mouse'* *E538*
'mouse' string (default "", "a" for GUI, MS-DOS and Win32)
global
{not in Vi}
Enable the use of the mouse. Only works for certain terminals
(xterm, MS-DOS, Win32 |win32-mouse|, QNX pterm, *BSD console with
sysmouse and Linux console with gpm). For using the mouse in the
GUI, see |gui-mouse|.
The mouse can be enabled for different modes:
n Normal mode
v Visual mode
i Insert mode
c Command-line mode
h all previous modes when editing a help file
a all previous modes
r for |hit-enter| and |more-prompt| prompt
Normally you would enable the mouse in all four modes with:
:set mouse=a
When the mouse is not enabled, the GUI will still use the mouse for
modeless selection. This doesn't move the text cursor.
See |mouse-using|. Also see |'clipboard'|.
Note: When enabling the mouse in a terminal, copy/paste will use the
"* register if there is access to an X-server. The xterm handling of
the mouse buttons can still be used by keeping the shift key pressed.
Also see the 'clipboard' option.
林金宏 講解 火災發生的「火場求生」注意事項
tail 遠端多台機器 Log 檔的工具
遠端機器很多,或者機器有多台,但是想要將 Log 檔靠 tail 一起持續觀看(ex: 看每台的 syslog.. 等),可以使用下述程式:
- monkeytail - tail variant designed for web developers monitoring logfiles
Vim 開檔自動到第幾行、搜尋位置的方法
Vim 想要開啟檔案時,直接到指定行數,或者某個搜尋文字到的位置,要怎麼做呢?