海外所得 超過多少需要繳交 海外所得稅 - 2013

台灣國民(中華民國國民) 海外所得超過多少, 需要繳交海外所得稅? (此文為 2013年的規定, 未來請以政府規定的最新公布的為主)

閱讀全文〈海外所得 超過多少需要繳交 海外所得稅 - 2013〉

Linux 設定 Samba 445 Port 使用的網路卡

檢查 netstat -tln 發現不太熟悉的 Port - 445, 查查看才知道這是 Samba 用的(一直以為只會用到 139 Port), 重點是這個 Port 居然是對外開放. XD

來看看如何把這個設定綁進內部網路.

閱讀全文〈Linux 設定 Samba 445 Port 使用的網路卡〉

Tmux 出現 protocol version mismatch 解法

Debian / Ubuntu Linux 做 Package Upgrade 後, Tmux 很常遇到下述問題:

  1. $ tmux attach # 出現下述錯誤訊息

    protocol version mismatch (client 7, server 6)

  2. 於是就無法進入 tmux 了~

解法很簡單: 只要把 tmux server 的 process pid 全部 kill 掉, 重新開始就可以正常使用.

但是如果是 tmux 明明還在某些無法停止的事情, 但是需要進去又進不去的狀況, 要如何先暫時解決?

閱讀全文〈Tmux 出現 protocol version mismatch 解法〉

Ubuntu Linux 桌面送通知訊息

Ubuntu Linux 桌面環境(使用 Unity、Gnome3), 程式要送通知訊息, 可以用下述方式傳送: (apt-get install notify-osd)

  • $ notify-send "hello world"
  • $ notify-send Title "hello world"
  • $ notify-send Date "`date`"
  • $ notify-send "Message Title" "The message body is shown here" -i /usr/share/pixmaps/sm.xpm -t 5000
  • $ notify-send Title "`tail /var/log/syslog`"
  • $ tail -n0 -f /var/log/syslog | while read line; do notify-send "System Message" "$line"; done
  • $ notify-send -i face-wink "Hello! January" # notify-send -i <icon> <Message>
  • $ notify-send  -t 0 "Bringing down the system" # 會彈出需要確認、取消的視窗
  • $ DISPLAY=:0.0 /usr/bin/notify-send "TITLE" "MESSAGE" # 加入 crontab 需要另外顯示
  • $ notify-send -u critical -i "notification-message-IM" 'Boss !!' 'Am done with the execution' # 緊急
  • $ command && notify-send # 程式完成時,呼叫 notify-send 傳送
  • $ notify-send --help # 可以查看更多參數

註: 通知訊息於 Unity 會從上角出現, Gnome3 會從正下方出現 通知訊息.

除了提醒外,想要有出現視窗確認的,可以使用 zenity,如下述:

  • $ zenity --info --text "STRING"
  • 可於 .bashrc 加入此 function,就可以 ls | notify "done" 完成通知
    function notify() {
        zenity --info --text "$1"
    }