Beware of using Linux's hostname -s switch

The hostname program has a common switch, -s , which is documented(in the Linux version) as:

-s, --short
Display the short host name. This is the host namecut at the first dot.

Although you would not expect it from this description, running' hostname -s ' will do a gethostbyname() and thus often a DNS lookupin most Linux versions of hostname . This can of course fail if yourDNS is not working, which winds up with the very peculiar result


Some thoughts about 6to4

I've previously written about theproblems with the IPv4 to IPv6 transition, and how the IPv6 peoplecould have made it easier . Well,it turns out that I have to take back some of the grumpy thingsthat I said back then because I just found out about 6to4 , which makes IPv6 connectivityfairly trivial for machines with public IPv4 addresses (and generally itworks), partly by embedding the IPv4 address space into IPv6.

(I'll let you read


天才需要誰?

這個城巿實在太需要天才了,枯乾無味的生活、毫無驚喜的事業、等待死亡的退休、醜聞不休的名人,有沒有甚麼事可以讓人覺得,這個地方真的有希望在明天呢?我們實在需要天才,一個天賦異稟的少年人,年紀輕輕十二、三

Getting a Views Page Display to Appear Inside an Organic Group

I have been hitting my head against a wall for a few weeks now, trying to get a few different Views-created pages to appear as if they were normal pages inside an Organic Group (meaning they would appear inside og-menu-enabled menus for that particular group, and group blocks would also appear on the pages.

After reading up on the thread " Organic Groups and Views 2 ", I found that I could use an argument to help solve my dilemma. Here's how I set up an


死神貓貓

相信大家都有可能聽過這頭被稱為Grim Reaper Cat(死神貓貓) 的小貓 Oscar ,被飼養在美國 Rhode Island某善終中心內的他,據稱具有預知死亡的能力,每逢有人即將去世,他就會在附近守候。

目前為止,已被他「送走」的,最少有50名該療養院

Continue reading...

20100209網摘 – 中國為什麼不是文化大國

中國

香港


有早知?

廣東俗諺有句是「有早知,無乞兒」,看似理所當然,其實想深一層,除非是極簡單的情況,否則這句說話的對錯是無從判斷的。

假如你說:「早知今天股市會升得這麼高,我昨天便不會把股票賣了,現在還不賺個盆滿缽滿?」

Why your program should have an actual configuration file

Every so often, someone says something like 'you know, our program has aconfiguration file but also supports runtime reconfiguration via somemagic. Clearly this is wrong, so what we should do is get rid of ourconfiguration file and just make sure the running state is persistent'.If they're feeling nice, they add that the running state will be savedas an XML file.

Every time people say this, sysadmins cry. Here is a very importantthing for real deployments of your program in real environments


起跑線

起跑線

「不要讓孩子輸在起跑線」是榮升人母的阿C的座右銘。

當阿C仍懷着女兒時,便密鑼緊鼓,一心要在家裏締造一個良好的英語語境。阿C深信英語無敵,是孩子將來必要掌握得好的語言。要學好語言,就要提供語境,所
Continue reading...

長但幼 or 粗但短

宜家俾兩個選擇你,二選一:

1. 長但幼

2. 粗但短

唔好問有冇第三個選擇,冇呀﹗

世上邊有咁多又長又粗嘅啫?我夠想要啦。

其實,我真係試過唔少ga。

又長又粗嘅,令人好回味好回味。

可惜,我只係遇上過一次。

長嘅,睇起