tag:blogger.com,1999:blog-26975923541225249962024-03-13T12:09:33.548+08:00Ryan WuThis is my old blog, please visit http://blog.ryanwu.meAnonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.comBlogger35125tag:blogger.com,1999:blog-2697592354122524996.post-21532935818187532312014-12-06T10:26:00.002+08:002014-12-06T10:26:12.569+08:00民眾終於可以好好發揮了<div style="background-color: white; color: #141823; font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 19.3199996948242px; margin-bottom: 6px;">
如果政治人物面對說與做,可以列成一個單選題:</div>
<div style="background-color: white; color: #141823; font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 19.3199996948242px; margin-bottom: 6px; margin-top: 6px;">
1.不說只做,稱黑箱作業。<br />2.只說不做,稱過度理想。<br />3.不說不做,稱昏庸無能。<span class="text_exposed_show" style="display: inline;"><br />4.多說多做,稱霸氣外洩。</span></div>
<div class="text_exposed_show" style="background-color: white; color: #141823; display: inline; font-family: Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 14px; line-height: 19.3199996948242px;">
<div style="margin-bottom: 6px;">
那...大概智商不用到100就可以選出最佳答案了。</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
我說的是最佳,但不代表是完美。從最近的媒體和民眾反應,大多數人們,還是期待包青天的;期待有人在大家都不知道的地方,把事情都做完,人民負責收割就好。過去,我們把這樣代議行為,視為最好的作法,但現在,其實人民有更好的選擇。事實上,不論什麼政策都有接受討論的空間,如果人民能夠輕易的表達意見,代議者能夠有方法的廣徵各方想法以及虛心的採納,那我相信,一個社會絕對能夠大步向前邁進。</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
日文裡面有一句諺語,「凸出的釘子就會被人敲下去」。有意思的是,我聽到這句話是 Stanford 教授 Jonathan Greenberg 在課堂上用來勉勵亞洲人的。他期許,亞洲人能正視這個問題(不只台灣,在座還有日本、韓國人),如果有任何的機會,要好好把握,勇於表達自己的意見 (Be a brave nail)。</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
許多人喜歡說,這個是個民智未開的社會,並且把問題歸咎於教育制度的失敗。但事實上,這社會的聰明人、高知識分子並不如想像中那麼少,只是所謂的智者,並沒有正確的方法、管道,去對這個社會有所貢獻。或者我該說,並不是每一個上位者都有辦法傾聽,承認自我的不足,甚至改進。</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
現在有一個政治人物,願意冒著說錯話、做錯事的風險,敞開心胸傾聽、拋出想法討論,這絕對是一個很好的改變契機。</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
媒體,請尊重這社會的平均智商,正面的、正錯的,把消息傳遞出去。<br />人們,請理性的告訴這個政治人物你的想法,他會聽,還會想,你繼續監督他,他更會拼命全力以赴,嗡嗡嗡。</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
天祐台灣。</div>
</div>
Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-22711003947123317762013-06-25T00:24:00.002+08:002013-06-25T01:59:03.462+08:00Display remote Node.JS service logs on Chrome Console<br />
<div class="p1">
In recent years, we got plenty of <a href="http://en.wikipedia.org/wiki/Platform_as_a_service">PaaS</a> services which provide very simple and easy way to deploy our Node.JS services.</div>
<div class="p1">
<br /></div>
<div class="p1">
Usually after deploying my service, I have to use the command line tools or visit some very slow web pages to access the server logs. It's really waste my time.</div>
<div class="p1">
<br /></div>
<div class="p1">
But today, I want to introduce a tool, <b><a href="http://craig.is/writing/chrome-logger">Chrome Logger</a>, </b>it provides a way to <b><span style="color: #e69138;">display server logs into Chrome Developer Tool's Console.</span></b></div>
<div class="p1">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga1aj5P5n4Ciwd7Q9kMHlyLw5HwNe8lNYvWDPYbkdsKYg0IMinCptBse0hqWm6FEnTwJL3_NCIh-HbtBn5kRu9QnQCSfok5qONusf_R2i14wVw75AEYBcz_7sI7JSI8RilOjQaML94WV22/s1600/Screen+Shot+2013-06-25+at+12.09.34+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="61" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga1aj5P5n4Ciwd7Q9kMHlyLw5HwNe8lNYvWDPYbkdsKYg0IMinCptBse0hqWm6FEnTwJL3_NCIh-HbtBn5kRu9QnQCSfok5qONusf_R2i14wVw75AEYBcz_7sI7JSI8RilOjQaML94WV22/s320/Screen+Shot+2013-06-25+at+12.09.34+AM.png" width="320" /></a></div>
<div class="p1">
<br /></div>
<div class="p1">
<a href="https://chrome.google.com/webstore/detail/chromephp/noaneddfkdjfnfdakjjmocngnfkfehhd">Install it</a>, then visit my <a href="http://chromelogger.herokuapp.com/">sample project on Heroku</a> to see what's going on.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo1uhnfdbss2oWC63bAZqG916BwCrsMvQHR58S3wEfzJ3XhVT03gXUAy51QUUooWZ_1IsFQVERW9bMRKTTid5_pSkixWYqJDwVwbC5yoD2uUtZM_mHvESeh7uAdaHvKEY4p1r1CS36eSr9/s1600/Screen+Shot+2013-06-25+at+12.22.18+AM.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo1uhnfdbss2oWC63bAZqG916BwCrsMvQHR58S3wEfzJ3XhVT03gXUAy51QUUooWZ_1IsFQVERW9bMRKTTid5_pSkixWYqJDwVwbC5yoD2uUtZM_mHvESeh7uAdaHvKEY4p1r1CS36eSr9/s1600/Screen+Shot+2013-06-25+at+12.22.18+AM.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="p1">
</div>
<ul>
<li>Sample Test Project on Github</li>
<ul>
<li><a href="https://github.com/flyworld/express-chromeLogger-seed">express-chromeLogger-seed</a></li>
</ul>
</ul>
<div>
<b>Update 06/25 00:40:</b></div>
<div>
<ul>
<li>If you're using <a href="http://expressjs.com/">ExpressJS</a>, you can simple log your error like following error handling middleware</li>
</ul>
<script src="https://gist.github.com/flyworld/66d5ac94916c6ab0a545.js"></script>
<div>
<b>Update 06/25 01:50:</b><br />
<br />
<ul>
<li>After reading the <a href="http://devtoolsecrets.com/">Secret of Browser Developer Tool</a>. I updated ChromeLogger(<a href="https://github.com/flyworld/chromelogger">my forked repo</a>) and express-chrome-logger(<a href="https://github.com/flyworld/express-chrome-logger">my forked repo</a>). Now it supports <b>TABLE display</b></li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuxSKlkhlrWvt-7INlT32RDOTf5dZ0YVq0afdxVMJCU9h8l5gxFxBiibNwgCpLs1j0V0uwE9POcfFIA5EceOB_MSKPqs4AQ6n0cNoCuas4t2ImzyEyxl9eg2N3u7GtGkgpWa-HvGv9HYu5/s1600/Screen+Shot+2013-06-25+at+1.56.35+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuxSKlkhlrWvt-7INlT32RDOTf5dZ0YVq0afdxVMJCU9h8l5gxFxBiibNwgCpLs1j0V0uwE9POcfFIA5EceOB_MSKPqs4AQ6n0cNoCuas4t2ImzyEyxl9eg2N3u7GtGkgpWa-HvGv9HYu5/s640/Screen+Shot+2013-06-25+at+1.56.35+AM.png" width="594" /></a></div>
<div>
Pull requests sent : <a href="https://github.com/ccampbell/chromelogger/pull/24">chromelogger</a> & <a href="https://github.com/olahol/express-chrome-logger/pull/1">express-chrome-logger</a>.</div>
</div>
</div>
<div>
<br /></div>
<div>
Good luck to myself.</div>
<div>
<br /></div>
<div>
<b><br /></b></div>
Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-10987219796258551442013-06-09T18:27:00.001+08:002013-06-09T18:27:28.338+08:00CSS Frameworks<p><strong>CSS Framework List </strong></p>
<ul>
<li>device compatibility</li>
<li>browser compatibility</li>
<li>compiler support</li>
<li>license.</li>
</ul>
<p><a href="http://usablica.github.io/front-end-frameworks/compare.html">http://usablica.github.io/front-end-frameworks/compare.html</a></p>
<p><strong>Wikipedia</strong></p>
<p>Focus on grid system comparison</p>
<p><a href="http://en.wikipedia.org/wiki/CSS_frameworks">http://en.wikipedia.org/wiki/CSS_frameworks</a></p>Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-18667932695694940812013-04-04T19:54:00.000+08:002013-05-31T09:29:52.490+08:00取得中華電信(Hinet)光世代Wifi基地台內的密碼<span style="font-size: 15px; letter-spacing: 1px; line-height: 22px;"><span style="font-family: inherit;">最近申辦了中華電信光世代50M/10M,並且申請了免費附贈的Wifi。</span></span><br />
<span style="font-size: 15px; letter-spacing: 1px; line-height: 22px;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-size: 15px; letter-spacing: 1px; line-height: 22px;"><span style="font-family: inherit;">拿到的機器是D-Link 的<b> WBR-2200</b></span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-A1_1_LOXin4/UV1k8dmF0mI/AAAAAAAAEZo/i5sKDtty-xw/s1600/Screen+Shot+2013-04-04+at+7.32.51+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: inherit;"></span></a></div>
<span style="font-size: 15px; letter-spacing: 1px; line-height: 22px;"><span style="font-family: inherit;"><br /></span></span>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">剛剛參考一些<a href="http://briian.com/?p=4756">網路上的文章</a>,把固定IP申請好,連入基地台,卻發現裡面有一個神祕的帳號:</span><b style="background-color: white; font-size: 15px; letter-spacing: 1px; line-height: 22px;">xxxxxxxx@wifi.hinet.net</b><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<blockquote class="tr_bq">
<br /></blockquote>
<span style="font-size: 15px; letter-spacing: 1px; line-height: 22px;">找了一下<a href="http://www.mobile01.com/topicdetail.php?f=110&t=2317597&p=1">Mobile01</a>,這一組帳號的密碼,居然要打電話自己去跟中華電信要...... orz </span><br />
<span style="font-size: 15px; letter-spacing: 1px; line-height: 22px;">礙於懶得打電話,就只好靠自己來。</span><br />
<span style="font-size: 15px; letter-spacing: 1px; line-height: 22px;"><br /></span>
<span style="font-size: 15px; letter-spacing: 1px; line-height: 22px;">我用的是<b>谷歌(Chrome)</b>瀏覽器,對這密碼欄位點選<b>右鍵(Right Click)</b> 然後選<b>檢查元素(Inspect Element)。</b></span><br />
<span style="font-size: 15px; letter-spacing: 1px; line-height: 22px;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
然後就... 嗯<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<b>我想這個號碼<strike>應該可能大概不</strike>是那個密碼,就把它複製下來試試看,</b><br />
<b><br /></b>
<b>接下來... 如有雷同純屬巧合。</b><br />
<b><br /></b>
<b>謝謝。</b><br />
<br />
<br />
<br />
<br />
<br />
<i style="color: blue; font-size: 15px; letter-spacing: 1px; line-height: 22px;"><span style="font-family: inherit;">以上僅於Hinet(中華電信)光世代附贈的家用Wi-Fi機器WBR-2200<b><strike>可能</strike></b>適用</span></i>Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-73396306690055722882013-03-14T12:21:00.002+08:002013-03-24T14:41:51.358+08:00Google Reader will not be available ?!??!Got this message this morning ...<br />
<br />
<b>"Google Reader will not be available after July 1, 2013"</b><br />
<br />
<a href="http://support.google.com/reader/answer/3028851?hl=en&uls=en">http://support.google.com/reader/answer/3028851?hl=en&uls=en</a><br />
<br />
<br />
The best alternative so far is Feedly... trying now<br />
<a href="http://blog.feedly.com/2013/03/14/google-reader/">http://blog.feedly.com/2013/03/14/google-reader/</a>Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-16427530826121600872013-02-23T11:42:00.001+08:002013-03-24T14:41:35.547+08:00成功的層級<div style="text-align: left;">
<span style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;"><span style="font-size: 13px; line-height: 17px;">今天重新拜讀了Seth Godin的成功的層級<span style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;"> (The hierarchy of success) </span>一文</span></span></div>
<div style="text-align: left;">
<span style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;"><span style="font-size: 13px; line-height: 17px;">其中提到的層級如下</span></span></div>
<span style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;">1.態度(Attitude)</span><br style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;" /><span style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;">2.研擬方案(Approach)</span><br style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;" /><span style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;">3.設定目標(Goals)</span><br style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;" /><span style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;">4.策略(Strategy)</span><br style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;" /><span style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;">5.戰術(Tactics)</span><br style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;" /><span style="color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-align: left;">6.執行(Execution)</span><br />
<br />
每一個"成功",不管是長短期或是不同的職位,都是環環相扣的,每當需要做出決定時,都應該全面去檢視自己的狀況。<br />
<br />常見的例子,像是因為執行上的一些困難,工程師不願意和設計師多做溝通。<br />
或是老闆想要的目標是X,但是策略與戰術的人卻沒有良好的溝通。<br />
這些 都會讓所謂的成功,充滿的風險。<br />
不可不慎。<br />
<br />
Reference:<br />
<a href="http://sethgodin.typepad.com/seths_blog/2009/09/the-hierarchy-of-success.html">http://sethgodin.typepad.com/seths_blog/2009/09/the-hierarchy-of-success.html</a>Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-38798702588715537782012-12-06T15:27:00.000+08:002012-12-06T15:27:33.830+08:00[iOS] Get current location and city name<br />
1. Add <strong>CoreLocation.framework</strong> to your project<br />
<br />
2. Add <b>CLLocationManagerDelegate</b> to your <u>viewController</u><br />
<br />
3. Initialize <strong>CLLocationManager</strong> in viewDidLoad<br />
<br />
4. Get current location in the delegate method <br />
<span class="p" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;"><b>- </b>(</span><span class="kt" style="color: #445588; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-weight: bold; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">void</span><span class="p" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">)</span><span class="nf" style="color: #990000; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-weight: bold; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">locationManager:</span><span class="p" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">(</span><span class="n" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">CLLocationManager</span><span class="o" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-weight: bold; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">*</span><span class="p" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">)</span><span class="nv" style="color: teal; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">manager</span><span class="nf" style="color: #990000; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-weight: bold; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">didUpdateLocations:</span><span class="p" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">(</span><span class="n" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">NSArray</span><span class="o" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; font-weight: bold; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">*</span><span class="p" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">)</span><span class="nv" style="color: teal; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 16.78333282470703px; margin: 0px; padding: 0px; white-space: pre;">locations;</span><br />
<div style="text-align: left;">
<br />
5. Use <b>CLGeocoder</b> to reverseGeocodeLocation<br />
<br />
<script src="https://gist.github.com/4222448.js?file=myViewController.m"></script>
Full Code <a href="https://gist.github.com/4222448">here</a></div>
Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-68068534297271649822012-11-08T15:54:00.001+08:002012-11-08T15:54:33.618+08:00My Mac App List V1.1<div><span style="font-family: Times;">更新了一下軟體列表,請參考。有*的是要付費才能好好使用的。</span></div>
<ul style="font-family: Times;">
<li>生產力軟體(Productivity)</li>
<ul>
<li><a href="http://www.irradiatedsoftware.com/sizeup/">SizeUp</a>:多視窗管理,很方便 (免費使用,會跳Demo視窗,但不礙事)</li>
<li><a href="http://mouapp.com/">Mou</a>:Markdown 即時預覽編輯器</li>
<li><a href="http://itunes.apple.com/us/app/dash-docs-snippets/id458034879?mt=12">Dash</a>*:快速Snippets與文件查詢工具 (2012之後會一直叫你花NT300買不然就會一直干擾…請謹慎)</li>
</ul>
<li>瀏覽器(Browser)</li>
<ul>
<li>Firefox </li>
<li>Chrome</li>
<li><a href="https://tools.google.com/dlpage/chromesxs">Chrome Canary</a> : For Web Developer Only, power new future chrome</li>
</ul>
<li>儲存(Storage)</li>
<ul>
<li><a href="https://www.dropbox.com/home">Dropbox</a> : Best Cloud File Storage</li>
<li><a href="https://skydrive.live.com/">SkyDrive</a>:Microsoft <span style="font-family: Times;">Cloud File Storage </span>因為有之前活動獲得的25G,所以還是用一下。</li>
<li><a href="https://drive.google.com/start">Google Drive</a> : Google<span style="font-family: Times;"> </span><span style="font-family: Times;">Cloud File Storage</span></li>
</ul>
<li>開發與編輯器(Development & Editor)</li>
<ul>
<li><a href="http://www.sublimetext.com/">Sublime Text</a>:我最愛的純文字編輯器,設定可以<a href="http://blog.flyworld.me/2012/03/my-sublime-text-2-on-windows-7-64bit.html">參考這篇</a></li>
<li><a href="http://www.syntevo.com/smartgit/index.html">SmartGit</a>:目前覺得最好用的Git Client (SourceTree把我repo搞爛過...)</li>
<li><a href="http://evernote.com/">Evernote</a> : 日常生活必備的筆記App</li>
<li><a href="http://ditchnet.org/httpclient/">HTTP Client</a>* : 視覺模擬HTTP Request用</li>
<li>XCode:iOS Development</li>
</ul>
<li>網路與多媒體(Network & Mutimedia)</li>
<ul>
<li><a href="http://www.haozhaopian.com/">好照片</a>:方便的照片特效處理軟體</li>
<li><a href="http://firealpaca.com/">FireAlpaca</a> : 免費的圖像編輯軟體</li>
<li><a href="http://skitch.com/">Skitch</a>:螢幕截圖軟體,附上基本畫筆可以標記</li>
<li><a href="http://tw.kkbox.com/">KKBox</a>* : 到處聽音樂,不用下載占空間 (支持台灣軟體發展!高雄Oh~Ya)</li>
<li><a href="http://www.videolan.org/vlc/">VLC Player</a> : 目前找到最通用的Video Player </li>
<li><a href="http://handbrake.fr/">HandBrake</a> : 步驟很簡單的影片轉檔軟體</li>
<li><a href="http://www.igetter.net/index.html">iGetter</a> : 續傳軟體</li>
</ul>
<li>終端機相關(Terminal)</li>
<ul>
<li><a href="http://itunes.apple.com/us/app/go2shell/id445770608?mt=12">Go2Shell</a>:可以直接在Finder上開啟該目錄的Terminal</li>
<li><a href="http://www.iterm2.com/">iTerm2</a>:加強版Terminal,自動完成/畫面切割對於CLI愛好者很適合</li>
</ul>
<li>社交軟體(Social)</li>
<ul>
<li><a href="http://www.tweetdeck.com/">TweetDeck</a>:Twitter Client, 管理多帳號的時候很方便(我還有jsdc.tw的帳號...)</li>
<li><a href="http://www.skype.com">Skype</a> : 微軟沒了MSN,只剩下他了</li>
<li><a href="http://line.naver.jp/">Line</a> : 目前最夯的即時通訊App</li>
</ul>
<li>系統軟體</li>
<ul>
<li><a href="http://www.alfredapp.com/">Alfred</a>:好用的快速啟動工具(比Spotlight強大一些 )</li>
<li><a href="http://www.freemacsoft.net/appcleaner/">AppCleaner</a>:自動掃描並乾淨刪除軟體的工具</li>
<li><a href="http://www.piriform.com/CCLEANER">CCleaner</a>:非常棒的系統清理軟體,會針對安裝的一些軟體清除暫存檔案,PC/MAC都有支援。</li>
<li><a href="http://www.grandtotal.biz/CheatSheet/">CheatSheet</a>:按下 <span style="background-color: #eeeeee; font-size: 12px; font-family: 'lucida grande', verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;">⌘ </span>幾秒就可以show出該軟體支援的快捷鍵</li>
<li><a href="http://www.coconut-flavour.com/">coconutBattery</a>:電池狀態顯示軟體</li>
<li><a href="http://www.clockwise.ee/gasmask/">Gas Mask</a> : 快速切換不同Hosts檔的好工具</li>
<li><a href="http://www.omnigroup.com/products/omnidisksweeper/">OmniDiskSweeper</a>:磁碟剩餘空間掃描軟體,可找出佔用最大空間的資料夾或檔案</li>
<li><a href="http://synergy-foss.org/">Synergy</a>:跨系統多螢幕作業軟體,多台電腦適用</li>
<li>Yahoo! KeyKey:中文輸入法</li>
<li><a href="http://www.ntfsmounter.com/">ntfsMounter</a>:多系統者必備, 掛載NTFS專用</li>
<li><a href="http://www.trankynam.com/xtrafinder/">XtraFinder</a> : Finder 加強工具,支持多Tab/ 快速開啟Terminal/ 垂直對照等功能</li>
</ul>
</ul>Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-4746645726967121752012-10-27T03:11:00.000+08:002013-03-24T14:42:36.383+08:00看Steve Jobs - The Lost Interview 後感因為週末實在太忙,下週又都排滿了,所以就很趕時髦的,在這部電影上映的今天就去看了。<br />
結果… 不得不讓我再次覺得,Steve Jobs 真的是非常非常厲害。<br />
(以下有部分電影內容 不喜者請勿繼續看)<br />
<br />
--------------------------------------------------------------------------------------------------------------------<br />
Steve Jobs 在受訪時,顯得有點緊張,<strong style="font-size: 15px;">當時是1995年</strong>(隔年NeXT才被Apple買下),其中很多他的觀點,在現今的公司(不管是大企業或是新創公司)都可以作為參考。<br />
以下,就以我理解的話來闡述這些觀點,如果有什麼問題,歡迎指教。<br />
<br />
<blockquote>
<strong>行銷跟業務只有在非獨佔性的事業(像是可樂公司)會領導整個企業,因為產品本身沒有更新的很快,在這部份著手才是上策,但科技業並不是這樣。</strong></blockquote>
如果有些公司要copy國外的點子來做,卻將重點放在技術研發,那只能說,失敗率會很高,因為放錯重點...<br />
獨佔性的企業不見得是大公司,可能只是一個小點子但沒人做(出來),或者是擁有特定的技術與架構的科技。執行面上,我相當認同EZTABLE CEO所說的,<a href="http://www.hey-ac.com/5/post/2012/10/precious.html">專注在產品細節</a>。<br />
<br />
<blockquote>
<strong>很多人認為好的點子就占了90%,但實際上執行是非常重要的。<br />頂尖的點子跟頂尖的產品之間,有著頂尖的技術。點子會在開發(執行)的過程中逐漸進化,並且變的更好;<br />所以必須雇用A咖,這些頂尖人才,會互相激勵,有時候還會爭論,吵架;但這對團隊目標是好的。</strong><br />
<strong>但這些A咖是最難管理的,所以他們需要一個領導者(就是講Steve Jobs自己)</strong></blockquote>
要好管的A咖是絕對不可能的,訪問者也提到Apple中一堆跟隨Steve Jobs的人後來都跑了XDDDD <span style="text-decoration: underline;">一個好的軟體公司,就一定會希望建立好的文化,帶起整個團隊的正向循環,從不斷的嘗試與失敗中,做出最好的產品</span>。只是很常見的是用錯了人,只懂得執行或者沒有辦法在細節上琢磨思考,最後只為了遵循原本粗略的規格與規範,反而被限制,無法在產品中真正的去帶給使用者想要傳遞的價值。<br />
<br />
時常有人認為Steve Jobs是獨裁者,但在影片中他不斷強調,<b><u>公司是員工的不是老闆的</u></b>。回家路上,我想起前幾天看到很喜歡的一篇文章:<a href="http://woundero.wordpress.com/2012/10/25/team-and-hero/">為什麼我們常愛說外國人「個人英雄主義」,但又常說「外國人比臺灣人懂得團隊合作」</a>。<br />
<br />
我們可以說,Steve Jobs是一個擁有強勢領導到風格的領導者。<u>他樂於受到團隊成員的遲疑,不妥協的團員對他而言是助力,不是阻力。他也很能夠直來直往的與團員們溝通,甚至進而說服自己的團員讓彼此一起往同一個方向走</u>,是很正確的作法。訪談中,Steve Jobs認為:<b>"真正的頂尖人才,是不需要去呵護(Baby Care)他們的自尊心"</b>。只有暢所欲言的領導人,才有暢所欲言的團隊成員。<br />
<br />
上面那篇文章中,所提到台灣的產業中,有著"<span style="background-color: white; color: #444444; font-family: Georgia, Cambria, 'Palatino Linotype', serif; font-size: 15px; line-height: 25px;"><i>一群不敢發問,大家沉默,排擠跳出來思考、發問的人,一群冷漠的寒蟬便形成了妥協而安靜的團隊",</i></span>問題可能不只是台灣的教育教出不發問的小孩,<b>而是團隊領導者沒有辦法接受不妥協</b>(原因?顧慮團員面子/太愛面子/官僚保位/思考紊亂/脾氣不好/...自行想像)。最終下場都是採取高壓政策,請下面的人閉嘴。這樣的團隊,甭說是好產品,可能連產品都還沒做出來就被終止了。<br />
<br />
<blockquote>
<strong>產品的內容(Content)遠比程序(Process)來的重要,真正的靈魂是內容,不是那些程序。</strong></blockquote>
這跟前一陣子XDiteㄉㄉ寫的文章 <a href="http://blog.xdite.net/posts/2012/10/07/maybe-you-should-listen-what-your-rd-said/">也許你該停下來聽聽工程師怎麼說</a> 不謀而合。常見的像是一個只懂得管理進度不在乎內容文化的Project Manager,就很有可能搞爛一整個產品。<br />
當然,反過來說,R&D懂得的內容,也不能僅止於技術部分,而是將需求/人性等納入考量,並以技術的邏輯實現。最後,將文化帶入產品,讓使用者親身感受到。(再次呼應上面,A咖才做的到這些)<br />
<br />
<blockquote>
<strong>真正的懂得內容的人,也才能將產品所需的成本給估算清楚。</strong></blockquote>
有些主管or老闆認為,R&D只是資產,今天寫了這些Code能動就好,不要太在乎架構,進度比較重要。<br />
<br />
過一陣子,換了一批新的<del>肝</del>R&D,所花費的維護成本卻高的嚇人,這也是理所當然的,因為前人考量的少,後人就多花點功砍掉重練再加再改。這些成本,都是隱性的,只有從內容的角度去了解,才不會傻傻的花費額外的時間精力,最終導致產品失敗或錯失良機。<br />
<br />
<blockquote>
<strong>Programming將在未來十年大行其道,每個人都該寫程式。</strong><br />
<strong>寫程式這件事情是訓練人們的釐清自己的思考。人們寫程式是因為想分享他們的感覺,想用這個工具創造出自己的世界。</strong></blockquote>
1995年的Steve Jobs… 預言了2012年的<a href="http://www.codeyear.com/"> Code Year</a> 這趨勢正夯。訪問中也提到了他對未來十年的看法,當時Jobs非常看好網路的發展,認為不管是印表機還是個人電腦都會因為網路而讓整個產業大變動。他還順便裱了一下Micro$oft,說還好網路技術不是被這個<em>不會創新</em>的公司所擁有。最後,他甚至預言,網路會成為未來社交的重要媒介。<br />
<br />
今天,2012年,事實證明,Facebook/Twitter,<br />
到後來Apple的 Air Print 都仍然是在他的視野內發展,真的不得不佩服他的先知灼見。<br />
<br />
<br />
順手打打心得居然三點多了… 剩下想到再補上…Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-13820685066854128262012-10-25T17:33:00.002+08:002012-11-26T10:43:35.210+08:00Update Enterprise Apps for iOS Devices only ONE TAP ! (faster OTA)We all know that Apple provides a <a href="http://help.apple.com/iosdeployment-apps/mac/1.1/#app43ad871e">easy way</a> (OTA - Over The Air) to distribute your in-house application through a simple web link like following.<br />
<blockquote>
<span style="color: #555555; font-family: Courier, 'Courier New', monospace; font-size: 12px; line-height: 18px;"><a href="itms-services://?action=download-manifest&url=http://example.com/
manifest.plist">Install App</a> </span></blockquote>
Sure, we can use the same way to update the app. That means we have to send a email or url to our device owner, then they can click it. But in my case, we serve some people who are very busy. Thus we need a faster to update the app.<br />
<br />
<span style="font-size: large;"><b>Usage : </b></span><br />
Simply One Tap on the <strong>AutoUpdate Icon</strong><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidA71gv4jsfAtcTOfBT4CHiHv_a1-yvQV0JaN_XFJfYp-GUqtE_GHCmbibWi77re8XyIigSWCCurzsfH4p-jdfmJPOU-gHSWB41y3DQfcI2AnbyQaFX8WN3eUk9oB7MoM0E5kQNUnyzPv6/s1600/p1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidA71gv4jsfAtcTOfBT4CHiHv_a1-yvQV0JaN_XFJfYp-GUqtE_GHCmbibWi77re8XyIigSWCCurzsfH4p-jdfmJPOU-gHSWB41y3DQfcI2AnbyQaFX8WN3eUk9oB7MoM0E5kQNUnyzPv6/s1600/p1.png" /></a></div>
<strong><br /></strong>
<br />
Then the browser will show up and ask you to update the app<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfMCM2i88jJMeVZhV-NhKdZhFuHorytFKtNI5hN0HSNlne6Hlw50ypV5wU_hFAbzadUTWtGvGlOWe6uU77euE-mg1CG5DQDw37Ht09XPQo3Uw03_DpLixMNFF_Ed6z1VqjZOIy7fzIhkDA/s1600/p2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfMCM2i88jJMeVZhV-NhKdZhFuHorytFKtNI5hN0HSNlne6Hlw50ypV5wU_hFAbzadUTWtGvGlOWe6uU77euE-mg1CG5DQDw37Ht09XPQo3Uw03_DpLixMNFF_Ed6z1VqjZOIy7fzIhkDA/s640/p2.PNG" width="640" /></a></div>
<br />
<br />
<b><span style="font-size: large;">How to : </span></b><br />
1. Create a html file with following code<br />
<br />
<script src="https://gist.github.com/3951519.js?file=ota-test.html"></script>
2. Add it to the home screen.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT0jg9AH4ejiaoHIsONp8ZYaN7KDhedyrOVluTx4rmKcHxqTRPdBmul3lGjNPqsKx5cZkFn6DK-hEgmCxWakDvJ8RSt13xxT8RtP336YHdITpvzbPWRlDBtcifK3AANJdc_3qVsLEjLX8R/s1600/p3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT0jg9AH4ejiaoHIsONp8ZYaN7KDhedyrOVluTx4rmKcHxqTRPdBmul3lGjNPqsKx5cZkFn6DK-hEgmCxWakDvJ8RSt13xxT8RtP336YHdITpvzbPWRlDBtcifK3AANJdc_3qVsLEjLX8R/s320/p3.png" width="224" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Remember to update the <a href="http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html" target="_blank">apple-touch-icon</a> link </div>
<br />
<b><span style="font-size: large;">Demo:</span></b><br />
Use you iOS device browser : <a href="http://goo.gl/HNJuV">http://goo.gl/HNJuV</a><br />
<br />
<b><span style="font-size: large;">Download:</span></b><br />
<a href="https://dl.dropbox.com/u/15540367/Forever/ota-test.zip">ota-test.zip</a> - This zip include the sample app-touch-icon, sample-plist, and sample html.<br />
<br />
<br />
<br />
<b><br /></b>
<br />
<br />Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-40193166480881856562012-10-24T17:47:00.001+08:002012-10-27T02:45:47.265+08:00推薦 XCode Plug-in - ColorSense + CodePilot<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4k2lmeB8tK_24sj7NgeoyAu-qwsy9eNuCvrRp4xYt300LG75F4jbvfSMyxuTHAPRaT8OCuR8VI-a-59PKxnrabD9bfCKpFcJLy0jcFo-NLnzi1mHrr6VYRZtM3j02giE-nSBaO-o7DOc0/s1600/new_hero20110308.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4k2lmeB8tK_24sj7NgeoyAu-qwsy9eNuCvrRp4xYt300LG75F4jbvfSMyxuTHAPRaT8OCuR8VI-a-59PKxnrabD9bfCKpFcJLy0jcFo-NLnzi1mHrr6VYRZtM3j02giE-nSBaO-o7DOc0/s1600/new_hero20110308.jpeg" /></a></div>
<br />
以目前來說,iOS的Developer大部分都還是使用XCode來做為主要的開發工具。<br />
但只要用過就知道,XCode充滿了許多神祕的問題:<br />
<ul>
<li>XCode WTF <a href="http://xcodewtf.tumblr.com/">http://xcodewtf.tumblr.com/</a> </li>
<li>Text from XCode <a href="http://www.textfromxcode.com/">http://www.textfromxcode.com/</a></li>
<li>@wtfxcode <a href="https://twitter.com/wtfxcode">https://twitter.com/wtfxcode</a> </li>
</ul>
<div>
嗯… 其實XCode真的很需要釋出開發Plug-in的API,就算有<a href="http://stackoverflow.com/questions/6316921/xcode-4-plugin-development">廣大的回響</a>,官方目前似乎對於這件事情還是<a href="http://openradar.appspot.com/8622025">沒有什麼反應</a>。</div>
<div>
一山還有一山高還是有很多高手,弄出了一些好用的Plug-In,也就是今天要介紹的內容。</div>
<div>
</div>
<h3>
第一套:ColorSense </h3>
<strong>說明</strong><br />
一般我們在Objective-C裡面,時常會使用到UIColor,不過每次都要請視覺設計師大大給或是自己去找詳細的RGBA實在很麻煩。加入這個Plug-In,一個正常的UIColor Syntax(例如: [UIColor redColor]) 上面就會出現色塊,點擊之後就會出現Mac OS X的Color Panel供選擇,非常方便。<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv5zyyVOROExtIXbvbWUzuUr44fBHr2zpIfibJhWl6XXuIx33pniWtlQ4VevvzaiQ99ue6Az0pbx_gvCWCTGa4AEHTpOXQLhR-qAMftvQ-88hpOBB3oSGYsmLUkfz-NrfMYaYarjkW2kcx/s1600/cs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="344" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv5zyyVOROExtIXbvbWUzuUr44fBHr2zpIfibJhWl6XXuIx33pniWtlQ4VevvzaiQ99ue6Az0pbx_gvCWCTGa4AEHTpOXQLhR-qAMftvQ-88hpOBB3oSGYsmLUkfz-NrfMYaYarjkW2kcx/s640/cs.png" width="640" /></a></div>
<br />
上面是我自己的螢幕截圖,身為一個Web Developer,我另外裝了<a href="http://wafflesoftware.net/hexpicker/">Hex Color Picker</a>,使得我的Color Panel還可以得到Hex值。<br />
<strong>安裝方式:</strong><br />
<ol>
<li>到官方的Git Repo,下載整個Project (git clone)</li>
<li>用XCode開啟ColorSense專案</li>
<li>Build ColorSense專案</li>
<li>重啟XCode</li>
</ol>
<div>
這樣就完成了!!</div>
<div>
</div>
<strong>官方網址(Git Repo) </strong><br />
<a href="https://github.com/omz/ColorSense-for-Xcode">https://github.com/omz/ColorSense-for-Xcode</a><br />
<h3>
第二套:CodePilot</h3>
<strong>說明</strong><br />
<strong></strong>XCode有自己的一套檔案管理方式,並不是按照實際的資料夾排列,而是使用群組的觀念,讓檔案在開發環境中看起來是整齊的。但是開發久了專案大了,或是加了很多其他Library,還是難免會有找不到檔案的情形。一直都很希望XCode可以像是<a href="http://www.sublimetext.com/2">Sublime Text 2</a> 或是 <a href="http://www.alfredapp.com/">Alfred</a> 一樣有個快速簡便的尋找檔案方式。於是我找到了CodePilot 這個Plug-in。<br />
<span id="goog_334522430"></span><span id="goog_334522431"></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ6Ond0vgOB9HnhQKpDywkzh7WpxebIIfHrwaaPRHpn8hQ0LBu4VyeGOEmuOvIqOFBeNqnUsUwxeRravgOU1JjXA7t5Ckc1xyGTvdaBE1CHba1tD3oIWo9-0WFF8maJ8DSYyxdg_dz-9tC/s1600/cp.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ6Ond0vgOB9HnhQKpDywkzh7WpxebIIfHrwaaPRHpn8hQ0LBu4VyeGOEmuOvIqOFBeNqnUsUwxeRravgOU1JjXA7t5Ckc1xyGTvdaBE1CHba1tD3oIWo9-0WFF8maJ8DSYyxdg_dz-9tC/s320/cp.jpg" width="320" /></a></div>
<br />
以上是截圖。<br />
<strong>安裝方式</strong><br />
<ol>
<li>將下載下來的檔案解壓</li>
<li>把 CodePilot2.xcplugin 放到 "~/Library/Developer/Xcode/Third-Party Plug-ins" (目前我是使用App Store抓下來的Xcode 4.5.1)</li>
<li>重啟XCode</li>
</ol>
<div>
啟動的快捷健是Shift + Command + X (<img alt="" height="12" src="http://www.danrodney.com/mac/img/menusym-shift.gif" style="-webkit-text-size-adjust: none; font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Helvetica Neue', Helvetica, sans-serif; font: inherit; line-height: 14px; margin: 0px; padding: 0px; text-align: right; vertical-align: baseline;" width="12" /><img alt="" height="12" src="http://www.danrodney.com/mac/img/menusym-command.gif" style="-webkit-text-size-adjust: none; font-family: 'Lucida Sans Unicode', 'Lucida Grande', 'Helvetica Neue', Helvetica, sans-serif; font: inherit; line-height: 14px; margin: 0px 0px -2px; padding: 0px; text-align: right; vertical-align: baseline;" width="12" />X)</div>
<div>
是不是很好找呢~?</div>
<div>
</div>
<strong>官方網址</strong><br />
<a href="http://codepilot.cc/">http://codepilot.cc/</a>Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-77653307182070356682012-10-03T16:21:00.001+08:002012-10-03T16:21:55.138+08:00[iOS] 在ViewController 之間傳值在iOS的開發中,我們經常會使用ViewController來控制每一個畫面的行為,<br />
剛開始的時候最常遇到的問題就是<br />
<b><br /></b>
<br />
<blockquote class="tr_bq">
<b>"怎麼在兩個ViewController之間傳遞資訊"</b></blockquote>
這篇文章中我列出了幾種常見的方法,提供給大家做參考。<br />
<br />
<b><span style="font-size: large;">1. 透過實體(Instance)傳遞資訊</span></b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcBOhVDYDntzf9-lK382Fq6jBRehl314kS4e4MBl0Pj7iV9sIGRtqTgP-8Ov75LWUHDJbvCUBFLXbJFqzXxDY9tFkAFQ8LSPmyZ-cPT1-9zuvdp8uahyphenhyphenLAh3vrN1hJ5CsRV7vGu6G2KbxZ/s1600/blog1-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="307" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcBOhVDYDntzf9-lK382Fq6jBRehl314kS4e4MBl0Pj7iV9sIGRtqTgP-8Ov75LWUHDJbvCUBFLXbJFqzXxDY9tFkAFQ8LSPmyZ-cPT1-9zuvdp8uahyphenhyphenLAh3vrN1hJ5CsRV7vGu6G2KbxZ/s640/blog1-1.png" width="640" /></a></div>
我們都知道,每一個ViewController 的類別(Class),不管是用Storyboard還是Nib的方式,都要先初始化(alloc + init),然後再透過這些<b>實體(Instance)</b>物件做操作。所以,要在彼此之間傳遞資訊,必須要取得這些<b>實體</b>。<br />
<br />
如果傳遞的資訊比較簡單,或是傳遞資訊的動作只有一次的時候,透過物件的實體是比較簡單的方式<br />
<h4>
範例A: 透過 Nib 的方式,取得ViewController2 的實體,傳遞資訊,指定user的值</h4>
<br />
<script src="https://gist.github.com/3825488.js?file=ViewController1.m"></script>
<br />
<h4>
範例B:在StoryBoard中,透過Segue 取得的實體,傳遞資訊,指定user的值</h4>
<br />
<script src="https://gist.github.com/3825531.js?file=ViewController1.m"></script>
<span style="font-size: large;"><b>2.透過單例(Singleton)物件傳遞</b></span><br />
透過物件的實體來傳遞固然很方便,但是很多時候,資訊的共享並不只存在於兩個ViewController之間,例如這個應用程式的作者資訊、目前登入者的暫存資料等等,應該是在一個共通的地方,每個人都是去同一個地方存取共通的資訊。這時我們就可以透過Singleton的方式,讓資訊傳遞更簡單。<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuHGE2cyp-Vnd-Jz9FzbQjbsK-uywInxb8PsT9tVgDpKNCyvqHSwSkEerhyV-W_oSDypX3jK7STvaeOBdPYaL7o8RTdxqkdoztsGfADTqSiL6Ju_LPLQ7o9R69r9w1QyXdor4BjN_I44Eo/s1600/blog2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="468" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuHGE2cyp-Vnd-Jz9FzbQjbsK-uywInxb8PsT9tVgDpKNCyvqHSwSkEerhyV-W_oSDypX3jK7STvaeOBdPYaL7o8RTdxqkdoztsGfADTqSiL6Ju_LPLQ7o9R69r9w1QyXdor4BjN_I44Eo/s640/blog2.png" width="640" /></a></div>
<br />
以下是範例程式碼<br />
<br />
<script src="https://gist.github.com/3825767.js"> </script>
Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-62545789063533700542012-09-26T18:10:00.003+08:002012-09-26T18:12:02.135+08:00My Sublime Text 2 Plug-in V2<a href="http://www.sublimetext.com/" target="_blank">Sublime Text 2</a> is one of my favorite plain text editor. It supports hundred of plugin(still growthing) with highly productivity features.<br />
<br />
I have listed my plugin on Windows 7 64bit in previous <a href="http://blog.flyworld.me/2012/03/my-sublime-text-2-on-windows-7-64bit.html" target="_blank">post</a>. This is the updated version of my<a href="http://blog.flyworld.me/2012/08/mac-app-widget-configure.html" target="_blank"> MacBook Air</a>.<br />
<br />
<b><span style="font-size: large;">Productivity</span></b><br />
<br />
<ul>
<li><b>SublimeLinter</b></li>
<ul>
<li>automatically show potential error of code after saving </li>
</ul>
<li><b>Http Requester</b></li>
<ul>
<li>Direct request url on new tab</li>
<li>[Cmd] + [Option] + [R]</li>
</ul>
<li><b>LiveReload</b></li>
<ul>
<li>reload web page directly after saving (need browser extension)</li>
</ul>
<li><b>DocBlockr</b></li>
<ul>
<li>Doc block generator </li>
<li>[Tab]</li>
</ul>
<li><b>AdvancedNewFile</b></li>
<ul>
<li>Quick folder/file creator, even with path.</li>
<li>[Cmd] + [Option] + [N]</li>
</ul>
<li><b>All Autocomplete</b></li>
<ul>
<li>Enable all opened file complete</li>
<li>[Tab]</li>
</ul>
<li>Gist</li>
<li>Terminal</li>
<li>SublimeCodeIntel</li>
<li>ZenCoding</li>
</ul>
<br />
<b><span style="font-size: large;">Code Operation (Align, format, encode)</span></b><br />
<br />
<ul>
<li>Alignment</li>
<li><b>EncodingHelper</b></li>
<ul>
<li>Enable reopen file in different encoding</li>
</ul>
<li>HtmlTidy</li>
<li>Indent XML</li>
<li>JsFormat</li>
<li><b>Prefixr</b></li>
<ul>
<li>Useful css formatter with prefix complete feature</li>
<li>[Ctrl] + [Cmd] + [X]</li>
</ul>
<li>SideBarEnhancements</li>
<li>SmartMarkdown</li>
<li>Sublime-HTMLPrettify</li>
</ul>
<br />
<b><span style="font-size: large;">Syntax & Snippets</span></b><br />
<br />
<ul>
<li>CSS Snippets</li>
<li>EJS</li>
<li>HTML5</li>
<li>Jade</li>
<li>jQuery</li>
<li>jQuery Snippets pack</li>
<li>jQuery Mobile Snippets</li>
<li>LESS</li>
<li>Plist Binary</li>
<li>Stylus</li>
</ul>
Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-7971251430762524432012-09-22T02:36:00.000+08:002012-09-22T02:36:03.532+08:00Simple one-step web(http) Server <div>
<br /></div>
<div>
We all know Mac OS has a powerful sharing feature called AirDrop, but it too simple to share to multiple users. Sometimes we really need a simple web server for sharing our static resource, For instance, HTML file, simple folder, or some multimedia files.</div>
<div>
<br /></div>
<div>
<b> </b></div>
<div>
We can use Python on Ubuntu...</div>
<div>
<span style="color: blue;">Python</span></div>
<div>
<b>Usage : </b></div>
<blockquote class="tr_bq">
$ python -m SimpleHTTPServer [port]</blockquote>
<div>
<br />
And I have to work under Micro$oft Windows sometimes...<br />
<span style="color: blue;">F5 </span><br />
<a href="http://www.getf5.com/">http://www.getf5.com/</a><br />
<br />
<b>Install : </b><br />
<blockquote class="tr_bq">
Download the F5 application</blockquote>
<b>Usage : </b><br />
<blockquote class="tr_bq">
Simply drag your folder or file into the application, it will shows the browsable URL.</blockquote>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
But i prefer nodejs based...</div>
<div>
<span style="color: blue;">NodeJS </span></div>
<div>
<b>Simple http server</b></div>
<div>
<a href="https://github.com/andrewpthorp/simple-http-server">https://github.com/andrewpthorp/simple-http-server</a></div>
<div>
<br /></div>
<div>
<b>Install : </b></div>
<blockquote class="tr_bq">
$ npm install simple-http-server -g</blockquote>
<div>
<b>Usage : </b></div>
<blockquote class="tr_bq">
$ nserver</blockquote>
<br />
<br />Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-74174160393932186772012-09-13T02:12:00.001+08:002012-09-13T02:12:45.900+08:00Apple 0912 發表重點<br />
<ul>
<li>iPhone 5</li>
<ul>
<li>A6 晶片處理器</li>
<li>更輕 更薄 (~20%) 雙色 防滑</li>
<li>四吋螢幕 : 326ppi (跟4s一樣) Retina Display<br />>> 據聞電池效能也變好了... 希望不要跟The new ipad 一樣熱呼呼又耗電很快<br />>> 後來有說電池效能比iphone 4s好一點點</li>
<li>1136*640 解析度 </li>
<li>變長了,多一排App<br />>> 長一點 應該可以顯示更多資訊 --> 據說開發者可以很輕易的轉換上去(?)</li>
<li>LTE ...<br />>> 台灣悲劇了 ... 種花電信... 趕不上時代的政府與公家單位</li>
<li>8百萬像素相機 (3264*2448),低光源,<b>分享Photo Stream(ios6)</b>,光圈f2.4</li>
<li>全景照片:兩千八百萬象素(28 megapixel)</li>
<li>1080p 攝影(可以邊錄影邊照)<br />>> 看來這一次真的完全超越一般小相機了</li>
<li>新的雙面插頭(8pin) Lightning<br />>> 以前的都不能用了?(可以... 會給你轉接頭=_=)</li>
<li><b><span style="color: blue;">沒有NFC,無線充電</span></b></li>
</ul>
</ul>
<br /><div>
<b><span style="font-size: large;">價錢:$199, $299, $399鎂</span></b></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
台灣一樣第三波國家....</div>
<div>
<br /></div>
<div>
<ul>
<li>iOS 6 (很多老梗...)</li>
<ul>
<li>Apple 地圖 - Yelp, 3D地圖</li>
<li>iCloud Tab - Mountain Lion 也有</li>
<li>Passbook </li>
<li>Siri - 更生活化 人性化 </li>
<li><b>日期:Sep. 19</b></li>
<li>版本:ipad 2+ , ipod 4g+, iphone3gs+</li>
</ul>
<li>iPod + iTunes</li>
<ul>
<li>新介面</li>
<li>FB結合</li>
</ul>
</ul>
</div>
<br />
<br />Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-62754822197727907992012-09-07T13:03:00.000+08:002012-09-07T13:09:10.699+08:00iOS Developer Enterprise Program How To<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5-a3eaN4mUJJu7VQVL4dj-aVPwjzQWkQLMIvFeR_Ngk0XUllZkyhGBUfbepUDQX1HSSAKiTNyVKb144BKFwXC4tGgb4qgzOv3CRymsAmORgF82RA5t__Tca5wYsFYGTZpAIzWxta-e_fl/s1600/shaking_hands.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5-a3eaN4mUJJu7VQVL4dj-aVPwjzQWkQLMIvFeR_Ngk0XUllZkyhGBUfbepUDQX1HSSAKiTNyVKb144BKFwXC4tGgb4qgzOv3CRymsAmORgF82RA5t__Tca5wYsFYGTZpAIzWxta-e_fl/s320/shaking_hands.png" width="214" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Following are steps add a new developer to your <a href="https://developer.apple.com/programs/ios/enterprise/">iOS Developer Enterprise Program</a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="color: blue;">Blue for Administrator</span> / <span style="color: #38761d;">Green for Developer</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: blue;">1. Add new member </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: #38761d;">2. Request certificate by using Keychain Access</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: blue;">3. Approve request</span></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<span style="color: #38761d;">4. Download and install certificates</span><br />
<span style="color: #38761d;"> Development certificate + WWDR intermediate certificate</span><br />
<div class="separator" style="clear: both; text-align: left;">
<span style="color: blue;">5. Admin create provisioning profile (Wildcard & non-wildcard bundle ID)</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="color: blue;"> Must select new member's name and add devices who can use</span></div>
<span style="color: #38761d;">6. Download new provisioning profile</span><br />
<span style="color: #38761d;">7. Select code signing provisioning profile (in XCode)</span><br />
<span style="color: #38761d;"> > Debug : Wildcard bundle ID</span><br />
<span style="color: #38761d;"> > Destribution(Release) : Specific bundle ID</span><br />
<span style="color: #38761d;"><br /></span>
<br />
<span style="font-size: large;"><i>Diagram:</i></span><br />
<span style="color: #38761d;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.flickr.com/photos/flyworldhan/7947716394/sizes/o/in/photostream/" target="_blank"><span id="goog_1551164595"></span><img border="0" height="232" src="http://farm9.staticflickr.com/8176/7947716394_934838d82b_o.png" width="640" /></a></div>
<div style="text-align: center;">
<b><a href="http://www.flickr.com/photos/flyworldhan/7947716394/sizes/o/in/photostream/" target="_blank"><span id="goog_1551164602"></span>Original Size</a></b><span id="goog_1551164603" style="color: #38761d;"></span><span id="goog_1551164604" style="color: #38761d;"></span><span id="goog_1551164605" style="color: #38761d;"></span><span style="color: #38761d;"><a href="http://draft.blogger.com/"></a></span></div>
<a href="http://draft.blogger.com/"></a><span id="goog_1551164575"></span><span id="goog_1551164576"></span><br />Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-31351902864913692322012-09-02T16:57:00.001+08:002012-09-19T21:56:38.848+08:00Facebook被盜帳號處理措施123<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUJPRghEA8Hn8x323mWrhRtuTptAFthQDbiT0bW0WG2BgirGJ7y3555KvXODqyv6jRE0ko2dvLI6uv4fDuZlm_IYVUWsVoe5IrY7EP8TL1kTggQesXMyHvbuRaUqt5yGfFPN3RByzU3gPw/s1600/fx1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUJPRghEA8Hn8x323mWrhRtuTptAFthQDbiT0bW0WG2BgirGJ7y3555KvXODqyv6jRE0ko2dvLI6uv4fDuZlm_IYVUWsVoe5IrY7EP8TL1kTggQesXMyHvbuRaUqt5yGfFPN3RByzU3gPw/s400/fx1.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
今天下午連續收到兩位朋友請我"<b>幫忙</b>"收一下Y拍的購物簡訊...<br />
<br />
看來這種詐騙方式還是不斷的存在,請大家小心謹慎不要幫忙收簡訊,也不要在奇怪的地方(圖書館, 網咖, 莫名的無線網路...) 登入自己的Facebook. 避免有心人士竊取帳號密碼。<br />
<br />
如果發現自己被盜了,請馬上按照以下的方式處理<br />
<b><span style="font-size: large;">1. 改密碼</span></b><br />
被盜帳號一定有原因,不管如何,避免自己朋友也受騙上當才是上策。<br />
以下是改密碼的步驟~<br />
<b><span style="font-size: large;"><br /></span></b>
<b>到Facebook帳號設定</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaRYX3WnvmjaObFxSv7wS7FQHFjyjg4i6HDCcAGCTO3qK8Sz4aa-fSnPPkOWejVdjpNA0y4yTPEWSKKW7BK_bCzeTgW3mPGBvrk3Mw7bqliy8B5QvdFCo1XIAHTWlZJ8OyQg9kvLFmCpQr/s1600/fx2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaRYX3WnvmjaObFxSv7wS7FQHFjyjg4i6HDCcAGCTO3qK8Sz4aa-fSnPPkOWejVdjpNA0y4yTPEWSKKW7BK_bCzeTgW3mPGBvrk3Mw7bqliy8B5QvdFCo1XIAHTWlZJ8OyQg9kvLFmCpQr/s400/fx2.jpg" width="284" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<b>選擇"一般" -> "密碼" 來變更</b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5duv80KuMfWLZ-95qJsrT1IQAfzrgldA_yLMfEPyfHAv976XQuqQg_LK1sh5B0iOQXMxHqNmiDVUvBPc3gzs755IOtw_uM-7CT1od3VTYgOKv3tTZ66ZNYrVKR_N048G4UKpLxHUPwhwL/s1600/fx3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5duv80KuMfWLZ-95qJsrT1IQAfzrgldA_yLMfEPyfHAv976XQuqQg_LK1sh5B0iOQXMxHqNmiDVUvBPc3gzs755IOtw_uM-7CT1od3VTYgOKv3tTZ66ZNYrVKR_N048G4UKpLxHUPwhwL/s640/fx3.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><b>2. 登出所有其他的連線 (Session)</b></span></div>
<div class="separator" style="clear: both; text-align: left;">
每一台電腦/手機登入都會有一個連線維持著,讓使用者不會斷線重登入。</div>
<div class="separator" style="clear: both; text-align: left;">
這一步驟就是要把除了現在自己登入的連線保留,其他都斷掉。</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>選取"帳號保安" -> "有效的連線"(Active Session) 並且把其他的裝置/連線全部都登出</b></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGIrUVQF-9GygEymENszYNn1cnoqne-27VHXD9Zwip1xOvKwhmjyn3jVm6frFbUqcGVBD0kJcuXaX7AQ5MYuNciQcthzCAJX4N4RSQqy2KIExtVXGB6tOZVguBj21ZdMvU0tPEee1qD2FR/s1600/fx4.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="355" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGIrUVQF-9GygEymENszYNn1cnoqne-27VHXD9Zwip1xOvKwhmjyn3jVm6frFbUqcGVBD0kJcuXaX7AQ5MYuNciQcthzCAJX4N4RSQqy2KIExtVXGB6tOZVguBj21ZdMvU0tPEee1qD2FR/s640/fx4.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">新增說明文字</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><b>3.增加自己的帳號安全性</b></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
參考<a href="http://playpcesor.blogspot.com/2010/09/facebook-login-out.html">電腦玩物的這篇</a>教學,學習如何設定以下兩招</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ol>
<li>在不同地方登入需要記錄裝置</li>
<li>登入的時候會寄信到自己信箱(當他人登入時,就馬上會知道)</li>
</ol>
<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
希望大家能好好的保護自己的帳號,這種詐騙手法在MSN / Google Talk / Facebook 都有,</div>
<div class="separator" style="clear: both; text-align: left;">
如果收到<b>"請求幫忙"</b>訊息的時候,請好心的告訴自己朋友喔!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-83198799333619435042012-08-26T21:09:00.002+08:002012-09-01T14:23:02.838+08:00Mac 新手上路記錄 (App, Widget, Configure)<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFVgXPvFKOU82-QiTYbqCSk1T02adhlPxMWtv0fDBNkBALzZiLmeUgSMSyv7msYCNxghCGz45rtDoi4l7JfbycCHVDnqKl_JDy694juQA0C3UcauUTE0o3kMgxxC2GEKXW5Ael_Zptr-yh/s1600/mac1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="408" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFVgXPvFKOU82-QiTYbqCSk1T02adhlPxMWtv0fDBNkBALzZiLmeUgSMSyv7msYCNxghCGz45rtDoi4l7JfbycCHVDnqKl_JDy694juQA0C3UcauUTE0o3kMgxxC2GEKXW5Ael_Zptr-yh/s640/mac1.jpg" width="640" /></a></div>
<div style="text-align: center;">
剛入手的MacBook Air 13" </div>
<br />
第一天拿到就更新了 <a href="http://support.apple.com/kb/DL1571">OS X 10.8.1</a>,速度很快,非常舒服。<br />
<br />
以下記錄一下安裝的東西<br />
<br />
首先是Mac Application (免費為主, 付費的... 過陣子再說...)<br />
<br />
<ul>
<li>生產力軟體(Productivity)</li>
<ul>
<li><a href="http://www.irradiatedsoftware.com/sizeup/">SizeUp</a>:多視窗管理,很方便(但是會跳Demo視窗)</li>
<li><a href="http://mouapp.com/">Mou</a>:Markdown 即時預覽編輯器</li>
<li><a href="http://itunes.apple.com/us/app/dash-docs-snippets/id458034879?mt=12">Dash</a>:快速Snippets與文件查詢工具</li>
<li><a href="http://qbix.com/calendar">Calendar for Mac</a>:MenuBar上的Calendar - 看的到event! <span style="color: red; font-weight: bold;">(2012/09/01新增)</span></li>
</ul>
<li>瀏覽器(Browser)</li>
<ul>
<li>Firefox</li>
<li>Chrome</li>
<li>Opera</li>
</ul>
<li>儲存(Storage)</li>
<ul>
<li>Dropbox</li>
<li>SkyDrive:因為有之前活動獲得的25G,所以還是用一下。</li>
</ul>
<li>開發與編輯器(Development & Editor)</li>
<ul>
<li><a href="http://www.sublimetext.com/">Sublime Text</a>:我最愛的純文字編輯器,設定可以<a href="http://blog.flyworld.me/2012/03/my-sublime-text-2-on-windows-7-64bit.html">參考這篇</a></li>
<li><a href="http://www.syntevo.com/smartgit/index.html">SmartGit</a>:目前覺得最好用的Git Client (SourceTree把我repo搞爛過...)</li>
<li>XCode:iOS Development</li>
</ul>
<li>多媒體(Mutimedia)</li>
<ul>
<li><a href="http://www.haozhaopian.com/">好照片</a>:方便的照片特效處理軟體</li>
<li><a href="http://skitch.com/">Skitch</a>:螢幕截圖軟體,附上基本畫筆可以標記</li>
<li>KKBox</li>
<li>VLC Player <b><span style="color: red;">(2012/09/01新增)</span></b></li>
</ul>
<li>終端機相關(Terminal)</li>
<ul>
<li><a href="http://itunes.apple.com/us/app/go2shell/id445770608?mt=12">Go2Shell</a>:可以直接在Finder上開啟該目錄的Terminal</li>
<li>iTerm:加強版Terminal</li>
</ul>
<li>社交軟體(Social)</li>
<ul>
<li>Adium:MSN/Gtalk/... 整合即時通訊</li>
<li><a href="http://itunes.apple.com/us/app/menutab-for-facebook/id421358730?mt=12">MenuTab for Facebook</a>:非常棒的Facebook整合</li>
<li><a href="http://www.tweetdeck.com/">TweetDeck</a>:Twitter Client, 管理多帳號的時候很方便(我還有jsdc.tw的帳號...)</li>
<li>Skype</li>
<li>Line</li>
</ul>
<li>系統軟體</li>
<ul>
<li><a href="http://www.alfredapp.com/">Alfred</a>:好用的快速啟動工具(比Spotlight強大一些 )</li>
<li><a href="http://www.freemacsoft.net/appcleaner/">AppCleaner</a>:自動掃描並乾淨刪除軟體的工具</li>
<li>Bodega:類似AppShopper的app分類整理軟體,可以設定Wishlist很方便</li>
<li><a href="http://www.piriform.com/CCLEANER">CCleaner</a>:非常棒的系統清理軟體,會針對安裝的一些軟體清除暫存檔案,PC/MAC都有支援。</li>
<li><a href="http://www.grandtotal.biz/CheatSheet/">CheatSheet</a>:按下 <span style="background-color: #eeeeee; font-family: 'lucida grande', verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-size: 12px;">⌘ </span>幾秒就可以show出該軟體支援的快捷鍵</li>
<li><a href="http://www.coconut-flavour.com/">coconutBattery</a>:電池狀態顯示軟體</li>
<li>Flux:螢幕亮度自動調整軟體</li>
<li><a href="http://www.omnigroup.com/products/omnidisksweeper/">OmniDiskSweeper</a>:磁碟剩餘空間掃描軟體,可找出佔用最大空間的資料夾或檔案</li>
<li><a href="http://synergy-foss.org/">Synergy</a>:跨系統多螢幕作業軟體,多台電腦適用</li>
<li>Yahoo! KeyKey:中文輸入法</li>
<li><a href="http://www.ntfsmounter.com/">ntfsMounter</a>:多系統者必備, 掛載NTFS專用<b><span style="color: red;">(2012/09/01新增)</span></b></li>
</ul>
</ul>
<br />
另外還有Dashboard Widgets (尚在摸索中)<br />
<br />
<ul>
<li>iStat Pro</li>
<li>Currency Converter</li>
<li>Day Counter</li>
<li>HSLider</li>
<li>Page Capture</li>
<li>PEMDAS</li>
<li>Translator</li>
</ul>
<div>
<br />
由於從來沒有擁有過MacBook 所以<br />
<br />
<ul>
<li>認真研究了一下<a href="http://support.apple.com/kb/HT1343?viewlocale=zh_TW">快捷鍵</a>(Keyboard Shortcut) 的部份。</li>
</ul>
還有因為一直改系統配置,不斷的開開關關讓我覺得很煩,所以後來也把<br />
<br />
<ul>
<li>System Preferences 設定了一個快捷鍵:(參考<a href="http://tantek.com/2010/242/b1/keyboard-shortcut-open-mac-system-preferences">這篇的教學</a>)</li>
</ul>
</div>
<div>
<br />
另外記錄一下幾個指令與小秘訣</div>
<div>
<br />
<ul>
<li><b>顯示隱藏檔案指令</b><span style="background-color: white; font-family: 'Courier New', Courier, Fixed; font-size: 14px;">指令</span></li>
</ul>
<span style="background-color: white; font-family: 'Courier New', Courier, Fixed; font-size: 14px;">defaults write com.apple.finder AppleShowAllFiles </span><span style="color: blue; font-family: 'Courier New', Courier, Fixed; font-size: 14px;">TRUE</span></div>
<div>
<span style="background-color: white; font-family: 'Courier New', Courier, Fixed; font-size: 14px;">killall Finder</span><br />
<ul>
</ul>
</div>
<div>
<br />
<ul>
<li><b style="font-family: 'Courier New', Courier, Fixed;">列出安裝的package(.pkg)-- (<strike>包裹還是套件阿~~~~~~?</strike></b></li>
</ul>
<span style="font-family: 'Courier New', Courier, Fixed; font-size: 14px;">pkgutil --pkgs</span><br />
<ul>
</ul>
<br />
<br />
<ul>
<li><b style="font-family: 'Courier New', Courier, Fixed;">螢幕取色</b></li>
</ul>
<span style="font-family: 'Courier New', Courier, Fixed;">使用內建的DigitalColor Meter </span><br />
<ul>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiACfOIH2PfSWQhcS9l3W8r3G8k_qkA8mA-fnUnfccV-MQk6Toitdwwyxv8L0kvN7VWDASEw8fmQLBqfbwctx-r0XpELXEKYgmELZVvQ2Qkqu6rGKRgvRodSJmbJup3tjmoA-5ag5SnzQnn/s1600/Screen+Shot+2012-08-26+at+8.59.56+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiACfOIH2PfSWQhcS9l3W8r3G8k_qkA8mA-fnUnfccV-MQk6Toitdwwyxv8L0kvN7VWDASEw8fmQLBqfbwctx-r0XpELXEKYgmELZVvQ2Qkqu6rGKRgvRodSJmbJup3tjmoA-5ag5SnzQnn/s320/Screen+Shot+2012-08-26+at+8.59.56+PM.png" width="320" /></a></div>
<span style="font-family: Courier New, Courier, Fixed;"><span style="font-size: 14px;"><br /></span></span>
<br />
<br />
<ul>
<li>最後透過<a href="http://www.macports.org/">MacPorts</a>安裝了常用的一些工具(ex:htop),其他有想到再補。</li>
</ul>
<br />
<br />
<br />
尚未解決:<br />
想找一套好的Blog編輯軟體,但是還在MarsEdit 3 / Ecto 等等的尋找中...<br />
<br />
其他參考<br />
<a href="http://www.leftcolumn.net/2009/02/15/40-useful-mac-os-x-shell-scripts-and-terminal-commands/">40 Useful Mac OS X Shell Scripts and Terminal Commands</a><br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-17631243558876249442012-05-13T05:32:00.001+08:002012-05-13T11:01:33.667+08:00Dropbox 舉辦的 Dropquest 2012 快速破關<blockquote>
<span style="font-size: medium;">為了容量 …</span></blockquote>
<span style="font-size: medium;"><strong>活動首頁</strong></span><br />
<span style="font-size: large;"><a href="https://www.dropbox.com/dropquest2012">https://www.dropbox.com/dropquest2012</a></span><br />
<br />
<span style="font-size: medium;">各關解答…</span><br />
<span style="font-size: medium;"><br /></span><br />
<span style="font-size: medium;">lv1. 先到Dropbox 的競賽資料夾(Dropquest 2012) 放入46637.txt</span><br />
<span style="font-size: medium;">lv2. 連接到 <a href="https://www.dropbox.com/dropquest2012/CRANE">https://www.dropbox.com/dropquest2012/CRANE</a></span><br />
<span style="font-size: medium;">lv3. SMUDGES</span><br />
<span style="font-size: medium;">lv4. SOMA</span><br />
<span style="font-size: medium;">lv5. MAD LIB</span><br />
<span style="font-size: medium;">lv6. 嘗試以下連結 </span><br />
<a href="https://www.dropbox.com/events?ns=false&n=0&d=1-7-2003"><span style="font-size: medium;">https://www.dropbox.com/events?ns=false&n=0&d=1-7-2003</span></a><br />
<a href="https://www.dropbox.com/events?ns=false&n=0&d=3-21-2005"><span style="font-size: medium;">https://www.dropbox.com/events?ns=false&n=0&d=3-21-2005</span></a><br />
<a href="https://www.dropbox.com/events?ns=false&n=0&d=11-28-2001"><span style="font-size: medium;"></span></a><span style="font-size: medium;"><a href="https://www.dropbox.com/events?ns=false&n=0&d=11-28-2001">https://www.dropbox.com/events?ns=false&n=0&d=11-28-2001</a></span><span style="font-size: medium;"></span><br />
<span style="font-size: medium;">lv7. 嘗試以下連結</span><br />
<a href="https://www.dropbox.com/dropquest2012/LEADING"><span style="font-size: medium;">https://www.dropbox.com/dropquest2012/LEADING</span></a><br />
<a href="https://www.dropbox.com/dropquest2012/DEALING"><span style="font-size: medium;">https://www.dropbox.com/dropquest2012/DEALING</span></a><br />
<a href="https://www.dropbox.com/dropquest2012/aligned"><span style="font-size: medium;"></span></a><span style="font-size: medium;"><a href="https://www.dropbox.com/dropquest2012/aligned">https://www.dropbox.com/dropquest2012/aligned</a></span><span style="font-size: medium;"></span><br />
<span style="font-size: medium;">lv8. triumphant</span><br />
<span style="font-size: medium;">lv9. </span><a href="https://www.dropbox.com/tour/6"><span style="font-size: medium;">https://www.dropbox.com/tour/6</span></a><span style="font-size: medium;"> 邀請 </span><a href="http://goo.gl/VBzx"><span style="font-size: medium;">http://goo.gl/VBzx</span></a><span style="font-size: medium;"> 出現的mail</span><br />
<span style="font-size: medium;">lv10. 試 </span><span style="font-size: medium;">MEXICO or Argentina or KOREA </span><br />
<span style="font-size: medium;">lv11. Southpole</span><br />
<span style="font-size: medium;">lv12. 到Dropbox去把Chapter 12.txt 還原到上一版</span><a href="https://www.dropbox.com/help"><span style="font-size: medium;">https://www.dropbox.com/help</span></a><span style="font-size: medium;"> 點 "Security and Privacy"</span><br />
<span style="font-size: medium;">lv14. 拼出答案 - 解答 <a href="http://goo.gl/FD9AG">http://goo.gl/FD9AG</a></span><br />
<span style="font-size: medium;">lv15. </span><span style="font-size: medium;"><a href="https://www.dropbox.com/share">https://www.dropbox.com/share</a> ,點彩虹</span><span style="font-size: medium;"></span><br />
<span style="font-size: medium;">lv17. shanghai</span><br />
<span style="font-size: medium;">lv18. </span><a href="http://goo.gl/piAHw"><span style="font-size: medium;">http://goo.gl/piAHw</span></a><span style="font-size: medium;"> (用瀏覽器) 把13689號檔案 放到Category 1 剩下放2</span><br />
<span style="font-size: medium;">lv20. <a href="https://www.dropbox.com/dropquest2012/apollo13">https://www.dropbox.com/dropquest2012/apollo13</a></span><br />
<span style="font-size: medium;">lv21. ABUSIVELY</span><br />
<span style="font-size: medium;">lv22. FACED or MACAU or BADGE or BASED or ADAGE</span><br />
<span style="font-family: inherit; font-size: medium;">lv23. Machu Picchu</span><br />
<span style="font-family: inherit;"><span style="font-size: medium;">lv24. </span></span><span style="font-size: medium;">colosseum</span>Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com1tag:blogger.com,1999:blog-2697592354122524996.post-28397428762390036062012-04-25T22:45:00.001+08:002012-04-25T22:45:59.408+08:00iOS Web 畫面閃爍問題 (CSS 3)<br />
在iOS (iPhone 4s/ iPad 2/iPod Touch) 上測試 Mobile Web的時候出現了閃爍問題<br />
和Team member 花了一段時間發現一個很詭異的問題 <br />
<strong><span style="font-size: large;">狀況</span></strong><br />
1. 父節點(DIV)因為要做Transition使用了<span style="color: blue;"> </span><code><strong><span style="color: #666666;"><br /></span><span style="color: blue;">transform: translate3d(…)</span></strong></code><br />
<code></code><code><span style="font-family: Arial;">2. 畫面處理完成後,觸動事件將子節點(DIV)的CSS改變<strong> <br /></strong></span><span style="color: blue; font-family: 'Courier New';"><strong>left : *px</strong></span></code><br />
<pre><code>就在這個更改子節點的瞬間 iOS 的畫面一定會<strong><span style="color: red;">閃爍一下</span></strong> </code><code>測試過了 iPad / iP4s / iPod Touch 都有這問題 但是Android 2.x 4.x 都沒有…</code></pre>
<br />
<strong><span style="font-size: large;">處理方式</span></strong><br />
<br />
原本以為是iOS 的 webkit 在處理特定 position 的 left 造成子節點重畫的問題,<br />後來想想覺得這 <span style="color: blue;"><strike>也太基本了吧</strike> </span><span style="color: black;">不太可能,經過嘗試以及搜尋,發現很多人都有類似問題。</span><br />
<br />
<span style="color: black;"> 像是StackOverflow <a href="http://stackoverflow.com/questions/6564911/webkit-translate3d-issues-peek-thru">這篇</a> 還有 <a href="http://stackoverflow.com/questions/6481894/proper-way-to-optimize-css-3-animations-for-ios-mobile-safari">這篇</a> 他是改 CSS top 導致發生神秘的閃爍事件…</span><br />
<br />
<span style="color: black;">最後使用動態增加translatde3d 並且 reset 的 <strike>爛招 </strike>解法 </span><span style="color: black;"> </span><br />
<br />
<span style="color: black;">後來將以下的 css 指定給子節點 問題就解決了</span><br />
<pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"><span style="color: maroon;">transform</span>: <span style="color: maroon;">translate3d</span>(<span style="color: maroon;">0</span>,<span style="color: maroon;">0</span>,<span style="color: maroon;">0</span>);</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"><span style="color: maroon;">-webkit-transform</span>: <span style="color: maroon;">translate3d</span>(<span style="color: maroon;">0</span>,<span style="color: maroon;">0</span>,<span style="color: maroon;">0</span>);</pre>
</pre>
<br />
<strong>補充</strong><br />
回家後看到jsconsole/jsbin的作者 Remy Sharp 大大的影片 <br />
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/IKl78ZgJzm4" width="560"></iframe><br />
<br />
<strong><span style="color: #333333;">造成我畫面閃動的原因 應該是跟iOS的硬體加速有關 </span></strong><br />
<br />
<strong><span style="color: red;">故需要Reset translate3d …..</span></strong><br />
<br />
<br />
<br />
<strong><strike>真。他x的 上一次遇到這種神秘的問題 是面對高級瀏覽器 IE 6 ……………</strike> </strong><br />
<br />
<br />
<br />
<strong>References</strong><br /><a href="http://stackoverflow.com/questions/tagged/translate3d">http://stackoverflow.com/questions/tagged/translate3d</a>Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-61642447561290804762012-03-22T01:51:00.000+08:002012-04-25T22:48:03.327+08:00Responsive Media Query Quick Reference<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibHHLn_yE3E9qfE1hnvvpJa66JWNNVqenbkvQmFPtkCPuNuEueca1ct02QNSLQpBJK80vyLXDFLWMWGxRZzIsvbAJdKJOoEhgcBr8aS5wvSmLXpVA7LpW4QLtD7fkL5FgWwe45XgpEUm7G/s1600/responsive-reference.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="267" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibHHLn_yE3E9qfE1hnvvpJa66JWNNVqenbkvQmFPtkCPuNuEueca1ct02QNSLQpBJK80vyLXDFLWMWGxRZzIsvbAJdKJOoEhgcBr8aS5wvSmLXpVA7LpW4QLtD7fkL5FgWwe45XgpEUm7G/s640/responsive-reference.png" width="640" /></a></div>
<br />
Just a reminder which helps me doing responsive design's <a href="http://www.w3.org/TR/css3-mediaqueries/">Media Query</a>.<br />
<br />
<blockquote class="tr_bq">
<blockquote class="tr_bq">
@media (max-width: 767px)
</blockquote>
<blockquote class="tr_bq">
@media (max-width: 480px) </blockquote>
<blockquote class="tr_bq">
@media (min-width: 768px) and (max-width: 979px)</blockquote>
<blockquote class="tr_bq">
@media (min-width: 980px)</blockquote>
<blockquote class="tr_bq">
@media (min-width: 1200px)</blockquote>
</blockquote>
<br />
注意 :<b>上面的順序是有意義的 更改順序會導致CSS被蓋掉</b>Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-74559992415203493912012-03-08T19:17:00.001+08:002012-03-14T17:24:31.996+08:00My Sublime Text 2 on Windows 7 64bit<br />
<img src="http://www.catsone.com/wp-content/uploads/2011/10/MP900387742.jpg" /><br />
<blockquote>
<span style="font-size: medium;">Sublime, the awesome, amazing editor.</span></blockquote>
<strong><span style="font-size: medium;">1. Get 64bit portable version</span></strong><br />
<ul>
<li>Official Website : <a href="http://www.sublimetext.com/2">http://www.sublimetext.com/2</a></li>
</ul>
<strong><span style="font-size: medium;">2. Install </span><a href="http://wbond.net/sublime_packages/package_control"><span style="font-size: medium;">Package Control</span></a> </strong><br />
This is the most complex step.<br />
<em>Type Ctrl + ` and enter following python code </em><br />
<pre class="csharpcode">import urllib2,os; pf=<span class="str">'Package Control.sublime-package'</span>; ipp=sublime.installed_packages_path(); os.makedirs(ipp) <span class="kwrd">if</span> not os.path.exists(ipp) <span class="kwrd">else</span> None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),<span class="str">'wb'</span>).write(urllib2.urlopen(<span class="str">'http://sublime.wbond.net/'</span>+pf.replace(<span class="str">' '</span>,<span class="str">'%20'</span>)).read()); print <span class="str">'Please restart Sublime Text to finish installation'</span></pre>
<strong><span style="font-size: medium;">3. Install Packages (All from package control)</span></strong><br />
<ul>
<li><a href="http://wbond.net/sublime_packages/alignment">Alignment</a></li>
<ul>
<li>Format shortcut – Ctrl + Alt + a</li>
</ul>
<li><a href="https://github.com/facelessuser/BracketHighlighter">BracketHighlighter</a></li>
<li><a href="https://github.com/Xavura/CoffeeScript-Sublime-Plugin">CoffeeScript</a></li>
<li><a href="https://github.com/BoundInCode/Display-Functions">Display Functions (Java)</a></li>
<li><a href="https://github.com/Stuk/sublime-edit-history">Edit History</a></li>
<ul>
<li>Jump to next/previous edit location</li>
<li>Add Key Binding</li>
<ul>
<li>{ "keys": ["<strong>ctrl+alt+e</strong>"], "command": "previous_edit" },<br />{ "keys": ["<strong>ctrl+e</strong>"], "command": "next_edit" }</li>
</ul>
</ul>
<li><a href="https://github.com/colinta/SublimeFileDiffs">FileDiffs</a></li>
<ul>
<li>Usage</li>
<ul>
<li>Right click on tab (Or use command popup then search “Diff”)</li>
<ul>
<li>Diff with clipboard – Text Diff</li>
<li>Diff with another file – Text Diff + Visual Diff Tool <br />(KDiff3, WinMerge, DiffMerge…)</li>
</ul>
</ul>
<li>Install <a href="http://kdiff3.sourceforge.net/">KDiff3</a></li>
<li>Modify Code (file_diffs.py)<br /><pre class="csharpcode"><strong><em><span style="color: #f79646;">Under </span><span style="color: blue;">WINMERGE</span></em></strong>
<span class="kwrd">if</span> not WINMERGE:
<span class="kwrd">if</span> os.path.exists(<span class="str">"%s\KDiff3\KDiff3.exe"</span> % os.environ[<span class="str">'ProgramFiles(x86)'</span>]):
WINMERGE = <span class="str">'"%s\KDiff3\KDiff3.exe"'</span> % os.environ[<span class="str">'ProgramFiles(x86)'</span>]
<span class="kwrd">else</span>:
WINMERGE = <span class="str">'"%s\KDiff3\KDiff3.exe"'</span> % os.environ[<span class="str">'ProgramFiles'</span>]
……
<strong><span style="color: #f79646;"><em>End of <span style="color: blue;">run_diff</span> function</em></span></strong>
<pre class="csharpcode"><span class="kwrd">if</span> from_file == <span class="str">'from_file'</span> or to_file == <span class="str">'to_file'</span>:
cmd_line = <span class="str">'%s "%s" "%s"'</span> % (WINMERGE, from_file, to_file)
print <span class="str">"KDiff3 command: "</span> + cmd_line
Popen(cmd_line)</pre>
</pre>
</li>
</ul>
<li><a href="https://github.com/kemayo/sublime-text-2-git/wiki">Git</a></li>
<ul>
<li>Call git command quickly – Need <a href="http://code.google.com/p/msysgit/">Git (mysysgit on Win7)</a></li>
<li>Usage : Command search “git”</li>
</ul>
<li><a href="https://github.com/mrmartineau/HTML5">HTML5</a></li>
<ul>
<li>Snippets</li>
</ul>
<li><a href="https://github.com/SublimeText/IndentGuides">IndentGuides</a></li>
<ul>
<li>Indent line for editors</li>
</ul>
<li><a href="https://github.com/mrmartineau/jQuery">jQuery</a></li>
<ul>
<li>Snippets</li>
</ul>
<li><a href="https://github.com/aaronpowell/sublime-jquery-snippets">jQuery Snippets pack</a></li>
<ul>
<li>Hint : Need enable jQuery support by command</li>
<li>Snippets</li>
</ul>
<li><a href="https://github.com/cgutierrez/JsMinifier">JS Minifier</a></li>
<ul>
<li>Minify shortcut –<strong> Ctrl + Alt + m</strong></li>
</ul>
<li><a href="https://github.com/jdc0589/JsFormat">JsFormat</a></li>
<ul>
<li>Format shortcut – <strong>Ctrl + Alt + f</strong></li>
</ul>
<li><a href="https://github.com/dzhibas/SublimePrettyJson">Pretty JSON</a></li>
<ul>
<li>Format shortcut – <strong>Ctrl + Alt + j</strong></li>
</ul>
<li><a href="http://wbond.net/sublime_packages/prefixr">Prefixr</a></li>
<ul>
<li>Format shortcut – <strong>Ctrl + Alt + x</strong> (For <strong>CSS</strong>)</li>
</ul>
<li><a href="https://github.com/SublimeText/SideBarGit">SideBarGit</a></li>
<li><a href="https://github.com/titoBouzout/SideBarEnhancements/">SideBarEnhancement</a></li>
<li><a href="https://github.com/Kronuz/SublimeCodeIntel">SublimeCodeIntel</a> <strong>(Must Have)</strong></li>
<ul>
<li>Autocomplete (Popup)</li>
</ul>
<li><a href="https://github.com/SublimeText/Tag">Tag</a></li>
<ul>
<li><strong>“/”</strong>to end tag</li>
<li>Format shortcut – <strong>Ctrl + Alt + f</strong></li>
<li>Features : Edit –> Tag …</li>
</ul>
<li><a href="http://wbond.net/sublime_packages/terminal">Terminal</a></li>
<ul>
<li>Open file shortcut – <strong>Ctrl + Shift + t</strong></li>
<li>Open folder shortcut – <strong>Ctrl + Shift + Alt + t</strong></li>
</ul>
<li><a href="http://wbond.net/sublime_packages/tortoise">Tortoise</a></li>
<ul>
<li>Need <a href="http://code.google.com/p/tortoisegit/">TortoiseGit</a> or <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a></li>
<li><b><span style="color: red;"><i>Update : 20120314</i> - </span></b><b><span style="color: blue;">error: [Error 2] The system cannot find the file specified</span></b></li>
<ul>
<li>Because <a href="http://code.google.com/p/tortoisegit/">TortoiseGit</a> use <a href="http://code.google.com/p/msysgit/">mysysgit</a> as default Git under Windows 7 64bit version, <br />we need to modify <b>Tortoise.py</b><br /><pre style="background-attachment: initial; background-clip: initial; background-color: #f6f8ff; background-image: initial; background-origin: initial; color: #000020;"><span style="color: #200080; font-weight: bold;">class</span> Git<span style="color: #308080;">(</span><span style="color: #308080;">)</span><span style="color: #308080;">:</span>
<span style="color: #200080; font-weight: bold;">def</span> <span style="color: #e34adc;">__init__</span><span style="color: #308080;">(</span>self<span style="color: #308080;">,</span> tortoise_proc_path<span style="color: #308080;">,</span> root_dir<span style="color: #308080;">)</span><span style="color: #308080;">:</span>
self<span style="color: #308080;">.</span>git_path <span style="color: #308080;">=</span> os<span style="color: #308080;">.</span>path<span style="color: #308080;">.</span>abspath<span style="color: #308080;">(</span><span style="color: #1060b6;">'C:\\PATH\\git.exe'</span><span style="color: #308080;">)</span></pre>
</li>
</ul>
</ul>
<li><a href="https://github.com/SublimeText/WinMerge">WinMerge</a></li>
<ul>
<li>Compare shortcut –<strong> Ctrl + Alt + d</strong> (Current file with previous edit file)</li>
<li>Modify Code (WinMerge.py)<br /><pre class="csharpcode">WINMERGE = <span class="str">"F:\WinMerge-2.12.4\WinMergeU.exe"</span></pre>
</li>
</ul>
<li><a href="http://code.google.com/p/zen-coding/">ZenCoding</a> <strong>(AWESOME!!)</strong></li>
<ul>
<li>Trigger – <strong>Tab</strong></li>
</ul>
</ul>
<strong><span style="font-size: medium;">Editor Shortcut</span></strong><br />
<ul>
<li>Toggle sidebar (file explorer) – <strong>Ctrl + K then B</strong></li>
<li>Command List - <strong>Ctrl + Shift + P</strong></li>
<li>File Search –<strong> Ctrl + P</strong></li>
<ul>
<li>Search Text in File – <strong>Ctrl + P</strong> then enter <em><strong>#searchText</strong></em></li>
<li>Jump to specific paragraph(Function/Class/Tag) – <strong>Ctrl + P</strong> then enter <em><strong>@searchMethod</strong></em></li>
<li>Go to specific line – <strong>Ctrl + P</strong> then enter <strong><em>:lineNumber</em></strong></li>
</ul>
</ul>
<div>
<b>Right Click Menu Support</b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4up8oVcD-Sn-9IvUQpgf6tJNTPdAgQg0MK33Wg49Spy83gr5B8eF325A1ao94wo9ONhiP99DUPU8lqXWQqJkUdC351kWNb9sMGdABD8hIv8_UnvGFTyyO98YsAHEacYTJ8DEMvP46Eqrg/s1600/RightClick.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="48" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4up8oVcD-Sn-9IvUQpgf6tJNTPdAgQg0MK33Wg49Spy83gr5B8eF325A1ao94wo9ONhiP99DUPU8lqXWQqJkUdC351kWNb9sMGdABD8hIv8_UnvGFTyyO98YsAHEacYTJ8DEMvP46Eqrg/s320/RightClick.png" width="320" /></a></div>
<div>
<b><br /></b></div>
<div>
<b><br /></b></div>
<div>
<b><br /></b></div>
<div>
<ul>
<li>Modify the Path of following regestries</li>
<li>Save following text into a .reg file then double click on it to apply</li>
</ul>
</div>
<div>
<b><br /></b></div>
<div>
<div>
<pre style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial;"><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">Windows Registry Editor Version </span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">5.00</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;"></span>
<span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;"></span>
<span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">[</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">HKEY_CLASSES_ROOT\</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">*</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">\shell\SublimeText</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">]</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;"></span>
<span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">@</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">=</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">"Edit With Sublime Text2"</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;"></span>
<span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">"Icon"</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">=</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">"D:</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">\\</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">WindowsApp</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">\\</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">Sublime</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">\\</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">sublime_text.exe"</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;"></span>
<span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">"Position"</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">=</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">"Bottom"</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;"></span>
<span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;"></span>
<span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">[</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">HKEY_CLASSES_ROOT\</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">*</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">\shell\SublimeText\command</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">]</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;"></span>
<span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">@</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial;">=</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">"D:</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">\\</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">WindowsApp</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">\\</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">Sublime</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">\\</span><span style="background-attachment: initial; background-clip: initial; background-color: #ffffe8; background-image: initial; background-origin: initial; color: #2a00ff;">sublime_text.exe %1"</span></pre>
</div>
<div style="font-weight: bold;">
<br /></div>
</div>Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-65286081756683507912012-03-06T17:47:00.001+08:002012-03-06T17:48:07.854+08:00《鐵娘子The Iron Lady》筆記<p>這篇文章我從Twitter 打到 Tumblr, 從Tumblr 打到 Blogger</p> <p><em>昨天才看完電影,今天全憑記憶打,不知不覺就打了好多,部分英文可能有錯就不要太在意了</em></p> <p>教育相關</p> <ul> <li>我們要不堅持立場,要不乾脆一事無成<br>(We will stand on principle, or we will not stand at all)</li> <li>過去人們總是努力要完成某件事,現在卻是要努力成為某個人<br>(It used to be about trying to do something, Now it’s about trying to be someone)</li> <li>如果父母總是要求孩子跟自己走一樣的路,那要怎麼要求孩子更傑出?<br>> 教育是適性發展,不是要跟隨前人腳步</li></ul> <p>政治相關</p> <ul> <li>以前政治是關於如何做事,現在是關於如何出名</li> <li>我們想要一個人民可以自由的選擇、犯錯、持有寬容及同情心的社會。這就是我們所謂的道德社會;不是一個國家要負所有責任,而沒有人須要為國家負責的社會。</li> <li>假裝我們都是平等的沒有任何好處,我們並不是相同的,從來沒有過,也永遠不會是</li> <li>人們已經不思考了,他們全憑感覺。一下說我覺得不妥,一下子又說抱歉我們組織覺得如何如何。<br>當代最重大的問題之一就是我們被這樣一群人所統治</li>> 一個領導人不能只靠"感覺",要理性地去思考每一步策略.<br> <li>那些人不是無能,就是懦弱 <br>> 這是鐵娘子教女兒開車時的話,其實正是暗指當時政客們的狀況</li> <li>總有人應該面對問題,說出難聽的真相! (對政客說) 你們這些人膽子太小了</li> <li>In politics, If you want anything said, ask a man; If you want anything done, ask a woman</li></ul> <p>人生相關</p> <ul> <li>生活本來就是自由選擇</li> <li>思想會化成語言,語言會化成行動,行動會變成習慣,習慣會變成個性,而個性會決定命運!<br>我們想甚麼,就會造就自己成為什麼樣的人<br>(Watch your thoughts for they become words. Watch your words for they become actions. Watch your actions for they become… habits. Watch your habits, for they become your character. And watch your character, for it becomes your destiny! What we think we become.)</li> <li>小心你想些什麼,因為它們會從你口中溜出來<br>(Watch your thoughts for they become words)</li> <li>你想改變這個國家(團體/公司),就去領導它<br>(If you want to change the party, lead it. If you want to change the country, lead it.)<br>> 要堅定立場,做出自己的風格. 還記得某個網路圈的名人曾在FB上說過,如果你不喜歡你的(公司)環境,不是該抱怨,而是該改造它(然後我就按讚)</li></ul> <p> </p> <p> </p> <p>最後一句看似簡單但卻意義非凡的話</p> <p><font size="4">One’s life must mean more than that.</font> </p> <p>正適合送給所有正在為自己理性/夢想打拼的人</p> <p>加油!</p>Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-89396486320234807202012-03-05T14:04:00.001+08:002012-03-05T14:04:29.767+08:00Request Https resource (Pass Authentication + Trust All Certificates) in Java<p> </p> <p>A post to remember</p> <ul> <li>Request resource from : <a title="https://a.b.c.d/test-metadata.xml" href="https://a.b.c.d/test-metadata.xml">https://a.b.c.d/test-metadata.xml</a> <ul> <li>Trust all certificates (<b>PKIX path building failed)</b> <li>Pass SSL handshake verification (javax <strong>SSLHandshakeException</strong>) <li>Pass basic (username/password) authentication (401, <strong>Authentication Required</strong>)</li></ul></li></ul> <p>Basic Java Way :</p> <table border="0" cellspacing="0" cellpadding="2" width="743"> <tbody> <tr> <td valign="top" width="741"><pre style="line-height: normal; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; letter-spacing: normal; orphans: 2; color: ; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-origin: initial; background-clip: initial"><font size="2"><font color="#7f0055"><span style="color: "><strong>import</strong></span><span style="color: "> java</span><span style="color: ">.</span><span style="color: ">io</span><span style="color: ">.</span><span style="color: "><strong>*</strong></span><span style="color: ">;</span></font><br /><font color="#7f0055"><span style="color: "><strong>import</strong></span><span style="color: "> java</span><span style="color: ">.</span><span style="color: ">net</span><span style="color: ">.</span><span style="color: "><strong>*</strong></span><span style="color: ">;</span></font><br /><font color="#7f0055"><span style="color: "><strong>import</strong></span><span style="color: "> java</span><span style="color: ">.</span><span style="color: ">security</span><span style="color: ">.</span><span style="color: ">cert</span><span style="color: ">.</span><span style="color: "><strong>*</strong></span><span style="color: ">;</span></font><br /><font color="#7f0055"><span style="color: "><strong>import</strong></span><span style="color: "> javax</span><span style="color: ">.</span><span style="color: ">net</span><span style="color: ">.</span><span style="color: ">ssl</span><span style="color: ">.</span><span style="color: "><strong>*</strong></span><span style="color: ">;</span></font><br /><br /><span style="color: "><font color="#7f0055"><strong>public</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>class</strong></font></span></font><font size="2"><font color="#000000"> HttpsRequestClient {<br /> </font><span style="color: "><font color="#7f0055"><strong>private</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>final</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span><font color="#000000"> USERNAME = </font><span style="color: "><font color="#2a00ff">"flyworld"</font></span></font><font size="2"><font color="#000000">;<br /> </font><span style="color: "><font color="#7f0055"><strong>private</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>final</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span><font color="#000000"> PASSWORD = </font><span style="color: "><font color="#2a00ff">"mypwd"</font></span></font><font size="2"><font color="#000000">;<br /> </font><span style="color: "><font color="#7f0055"><strong>private</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>final</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span><font color="#000000"> TESTURL = </font><span style="color: "><font color="#2a00ff">"https://a.b.c.d/test-metadata.xml"</font></span></font><font size="2"><font color="#000000">;<br /><br /> </font><span style="color: "><font color="#7f0055"><strong>public</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>static</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>void</strong></font></span><font color="#000000"> main(</font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span></font><font size="2"><font color="#000000">[] args) {<br /> HttpsRequestClient client = </font><span style="color: "><font color="#7f0055"><strong>new</strong></font></span></font><font size="2"><font color="#000000"> HttpsRequestClient();<br /> </font><span style="color: "><font color="#7f0055"><strong>switch</strong></font></span></font><font size="2"><font color="#000000"> (args.length) {<br /> </font><span style="color: "><font color="#7f0055"><strong>case</strong></font></span></font><font size="2"><font color="#000000"> 0:<br /> client.testURL();<br /> </font><span style="color: "><font color="#7f0055"><strong>break</strong></font></span></font><font size="2"><font color="#000000">;<br /> </font><span style="color: "><font color="#7f0055"><strong>case</strong></font></span></font><font size="2"><font color="#000000"> 1:<br /> client.testURL(args[0]);<br /> </font><span style="color: "><font color="#7f0055"><strong>case</strong></font></span></font><font size="2"><font color="#000000"> 3:<br /> client.testURL(args[0], args[1], args[2]);<br /> </font><span style="color: "><font color="#7f0055"><strong>default</strong></font></span></font><font size="2"><font color="#000000">:<br /> client.testURL();<br /> }<br /><br /> }<br /><br /> </font><span style="color: "><font color="#7f0055"><strong>public</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>void</strong></font></span></font><font size="2"><font color="#000000"> testURL() {<br /> testURL(TESTURL, USERNAME, PASSWORD);<br /> }<br /><br /> </font><span style="color: "><font color="#7f0055"><strong>public</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>void</strong></font></span><font color="#000000"> testURL(</font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span></font><font size="2"><font color="#000000"> url) {<br /> testURL(url, USERNAME, PASSWORD);<br /> }<br /><br /> </font><span style="color: "><font color="#7f0055"><strong>public</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>void</strong></font></span><font color="#000000"> testURL(</font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span><font color="#000000"> testURL, </font><span style="color: "><font color="#7f0055"><strong>final</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span><font color="#000000"> name, </font><span style="color: "><font color="#7f0055"><strong>final</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span></font><font size="2"><font color="#000000"> pwd) {<br /><br /> HttpsURLConnection testConnection = </font><span style="color: "><font color="#7f0055"><strong>null</strong></font></span></font><font size="2"><font color="#000000">;<br /> </font><span style="color: "><font color="#7f0055"><strong>try</strong></font></span></font><font size="2"><font color="#000000"> {<br /> </font><span style="color: "><font color="#3f7f59">// Trust All HttpsCertificates</font></span><br /><font color="#000000"> SSLContext sc = SSLContext.getInstance(</font><span style="color: "><font color="#2a00ff">"SSL"</font></span></font><font size="2"><font color="#000000">);<br /> sc.init(</font><span style="color: "><font color="#7f0055"><strong>null</strong></font></span><font color="#000000">, </font><span style="color: "><font color="#7f0055"><strong>new</strong></font></span><font color="#000000"> TrustManager[] { </font><span style="color: "><font color="#7f0055"><strong>new</strong></font></span><font color="#000000"> AllPassTrustManager() }, </font><span style="color: "><font color="#7f0055"><strong>null</strong></font></span></font><font size="2"><font color="#000000">);<br /><br /> </font><span style="color: "><font color="#3f7f59">// Pass handshake <a href="http://docs.oracle.com/javase/1.4.2/docs/api/javax/net/ssl/HostnameVerifier.html">verification</a><br></font></span></font><font size="2"><font color="#000000"> HostnameVerifier myHostnameVarifier = </font><span style="color: "><font color="#7f0055"><strong>new</strong></font></span></font><font size="2"><font color="#000000"> HostnameVerifier() {<br /> </font><span style="color: "><font color="#7f0055"><strong>public</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>boolean</strong></font></span><font color="#000000"> verify(</font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span></font><font size="2"><font color="#000000"> urlHostName, SSLSession session) {<br /> </font><span style="color: "><font color="#7f0055"><strong>return</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>true</strong></font></span></font><font size="2"><font color="#000000">;<br /> }<br /> };<br /><br /> </font><span style="color: "><font color="#3f7f59">// Configuration</font></span><br /></font><font size="2"><font color="#000000"> HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());<br /> HttpsURLConnection.setDefaultHostnameVerifier(myHostnameVarifier);<br /> Authenticator.setDefault(</font><span style="color: "><font color="#7f0055"><strong>new</strong></font></span></font><font size="2"><font color="#000000"> Authenticator() {<br /> </font><span style="color: "><font color="#7f0055"><strong>protected</strong></font></span></font><font size="2"><font color="#000000"> PasswordAuthentication getPasswordAuthentication() {<br /> </font><span style="color: "><font color="#7f0055"><strong>return</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>new</strong></font></span></font><font size="2"><font color="#000000"> PasswordAuthentication(name, pwd.toCharArray());<br /> }<br /> });<br /><br /> testConnection = (HttpsURLConnection) </font><span style="color: "><font color="#7f0055"><strong>new</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>URL</strong></font></span></font><font size="2"><font color="#000000">(testURL).openConnection();<br /><br /> printHttpsCertificates(testConnection);<br /> printResponseContent(testConnection);<br /><br /> } </font><span style="color: "><font color="#7f0055"><strong>catch</strong></font></span><font color="#000000"> (</font><span style="color: "><font color="#7f0055"><strong>MalformedURLException</strong></font></span></font><font size="2"><font color="#000000"> e) {<br /> e.printStackTrace();<br /> } </font><span style="color: "><font color="#7f0055"><strong>catch</strong></font></span><font color="#000000"> (</font><span style="color: "><font color="#7f0055"><strong>IOException</strong></font></span></font><font size="2"><font color="#000000"> e) {<br /> e.printStackTrace();<br /> } </font><span style="color: "><font color="#7f0055"><strong>catch</strong></font></span><font color="#000000"> (</font><span style="color: "><font color="#7f0055"><strong>Exception</strong></font></span></font><font size="2"><font color="#000000"> e) {<br /> e.printStackTrace();<br /> } </font><span style="color: "><font color="#7f0055"><strong>finally</strong></font></span></font><font size="2"><font color="#000000"> {<br /> </font><span style="color: "><font color="#7f0055"><strong>if</strong></font></span><font color="#000000"> (testConnection != </font><span style="color: "><font color="#7f0055"><strong>null</strong></font></span></font><font size="2"><font color="#000000">)<br /> testConnection.disconnect();<br /> }<br /><br /> }<br /><br /> </font><span style="color: "><font color="#7f0055"><strong>private</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>static</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>void</strong></font></span></font><font size="2"><font color="#000000"> printHttpsCertificates(HttpsURLConnection con) {<br /> </font><span style="color: "><font color="#7f0055"><strong>try</strong></font></span></font><font size="2"><font color="#000000"> {<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#2a00ff">"-----Certificates-----"</font></span></font><font size="2"><font color="#000000">);<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#2a00ff">"Response Code : "</font></span></font><font size="2"><font color="#000000"> + con.getResponseCode());<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#2a00ff">"Cipher Suite : "</font></span></font><font size="2"><font color="#000000"> + con.getCipherSuite());<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.getProperty(</font><span style="color: "><font color="#2a00ff">"line.separator"</font></span></font><font size="2"><font color="#000000">));<br /><br /> </font><span style="color: "><font color="#7f0055"><strong>Certificate</strong></font></span></font><font size="2"><font color="#000000">[] certs = con.getServerCertificates();<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#2a00ff">"Certificate Number : "</font></span></font><font size="2"><font color="#000000"> + certs.length);<br /> </font><span style="color: "><font color="#7f0055"><strong>for</strong></font></span><font color="#000000"> (</font><span style="color: "><font color="#7f0055"><strong>int</strong></font></span></font><font size="2"><font color="#000000"> i = 0; i < certs.length; i++) {<br /> </font><span style="color: "><font color="#7f0055"><strong>Certificate</strong></font></span></font><font size="2"><font color="#000000"> cert = certs[i];<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#2a00ff">"No : "</font></span></font><font size="2"><font color="#000000"> + i);<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#2a00ff">"Cert Type : "</font></span></font><font size="2"><font color="#000000"> + cert.getType());<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#2a00ff">"Cert Hash Code : "</font></span></font><font size="2"><font color="#000000"> + cert.hashCode());<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#2a00ff">"Cert Public Key Algorithm : "</font></span></font><font size="2"><font color="#000000"> + cert.getPublicKey().getAlgorithm());<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#2a00ff">"Cert Public Key Format : "</font></span></font><font size="2"><font color="#000000"> + cert.getPublicKey().getFormat());<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.getProperty(</font><span style="color: "><font color="#2a00ff">"line.separator"</font></span></font><font size="2"><font color="#000000">));<br /> }<br /> } </font><span style="color: "><font color="#7f0055"><strong>catch</strong></font></span></font><font size="2"><font color="#000000"> (SSLPeerUnverifiedException e) {<br /> e.printStackTrace();<br /> } </font><span style="color: "><font color="#7f0055"><strong>catch</strong></font></span><font color="#000000"> (</font><span style="color: "><font color="#7f0055"><strong>IOException</strong></font></span></font><font size="2"><font color="#000000"> e) {<br /> e.printStackTrace();<br /> }<br /> }<br /><br /> </font><span style="color: "><font color="#7f0055"><strong>private</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>static</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>void</strong></font></span></font><font size="2"><font color="#000000"> printResponseContent(HttpsURLConnection con) {<br /> </font><span style="color: "><font color="#7f0055"><strong>try</strong></font></span></font><font size="2"><font color="#000000"> {<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span><font color="#000000">.out.println(</font><span style="color: "><font color="#2a00ff">"-----Content-----"</font></span></font><font size="2"><font color="#000000">);<br /> </font><span style="color: "><font color="#7f0055"><strong>BufferedReader</strong></font></span><font color="#000000"> br = </font><span style="color: "><font color="#7f0055"><strong>new</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>BufferedReader</strong></font></span><font color="#000000">(<br> </font><span style="color: "><font color="#7f0055"><strong>new</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>InputStreamReader</strong></font></span></font><font size="2"><font color="#000000">(con.getInputStream()));<br /> </font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span></font><font size="2"><font color="#000000"> input;<br /> </font><span style="color: "><font color="#7f0055"><strong>while</strong></font></span><font color="#000000"> ((input = br.readLine()) != </font><span style="color: "><font color="#7f0055"><strong>null</strong></font></span></font><font size="2"><font color="#000000">) {<br /> </font><span style="color: "><font color="#7f0055"><strong>System</strong></font></span></font><font size="2"><font color="#000000">.out.println(input);<br /> }<br /> br.close();<br /> } </font><span style="color: "><font color="#7f0055"><strong>catch</strong></font></span><font color="#000000"> (</font><span style="color: "><font color="#7f0055"><strong>IOException</strong></font></span></font><font size="2"><font color="#000000"> e) {<br /> e.printStackTrace();<br /> }<br /> }<br /><br /> </font><span style="color: "><font color="#3f5fbf">/**</font></span><br /><span style="color: "><font color="#3f5fbf"> </font></span><span style="color: "><font color="#7f9fbf"><strong>*</strong></font></span><span style="color: "><font color="#3f5fbf"> A TrustManager which passes all certificates</font></span><br /><span style="color: "><font color="#3f5fbf"> </font></span><span style="color: "><font color="#7f9fbf"><strong>*</strong></font></span><span style="color: "><font color="#3f5fbf"> </font></span><br /><span style="color: "><font color="#3f5fbf"> </font></span><span style="color: "><font color="#7f9fbf"><strong>*</strong></font></span><span style="color: "><font color="#3f5fbf"> </font></span><span style="color: "><font color="#7f9fbf"><strong>@see</strong></font></span><span style="color: "><font color="#3f5fbf"> TrustManager</font></span><br /><span style="color: "><font color="#3f5fbf"> */</font></span><br /><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>private</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>class</strong></font></span><font color="#000000"> AllPassTrustManager </font><span style="color: "><font color="#7f0055"><strong>implements</strong></font></span></font><font size="2"><font color="#000000"> TrustManager, X509TrustManager {<br /> </font><span style="color: "><font color="#7f0055"><strong>public</strong></font></span></font><font size="2"><font color="#000000"> X509Certificate[] getAcceptedIssuers() {<br /> </font><span style="color: "><font color="#7f0055"><strong>return</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>null</strong></font></span></font><font size="2"><font color="#000000">;<br /> }<br /><br /> </font><span style="color: "><font color="#7f0055"><strong>public</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>void</strong></font></span><font color="#000000"> checkServerTrusted(X509Certificate[] certs, </font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span><font color="#000000"> authType) </font><span style="color: "><font color="#7f0055"><strong>throws</strong></font></span></font><font size="2"><font color="#000000"> CertificateException {<br /> </font><span style="color: "><font color="#7f0055"><strong>return</strong></font></span></font><font size="2"><font color="#000000">;<br /> }<br /><br /> </font><span style="color: "><font color="#7f0055"><strong>public</strong></font></span><font color="#000000"> </font><span style="color: "><font color="#7f0055"><strong>void</strong></font></span><font color="#000000"> checkClientTrusted(X509Certificate[] certs, </font><span style="color: "><font color="#7f0055"><strong>String</strong></font></span><font color="#000000"> authType) </font><span style="color: "><font color="#7f0055"><strong>throws</strong></font></span></font><font size="2"><font color="#000000"> CertificateException {<br /> </font><span style="color: "><font color="#7f0055"><strong>return</strong></font></span></font><font size="2"><font color="#000000">;<br /> }<br /> }</font></font><font color="#000000" size="2"><br />}</font></pre></td></tr></tbody></table><br /><p>With <a href="http://hc.apache.org/httpcomponents-client-ga/index.html">HttpClient</a>, the testURL method become easier</p><br /><table border="0" cellspacing="0" cellpadding="2" width="739"><br /><tbody><br /><tr><br /><td valign="top" width="737"><pre style="background: #ffffff; color: #000000"><font size="2"><span style="color: #7f0055; font-weight: bold">public</span> void testURL(String testURL, String name, String pwd) {<br /> DefaultHttpClient httpclient = <span style="color: #7f0055; font-weight: bold">new</span> DefaultHttpClient();<br /> <span style="color: #7f0055; font-weight: bold">try</span> {<br /> <span style="color: #3f7f59">// Trust all https certificates</span><br /> SSLContext sc = SSLContext.getInstance(<span style="color: #2a00ff">"SSL"</span>);<br /> sc.init(<span style="color: #7f0055; font-weight: bold">null</span>, <span style="color: #7f0055; font-weight: bold">new</span> TrustManager[] { <span style="color: #7f0055; font-weight: bold">new</span> AllPassTrustManager() }, <span style="color: #7f0055; font-weight: bold">null</span>);<br /> <span style="color: #3f7f59">// Use apache SSLSocketFactory</span><br /> httpclient.getConnectionManager().getSchemeRegistry()<br /> .register(<span style="color: #7f0055; font-weight: bold">new</span> Scheme(<span style="color: #2a00ff">"https"</span>, 443, <span style="color: #7f0055; font-weight: bold">new</span> SSLSocketFactory(sc)));<br /> httpclient.getCredentialsProvider().setCredentials(<br> <span style="color: #7f0055; font-weight: bold">new</span> AuthScope(AuthScope.ANY_HOST, 443),<br /> <span style="color: #7f0055; font-weight: bold">new</span> UsernamePasswordCredentials(name, pwd));<br /> HttpGet httpget = <span style="color: #7f0055; font-weight: bold">new</span> HttpGet(testURL);<br /> ResponseHandler<<span style="color: #7f0055; font-weight: bold">String</span>> handler = <span style="color: #7f0055; font-weight: bold">new</span> ResponseHandler<<span style="color: #7f0055; font-weight: bold">String</span>>() {<br /> <span style="color: #7f0055; font-weight: bold">public</span> <span style="color: #7f0055; font-weight: bold">String</span> handleResponse(HttpResponse response) <br> <span style="color: #7f0055; font-weight: bold">throws</span> ClientProtocolException, <span style="color: #7f0055; font-weight: bold">IOException</span> {<br /> <span style="color: #7f0055; font-weight: bold">System</span>.out.println(<span style="color: #2a00ff">"Response Status : "</span> + response.getStatusLine());<br /> <span style="color: #7f0055; font-weight: bold">System</span>.out.println(<span style="color: #2a00ff">"-----Content-----"</span>);<br /> HttpEntity entity = response.getEntity();<br /> <span style="color: #7f0055; font-weight: bold">if</span> (entity != <span style="color: #7f0055; font-weight: bold">null</span>) {<br /> <span style="color: #7f0055; font-weight: bold">return</span> EntityUtils.toString(entity);<br /> } <span style="color: #7f0055; font-weight: bold">else</span> {<br /> <span style="color: #7f0055; font-weight: bold">return</span> <span style="color: #7f0055; font-weight: bold">null</span>;<br /> }<br /> }<br /> }; <br /> <span style="color: #7f0055; font-weight: bold">System</span>.out.println(httpclient.execute(httpget, handler));<br /> } <span style="color: #7f0055; font-weight: bold">catch</span> (<span style="color: #7f0055; font-weight: bold">Exception</span> e) {<br /> e.printStackTrace();<br /> } <span style="color: #7f0055; font-weight: bold">finally</span> {<br /> httpclient.getConnectionManager().shutdown();<br /> }<br />}</font></pre></td></tr></tbody></table><br /><p><strong>Reference : </strong></p><br /><p><a href="http://www.mkyong.com/java/java-https-client-httpsurlconnection-example/">http://www.mkyong.com/java/java-https-client-httpsurlconnection-example/</a><br><a href="http://hc.apache.org/httpcomponents-client-ga/examples.html">http://hc.apache.org/httpcomponents-client-ga/examples.html</a></p> Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0tag:blogger.com,1999:blog-2697592354122524996.post-76370607565215172002012-02-24T17:01:00.001+08:002012-02-24T17:01:12.821+08:00談創業家與專業經理人<p> </p> <p>這是今天在Twitter上回應了<a href="http://twitter.com/#!/deduce">@Deduce</a>大大的一段話</p> <blockquote style="width: 575px; height: 42px"> <p>我覺得專業經理人跟創業家有很大的相似點, 只是喜歡的生活型態不同罷了.</p></blockquote> <p>這樣講或許有點草率,不過專業經理人和創業家的異同,其實在很多地方都有這類的討論</p> <p><strong><font size="4">到底這兩者差在哪?</font></strong></p> <p>下圖為 <a href="http://www.mindmapping.com.tw">孫易新心智圖法</a> 網站彙整EMBA雜誌第295期文章”<a href="http://mag.chinatimes.com/mag-cnt.aspx?artid=7054">創業家和專業經理人有何不同</a>”所得到的心智圖<a href="http://goo.gl/CGFtH"><img src="http://www.mindmapping.com.tw/uploadfiles/%E5%89%B5%E6%A5%AD%E5%AE%B6%E5%92%8C%E5%B0%88%E6%A5%AD%E7%B6%93%E7%90%86%E4%BA%BA%E6%9C%89%E4%BD%95%E4%B8%8D%E5%90%8C_110304.png" width="716" height="379"></a></p> <p>中午吃飯時順口問了同事對於這兩者之間的看法.</p> <p><a href="http://plurk.com/tonyq">TonyQ</a>:字不一樣(當場毆飛)</p> <p><a href="http://zanyking.blogspot.com/">Ian</a>覺得這兩者的驅動(Driven)不同, 專業經理人是透過指標(例如股價,效率,收入)來驅動, 創業家是透過目標(創造更好的Todo List, 雲端筆記本, 社群互動…)來驅動. (簡言之:Different motivation)。</p> <p>這兩者在現今社會也有著非常不同的印象</p> <ul> <li>專業經理人 : 普遍認知為<strong>妥善運用目前資源追求極大利益者</strong> <li>創業家 : 普遍認知為<strong>尋求偉大夢想的實踐者</strong></li></ul> <p>加上在<strong>執行層面</strong>上來說,這兩者的確有非常大的<strong>重疊</strong>. 甚至有非常多的例子是從專業經理人成了創業家,從<a href="http://findbook.tw/book/9789867969217/basic">創業家到執行長</a>。所以不論是企業管理研究或是創業圈都對這兩者有許許多多的討論與分析。</p>好多年前在BBS上有轉錄一篇文章, 叫做”<strong>天生注定當老闆</strong>”(剛剛Google找不到原文…只有許多<a href="http://tw.myblog.yahoo.com/bluesir30/article?mid=333&prev=334&l=f&fid=6">轉載與片段</a>) <br>其中提到的創業家特質,<u>很大一部分跟專業經理人所必須具備的特質是一樣的</u>。不過其中也提到創業家與專業經理人天生性格上最大的鴻溝是<font color="#0000a0"><strong>對於不可測及不確定變數的容忍</strong></font><font color="#000000"> (</font>簡言之就是對於風險的容忍程度。) <p>用一個比喻來說,這兩者就像從不同的登山口,穿戴類似的裝備兩個登山者,不論面對颳風下雨都有著堅忍不拔的毅力,但面對每一個突發狀況的處理方式卻不完全相同。</p> <p><strong><font size="4">身為一個創業家需不需要有專業經理人的思維呢 ?</font></strong></p> <p>許多巨型企業(如IBM, Manpower)都有一個制度,就是把較為成熟的產品部門或技術團隊,切出去當成Branch。整個Branch的五管(包含支出與收入)都獨立運作責任自付。這造就出了許多十八般武藝樣樣精通的專業領導人才,若這些人離開後,踏上創業路,也往往都能建立起自己的一片天。</p> <p>剛剛在翻舊文時從我的Evernote發現一篇之前有意思的文章 <a href="http://www.managertoday.com.tw/?p=2299">「專業經理人」比「創業家老闆」更愛錢?</a>其中談到非金錢動機在進場與退場行為中扮演的角色<strong>.</strong> 這篇文章提供了幾個假設供需要了解分析一間公司的人做參考</p> <p><a href="http://lh6.ggpht.com/-Ab4Kfdf83o0/T0dRy_KXBII/AAAAAAAABos/PIUr7ZMX6Yo/s1600-h/ec%25255B7%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="ec" border="0" alt="ec" src="http://lh5.ggpht.com/-0fo7cZ7qTtQ/T0dRzjMLlNI/AAAAAAAABow/BgQdoJON-jo/ec_thumb%25255B5%25255D.png?imgmax=800" width="434" height="258"></a></p> <p><strong></strong>其中提出三個假設</p> <ol> <li>在由專業經理人所掌管的公司裡,「市場經濟吸引力」與「進場可能性」呈正相關的可能性,大於由所有人管理的公司。</li> <li>由專業經理人管控的公司,比起由企業所有人身兼經理人的公司,更有可能因為經濟誘因愈小,而提高退出市場的可能性。</li> <li>在由專業經理人所管理的公司裡,「市場經濟吸引力」與「公司價格」兩者之間的正向關係,比起在由所有人管理的公司裡更為強烈。</li></ol> <p>在所謂<strong>浪頭上的產業</strong>(白話:市場熱錢的聚集處),只有極少部分的公司是由所謂的專業經理人管理。排除企業導師等等的外部協助,身為一個資訊創業者,除了從做中學之外,對於專業經理人的思維與管理態度也必須要有一定程度的狩獵(最常見的切入點是行銷,專案管理,與人力資源管理),否則就算募了一大筆錢或是擁有很好的Business Model,也很有可能被時代的潮流淹沒。</p> <p><strong><font size="4"></font></strong> </p> <p><strong><font size="4">去創業好還是去當專業經理人好?</font></strong></p> <p>隨著Diablo 3 即將發行,用這張D2圖來解釋最合理也不過</p> <p><a href="http://lh5.ggpht.com/-qQdwlihfnM4/T0dR09IK1BI/AAAAAAAABo4/l2eo-zx5kO0/s1600-h/skill%25255B6%25255D.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="skill" border="0" alt="skill" src="http://lh5.ggpht.com/-rC_E455VnrM/T0dR1hzT_4I/AAAAAAAABpE/kH5u3h5-m6Q/skill_thumb%25255B3%25255D.jpg?imgmax=800" width="333" height="450"></a></p> <p>這世界上本來就沒有所謂完美的Career Path, <strong>你想玩什麼就玩什麼</strong>,如果現階段的環境無法達到滿足或讓你覺得生活無趣,那代表你需要一點改變了。上述提到的創業家的特質與中山大學創意管理教授劉常勇提出的<a href="http://www.inex.twmail.net/temp/p01/175.htm">10D</a>是很可以參考的指標。</p> <p>基本上,累積自己的價值(點技能)都不會有壞處,但是在有限的資源(例如時間)內如何將這些技能在正確的時間發揮,就是每一個人都需要好好思考的了。</p> Anonymoushttp://www.blogger.com/profile/09996981011007266639noreply@blogger.com0