gc after git filter-branch

git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin
git reflog expire --expire=now --all
git gc --prune=now
»

ncurses wide charactor support

Switch to libncursesw if needed. cd /lib/x86_64-linux-gnu/ unlink libncurses.so.5 ln -s libncursesw.so.5 libncurses.so.5 »

4 kinds of behavior in glibc write buffer

如果不強制呼叫 fflush() 來將 userspace buffer 寫入 kernel buffer 裡的話, glibc 有以下幾種預設的行為: - full buffer for disk file, 當緩衝區全滿或者 fd close 時寫入 - row buffer for tty, 當遇到換行符時寫入 - no buffer for stderr, »

Paxos

搞不清楚 Paxos 演算法, 跟人家談什麼分布式系統? 話說回來, 真的弄懂 Paxos 的又有幾人? 就連 Leslie Lamport 自己, 也是前後經過近十年的時間, 才磨出了這個以&rdquo »

Numbers every programmer should know

Jeff Dean 大神曾經說過, 有一些數字是每個 programmer 都要時刻勞記在心的. 然而, 硬體不停在進步, 這些數字也需要與時俱進, 於是就有人做了一個小工具, 可以按年份估 »

A migration from Gitolite to Gitlab

注意 Gitlab 這個專案很久了, 最近因為一些需求決定將公司所有的 Git repos 從 Gitolite 搬到 Gitlab 上. 一直以來都是以 Gitolite + Redmine + Jenkins 這套大三元作為開發及持續整合的環境, 耦合程度 »

OpenSSL 正夯

花了半天的時間跟著 這篇標題超嗆的文章 一起 trace OpenSSL 的 code, 真沒想到天天在用的東西, 而且還是被整個世界大幅採用的庫, 居然藏了這麼多垃圾 code… 先不說邏輯錯誤, »

Two different types of networking in Openstack

Just found the following diagram when reading Openstack documentation, very intuitive. By the way I think the second picture has a mistake in br-int of the Network Node, the port phy-br-eth1 should be int-br-eth1. Please corrects me if I’m wrong! Nova-Network Traffic in the Cloud OpenStack Networking Service Traffic in the Cloud »

Set up port-forwarding via libvirt's hook

It’s a bad idea using one file to maintain all port-forwarding rules for VMs. In such a traditional environment (without SDN I mean), consider libvirt’s hook mechanism as a more modular way.

For Ubuntu, edit /etc/libvirt/hooks/qemu and then restart the libvirt-bin service.

»