泡麵吃進肚子後的影片觀察 - 2013

一般正常麵條吃進肚子後, 大約 2hr 就完全消化掉了, 但是 泡麵吃進肚子後, 經過36小時無法完全消化~

詳見此影片: 三分鐘泡好的泡麵 吃進肚子36小時後 原來會變成這樣

結論: 平常沒事最好不要吃泡麵~

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"
    }

好文 - 公司要如何判斷員工是否合適?

公司和員工都是互相的, 公司希望找到適合的員工, 員工同時也在挑選公司.

不過 公司除了找到能力合適的員工外, 還有哪些觀點是要注意的呢? 此篇文章歸類六點, 可以參考看看.

閱讀全文〈好文 - 公司要如何判斷員工是否合適?〉