<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4367654613028296334</id><updated>2024-09-22T21:40:24.020+08:00</updated><category term="iOS Dev"/><category term="Python"/><category term="Linux"/><category term="PHP"/><category term="JavaScript"/><category term="Mac"/><category term="Objective-C"/><category term="Android"/><category term="Java"/><category term="Apache"/><category term="Literary 創作與有感而發"/><category term="jQuery"/><category term="閱讀與聽演講筆記"/><category term="CentOS"/><category term="Django"/><category term="Software"/><category term="Node.js"/><category term="CodeIgniter"/><category term="MySQL"/><category term="OSX"/><category term="Ubuntu"/><category term="Windows"/><category term="影片分享"/><category term="Debian"/><category term="Lovely Song"/><category term="Ruby on Rails"/><category term="轉貼文章"/><category term="Blogger"/><category term="Moodle"/><category term="Ruby"/><category term="Sublime Text"/><category term="Web Design"/><category term="CSS"/><category term="Good Website"/><category term="Japanese 日語學習"/><category term="MSN"/><category term="MongoDB"/><category term="Network"/><category term="One-Liners"/><category term="Shell Script"/><category term="Spring"/><category term="Theory"/><category term="C"/><category term="Cherokee"/><category term="Color"/><category term="Data Structure"/><category term="English 英語學習"/><category term="ExpressJS"/><category term="JavaEE"/><category term="Komodo"/><category term="Language"/><category term="Matlab"/><category term="Microsoft Word"/><category term="PhotoShop"/><category term="Xcode"/><category term="nginx"/><category term="ssh"/><category term="Automator"/><category term="Bootstrap"/><category term="Chrome"/><category term="Chrome Extension"/><category term="Eclipse"/><category term="Erlang"/><category term="Excel"/><category term="F2E"/><category term="Flash"/><category term="Front-End"/><category term="Game"/><category term="Github"/><category term="Good Books"/><category term="HTML"/><category term="HTML5"/><category term="KUbuntu"/><category term="LDAP"/><category term="Legend"/><category term="LifeType"/><category term="OS X Lion"/><category term="Object-Oriented_物件導向"/><category term="PEAR"/><category term="Quotes"/><category term="SQL"/><category term="Steve Jobs"/><category term="SyntaxHighlighter"/><category term="Tcl"/><category term="Tips"/><category term="Tk"/><category term="Twitter"/><category term="UML"/><category term="Unicode"/><category term="VMware"/><category term="Visual Basic"/><category term="XML"/><category term="Zen Coding"/><category term="commands"/><category term="dotfiles"/><category term="git"/><category term="i18n"/><category term="iPhone"/><category term="proxy"/><category term="vim"/><category term="心理測驗"/><title type='text'>Hank to hanker - Learning Note</title><subtitle type='html'>一個成功的拳擊手, 就是在眾多的打擊和跌倒後爬起來。人生亦如是。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://whhnote.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>304</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-3382754581747043285</id><published>2013-08-02T21:41:00.002+08:00</published><updated>2016-04-23T17:37:26.288+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MongoDB"/><title type='text'>[MongoDB] MongoDB Shell Note</title><content type='html'>&lt;script src=&quot;https://gist.github.com/hanksudo/6087298.js&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/3382754581747043285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/3382754581747043285'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/08/mongodb-mongodb-shell-note.html' title='[MongoDB] MongoDB Shell Note'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-9116204045383102822</id><published>2013-08-01T19:00:00.002+08:00</published><updated>2016-04-23T17:37:45.695+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>[Python ] Compare two list only return matched</title><content type='html'>&lt;script src=&quot;https://gist.github.com/hanksudo/6130371.js&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/9116204045383102822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/9116204045383102822'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/08/python-compare-two-list-only-return.html' title='[Python ] Compare two list only return matched'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-2154729581814545118</id><published>2013-07-15T12:07:00.000+08:00</published><updated>2016-04-23T17:38:22.830+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ExpressJS"/><category scheme="http://www.blogger.com/atom/ns#" term="i18n"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><title type='text'>[NodeJS] Express 3.x 整合i18n-node實現多語言網站 - use i18n-node implement multilanguage website with express 3.x</title><content type='html'>&lt;script src=&quot;https://gist.github.com/hanksudo/5994144.js&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/2154729581814545118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/2154729581814545118'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/07/nodejs-express-3x-i18n-node-use-i18n.html' title='[NodeJS] Express 3.x 整合i18n-node實現多語言網站 - use i18n-node implement multilanguage website with express 3.x'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-809093054483395130</id><published>2013-07-15T12:03:00.000+08:00</published><updated>2013-07-15T12:03:22.499+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nginx"/><title type='text'>[Nginx] 自定義error page - nginx custom error page</title><content type='html'>在這使用的是預設路徑, 也可以改成自己放error page的路徑
&lt;pre class=&quot;code&quot;&gt;
server {
    listen 80;                                                                  
    server_name my-domain-name.com;
    
    error_page 500 502 503 504  /error.html;
    location = /error.html {
        root   html;
    }   

    location / {
    }
}
&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/809093054483395130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/809093054483395130'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/07/nginx-error-page-nginx-custom-error-page.html' title='[Nginx] 自定義error page - nginx custom error page'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-7161225519015808984</id><published>2013-07-14T17:20:00.000+08:00</published><updated>2013-07-15T12:03:37.733+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nginx"/><category scheme="http://www.blogger.com/atom/ns#" term="proxy"/><title type='text'>[Nginx] 使用Nginx proxy_pass 時保留 host header</title><content type='html'>&lt;p&gt;原本我使用 nginx 的 proxy_pass 只設定這樣&lt;/p&gt;
&lt;code&gt;vim /usr/local/etc/nginx/site-enabled/site&lt;/code&gt;
&lt;pre class=&quot;code&quot;&gt;
server {
    listen 80;
    server_name my-domain-name.com;
 
    location / {
        proxy_pass  http://hank.local:8210;
    }
}&lt;/pre&gt;

