Blogspot - zeroplex.blogspot.com - Zeroplex 生活隨筆

Latest News:

Set Remote Default Port for SSH Client 21 Aug 2013 | 01:34 pm

若 sshd 改成非 port 22,不少 ssh client 操作會變成很麻煩。 但可以在 .ssh/config 設定 host name 和 url、port,之後就可僅用 host name 連線。 vim ~/.ssh/config : 之後要連線時打「hq」即可: ssh hq git remote add origin hp:/path/to/repository Re...

關於 PHP Short Tag 21 Aug 2013 | 01:24 pm

數年前寫過如何啟用 PHP short tag (<? ... ?>) 的方法,但某次鬼打強後,還是建議關閉 short tag。 某次要產生 XML,沒注意到 XML 的 header 居然是「<?」,使得機器把本來不該是 PHP 的程式片段也當成 PHP 執行了: 以後需要產生資料,還是用 template engine 處理吧。

Menu Color Settings in Vim 16 Aug 2013 | 09:08 am

手上用的 vim-autocomplpop 選單中,被選取的項目一直都是白底白字 (好閃啊)。 以為是 plugin 設定的問題,最近才知道是 vim color settings 的關係,在 .vimrc 加入一行設定就可以解決: Reference: ns9tks / vim-autocomplpop / issues / #57 - customize pop-up colors

Array Iterate in Bash 13 Aug 2013 | 02:41 pm

Bash 裡面有個 for-in 可以很輕鬆的對多筆資料做迭代,不過我語法一直弄錯。 文字列表: 如果是陣列,語法要換: Reference: Bash For Loop Array: Iterate Through Array Values Bash Guide for Beginners - Chapter 10. More on variables

Digg Reader 12 Aug 2013 | 11:27 am

由於 The Older Reader 最近災情實在有點嚴重,將 RSS list export 到 Digg Reader。 Digg Reader 介面也很輕巧,快速鍵和 Google Reader 相同,第一次用起來沒遇到什麼障礙。若要說缺點的話,就是 RSS folder/category 項目沒辦法使用字母排序,會讓我找不到東西。

Disable New Line at End of File in Vim 11 Jul 2013 | 09:01 am

Vim 預設會在檔尾加上換行字元,原因是在 CLI 時 cat 檔案,顯示的結果比較好看。 檔尾有會行字元: 檔尾沒有換行字元: 雖然在檔尾加上換行字元顯示時較清楚,但某些程式裡面可能會造成問題 (像 PHP)。 在 .vimrc 中加入設定,讓 vim 不要在檔尾加上換行字元:

Alias Command Contains Spaces in Bash 9 Jul 2013 | 01:36 pm

.bashrc 下設定 command alias 的方法是: 不過假設要 alias 的指令包含空白,如「svn commit」要 alias 成「svn commit --editor-cmd vim」,就得靠自訂 function 了。 新增一個 function 蓋掉原本的 svn 指令,如果 svn 後接的參數是 commit,便加上 --editor-cmd: 不過 svn co...

Google Reader Bye 3 Jul 2013 | 09:58 am

Google Reader 停止服務,這才發現 RSS Reader 在生活中也是不可或缺的一部分。 從收到停止服務的消息以後,開始尋覓還有什麼服務可以用。試了 Fleedly、Bloglines 等,最後還是選 The Old Reader,畢竟能留有原來的 rss 分類,快速鍵也和 Google Reader 一樣,不需要再花什麼時間去適應。

Firefox PPA on Ubuntu 12.04 1 Jul 2013 | 06:58 pm

Mozilla 官方 PPA:

修改 Ubuntu 12.04 登入畫面背景圖片 29 Jun 2013 | 01:04 pm

開啟 /usr/share/glib-2.0/schemas/com.canonical.unity-greeter.gschema.xml,並找到「com.canonical.unity-greeter」,將 key「background」改成新的圖片路徑: 將設定值重新編譯:

Related Keywords:

80072745, pro git, dos2unix ubuntu, css width 自動, screen message, javascript 跳頁, compile java, coscup screen message, linux 反組譯, imagemagick 系統字

Recently parsed news:

Recent searches: