2017年7月15日 星期六

[Kernel] Portal


[Git] Portal


  • What is Git?
    • 分散式版本控制軟體
    • 利用 40 bytes的 hash key當作每次 commit ID
    • stages
    • 每次皆儲存完整內容, not diff
  • 名詞
    • hash
    • commit
    • repository (remote, local)
    • branch
    • HEAD
      • pointer to latest commit of current branch
    • Q: reference, rebase, cherry-pick?
    • parent -> 延伸至哪個 version
  • 行為
    • clone
    • checkout
    • commit
      • 修改 commit: 
        git commit --amend
    • push
    • pull
      • 從 remote 抓取各版 merge成新的 commit
    • fetch
      • 與 pull的差異是, 僅抓取 remote的 log, 不 merge
    • merge
      • fast forward (branch 合回 master, 且 master 未更改)
      • non-fast forward, merge into a new commit
      • rebase, branch的修改會串到 master 後面
        • Merge (From 連猴子都懂的 Git 入門指南)
          修改內容的歷史記錄會維持原狀,但是合併後的歷史紀錄會變得更複雜。
        • Rebase
          修改內容的歷史記錄會接在要合併的分支後面,合併後的歷史記錄會比較清楚簡單,但是,會比使用 merge 更容易發生衝突。
          • e.g. git checkout br3
          • git rebase master
          • 在 master 後面再串上 br3
    • stash
    • blame
      • 可以 line-by-line 秀出各 commiter
  • 教學
  • 設定
    • .gitignore
    • filemode
      • 常看到 git diff 只差在 old mode 100644 與 new mode 100755
      • 可以利用 git config core.filemode false 來隱藏這些錯誤
    • workspace config, user config, global config
  • 可搭配 Google 的 Tool repo 進階 checkout 多個 repository 對應的特定版號, 以 manifest做管理 (xml format), 或是 snapshot.xml 做管理

2017年7月1日 星期六

[Raspberry Pi] Portal


[Raspberry Pi] toolchain


  • Compiler
    • compile option
      • -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s
        

[RPi] Raspberry Pi


  • Software
  • Boot process
    • first stage bootloader
      • 在 GPU SoC中, 無法修改, 會去 mount SD card 上的FAT32 filesystem
    • second stage boot-loader (bootcode.bin) - only released by binary
      • retrieve GPU firmware in SD card, and starts the GPU
    • GPU firmware (start.elf) - only released by binary
      • GPU starts up CPU
      • additional fixup.dat will check SDRAM partition
    • User codes
      • any binaries, e.g. kernel image (kernel.img), U-Boot, bare-bone applications

2017年6月16日 星期五

[License] GPL v.s. LGPL & GPL in Linux


  • 簡單比較
    • GPL:
      • 保護 application
      • 較嚴苛
      • release binary時, 需要 release source code
      • 僅為執行(非修改)此 binary使用, 不用 release source code
    • LGPL:
      • 保護 library
      • 較寬鬆
      • dynamically or statically link則無限制
  • 在 kernel 上所執行的使用者應用程式都不受 GPL制約

2017年5月30日 星期二

[Company] 清算流程


2017年4月10日 星期一

[Mantis] enable due date

  • if you use google cloud deployment to deploy bitnami mantis service
    • use ssh to login shell
    • edit /opt/bitnami/apps/mantis/htdocs/config/config_inc.php
  • add following lines in config/config_inc.php
    • $g_due_date_update_threshold = DEVELOPER;
      $g_due_date_view_threshold = REPORTER;
      
  • Reference:

2017年2月25日 星期六

[Project] Jarvis

  • 看到 Mark Zuckerberg 在 2016 年完成的 project Jarvis, 整個熱血沸騰. 希望今年有時間也來摸一下吧! 看了一下他設計的架構圖如下 
  • 看起來滿多細節與技術在裡頭, 譬如光 User Interface 就沒列到喇叭與麥克風, 應該是認為 iOS Voice App 就代表跑在手機上, 而這兩者手機都有!? 但, Language Processing 就可能分成 pre-process (e.g. Speech-to-Text), recognition( 其中包含 semantics analysis等), 看起來有點籠統, 喇叭的輸出應該也有 TTS(Text-to-Speech) 才是, Morgan Freeman的聲音不知是預錄的, 還是有特定的 TTS engine組合而成.
  • 若要實作上面的系統, 目前手邊資源: iPhone, Raspberry Pi, 電視, USB camera, 預計架構為: USB camera (including Microphone) 作為 Input, 串接到 Raspberry Pi (RPi), RPi 作為 Server, 上面含有 AI system做任何判斷, 再以 HDMI 串接電視, 作為聲音與影像的輸出. 另外就是應用面的思考了. 360 camera+房仲系統?
  • 既有軟體

[Mac] 清除 Mail 相關檔案

Mac OSX Sierra 在 System Information.app (系統資訊) 中加入了儲存空間管理 (Command + U)的功能, 但滿常看到, "郵件" 裡面有許多正在使用的儲存空間, 卻無法移除(如下圖)


可以到 ~/Library/Mail/V4/ 底下, 將一些數字ID的資料夾清除即可.