&lt;p&gt;但是在後端程式從 header 裡判斷 host 會一直找到 hank.local:8210 而不是 my-domain-name.com &lt;/p&gt;
&lt;p&gt;後來找到一個方法可以保留 header 到 proxy 裡, 加上 proxy_set_header Host $http_host 即可&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;
server {
    listen 80;
    server_name my-domain-name.com;
 
    location / {
        proxy_pass  http://hank.local:8210;
        proxy_set_header Host $http_host;
    }
}
&lt;/pre&gt;

&lt;p&gt;重新讀取 nginx 設定檔&lt;/p&gt;
&lt;code&gt;sudo nginx -s reload&lt;/code&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/7161225519015808984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/7161225519015808984'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/07/nginx-nginx-proxypasshost-header.html' title='[Nginx] 使用Nginx proxy_pass 時保留 host header'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-5024523687752353839</id><published>2013-07-08T12:11:00.000+08:00</published><updated>2013-07-08T13:05:54.829+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><title type='text'>[Mac] 英文單字或句子不會唸? 讓Mac直接幫你念出來。</title><content type='html'>&lt;p&gt;常看到一個英文單字或句子時, 不懂得怎麼唸, 秉持勤勉精神, 想努力學習一下, 但總是沒有很好的工具可以快速方便的唸出不懂怎麼唸的句子, 只要妳是用Mac, 內建就有功能能做到&lt;/p&gt;

&lt;p&gt;突然發現Mac有個say指令, 可以直接在terminal底下唸出輸入的文字&lt;/p&gt;
&lt;b&gt;say - Convert text to audible speech&lt;/b&gt;

&lt;p&gt;&lt;b&gt;直接在指令後面接上要說出的單字或句子&lt;/b&gt;&lt;/p&gt;
&lt;code&gt;$ say Hello&lt;/code&gt;

&lt;p&gt;&lt;b&gt;或是指定說出一個檔案內的內容&lt;/b&gt;&lt;/p&gt;
&lt;code&gt;$ say -f article.txt&lt;/code&gt;

&lt;p&gt;&lt;b&gt;也可以指定語音檔取代內建的語音, 或是使用其他內建的語音&lt;/b&gt;&lt;/p&gt;
&lt;code&gt;$ say -v ?&lt;/code&gt;

&lt;p&gt;&lt;b&gt;看看更多的附加功能&lt;/b&gt;&lt;/p&gt;
&lt;code&gt;$ man say&lt;/code&gt;

