想了一個方法用大螢幕即時顯示 git 的 commit tree,看起來很有趣,
在 merge 不同 branch 的時候也十分實用。
我們用的程式是 NerdTool,它跟 GeekTool 類似,
是一個可以把任一 command 的 output 顯示在桌面上。
我最早是在 LifeHacker 發現的,
最大的差別在 NerdTool 可以正確的顯示 ASCII colors。
我們先從 bitbucket 上另外 clone 了一份 repo 下來專門用來 watch commit 的變動,
接著讓 NerdTool 三秒跑一次 git pull 並用樹狀圖顯示 log 在桌面上:
cd ~/.gitwatch/<repo_name> ; git pull 2>&1 > /dev/null ; date; git lp | head -47
git 設定的 alias
lp = log —pretty=oneline —abbrev-commit —decorate —graph —color
後來翻了翻 git log 的 manpage 又把 alias 改了一下,顯示成自己喜歡的格式,加入了 commiter 、 commit time 兩個資訊,改成照時間排序,又條了一下配色。
lp = log —abbrev-commit —decorate —graph —color —pretty=”format:%Cblue%h\ %Cred%an:%Creset\"%Cgreen%s%Cblue\"\ %Creset%ar” —date-order
Recently, we released the Android version of Meridian, our platform for building location-based apps.
We didn’t use one of these “Cross Platform!” tools like Titanium. We wrote it, from scratch, in Java, like you do in Android.
We decided it was important to keep the native stuff native, and to respect each platform’s conventions as much as possible. Some conventions are easy to follow, like putting our tabs on the top. Other conventions go deep into the Android Way, like handling
Intents, closing oldActivities, implementing Search Providers, and being strict about references to help the garbage collector.Now, our platform leverages HTML5 (buzzword, sorry) in many places for branding and content display, so we got a fair amount of UI for free. But there was much platform code written in Objective-C that needed translation into Java, such as map navigation, directions, and location switching.
So, we rolled up our sleeves, downloaded the Android SDK, and got to work.
今年十月初,Qualcomm 釋出了 QCAR[1][5] ── 一個運行於 Android 平台上的增擬實境 (AR) SDK,提供幾個基本(?)的 AR 元件,讓開發者可以跳過影像處理,快速、簡單的在 Android 平台上開發各式包含的 AR 功能應用程式。今天終於有點時間,把 QCAR SDK 抓了下來,也跑了跑 sample 程式。因為還玩的很淺,原本不想寫 blog 的,但發現[2]網路上跟 QCAR 有關的中文文章實在少的可憐,還是寫一篇來簡單記錄一下。
QCAR 與 Layer[3]、WikiTude[4] 等 location based 的 AR 引擎有所不同。這類的 AR 系統利用 GPS 或 Wifi 取得使用者在地球上的位置,再搭配由電子羅盤取得的使用者面向,在螢幕上呈現使用者周遭的 POI 距離以及相對方位。Layers 提供了 API ,讓開發者在其程式中顯示自己設計的資料,而 WikiTude 則是進一部的提供了 SDK,讓開發者可以在自己的程式中加入 location based 的 AR 功能。(對 AR 並沒有任何研究,location based AR 這個名字也是胡亂取的:p)
QCAR 系統所提供的 AR 功能,則是藉由攝影機辨認現實生活中的平面 pattern 或材質,並準確的在平面上方(或其他相對方向、位置)的空間繪製 3D 的物件。目前 QCAR 支援了兩個類型的追蹤:Image Target 以及 Frame Marker 並可以搭配 Virtual Button 讓生活中的物品上出現可以用手(或其他物件)使用的按鈕。
下圖就是最基本 Image Target 追蹤,可以看出紙張放置的角度改變,上方的 Utah teapot 也會跟著改變。Image Target 追蹤的實作流程也很有趣,開發者要先將想追蹤的圖片上傳至網站由 Qualcomm 幫你從圖檔抓出 features,接著將 features 從網站下載下來,搭配 SDK 使用。
此篇文章延續前文 ─ “Linux Kernel Development / Debugging (1) - 第一次玩 qemu/kgdb 就上手”,簡單介紹如何使用 gdb / kgdb 對核心模組 (kernel module) 進行即時的 debugging。
在先前的文章中,介紹了如何使用 qemu、kgdb、gdb 對核心進行動態的 debugging,並在編譯核心時在 vmlinux 中包含 debugging information,使 debug 時能夠直接瀏覽原始碼以及對變數進行存取。然而,kernel module 是在核心之外的,因次就算編譯時加上 -g GCCFLAG 也無法直接在 gdb 中存取其 debugging information。