Wikipedia Affiliate Button

11/08/2009

ssh tunnel + rdesktop + virtualbox windows

1. We'd like to create an ssh tunnel between home pc and office PC.  On home pc,  type the following command

> ssh -L 3389:localhost:3389 timwu@deansoft

This means all traffic toward localhost:3399 will be redirected to timwu@deansoft:3399

2. on office PC, execute the virtualbox instance winxp
> VBoxHeadless -s winxp

3.
then you can run rdesktop to attach remote windows screen
> rdesktop -P -z -a 8 localhost

-z -P -a 8 is for low bandwidth

7/20/2009

短短3個月, 轉手開價跳兩百萬

4月才開始看房子, 坦白講就是懶, 房子這麼貴的東西, 一不留神就漲上去了, 錯過年初便宜沒買, 自己大意我沒話講, 但是親眼看到投客迅速搶貨後抬價掛出, 不禁感嘆投機生意真好賺, 有人就是敢在住的需求上發機會財.

或許有人覺得投資客也是正常工作, 每天看屋掃貨, 高額貸款風險高, 不偷不搶完全合法, 底下不做批判, 純粹把這段經驗寫下來, 當作對這段找痛苦的尋屋期做個人生筆記.

這是4月底某個週末, 來自某個信義仲介的email, 他隨後急電, 告訴我這間是big apple, 叫我要趕快來看.

---------- Forwarded message ----------
Date: 2009/4/26
Subject: 【再慢就來不及了】原德安近捷運三房首選

成功路45413

34.35 屋齡18

公設2坪,公設比5%

1380另社區有車位出租坡平5000/

有車位出售220/

重點:1.不吵

2.有景觀

3.氯離子符合標準(信義房屋合格廠商檢測)

檢附證明



------------------------------------------------------------------------------------------------------------------------------------
我迅速看了一下, 印象還不錯, 但當時才剛開始看房子, 行情不熟悉, 不知道這樣到底是貴還是便宜, 且一千多萬的數字, 我想每個人第一次面臨人生中這麼大一筆金額, 多少都會有點恐懼遲疑, 我沒有馬上下手(好, 我承認這是我動作慢, 活該!), 這個房子在短短五日內迅速成交(仲介告知成交價格約12xx), 事後想想有點可惜, 心理暗自恭喜出手明快果決的買家.


7月這間房子又悄悄出現在信義網站上,

-------------------------------------------------------------------------------------------------------------------------------------
http://www.sinyi.com.tw/buy/buy-search/property.aspx?id=63985Y

日湖電梯三房(63985Y)

房屋特色:
  • 日湖百貨捷運生活圈
  • 高樓景觀佳前後陽台
  • 近市場學校生活機能好
  • 低公設另車位可買


基本資料:聯絡分店
地址
總價 1580萬
格局 3房/2廳/2衛/0室
建物登記
主建物+陽台 32.34坪
土地登記
屋齡 19.7年
朝向
樓高/樓別 16樓/13樓
用途/類型 住宅/大樓
月管理費 1730元
警衛管理
邊間/暗房 否/無
建物結構 鋼筋混凝土
外牆建材 二丁掛
車位
建物登記坪數:
主建物29.94坪
公共設施2.00坪
陽台2.40坪
-----------------------------------------------------------------------------------------------------------------------------

我馬上約看, 還真的是同一間, 原來這間房子被投客買走, 難怪動作這麼快, 看到開價了嗎? 短短不到3個月, 跳了兩百萬, 我不知道他能多少成交, 但從開價看得出來, 獲利百萬是基本目標.

我仰天長嘆, 一百萬! 要寫多少程式/加多少班才能存到一百萬啊..., 我真的感觸很深, 當你每夜加班/奉獻青春/燃燒健康的時候, 有人已經佔好山頭, 等著接收你現成的努力成果.....

5/07/2009

看新聞做股票是很危險的!!!




---------------------------------------------------------------------------------------------------------------------------------
http://tw.stock.yahoo.com/news_content/url/d/a/090108/2/1axwt.html
高盛:亞股今年風險高 農曆年後回檔 台股最低點見到2字頭
2009/01/08 10:50 鉅亨網

【鉅亨網記者蔡佳容˙台北】 高盛證券亞太策略分析師慕天暉 (Timothy Moe)在 新出爐的「2009亞太股市展望」報告中指出,市場對於 企業獲利預估過度樂觀,但若結果不符市場預期,近期 的反彈也將終結,預估在農曆年後就將回檔,台股最低 點恐來到2910點,重新見到1990年的低點。

亞股自去年11月低點反彈至今,平均 漲幅已達 30% ;然而,高盛證券分析全球 100位基金經理人客戶的意 見後指出,近期的反彈只是來自於市場期待景氣下半年 好轉、企業獲利樂觀,因此投資人願意暫時將部分資金 放回股市,且贖回壓力減輕,但若基本面有想像中的樂 觀,反彈也將就此終結。

