Archive for the ‘Footprints + Diary’ Category

Smart Archives

Wednesday, May 21st, 2008

寶貝哈泥問我說要怎麼顯示所有 blog 裡面的文章,可是我也不記得我以前怎麼用了。印象中是用可以執行 PHP 的 Plugin 然後貼一小段程式碼,然後就讓他自己跑 query 列出全部。總之,沒有非常的簡單。

昨天在 rwiz 上不小心 (!?) 點了胸毛男的 blog 忽然間發現他家上有一頁 文件集 正是我在找的。馬上去問這頁怎麼生出來的,原來是 Smart Archives 這個 Plugin。配合好用的 Exec-PHPArchives 頁終於生出來了 :D

Turn your VPS/Dedicated Server into a Remote Desktop!

Monday, April 21st, 2008

警告,這很惡搞 XD

Why would you do that? Because you can! And the fact that it’s a VPS/Dedicated Server, chances are its Internet connection is a lot faster than yours. As root, the following steps are tested working for Ubuntu 7.10 Gutsy.

1) Install Gnome, vnc4server, inetd
apt-get install gnome compiz vnc4server openbsd-inetd

2) Enable XDMCP
Edit /etc/gdm/gdm.conf
Look for:
[xdmcp]
Enable=false

Change it to:
Enable=true

3) Configure inetd:
Edit /etc/inetd.conf, add (one line):
5901 stream tcp nowait root /usr/bin/Xvnc Xvnc -inetd :1 -query localhost -geometry 800x600 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared securitytypes=none -extension XFIXES
Now restart inetd with service restart openbsd-inetd

4) Restart GDM
service restart gdm

DONE. Now you can access your VPS as a GNOME desktop with with any vnc client at serveraddress:1, :1 being the display. You can add multiple displays for multiple desktops at the same time ;)

好孩子不要嘗試喔 XD

python-pycurl on Shared Host

Friday, March 21st, 2008

編 Python 2.5, MySQLdb 都很輕鬆
就 make –prefix=~/ 和 python setup.py install 而已
但是 pycurl 讓我浪費了好多個小時的人生

我一直碰到的問題是這樣:

# python
Python 2.5.2 (r252:60911, Mar 21 2008, 05:12:12)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import pycurl
Traceback (most recent call last):
File ““, line 1, in
ImportError: libcurl.so.4: cannot open shared object file: No such file or directory
>>>

把浪費的時間跳過,總之就是 pycurl 沒寫好 (怨念總是得目標來發洩)
setup 時候的 –curl-config 就跟你說在 ~/lib 了,還去 /usr/lib 下面找 libcurl.so.4
好吧或許摸 unix 環境的時間還不夠久,總之最後發現只要這樣子就解決掉了

export LD_LIBRARY_PATH=~/lib

真是浪費生命

投藍綠是你家的事,但是請支持公投謝謝

Friday, March 21st, 2008

最近不知道為什麼,政治關心度上昇 100%
連枕邊細語的時間都可以拿將要來臨的總統大選當話題 (絕對不是沒有其他東西可以講XD)

我家都親綠耶真糟糕,感覺起來不管說啥好像就是因為父母這樣認為所以看到的就只有這樣
餅幹也討論過政治議題,他講的口沫衡飛(想像的),表達出內心對綠黨民進黨的失望忿怒與不滿
可以算是大部分高知識阿宅份子(!?)的思想寫照?
我覺得很認同阿,至少一方面是我自己對每個新聞個案知道的沒有很詳細
另一方面他的確也說的很有道理

說說個人感覺好了
說真的,光是只有看總統大選辯論表現的話,我會投給馬吧
我也跟我老北說過,他們如果是上辯論課,馬9大概可以拿個 A,謝大概 C+/B- 那邊,遜

假設他們講的都是真的了,也就是說每張開的發票都會實現,那我會為了不要一中市場而投給謝
不是我討厭中國人,而是我在海外碰到的高教育中國人讓我感到他們也無法相信自己的政府,這很悲哀
每當問起阿在這邊博士後研究都做的這麼好了,有沒有要回中國發展?
得到的答案簡單說就是中國共產黨的政府還是不能信任的
我不懂的是,為什麼反而台灣人那麼相信他們?

A referendum (plural referendums or referenda), ballot question, or plebiscite (from Latin plebiscita, originally a decree of the Concilium Plebis) is a direct vote in which an entire electorate is asked to either accept or reject a particular proposal. This may be the adoption of a new constitution, a constitutional amendment, a law, the recall of an elected official or simply a specific government policy. The referendum or plebiscite is a form of direct democracy.

公投就是公投,就算被拿來榜了大選也還是公投
公投的結果也不會因為是民進黨執政時候得到的所以民進黨變得比較厲害
這種最基本最直接的民主手法,卻被台灣人和媒體炒作成一種下三濫的手法
或許辦公投的人動機的確不良,或許他們真的想要靠支持入聯所以投支持順便投給我們
國民黨也是支持入聯吧?
雖然每個人都知道只要中國繼續在安理會裡面,台灣就不可能入聯
但是單純問如果可以的話想不想,我想都是會點頭的吧

在台灣似乎支持公投就是等於支持綠色,領了公投票就是接受了綠色的骯髒手段
醒醒吧,中國畏懼的就是這種最原始最直接的民主動作
雖然我自己是一點都不覺得這次公投會過,也一點都不覺得謝會贏,想要說的話還是想要說
想要避免一黨獨大,然後讓台灣政局繼續亂七八糟而投給民進黨的
想要拼台灣經濟,讓台灣人民所得一起(!?)往上而投給國民黨的
我是認為,不管你投藍綠是你家的事,但是請支持公投謝謝

180 / 547.5 ~ 1/3

Sunday, March 16th, 2008

大量照片,沒事別點進來

(more…)

All Rights Reserved Copyright © 2008 Design by StyleShout and Clazh