對於學習英文唸法時很有用 :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/5024523687752353839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/5024523687752353839'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/07/mac-say-convert-text-to-audible-speech.html' title='[Mac] 英文單字或句子不會唸? 讓Mac直接幫你念出來。'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-375146188375497823</id><published>2013-07-05T14:33:00.000+08:00</published><updated>2013-07-05T14:34:06.995+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ExpressJS"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><title type='text'>[NodeJS] Pretty HTML on Express 3.x</title><content type='html'>&lt;script src=&quot;https://gist.github.com/hankwang/5932408.js&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/375146188375497823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/375146188375497823'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/07/express-3-pretty-html-option.html' title='[NodeJS] Pretty HTML on Express 3.x'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-7660004988251195181</id><published>2013-06-27T20:48:00.001+08:00</published><updated>2013-06-27T20:48:35.084+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="Shell Script"/><title type='text'>[shell] Top 10 shell commands you currently use</title><content type='html'>&lt;script src=&quot;https://gist.github.com/hankwang/5876091.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;My Top Ten:&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;
2061 git
482 ll
165 cd
131 ssh
123 sed
116 vim
106 forever
98 rm
86 brew
84 ls
&lt;/pre&gt;


&lt;p&gt;&lt;b&gt;See Also&lt;/b&gt;&lt;/p&gt;

&lt;a href=&quot;https://coderwall.com/p/o5qijw&quot;&gt;https://coderwall.com/p/o5qijw&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/7660004988251195181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/7660004988251195181'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/06/shell-top-10-shell-commands-you.html' title='[shell] Top 10 shell commands you currently use'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-4410715878140974883</id><published>2013-06-20T17:51:00.000+08:00</published><updated>2013-06-20T17:51:31.196+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Quotes"/><category scheme="http://www.blogger.com/atom/ns#" term="Steve Jobs"/><title type='text'>[Quotes] Simple can be harder than complex ... Steve Jobs - 簡單比複雜難得多</title><content type='html'>
&lt;h3&gt;&quot;Simple can be harder than complex. You have to work hard to get your thinking clean to make it simple. But it’s worth it in the end because once you get there, you can move mountains.&quot; -- Steve Jobs&lt;/h3&gt;


&lt;p&gt;簡單比複雜難得多，你必須竭盡全力、理清思路，才能創造簡單。但這絕對值得，因為只有這樣，你才能開闢新世界。&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/4410715878140974883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/4410715878140974883'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/06/quotes-simple-can-be-harder-than.html' title='[Quotes] Simple can be harder than complex ... Steve Jobs - 簡單比複雜難得多'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-2230778119808167155</id><published>2013-06-19T20:03:00.000+08:00</published><updated>2013-06-19T20:03:08.613+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network"/><category scheme="http://www.blogger.com/atom/ns#" term="ssh"/><title type='text'>[ssh] ProxyCommand - Run a local command before ssh to remote server.</title><content type='html'>Modify ~/.ssh/config

&lt;pre class=&quot;code&quot;&gt;
Host mydomain
    ProxyCommand sh -c &quot;local_command /usr/bin/nc %h %p&quot;

Host mydomain
    Hostname=mokoversity.com
    IdentityFile=~/.ssh/mokoversity_dsa
    User=hank
    PasswordAuthentication=no
    PubkeyAuthentication=yes
&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/2230778119808167155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/2230778119808167155'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/06/ssh-proxycommand-run-local-command.html' title='[ssh] ProxyCommand - Run a local command before ssh to remote server.'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-7379011697551131250</id><published>2013-06-18T06:43:00.000+08:00</published><updated>2013-06-19T19:58:41.850+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="Network"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="ssh"/><title type='text'>[Mac] ssh remote server through socks proxy - 經由socks proxy ssh到遠端Server</title><content type='html'>&lt;p&gt;&lt;h3&gt;1. &lt;u&gt;Install ProxyChains&lt;/u&gt;&lt;/h3&gt;&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;$ wget https://gist.github.com/allenhuang/3792521/raw/bb52568695f9d745004eee87b892637f9d17a771/proxychains4_formula.rb
$ mv proxychains4_formula.rb /usr/local/Library/Formula/Proxychains.rb
$ brew install --HEAD proxychains
&lt;/pre&gt;

&lt;p&gt;&lt;h3&gt;2. &lt;u&gt;Modify ProxyChains conf&lt;/u&gt;&lt;/h3&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ vim /usr/local/etc/proxychains.conf&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;set this line to conf:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;socks4  127.0.0.1 8888&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;h3&gt;3. &lt;u&gt;Open socks&lt;/u&gt;&lt;/h3&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ssh -vND 8888 user@socks.server&lt;/code&gt;&lt;/p&gt;


&lt;p&gt;&lt;h3&gt;4. &lt;u&gt;Settings Socks Proxy on Mac Network Preference&lt;/u&gt;&lt;/h3&gt;&lt;/p&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkl6-_jhsNoA92MrQ3hilLvhi1CgbB-1kFim6m6v6Zaz-QVw94eIc7yaVVu4otukApG_mn4oBooBtItsQ8wZBBQseCy5R5TQGU57pMy36e3vXytQAgEJfuKbidpbQ98jPJFCoICUussiwO/s1600/Screen+Shot+2013-06-18+at+%E4%B8%8A%E5%8D%886.37.53.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;566&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkl6-_jhsNoA92MrQ3hilLvhi1CgbB-1kFim6m6v6Zaz-QVw94eIc7yaVVu4otukApG_mn4oBooBtItsQ8wZBBQseCy5R5TQGU57pMy36e3vXytQAgEJfuKbidpbQ98jPJFCoICUussiwO/s640/Screen+Shot+2013-06-18+at+%E4%B8%8A%E5%8D%886.37.53.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;

&lt;p&gt;&lt;h3&gt;5. &lt;/u&gt;Connect to remote server&lt;/u&gt;&lt;/h3&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ /usr/local/bin/proxychains4 ssh user@remote.server&lt;/code&gt;&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/7379011697551131250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/7379011697551131250'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/06/mac-ssh-remote-server-through-socks.html' title='[Mac] ssh remote server through socks proxy - 經由socks proxy ssh到遠端Server'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkl6-_jhsNoA92MrQ3hilLvhi1CgbB-1kFim6m6v6Zaz-QVw94eIc7yaVVu4otukApG_mn4oBooBtItsQ8wZBBQseCy5R5TQGU57pMy36e3vXytQAgEJfuKbidpbQ98jPJFCoICUussiwO/s72-c/Screen+Shot+2013-06-18+at+%E4%B8%8A%E5%8D%886.37.53.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-8343877533556440173</id><published>2013-06-15T16:46:00.000+08:00</published><updated>2013-06-15T16:46:16.227+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="vim"/><title type='text'>[Vim] vim configuration</title><content type='html'>&lt;p&gt;我其實很少用vim ... 不過有時候在Mac用一下、Linux用一下，覺得沒存一下設定檔不行... 所以慢慢整理一份出來 &lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/hankwang/5787421.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;u&gt;&lt;b&gt;See Also&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;

&lt;a href=&quot;http://vim.wikia.com/wiki/Example_vimrc&quot;&gt;http://vim.wikia.com/wiki/Example_vimrc&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/8343877533556440173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/8343877533556440173'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/06/vim-vim-configuration.html' title='[Vim] vim configuration'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-8386330827443235921</id><published>2013-06-03T23:05:00.002+08:00</published><updated>2013-06-27T11:16:59.354+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="F2E"/><category scheme="http://www.blogger.com/atom/ns#" term="Front-End"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>F2E前端工程師面試問題集 - Front-end Job Interview Questions</title><content type='html'>&lt;b&gt;Fork me on Github : &lt;a href=&quot;https://github.com/hankwang/Front-end-Developer-Interview-Questions&quot;&gt;Front-end-Developer-Interview-Questions&lt;/a&gt;&lt;/b&gt;

&lt;script src=&quot;https://gist.github.com/hankwang/5873678.js&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/8386330827443235921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/8386330827443235921'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/06/front-end-job-interview-questions.html' title='F2E前端工程師面試問題集 - Front-end Job Interview Questions'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-9108155918798561300</id><published>2013-06-03T20:16:00.002+08:00</published><updated>2013-06-18T06:43:58.506+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dotfiles"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><title type='text'>[OSX] dotfiles - zsh based Terminal editor and configuration files.</title><content type='html'>&lt;p&gt;My dotfiles: &lt;a href=&quot;https://github.com/hankwang/dotfiles&quot;&gt;https://github.com/hankwang/dotfiles&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Image 1&lt;/p&gt;
&lt;img src=&quot;http://i.imgur.com/vzftD0D.png&quot; width=&quot;90%&quot; /&gt;
&lt;p&gt;Image 2&lt;/p&gt;
&lt;img src=&quot;http://i.imgur.com/lUdmw87.png&quot; width=&quot;90%&quot; /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/9108155918798561300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/9108155918798561300'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/06/osx-dotfiles-zsh-based-terminal.html' title='[OSX] dotfiles - zsh based Terminal editor and configuration files.'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-7456788549815739201</id><published>2013-06-03T12:12:00.000+08:00</published><updated>2013-06-03T20:18:07.021+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commands"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="One-Liners"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><title type='text'>[OSX] copy last command by pbcopy - 複製上一個指令到剪貼簿</title><content type='html'>

&lt;p&gt;例如測試一行command是不是正確的, 確認之後我想複製起來做筆記或是貼到別地方, 這時候就可以透過pbcopy達到快速複製的效果, 不用再用滑鼠去框。&lt;/p&gt;
&lt;code&gt;
$ ps -awx
&lt;/code&gt;

&lt;p&gt;把上一個指令複製到剪貼簿&lt;/p&gt;
&lt;code&gt;
$ echo &quot;!!&quot; | pbcopy
&lt;/code&gt;

&lt;p&gt;把上一個指令的最後一個參數複製到剪貼簿&lt;/p&gt;
&lt;code&gt;
$ echo &quot;!$&quot; | pbcopy
&lt;/code&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/7456788549815739201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/7456788549815739201'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/06/mac-copy-last-command-by-pbcopy.html' title='[OSX] copy last command by pbcopy - 複製上一個指令到剪貼簿'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-1224890902162742991</id><published>2013-06-02T02:03:00.003+08:00</published><updated>2013-06-02T02:05:58.419+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>[git] Syncing a fork - 同步原本repo的修改到fork出來的repo</title><content type='html'>
&lt;ol&gt;
&lt;li&gt;加入新的遠端repo&lt;/li&gt;
&lt;li&gt;取回遠端repo&lt;/li&gt;
&lt;li&gt;合併repo到master&lt;/li&gt;
&lt;li&gt;解決conflict的commits&lt;/li&gt;
&lt;/ol&gt;


&lt;br /&gt;&lt;h3&gt;列出目前的遠端repo&lt;/h3&gt;

&lt;pre class=&quot;code&quot;&gt;$ git remote -v 
origin https://github.com/user/repo.git (fetch)
origin https://github.com/user/repo.git (push)
&lt;/pre&gt;

&lt;br /&gt;&lt;h3&gt;加入一個新的遠端repo&lt;/h3&gt;

&lt;pre class=&quot;code&quot;&gt;$ git remote add upstream https://github.com/otheruser/repo.git
&lt;/pre&gt;

&lt;p&gt;註: upstream 為加入的遠端repo名稱, 可以自取&lt;/p&gt;

&lt;br /&gt;&lt;h3&gt;查看新加入的遠端repo&lt;/h3&gt;

&lt;pre class=&quot;code&quot;&gt;$ git remote -v

origin https://github.com/user/repo.git (fetch)
origin https://github.com/user/repo.git (push)
upstream https://github.com/otheruser/repo.git (fetch)
upstream https://github.com/otheruser/repo.git (push)
&lt;/pre&gt;

&lt;br /&gt;&lt;h3&gt;取回新加入的遠端repo的所有分支(branches)&lt;/h3&gt;

&lt;pre class=&quot;code&quot;&gt;$ git fetch upstream

remote: Counting objects: 75, done.
remote: Compressing objects: 100% (53/53), done.
remote: Total 62 (delta 27), reused 44 (delta 9)
Unpacking objects: 100% (62/62), done.
From https://github.com/otheruser/repo
 * [new branch]      master     -&amp;gt; upstream/master
&lt;/pre&gt;

&lt;br /&gt;&lt;h3&gt;查看目前本機和遠端的所有分支(branches)&lt;/h3&gt;

&lt;pre class=&quot;code&quot;&gt;$ git branch -va

* master                  a422352 My local commit
  remotes/origin/HEAD     -&amp;gt; origin/master
  remotes/origin/master   a422352 My local commit
  remotes/upstream/master 5fdff0f Some upstream commit
&lt;/pre&gt;

&lt;br /&gt;&lt;h3&gt;合併upstream的master到目前repo的master&lt;/h3&gt;

&lt;pre class=&quot;code&quot;&gt;$ git merge upstream/master

Updating 34e91da..16c56ad
Fast-forward
README.md                 |    5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
&lt;/pre&gt;

&lt;br /&gt;&lt;h3&gt;如果merge時遇到conflict, 例如&lt;strong&gt;README.md&lt;/strong&gt; conflict&lt;/h3&gt;

&lt;pre class=&quot;code&quot;&gt;$ git status

# You have unmerged paths.
#   (fix conflicts and run &quot;git commit&quot;)
#
# Changes to be committed:
#
#   new file:   run.sh
#
# Unmerged paths:
#   (use &quot;git add &amp;lt;file&amp;gt;...&quot; to mark resolution)
#
#   both modified:      README.md
&lt;/pre&gt;

&lt;p&gt;編輯&lt;strong&gt;README.md&lt;/strong&gt;處理conflict的地方後, 重新commit&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;$ git add README.md
$ git rebase --continue
&lt;/pre&gt;

&lt;br /&gt;&lt;h3&gt;See also&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://help.github.com/articles/syncing-a-fork&quot;&gt;Github - Syncing a fork&lt;/a&gt;&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/1224890902162742991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/1224890902162742991'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/06/syncing-fork.html' title='[git] Syncing a fork - 同步原本repo的修改到fork出來的repo'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-68516487489875756</id><published>2013-05-22T16:53:00.001+08:00</published><updated>2013-05-22T16:53:53.858+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>[Python] list pip installed packages - 列出pip已安裝的套件</title><content type='html'>&lt;strong&gt;List all installed packages - 列出所有已安裝的套件&lt;/strong&gt;
&lt;p&gt;&lt;code&gt;$ pip freeze&lt;/code&gt;&lt;/p&gt;

&lt;strong&gt;Check specify package version - 查看某套件版本&lt;/strong&gt;
&lt;p&gt;&lt;code&gt;$ pip freeze | grep Django&lt;/code&gt;&lt;/p&gt;

</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/68516487489875756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/68516487489875756'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/05/python-list-pip-installed-packages-pip.html' title='[Python] list pip installed packages - 列出pip已安裝的套件'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-4093888256572319921</id><published>2013-05-10T17:12:00.001+08:00</published><updated>2013-05-22T16:27:23.437+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSS"/><title type='text'>[CSS] Drop down menu without JS</title><content type='html'>純CSS+HTML的下拉式選單, 直接選取Result欄位看結果

&lt;iframe width=&quot;100%&quot; height=&quot;300&quot; src=&quot;http://jsfiddle.net/hankwang/cgRw6/embedded/html,css,result&quot; allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;b&gt;See Also&lt;/b&gt;

&lt;a href=&quot;http://www.ryancollins.me/?p=1041&quot;&gt;http://www.ryancollins.me/?p=1041&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/4093888256572319921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/4093888256572319921'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/05/css-drop-down-menu-without-js.html' title='[CSS] Drop down menu without JS'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-8133110473526854682</id><published>2013-04-26T02:28:00.000+08:00</published><updated>2016-04-23T17:38:50.056+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS Dev"/><title type='text'>[iOS Dev] UILocalNotification in particular time - 指定時間本地通知</title><content type='html'>&lt;p&gt;Add Local Notification at particular time&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/hanksudo/5457862.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;Cancel one particular LocalNotification&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/hanksudo/5457988.js&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/8133110473526854682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/8133110473526854682'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/04/ios-dev-uilocalnotification-in.html' title='[iOS Dev] UILocalNotification in particular time - 指定時間本地通知'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-5428597565863752689</id><published>2013-04-25T12:05:00.000+08:00</published><updated>2013-04-25T12:05:20.537+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Github"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><title type='text'>[NodeJS] Auto deploy by github hook</title><content type='html'>Github hook service會在有新的commit的時候觸發hook API(bitbucket也有), 這可以用在&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;遠端Server自動部署, 才不用每次都ssh到遠端Server去git pull然後deploy一遍&lt;/li&gt;
&lt;li&gt;自動發訊息到團隊的協作平台或是寄發Email&lt;/li&gt;
&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Github本身支援很多好用的服務, 那我是用WebHook在我的主機上, 當有commit時會觸發Server上的hook, 然後執行一個Shell Script, 自動git pull然後重新啓動我的Web Service&lt;br /&gt;
&lt;br /&gt;&lt;code&gt;
$ cd /var/web/project&lt;br /&gt;
$ git pull&lt;br /&gt;
$ forever restart /var/web/project/app.js&lt;br /&gt;&lt;/code&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Code&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;https://github.com/hankwang/node-github-hook-deploy&quot;&gt;https://github.com/hankwang/node-github-hook-deploy&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/5428597565863752689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/5428597565863752689'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/04/nodejs-auto-deploy-by-github-hook.html' title='[NodeJS] Auto deploy by github hook'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-3800406655875369625</id><published>2013-04-02T11:57:00.000+08:00</published><updated>2013-04-06T16:50:14.671+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><title type='text'>[Linux] 使用 Crontab 定時執行程式</title><content type='html'>&lt;h2&gt;為什麼用 crontab ?&lt;/h2&gt;

&lt;h4&gt;執行例行性的工作, 例:&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;定期備份資料&lt;/li&gt;
&lt;li&gt;定期寄送Server log到某個Email&lt;/li&gt;
&lt;li&gt;定期檢查系統狀態&lt;/li&gt;
&lt;/ul&gt;

