qerter

qerter

dhlient 會將本機 hostname 資訊送出

/etc/dhcp/dhclient.conf

send host-name = gethostname();

ghost

C.C.Agile AsianPloP

Octopress - 放在 github page 上的靜態 blog

C# unittest xUnit.net

C# Mock rhino Mocks NSubstitute

單元測試的藝術

yan

GPG Key 到期處理

$ gpg --list-keys
pub 4096R/ABCD1234 2013-09-26 [expired: 2013-12-31]

$ gpg --edit-key ABCD1234

gpg> list

pub 4096R/ABCD1234 created: 2013-09-26 expired: 2013-12-31 usage: SC
trust: unknown validity: expired
sub 4096R/EFGH5678 created: 2013-09-26 expired: never usage: E

gpg> key 0    # 只選擇 primary key,取消選擇 sub key

gpg> expire
Changing expiration time for the primary key.
Please specify how long the key should be valid.
0 = key does not expire
= key expires in n days
w = key expires in n weeks
m = key expires in n months
y = key expires in n years
Key is valid for? (0) 2014-12-31    # 可輸入到期日期
Key expires at Wed Dec 31 00:00:00 2014 CST
Is this correct? (y/N) y

gpg> save

$ gpg --keyserver keys.gnupg.net --send-keys ABCD1234

撤銷 GPG key

# 產生撤銷憑證
$ gpg --output ~/myrevoke.asc --gen-revoke your_user_id

# 撤銷 GPG key
$ gpg --import ~/myrevoke.asc
$ gpg --keyserver pgp.mit.edu --send-keys your_user_id