<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by kcliu on Medium]]></title>
        <description><![CDATA[Stories by kcliu on Medium]]></description>
        <link>https://medium.com/@kcliu?source=rss-81cba4ed210f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lWQBgyygVboGaA4XG-_olA.jpeg</url>
            <title>Stories by kcliu on Medium</title>
            <link>https://medium.com/@kcliu?source=rss-81cba4ed210f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 07:19:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kcliu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Immutable.Records]]></title>
            <link>https://medium.com/@kcliu/immutable-records-34a38e83c50e?source=rss-81cba4ed210f------2</link>
            <guid isPermaLink="false">https://medium.com/p/34a38e83c50e</guid>
            <category><![CDATA[immutablejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[es6]]></category>
            <dc:creator><![CDATA[kcliu]]></dc:creator>
            <pubDate>Sun, 16 Jul 2017 17:08:21 GMT</pubDate>
            <atom:updated>2017-07-16T17:08:21.404Z</atom:updated>
            <content:encoded><![CDATA[<p>最近開始在 project 內使用 Immutable.Records，紀錄一下幾個特色：</p><h4>self-documenting</h4><ul><li>在讀源碼的時候可以輕易地從 Records 的宣告理解資料格式</li></ul><h4>Immutable structure</h4><ul><li>彌補了 js plain object 可以隨意刪改 property 的問題</li></ul><h4>存取方式</h4><ul><li>可以用 js plain object 的方式存取 `console.log(record.name)`</li><li>比較特別的是也可以用 es6 destructuring (這很讚, 因為寫 Immutable 的時候常常覺得用不上 es6 syntax 很煩)</li><li>Records 繼承了 Immutable.Map 所有的 functions，所以如果把 Records 包在 Map 裡也可以用 getIn 來取值</li></ul><p>ref:</p><ul><li><a href="https://tonyhb.gitbooks.io/redux-without-profanity/content/using_immutablejs_records.html">Using Immutable.js Records | Redux without Profanity</a></li><li><a href="https://facebook.github.io/immutable-js/docs/#/Record">Immutable.js</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34a38e83c50e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[聶隱娘]]></title>
            <link>https://medium.com/@kcliu/%E8%81%B6%E9%9A%B1%E5%A8%98-854eb9c4ffce?source=rss-81cba4ed210f------2</link>
            <guid isPermaLink="false">https://medium.com/p/854eb9c4ffce</guid>
            <category><![CDATA[review]]></category>
            <category><![CDATA[movies]]></category>
            <dc:creator><![CDATA[kcliu]]></dc:creator>
            <pubDate>Sun, 20 Sep 2015 19:54:56 GMT</pubDate>
            <atom:updated>2015-09-23T04:23:39.119Z</atom:updated>
            <content:encoded><![CDATA[<p>作為一個電影觀眾，我進電影院的唯一期望只是想看一個好的故事；但由於我事前不愛作功課，常常踩到雷也只是剛好而已。這次會想看「聶隱娘」，純粹是身為武俠迷對這部電影有著一點美好的想像。然而儘管抱著一絲絲期待進場，終究是落得失望而歸。</p><p>當初看侯導的「悲情城市」，就已經對其每段劇情之間的弱連結感到傷神，但真的沒想到在「聶」片又更加地變本加厲。片中每個鏡頭之間穿插的大量留白，我只能理解為藝術手法的表現，對我而言，就是不斷地提醒我是個旁觀者；冷澀的台詞中以文言為主體，但又時不時有極為白話的台詞，前者令人難以下嚥；後者則令人出戲。</p><p>回到「聶」片的劇本，真真切切是平舖直敘，一根腸子通到底。簡單的程度如果讓諾蘭來導，以他緊湊的風格以及每秒餵給觀眾的資訊量，應該 10 分鐘內就上片尾名單了。從小看過那麼多宮廷大戲，在「聶」片中的宮廷戲碼也簡單到讓人忍俊不住頻頻出戲。至於那場決鬥有多無厘頭，應該有更多人比我有更多怨言才是。</p><p>其實挑剔這麼多，終歸是我的悟性不佳，我始終無法成為藝術片的愛好者。一部電影的述說方式當然可以選擇不面向觀眾，有的時候我覺得侯孝賢、蔡明亮這類的導演，他們在拍片過程中所關注的，自己多了一些，觀眾少了一點。而我所期待看到的依舊是好萊塢式的、李安式的，在故事裡邊有圓滑的轉折；在通俗中尋找深刻的共鳴。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=854eb9c4ffce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[how to cherry pick a range of commits]]></title>
            <link>https://medium.com/@kcliu/how-to-cherry-pick-a-range-of-commits-33df65b352ba?source=rss-81cba4ed210f------2</link>
            <guid isPermaLink="false">https://medium.com/p/33df65b352ba</guid>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[kcliu]]></dc:creator>
            <pubDate>Sun, 14 Jun 2015 11:04:30 GMT</pubDate>
            <atom:updated>2015-06-14T11:04:30.242Z</atom:updated>
            <content:encoded><![CDATA[<p>如果需要從別的 branch 拿單一 commit 過來目前的 branch，通常我們會用 git cherry-pick，但如果需要一段連續的 commits 呢？</p><p>如果直接下關鍵字去查詢的話，可能會找到許多文章包含 stackoverflow 上是教你用 rebase 加 — onto 的方式來做：</p><pre>git rebase  — onto master ab123123^ </pre><p>但是其實在 Git 1.7.2+ 已經可以支援 cherry-pick 多個 commits 的語法了：</p><pre>git cherry-pick older..newer </pre><p>p.s. 寫這篇只是因為實在找到太多篇是教你用 rebase — onto 的舊文了，提醒一下自己不要看太久之前的 blog 技術文，搜尋的時候加個 time filter。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33df65b352ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AngularJS debug tips]]></title>
            <link>https://medium.com/@kcliu/angularjs-debug-tips-a7ce9028791d?source=rss-81cba4ed210f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7ce9028791d</guid>
            <category><![CDATA[debug]]></category>
            <category><![CDATA[angularjs]]></category>
            <dc:creator><![CDATA[kcliu]]></dc:creator>
            <pubDate>Fri, 24 Apr 2015 04:29:06 GMT</pubDate>
            <atom:updated>2015-04-24T08:58:30.345Z</atom:updated>
            <content:encoded><![CDATA[<p>在 chrome inspector 可以抓到一些 AngularJS 的資訊, 方便 debug</p><ul><li>Scope</li></ul><pre>angular.element(<strong>$0</strong>).scope()</pre><p><strong>targetNode</strong> 可以塞入想觀察的 DOM element。chrome inspector 有 default 的 <strong>$0</strong> ~ <strong>$4</strong> 可以用。但其實裝 <a href="https://chrome.google.com/webstore/detail/ng-inspector-for-angularj/aadgmnobpdmgmigaicncghmmoeflnamj?hl=en">ng-inspector</a> 就可以看到所有 scope 了。</p><ul><li>Service</li></ul><pre>angular.element($(&#39;html&#39;)).injector().get(&#39;<strong>$location</strong>&#39;)</pre><p>可以完整抓到 $location，同理如果有改值，還可以 call <strong>$apply()</strong> refresh</p><pre>angular.element($(&#39;html&#39;)).scope().$apply()</pre><p>refs:</p><ul><li><a href="http://blog.ionic.io/angularjs-console/">http://blog.ionic.io/angularjs-console/</a></li><li><a href="http://stackoverflow.com/questions/13743058/how-to-access-the-angular-scope-variable-in-browsers-console">http://stackoverflow.com/questions/13743058/how-to-access-the-angular-scope-variable-in-browsers-console</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7ce9028791d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[日本買電器小心得]]></title>
            <link>https://medium.com/@kcliu/%E6%97%A5%E6%9C%AC%E8%B2%B7%E9%9B%BB%E5%99%A8%E5%B0%8F%E5%BF%83%E5%BE%97-5c0304d5cc8d?source=rss-81cba4ed210f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c0304d5cc8d</guid>
            <dc:creator><![CDATA[kcliu]]></dc:creator>
            <pubDate>Sun, 19 Apr 2015 21:06:42 GMT</pubDate>
            <atom:updated>2015-04-20T16:10:19.595Z</atom:updated>
            <content:encoded><![CDATA[<p>通常大家去日本旅遊都會想搬幾台電器回來，自己搬了幾次之後也累積了一點心得…</p><h3>比價</h3><p>我都是用 <a href="http://kakaku.com/">http://kakaku.com/</a></p><h3>入手</h3><h4><a href="http://www.amazon.co.jp/">Amazon</a></h4><p>a. 要注意的是如果不是由 Amazon 自己賣的話，運送時間通常會比較久。由於 Amazon 寄送時間非常精準，有的時候即使不是最便宜但我還是會優先從 Amazon 購買。</p><p>b. 要小心出貨時間跟寄送時間，常常不小心把出貨時間看成到貨時間</p><p>c. 直接寄到最後一天的旅館去（事先找可以代收的旅館，可寫信去問）</p><h4>一般電器通路</h4><p>通常 kakaku 上面的價格最低的都在實體通路，要注意的是通常都是現金價，如果要買最低價格的話要記得把錢帶夠。有的店家可以直接宅配機場，有的不行，也有的會要你拿去便利商店宅配，這都不太一定，可以事先做功課。</p><h3>運送</h3><p>如果帶水波爐之類的大型家電，就要煩惱搬運問題，不考慮海運的情況下，總共有三段路徑：</p><h4>從旅館到機場</h4><p>如果不是寄到機場去的話，只能寄到最後一晚會停留的旅館。可以選擇有利木津巴士停靠的旅館，省時省力。巴士車票有時在台灣先跟鄉民買會比較便宜。</p><h4>搭飛機</h4><p>建議選擇廉價航空，因為可以花錢購買行李重量，不用擔心超重罰錢。</p><h4>抵達台灣</h4><p>我會事先預約機場接送，如果有用信用卡刷機票的話通常會很便宜甚至免費。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c0304d5cc8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[使用 cask 安裝 OSX applications]]></title>
            <link>https://medium.com/@kcliu/%E4%BD%BF%E7%94%A8-cask-%E5%AE%89%E8%A3%9D-osx-applications-839b10c1ee1d?source=rss-81cba4ed210f------2</link>
            <guid isPermaLink="false">https://medium.com/p/839b10c1ee1d</guid>
            <category><![CDATA[cask]]></category>
            <category><![CDATA[os-x]]></category>
            <category><![CDATA[homebrew]]></category>
            <dc:creator><![CDATA[kcliu]]></dc:creator>
            <pubDate>Mon, 06 Apr 2015 16:08:53 GMT</pubDate>
            <atom:updated>2015-04-06T16:08:53.176Z</atom:updated>
            <content:encoded><![CDATA[<p>動機：跟使用 homebrew 一樣來管理一般的 OSX applications</p><p>安裝 cask：</p><pre>brew install caskroom/cask/brew-cask</pre><p>接著就可以用下列指令來安裝 google chrome</p><pre>brew cask install google-chrome </pre><p>如果要裝 google-chrome-canary 則需要先：</p><pre>brew tap caskroom/version</pre><p>就可以順利安裝了：</p><pre>brew cask install google-chrome-canary</pre><p>refs:</p><p><a href="https://github.com/caskroom/homebrew-cask">https://github.com/caskroom/homebrew-cask</a></p><p><a href="https://github.com/caskroom/homebrew-versions">https://github.com/caskroom/homebrew-versions</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=839b10c1ee1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[image optimization]]></title>
            <link>https://medium.com/@kcliu/image-optimization-113809d33d47?source=rss-81cba4ed210f------2</link>
            <guid isPermaLink="false">https://medium.com/p/113809d33d47</guid>
            <dc:creator><![CDATA[kcliu]]></dc:creator>
            <pubDate>Mon, 23 Mar 2015 06:16:43 GMT</pubDate>
            <atom:updated>2015-03-27T03:27:33.502Z</atom:updated>
            <content:encoded><![CDATA[<p>今天做了一下 image optimization tool 的 survey，</p><p>發現了這張 performance 圖表:</p><p><a href="http://jamiemason.github.io/ImageOptim-CLI/">http://jamiemason.github.io/ImageOptim-CLI/</a></p><p>tl;dr:</p><p>有錢的話直上 <a href="https://kraken.io/">Kraken</a> 我覺得是最方便的，直接有個 image server 還可以簡單 crop 出各種 size 方便 RWD 作業。</p><p>最佳化效果最好的 solution 則是：</p><p>JPG : <a href="http://www.jpegmini.com/">JPEGMini</a> -&gt; <a href="https://imageoptim.com/">ImageOptim</a></p><p>PNG: <a href="http://pngmini.com/">ImageAlpha</a> -&gt; <a href="https://imageoptim.com/">ImageOptim</a></p><p>也有提供 CLI solution:</p><p><a href="https://github.com/JamieMason/ImageOptim-CLI">https://github.com/JamieMason/ImageOptim-CLI</a></p><p>Note: ImageOptim 不會失真，JPEGMini跟 ImageAlpha 都會犧牲一點資訊以失真以換取空間</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=113809d33d47" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Alfred Tips]]></title>
            <link>https://medium.com/@kcliu/%E6%88%91%E5%B8%B8%E7%94%A8%E5%88%B0%E7%9A%84-alfred-%E5%8A%9F%E8%83%BD-622f7d37d345?source=rss-81cba4ed210f------2</link>
            <guid isPermaLink="false">https://medium.com/p/622f7d37d345</guid>
            <category><![CDATA[alfred]]></category>
            <category><![CDATA[workflow]]></category>
            <dc:creator><![CDATA[kcliu]]></dc:creator>
            <pubDate>Tue, 24 Feb 2015 03:12:30 GMT</pubDate>
            <atom:updated>2015-04-28T06:44:19.880Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. work with files</h3><pre><strong>⌥ + ⌘ + \</strong></pre><p>在 finder 裡選取檔案後按熱鍵可以叫出選單，比較常用的有 copy path to clipboard</p><h3>2. clipboard history</h3><pre><strong>⌥ + ⌘ + c</strong></pre><h3>3. workflows</h3><p>有個叫做什麼 piratebay 的真的是很威阿..</p><p>ref :</p><p><a href="http://support.alfredapp.com/cheatsheet">Cheatsheet - Alfred v2 Support</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=622f7d37d345" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[安裝 Node.js]]></title>
            <link>https://medium.com/@kcliu/node-js-ef2fb521dd9a?source=rss-81cba4ed210f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef2fb521dd9a</guid>
            <dc:creator><![CDATA[kcliu]]></dc:creator>
            <pubDate>Tue, 17 Feb 2015 04:30:41 GMT</pubDate>
            <atom:updated>2015-03-11T06:00:18.502Z</atom:updated>
            <content:encoded><![CDATA[<h3>installing Node.js</h3><ol><li>install <a href="http://brew.sh/">homebrew</a> firstly</li><li>`brew install nodebrew`</li><li>add path</li></ol><pre>PATH=$HOME/.nodebrew/current/bin:$PATH</pre><p>4. `nodebrew install-binary latest`</p><p>p.s. to uninstall node.js completely, follow :</p><p><a href="http://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x">http://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef2fb521dd9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sumblime Text tricks]]></title>
            <link>https://medium.com/@kcliu/sumblime-text-tricks-a529a3fb5273?source=rss-81cba4ed210f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a529a3fb5273</guid>
            <dc:creator><![CDATA[kcliu]]></dc:creator>
            <pubDate>Fri, 06 Feb 2015 07:20:11 GMT</pubDate>
            <atom:updated>2015-02-08T18:17:54.324Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>Search in files with wildcards</li></ol><p>path and wildcards could be seperated by commas</p><pre>/path/to/search,*.cc,*.h</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a529a3fb5273" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>