慕天暉預期2009年亞股將是「高風險、報酬率低」 的一年,而在亞股的投資組合中,中國是唯一被評為「 加碼」的市場,台股則維持「減碼」評等,預估最高點 有機會達到5970點,不過合理指數應為3840點,最糟也 有可能跌至2910點。

慕天輝指出,目前能見最樂觀的狀況為各國政府刺 激經濟措施自下半年起才將發酵,股市下半年也才有可 能復甦;因此預估在農曆新年前外資就有可能率先撤退 ,農曆年後股市也將回檔。------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


短短4個月後

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


瑞銀:台股上看7500點 高盛喊9000點

http://www.cdnews.com.tw 2009-05-04 16:08:34

王鵬捷/綜合報導

 受政策開放陸資來台激勵,高盛證券將台股升等至「加碼」,看好台股將會是港股直通車的翻版,今年高點看9000點,瑞銀證券也將台股高點由6000點升至7500點。

 中央社4日報導,繼麥格理證券將台股評等一口氣升至「加碼」,高盛證券亞太策略分析師慕天暉 (Timothy Moe)在最新出爐的亞股策略報告中,也將台股升等至「加碼」,看好台股可重演2007年中至年底時港股因直通車政策的強勁表現。

 慕天暉原本擔心全球經濟衰退影響台灣企業獲利,但近來經濟和企業財報數據都見改善,除將台灣今、明年經濟成長率由「-7.5%」、2.5%升至「-7%」、3.5%外,今年台股高點估7500點至9000點,最差也有5100點。

 高盛證券看好的標的,包括鴻海精密、聯發科、宏達電、富邦金、元大金、遠紡、台泥、亞泥、緯創資通和永豐金等。

 瑞銀台股研究部主管董成康預期,陸資不僅是台股短線利多,也是推升台股的新資金,加上全球景氣已出現觸底跡象,將台股高點由6000點升至 7500點;同時將金融類股升至「加碼」,並增加資產概念股的籌碼,並持續看好下游電子業硬體廠商,但對半導體和電信類股轉為「減碼」。


5/06/2009

survey RTMP server implementation

玩這個太花時間了, 先簡單做個筆記

兩套 C++ based RTMP server都 build 不起來, crtmpserver 用到了cmake 且只支援BSD, eclassd 我光automake就過不了,
只好先try rubyizumi , 它用ruby實作, 實際執行會動, 且code很簡潔.

這些server大致上是parsing mp4 的內容, 取出payload後分析, 然後包成 AMF再send 出去.


4/22/2009

sox 的用法



sox -n -c1 -t alsa default synth 5 sine 200
產生 200HZ 5秒鐘

sox -n -c1 -t alsa default synth 10 sine 100-1000
產生 100HZ~1000HZ 10秒鐘

sox -n -c1 -t alsa default synth 5 sine
產生 middle C(440HZ) 5秒鐘

sox -n -c1 -t alsa default synth 10 sine %0-%7
產生整個 middle octave 8秒鐘

sox -n -c1 -t alsa default synth 10 sine %-7-%7
產生橫跨兩個 octave 8秒鐘

4/16/2009

wma2wav

這裡看到的


For wma files:
  • Download ffmpeg
  • ffmpeg -i infile.wma -acodec pcm_s16le -ar 44100 -ac 2 -f wav outfile.wav

or:
  • Download MPlayer
  • mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader:file="outfile.wav" "infile.wma"

4/09/2009

SF4 絕招尻不出來....

尻這個字念"ㄎㄠ", 不知道它的意思的人想必沒有童年,....

好久沒玩格鬥遊戲, 很興奮地買了SF4 才發現我是肉腳, 跟電腦玩只能打到第四關,
開network match後, 被陌生人踢館踢好玩的, 對決了十次只有贏一次.  我看過一陣子會忍不住去買大搖桿.

其實不應該買這片的, 只是覺得PS3放在客廳都是老弟在玩, 該弄片自己想玩的遊戲,
那為什麼當初要買PS3呢?  我也想不起來, 我好像看完IBM的Cell簡報, 大大讚嘆這是全世界最先進的處理機架構,
開始幻想在上面開發軟體...剛好又有人抽獎抽到PS3, 出個二手價, 我覺得不貴就買了.





4/01/2009

取得struct內個別 member資訊

#include <stddef.h>
有offsetof()可以取得member offset, 另外要取得member size也不難, 以下列macro即可
   
#define lengthof(s,m) ((size_t) sizeof(((s *)0)->m))

backtrace without gdb


http://anndymaktub.blogspot.com/2009/02/stack-backtracing-inside-your-program_23.html
透過backgrace & backtrace_symbols 這兩個function.

殘念, uclibc好像不支援耶...

3/25/2009

ubuntu經常無聲

這是老問題, 目前還沒找到好解法, 列出一些線索

