0%

SSDP

introduce

  • SSDP(Simple Service Discovery Protocol),一種應用層協定,是隨插即用(UPnP,Universal Plug and Play)技術核心協定之一,使用UDP,Port1900。
  • SSDP應用在現代的路由器、電視、印表機…等,可以說是幾乎身邊的電器3C產品都有這項技術。在封包層面支援UPnP的主機利用群播到239.255.255.250的方式,告訴整個區域網路下的主機們有這項服務。
  • 我們可以群播出一個SSDP Discover封包,只要是支援UPnP服務的主機會傳回它所提供的服務。
    閱讀全文 »

Terminal Color

而 ESC 是一個 Escape character,一般 bash 中有三種方式可以編碼

  • Shell: \e
  • ASCII Hex: \0x1B
  • ASCII Oct: \033
    而 ESC 輸出通常會表示為 ^[<ESC>
    閱讀全文 »

Core File

  • In most GNU/Linux systems (all of those I personally have used, at least), core dump files generated after an uncaught signal in a process (as a SIGSEGV or SIGQUIT), are generated in the base directory where the program was executed, and named as “core” or “core.PID”.
    閱讀全文 »

PAM (Pluggable Authentication Modules)

  • 它通過提供一些動態鏈接庫和一套統一的API,將系統提供的服務 和該服務的認證方式分開,使得系統管理員可以靈活地根據需要給不同的服務配置不同的認證方式而無需更改服務程序,同時也便於向系 統中添加新的認證手段。
  • 在以前 Unix-like 系統每個程式都有屬於自己一套的驗證方式.現在將這些驗證集中起來管理就叫做 PAM(Pluggable Authentication Modules),而 PAM 是一種認證(authentication)和授權(authorization)的架構.任正式證實你的身份過程,而授權是依據使用者身份來決定是否有權限存取系統的過程
    閱讀全文 »

MOTD (Message of the day)

  • static /etc/motd
  • Then, Ubuntu Intrepid Ibex (2008) introduced a package update-motd, which consisted of
    • a script called update-motd.
    • an entry in /etc/cron.d calling update-motd every 10 minutes.
    • a folder /etc/update-motd.d
      閱讀全文 »

logrotate

  • logrotate - rotates, compresses, and mails system logs

logrotate 的設定

  • Linux系統預設安裝logrotate工具,它預設的配置檔案在:
    • /etc/logrotate.conf
    • /etc/logrotate.d/
  • Logrotate 是基於 cron 來執行的
  • restart service: `sudo /usr/sbin/logrotate -v /etc/logrotate.conf
    閱讀全文 »

不喜歡用 Line 的原因

pros:

  • 貼圖種類、樣式很多

  • 照片可以傳原始檔 (但是相簿基本上不能傳原始)

    cons:

  • 訊息不會自動備份

  • 檔案圖片等等會過期

  • 相簿不能存影片

  • 太多廣告、長輩文、假訊息

  • 視訊和音訊不能通話後再切換

  • 不能變成小框框

  • notification 不能預覽連續訊息

Gitbook

  • 最主要是希望有搜尋功能

    gitbook.com

  • 但是 gitbook 的 individual usage 只能有 public 和 private 各 10 本書
  • 並且 import/export 功能不是很好
  • 最重要的是他的輸入介面有點麻煩

gitbook.io

reference

Terminal Shortcut

Command Editing Shortcuts

Ctrl + a – go to the start of the command line

Ctrl + e – go to the end of the command line

Ctrl + k – delete from cursor to the end of the command line

Ctrl + u – delete from cursor to the start of the command line

Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word)

Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor

Ctrl + xx – move between start of command line and current cursor position (and back again)

Alt + b – move backward one word (or go to start of word the cursor is currently on)

Alt + f – move forward one word (or go to end of word the cursor is currently on)

閱讀全文 »