&lt;br /&gt;
&lt;h2&gt;crontab 指令&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;$ crontab -l # 列出所有 cron jobs
$ crontab -r # 刪除所有 cron jobs
$ crontab -e # 編輯目前使用者的 cron jobs
$ crontab [-u  user] -l # 列出某個使用者的cron jobs (要有權限) 
&lt;/code&gt;&lt;/pre&gt;

&lt;br /&gt;
&lt;h2&gt;時間格式 time format&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;minutes 0-59&lt;/li&gt;
&lt;li&gt;hour 0-23&lt;/li&gt;
&lt;li&gt;day of month 1-31&lt;/li&gt;
&lt;li&gt;month 1-12&lt;/li&gt;
&lt;li&gt;day of week 0-7 (0 or 7 is Sun)&lt;/li&gt;
&lt;/ul&gt;

&lt;br /&gt;
&lt;h2&gt;crontab sample&lt;/h2&gt;

&lt;script src=&quot;https://gist.github.com/hankwang/5289084.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
&lt;p&gt;&lt;strong&gt;See Also&lt;/strong&gt;&lt;/p&gt;
&lt;a href=&quot;http://linux.die.net/man/5/crontab&quot;&gt;crontab(5) - Linux man page&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/3800406655875369625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/3800406655875369625'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/04/linux-crontab.html' title='[Linux] 使用 Crontab 定時執行程式'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-6064790595244412881</id><published>2013-04-02T09:27:00.000+08:00</published><updated>2013-04-02T09:27:54.336+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sublime Text"/><title type='text'>[Sublime Text] 我的Sublime Text 2設定檔</title><content type='html'>&lt;p&gt;高亮目前選取行&lt;code&gt;&quot;highlight_line&quot;: true&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;停用Vintage模式 (&lt;a href=&quot;http://www.sublimetext.com/docs/2/vintage.html&quot;&gt;Vintage Mode&lt;/a&gt;)
&lt;code&gt; &quot;ignored_packages&quot;:
 [
  &quot;Vintage&quot;
 ],
&lt;/code&gt;
&lt;/p&gt;


&lt;p&gt;Soda樣式的tab&lt;code&gt;&quot;soda_classic_tabs&quot;: false&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;tab的大小&lt;code&gt;&quot;tab_size&quot;: 4&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;把tab轉為空白鍵&lt;code&gt;&quot;translate_tabs_to_spaces&quot;: true&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;存檔時移除不必要的空白&lt;code&gt;&quot;trim_trailing_white_space_on_save&quot;: true&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;偵測跑很慢的plugin, 會跳出警告&lt;code&gt;&quot;detect_slow_plugins&quot;: false&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;完整的設定檔&lt;/strong&gt;&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/hankwang/4987299.js&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/6064790595244412881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/6064790595244412881'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/04/sublime-text-sublime-text-2.html' title='[Sublime Text] 我的Sublime Text 2設定檔'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-5203448743836257589</id><published>2013-03-23T14:02:00.001+08:00</published><updated>2013-03-23T14:11:21.327+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sublime Text"/><title type='text'>[Sublime Text Plugin] EasyMotion - 透過鍵盤移動滑鼠游標到指定位置</title><content type='html'>&lt;h3&gt;EasyMotion - 讓你用鍵盤就可以滑鼠游標及選取一塊程式碼&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/tednaleid/sublime-EasyMotion&quot;&gt;EasyMotion on Github&lt;/a&gt;&lt;/p&gt;
&lt;img height=&quot;161&quot; src=&quot;https://raw.github.com/tednaleid/sublime-EasyMotion/add_images/images/many_matches_second.png&quot; alt=&quot;EasyMotion&quot; /&gt;

&lt;h3&gt;透過Sublime Text Package Manager安裝&lt;/h3&gt;

&lt;p&gt;在Sunlime Text 2 使用 &lt;code&gt;Cmd + Shift + P&lt;/code&gt; 然後 Install Package 安裝 EasyMotion&lt;/p&gt;

&lt;h3&gt;使用方式&lt;/h3&gt;

&lt;p&gt;移動滑鼠游標: &lt;code&gt;Cmd + ; + 要到達的英文字&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;選取一塊區域: &lt;code&gt;Shift + Cmd + ; + 要到達的英文字&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;EasyMotion 安裝與使用介紹影片&lt;/h3&gt;

&lt;p&gt;
&lt;object height=&quot;315&quot; width=&quot;560&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/CmaX23TP2XE?version=3&amp;amp;hl=zh_TW&quot;&gt;&lt;/param&gt;
&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;
&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;
&lt;embed src=&quot;http://www.youtube.com/v/CmaX23TP2XE?version=3&amp;amp;hl=zh_TW&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;560&quot; height=&quot;315&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot;&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;/p&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/5203448743836257589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/5203448743836257589'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/03/sublime-text-plugin-easymotion.html' title='[Sublime Text Plugin] EasyMotion - 透過鍵盤移動滑鼠游標到指定位置'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-7030258800951285115</id><published>2013-03-22T04:40:00.000+08:00</published><updated>2013-03-22T04:40:29.456+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="Sublime Text"/><title type='text'>[Sublime Text] Run NodeJS file on Sublime Text 2</title><content type='html'>在Sublime Text的選單列 &lt;code&gt;Tools -&gt; Build System -&gt; New Build System...&lt;/code&gt;

然後複製以下內容存成 &lt;code&gt;JavaScript.sublime-build&lt;/code&gt; 放至&lt;br /&gt;&lt;br /&gt;
路徑:&lt;br /&gt;
&lt;code&gt;~/Library/Application Support/Sublime Text 2/Packages/JavaScript&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/hankwang/5216413.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
就可以透過Cmd + B(Ctrl + B on Windows)直接 Build :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/7030258800951285115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/7030258800951285115'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/03/sublime-text-run-nodejs-file-on-sublime.html' title='[Sublime Text] Run NodeJS file on Sublime Text 2'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4367654613028296334.post-1166059950009769932</id><published>2013-03-18T06:10:00.001+08:00</published><updated>2013-03-18T06:17:23.998+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><title type='text'>[Mac] 畫面截圖小技巧 Scrrenshot Tips</title><content type='html'>&lt;div class=&quot;separator&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjflvzzjDHbDiMz7aX_nTMoGsBJxn9NbLbOWw2q2O2yWKvU7PcxQlD9RcxexwZwvnb2pTYF2vG5NN2REkd-SkzgeYSjE-cWfGk-TbC8tajls_jxOyG40YaIi1nCdo4tkYnA19f-WWd5A9Fl/s400/Screen+Shot+2013-03-18+at+%E4%B8%8A%E5%8D%886.02.11.png&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;b&gt;快捷鍵 Shortcuts&lt;/b&gt;&lt;/h3&gt;
&lt;br /&gt;
⌘ + Ctrl + Shift + 3 &amp;nbsp; (全畫面截圖, 暫存於剪貼簿)&lt;br /&gt;
⌘ + Ctrl + Shift + 4 &amp;nbsp; (框選要截圖的部分, 暫存於剪貼簿)&lt;br /&gt;
⌘ + Shift + 3 &amp;nbsp; (全畫面截圖, 直接儲存)&lt;br /&gt;
⌘ + Shift + 4 &amp;nbsp; (框選要截圖的部分, 直接儲存)&lt;br /&gt;
⌘ + Shift + 4, Space &amp;nbsp;(選取要截圖的視窗, 直接儲存)&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;h3&gt;&lt;b&gt;更改預設畫面截圖儲存路徑&lt;/b&gt;&lt;/h3&gt;&lt;br /&gt;
例如我把預設路徑設在~/screenshots (在Terminal中執行)&lt;br /&gt;
&lt;br /&gt;
# 更改預設的畫面截圖儲存路徑&lt;br /&gt;
&lt;code&gt;
$ defaults write com.apple.screencapture location ~/screenshots/
&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;
# 重載畫面程序&lt;br /&gt;
&lt;code&gt;
$ killall SystemUIServer
&lt;/code&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/1166059950009769932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4367654613028296334/posts/default/1166059950009769932'/><link rel='alternate' type='text/html' href='http://whhnote.blogspot.com/2013/03/mac-scrrenshot-tips.html' title='[Mac] 畫面截圖小技巧 Scrrenshot Tips'/><author><name>Hank Wang</name><uri>http://www.blogger.com/profile/02326720265335366792</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjflvzzjDHbDiMz7aX_nTMoGsBJxn9NbLbOWw2q2O2yWKvU7PcxQlD9RcxexwZwvnb2pTYF2vG5NN2REkd-SkzgeYSjE-cWfGk-TbC8tajls_jxOyG40YaIi1nCdo4tkYnA19f-WWd5A9Fl/s72-c/Screen+Shot+2013-03-18+at+%E4%B8%8A%E5%8D%886.02.11.png" height="72" width="72"/></entry></feed>