* /etc/init.d/pulseaudio stop 之後pulseaudio server仍然還在 根本沒有消失
* 可以強制用kill -9 殺掉pulseaudio
* 我用下列指令搞定
>asoundconf list
Names of available sound cards:
Intel
SAA7134
> asoundconf reset-default-card Intel
> asoundconf set-default-card Intel


* 接下來, 查看 /home/timwu/.asoundrc.asoundconf 應該要有內容
* 沒有pulse, 直接對Intel輸出仍可達到multiple audio stream 混音,
* 啟動pulse可以用asoundconf set-pulse

3/10/2009

李小龍的重訓

打架的時候, 胸肌真的不是重點......
--------------------------------------------------------
Bruce Lee - Wikipedia, the free encyclopedia

Physical fitness and nutrition



Bruce Lee in Way of the Dragon in 1972

Lee felt that many martial artists of his day did not spend enough time on physical conditioning. Bruce included all elements of total fitness—muscular strength, muscular endurance, cardiovascular endurance, and flexibility. He tried traditional bodybuilding techniques to build bulky muscles or mass. However, Lee was careful to admonish that mental and spiritual preparation was fundamental to the success of physical training in martial arts skills. In his book The Tao of Jeet Kune Do, he wrote

Training is one of the most neglected phases of athletics. Too much time is given to the development of skill and too little to the development of the individual for participation." "JKD, ultimately is not a matter of petty techniques but of highly developed spirituality and physique.[44]

The weight training program that Lee used during a stay in Hong Kong in 1965 at only 24 years old placed heavy emphasis on his arms. At that time he could perform bicep curls at a weight of 70 to 80lbs for three sets of eight repetitions, along with other forms of exercises, such as squats, push-ups, reverse curls, concentration curls, French presses, and both wrist curls and reverse wrist curls.[45] The repetitions he performed were 6 to 12 reps (at the time). While this method of training targeted his fast and slow twitch muscles, it later resulted in weight gain or muscle mass, placing Bruce a little over 160 lbs. Lee was documented as having well over 2,500 books in his own personal library, and eventually concluded that "A stronger muscle, is a bigger muscle", a conclusion he later disputed. Bruce forever experimented with his training routines to maximize his physical abilities, and push the human body to its limits. He employed many different routines and exercises including skipping rope, which served his training and bodybuilding purposes effectively.[46]

Lee believed that the abdominal muscles were one of the most important muscle groups for a martial artist, since virtually every movement requires some degree of abdominal work. Perhaps more importantly, the "abs" are like a shell, protecting the ribs and vital organs.

He trained from 7 a.m. to 9 a.m., including stomach, flexibility, and running, and from 11 a.m. to 12 p.m. he would weight train and cycle. A typical exercise for Lee would be to run a distance of two to six miles in 15 to 45 minutes, in which he would vary speed in 3–5 minute intervals. Lee would ride the equivalent of 10 miles in 45 minutes on a stationary bike.[47]

Lee would sometimes exercise with the jump rope and put in 800 jumps after cycling. Lee would also do exercises to toughen the skin on his fists, including thrusting his hands into buckets of harsh rocks and gravel. He would do over 500 repetitions of this on a given day.[48]

2/23/2009

gmail的新功能在中文版找不到

gmail如果語言選中文的話, 進去"設定",

設定為英文的話, 進去"settings", 會發現多了 "Labs"

General
Themes


Labs裡面有一堆gadget可以玩, enable後, 再調回中文仍可以用.

blogger iframe test


檢視較大的地圖

computeSpectrum on microphone

AIR computeSpectrum on microphone - Google 搜尋

唉, 殘念, computeSpectrum不能對microphone.

不知道為什麼adobe為什麼要鎖這個地方, security concern? DRM issue?  Adobe's online music plan on it?
從網路上提問的踴躍程度看起來, 這個功能若一開, 一狗票音樂惡搞創作網站會出籠.

2/19/2009

scim freezes gnome-terminal

換到ubuntu 8.10候, 每天工作最常在用的gnome-terminal 竟然會freeze, 最常發生在從firefox focus 轉移回來時, 雖然點一下別的tab就好了,
但是這會對工作流程中斷不流暢,  到今天才發現是scim 的問題, 輸入法改用gcin就好了

2/15/2009

實戰敏捷開發 Practices of an Agile Developer

以前不喜歡看軟工的書, 立即效益低又不好讀, 有些軟工方法論更是華而不實, 難以實行,

最近流行的 Agile development 算是比較注重開發的實務面, Practices of an Agile Developer也是這個領域著名著作, 這個blog 的作者ihower, 蠻用心整理了六篇讀書心得, 且加上了不少他自己在團隊實施的心得,, 值得一看.




by ihower

有效率的團隊互動是敏捷軟體開發的一個重要基石,能與人一起開發軟體是很棒的事情。

小小一本書,拖了這麼久終於整理完了,總計六篇: