2010年10月18日 星期一

2010年10月6日 星期三

Remote a Git Remote Branch that is Connected to an SVN

svn branch delete 的時候
用 git svn fetch 似乎不會把 remote branch 給刪掉
只好手動移掉
git branch -r -d your_remote_xxxx_branch

2010年9月30日 星期四

Wide character

The Microsoft Windows application programming interfaces Win32 and Win64 require that wide character variables be defined as 16-bit values, and that characters be encoded using UTF-16, while modern Unix-like systems generally require 32-bit values encoded using UTF-32.

[REF]
Wide character

2010年8月30日 星期一

2010年8月16日 星期一

Bulid celt under mingw32

CPPFLAGS="-fno-common" LDFLAGS="-no-undefined" ./configure
make
make install

2010年8月3日 星期二

Debug Memory Leak in VC

#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>

_CrtMemState old, new, diff;

_CrtMemCheckpoint(&old);
....
_CrtMemCheckpoint(&new);

_CrtMemDifference(&diff, &old, &new);
_CrtMemDumpStatistics(&diff);

_CrtDumpMemoryLeaks();

2010年7月9日 星期五

好用的 git-svn

最近在弄一個 project, 用的 SCM 是 svn
常常在改一個東西的時候..會有另一個 request 進來..
像是幫我 build 一下..有 bug 要 fix 之類的事..
這個時候需要一個 clean 的 code..
所以我就需要把改過的 code commit 或是 backup 一下...很麻煩...

想到 git 的好用...就試試 git-svn
配合 branch, stash 就可以解決問題..

可參考網頁
使用 git-svn 整合 git 與 svn
Develop with Git on a Google Code Project
Howto use Git and svn together

2010年6月29日 星期二

ENet, a relatively thin, simple and robust network communication layer on top of UDP

ENet's purpose is to provide a relatively thin, simple and robust network communication layer on top of UDP.

2010年6月28日 星期一

Lock-free and Wait-free

multi-thread, multi-core programming 中..synchronization 總是個問題
能不用 lock 就不 lock, 最好..

Some notes on lock-free and wait-free algorithms

2010年6月25日 星期五

Memcached and Membase

Memcached
Membase
有時間再看看..有沒有什麼地方可以用~~

2010年5月27日 星期四

2010年5月26日 星期三

約耳談軟體 (Joel on Software)

《約耳談軟體(Joel on Software)》翻譯計畫
線上就有的看....可以不用買書..
我買了.XD

回 email 也是個學問~

回信時...不要隨便 quote
http://daringfireball.net/2007/07/on_top

2010年4月14日 星期三

Convert Binary File as a Normal Object File

objcopy -I binary -O elf32-i386 -B i386 your_bin_file your_bin_file.o

Then you can use nm to check your_bin_file.o

01000000 D _binary_your_bin_file_end
01000000 A _binary_your_bin_file_size
00000000 D _binary_your_bin_file_start

Use this in your code
extern char _binary_your_bin_file_end[];
extern char _binary_your_bin_file_size[];
extern char _binary_your_bin_file_start[];

2010年3月4日 星期四

POSIX IO Must Die!

喔喔~好驚悚的 subject..請看下面 link
POSIX IO Must Die!

2010年2月22日 星期一

2010年2月21日 星期日

My First Linux Kernel Patch

看到自己的 patch 被加到其它 kernel hacker 的 git tree 中...
還蠻感動的...
http://git.kernel.org/?p=linux/kernel/git/sarah/xhci.git;a=commit;h=583f156bde78f678bad42ddd815b43bab89309e1

ps: 不知道什麼時候才會真的進 mainline

不過 patch 有兩個地方有點錯誤..
1. Subject line 的 subsystem
USB: xhci: 應該為 xhci: 比較正確
2. Body of the explanation 有 typo
最後一行的 legacy sup support. 應該是 legacy support.

呼~下次會多注意這些小地方..
希望末來還有機會能 submit kernel patch .. :)

2010年2月11日 星期四

git send-email 簡單用法紀錄

試了好久..總算用 git format-patch 和 git send-email 把 patch 送出..@@

[Create patch for git-send-email]
git format-patch master

[Send patch with git-send-email]
git send-email -to xxx@xxx -cc xxx@xxx -cc xxx@xxx --suppress-from 0001-xxx.patch

ps: --suppress-from 加這個 option 就不會把 patch 中 From: 的 email 加到 cc: 中
--dry-run try git-send-email 的 option 時..好用~

2010年2月10日 星期三

git send-email 相關的設定 (for gmail)

git config --global sendemail.smtpencryption tls
git config --global sendemail.smtpserver smtp.gmail.com
git config --global sendemail.smtpuser laface.tw
git config --global sendemail.smptserverport 587

2010年2月1日 星期一

在 RedHat 7.2 上裝 git

RedHat 7.2 太舊了..需要加 NO_NSEC

./configure CFLAGS=-DNO_NSEC --prefix=/usr

記錄一下..不然又會忘~@@

2010年1月6日 星期三

GNU cflow

GNU cflow
一個可以用來 trace code 的工具..
有機會再來試看看~~

2010年1月5日 星期二

GNOME, GTK, GDK, XLib, GLib

這幾個名詞總是記不太起來..可能是太少接觸了吧..^^"
把一個link記下來..以後要回憶比較快~~