<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Justin Lin</title>
	<atom:link href="https://justinlin.net/feed/" rel="self" type="application/rss+xml" />
	<link>https://justinlin.net</link>
	<description></description>
	<lastBuildDate>Wed, 15 Feb 2017 16:01:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.7</generator>
<site xmlns="com-wordpress:feed-additions:1">9194420</site>	<item>
		<title>Oversight of the State Department on FBI Director Comey and Hillary Clinton</title>
		<link>https://justinlin.net/2016/07/07/oversight-of-the-state-department-on-fbi-director-comey-and-hillary-clinton/</link>
		<comments>https://justinlin.net/2016/07/07/oversight-of-the-state-department-on-fbi-director-comey-and-hillary-clinton/#respond</comments>
		<pubDate>Fri, 08 Jul 2016 03:58:50 +0000</pubDate>
		<dc:creator><![CDATA[justin]]></dc:creator>
				<category><![CDATA[New York]]></category>

		<guid isPermaLink="false">http://justinlin.net/?p=1514</guid>
		<description><![CDATA[I watched a live stream of the questioning of FBI Director Comey by the House Oversight Committee related to the allegations against Hillary Clinton. It was very interesting, and I recommend anyone to watch at least part of it: I won’t try to summarize the whole meeting here (feel free to watch some of the &#8230; <a href="https://justinlin.net/2016/07/07/oversight-of-the-state-department-on-fbi-director-comey-and-hillary-clinton/" class="more-link">Continue reading <span class="screen-reader-text">Oversight of the State Department on FBI Director Comey and Hillary Clinton</span></a>]]></description>
				<content:encoded><![CDATA[<p class="graf graf--p graf-after--figure"><a href="https://justinlin.net/wp-content/uploads/2016/07/clinton.jpeg"><img class="size-full wp-image-1519 aligncenter" src="https://justinlin.net/wp-content/uploads/2016/07/clinton.jpeg" alt="" width="300" height="300" /></a></p>
<p id="c10c" class="graf graf--p graf-after--figure">I watched a live stream of the questioning of FBI Director Comey by the House Oversight Committee related to the allegations against Hillary Clinton. It was very interesting, and I recommend anyone to watch at least part of it:</p>
<div class="jetpack-video-wrapper"><iframe width="900" height="506" src="https://www.youtube.com/embed/2AGkTUzSFwg?feature=oembed" frameborder="0" allowfullscreen></iframe></div>
<figure id="b197" class="graf graf--figure graf--iframe graf-after--p">
<div class="aspectRatioPlaceholder is-locked"></div>
</figure>
<p id="e6d9" class="graf graf--p graf-after--figure">I won’t try to summarize the whole meeting here (feel free to watch some of the shorter videos on the same YouTube channel), but I just needed to write down some comments about the current political atmosphere with regards to the above video. It should also be noted than I am Canadian, so I will not be casting a vote in any U.S. election anytime soon.</p>
<p id="6ddf" class="graf graf--p graf-after--p">I’m particularly disappointed at the democratic representatives at this meeting. While the republican candidates were asking good questions, the democratic representatives were arguing that because they all trust the character of Mr. Comey, then we should just trust trust his recommendation and do nothing. This is a valid, though weak, point to make, and it didn’t need to be made 15 times. They also say some ridiculous things like claiming this whole meeting is a waste of time, and they would rather Mr. Comey be out there searching for murderers of black teenagers. Why would you call a meeting and come to it, then start claiming the meeting itself is a waste of time?</p>
<p id="5e07" class="graf graf--p graf-after--p">During the Obama vs Romney elections, I used to think Fox News and the republicans were full of crazies, but this type of meeting really shows some of the converse. Granted that I still view people like Glenn Beck as insane, I think that the type of media I consume has changed over time. I much prefer to watch these long meetings such as in the above video rather than regular TV or short YouTube videos now, and I’m starting to see how left-biased mainstream media actually is.</p>
<p id="77be" class="graf graf--p graf-after--p">Given the facts and arguments made in the questioning, it does look to me like Hillary did wrong and should face consequences. She was at the very least negligent in preserving confidential information.</p>
<div class="jetpack-video-wrapper"><iframe width="900" height="506" src="https://www.youtube.com/embed/VVQOcCKIJKc?feature=oembed" frameborder="0" allowfullscreen></iframe></div>
]]></content:encoded>
			<wfw:commentRss>https://justinlin.net/2016/07/07/oversight-of-the-state-department-on-fbi-director-comey-and-hillary-clinton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">1514</post-id>	</item>
		<item>
		<title>Dockerize existing Ubuntu VM</title>
		<link>https://justinlin.net/2016/07/02/dockerize-existing-ubuntu-vm/</link>
		<comments>https://justinlin.net/2016/07/02/dockerize-existing-ubuntu-vm/#respond</comments>
		<pubDate>Sun, 03 Jul 2016 03:54:37 +0000</pubDate>
		<dc:creator><![CDATA[justin]]></dc:creator>
				<category><![CDATA[New York]]></category>

		<guid isPermaLink="false">http://justinlin.net/?p=1510</guid>
		<description><![CDATA[I have an existing VM on EC2 that I use to host various small websites, and I wanted to move it to a new dedicated server. Fortunately, I try to minimize the amount of configuration I do on new servers such that migration is not a pain. My new dedicated server is much bigger (16gb &#8230; <a href="https://justinlin.net/2016/07/02/dockerize-existing-ubuntu-vm/" class="more-link">Continue reading <span class="screen-reader-text">Dockerize existing Ubuntu VM</span></a>]]></description>
				<content:encoded><![CDATA[<section class="section section--body">
<div class="section-divider"></div>
<div class="section-content">
<div class="section-inner sectionLayout--insetColumn">
<p class="graf graf--p"><a href="https://justinlin.net/wp-content/uploads/2016/07/aws.png"><img class="wp-image-1511 size-full aligncenter" src="https://justinlin.net/wp-content/uploads/2016/07/aws.png" width="600" height="300" /></a></p>
<p class="graf graf--p">I have an existing VM on EC2 that I use to host various small websites, and I wanted to move it to a new dedicated server. Fortunately, I try to minimize the amount of configuration I do on new servers such that migration is not a pain. My new dedicated server is much bigger (16gb of RAM). Since I don’t want to customize this server and be tied down to a particular provider, I decided to instead only run Docker on this server and run every service or web application through docker.</p>
<p class="graf graf--p">So, back to the existing VM on EC2. This server basically just ran <a class="markup--anchor markup--p-anchor" href="https://www.nginx.com" target="_blank" data-href="https://www.nginx.com">nginx</a>, <a class="markup--anchor markup--p-anchor" href="https://www.mysql.com/" target="_blank" data-href="https://www.mysql.com/">mysql</a> and u<a class="markup--anchor markup--p-anchor" href="http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html" target="_blank" data-href="http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html">wsgi-emperor</a>. It would have probably taken me at most an hour to SCP and reconfigure everything on the new server, but I obviously opted for hard mode. I started writing some Dockerfiles to bootstrap and setup the server. After a few days of hacking on these, I realized that I was not <a class="markup--anchor markup--p-anchor" href="https://www.youtube.com/watch?v=_p73PZIDQuA" target="_blank" data-href="https://www.youtube.com/watch?v=_p73PZIDQuA">prepared</a>. There are a lot of small details to do it right. I wanted something that was sure to be correct, hence I set out to dockerize the entire server.</p>
<p class="graf graf--p">The idea is pretty simple: tar up all the files on the server then run them in Docker. It ended up <em class="markup--em markup--p-em">mostly</em> as simple as it sounded. The steps are below.</p>
</div>
</div>
</section>
<section class="section section--body">
<div class="section-divider">
<hr class="section-divider" />
</div>
<div class="section-content">
<div class="section-inner sectionLayout--insetColumn">
<p class="graf graf--p">On the origin server, tar up the whole file system excluding some device mounts. It’s probably a good idea to delete old kernels and packages to reduce the size of the tarball.</p>
<pre class="graf graf--pre">sudo tar czvf rootfs.tar.gz --exclude=/proc --exclude=/sys-exclude=$PWD/rootfs.tar.gz /</pre>
<p class="graf graf--p">SCP it over.</p>
<pre class="graf graf--p">scp rootfs.tar.gz &lt;new-server&gt;:~/dockers/docker-vm/rootfs.tar.gz</pre>
<p class="graf graf--p">Create a simple Dockerfile in the target folder (i.e. ~/dockers/docker-vm).</p>
<pre class="graf graf--pre">FROM scratch
ADD rootfs.tar.gz /
CMD ["/sbin/init"]</pre>
<p class="graf graf--p">Build it.</p>
<pre class="graf graf--pre">docker build -t docker-vm .</pre>
<p class="graf graf--p">Now comes the tricky part. Docker does not seem to support everything needed to run systemd normally, so we need to start our docker in privileged mode.</p>
<pre class="graf graf--pre">docker run --privileged —-name=docker-vm -d docker-vm</pre>
</div>
</div>
</section>
<section class="section section--body">
<div class="section-divider">
<hr class="section-divider" />
</div>
<div class="section-content">
<div class="section-inner sectionLayout--insetColumn">
<p class="graf graf--p">This isn’t exactly Docker’s main use case, so there are still some issues with this approach, but it should save a good amount of time in terms of moving an existing server to run within a new one.</p>
<p class="graf graf--p">To debug the docker, it’s possible to simply attach to it.</p>
<pre class="graf graf--pre">docker exec -it docker-vm bash</pre>
<p class="graf graf--p">Note that environment variables like TERM are not set when attaching, so you might need to do something like export “TERM=xterm-256color” to get things working.</p>
<p class="graf graf--p">The run command above likely needs to be tailored to various needs, so nuking the container is as simple as:</p>
<pre class="graf graf--pre">docker rm -f docker-vm</pre>
<figure id="attachment_1512" style="width: 298px" class="wp-caption aligncenter"><a href="https://justinlin.net/wp-content/uploads/2016/07/docker_whale.png"><img class="wp-image-1512 size-full" src="https://justinlin.net/wp-content/uploads/2016/07/docker_whale.png" width="298" height="169" /></a><figcaption class="wp-caption-text">Obligatory whale tax</figcaption></figure>
</div>
</div>
</section>
]]></content:encoded>
			<wfw:commentRss>https://justinlin.net/2016/07/02/dockerize-existing-ubuntu-vm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">1510</post-id>	</item>
		<item>
		<title>Photo Sphere gems</title>
		<link>https://justinlin.net/2016/03/12/photo-sphere-gems/</link>
		<comments>https://justinlin.net/2016/03/12/photo-sphere-gems/#respond</comments>
		<pubDate>Sat, 12 Mar 2016 19:02:05 +0000</pubDate>
		<dc:creator><![CDATA[justin]]></dc:creator>
				<category><![CDATA[New York]]></category>

		<guid isPermaLink="false">http://justinlin.net/?p=1505</guid>
		<description><![CDATA[Cool looking house.]]></description>
				<content:encoded><![CDATA[<p><a href="https://justinlin.net/wp-content/uploads/2016/03/photosphere.png"><img class="size-large wp-image-1530 aligncenter" src="https://justinlin.net/wp-content/uploads/2016/03/photosphere-1200x725.png" alt="" width="650" height="393" srcset="https://justinlin.net/wp-content/uploads/2016/03/photosphere-1200x725.png 1200w, https://justinlin.net/wp-content/uploads/2016/03/photosphere-420x254.png 420w, https://justinlin.net/wp-content/uploads/2016/03/photosphere-750x453.png 750w, https://justinlin.net/wp-content/uploads/2016/03/photosphere-768x464.png 768w" sizes="(max-width: 650px) 100vw, 650px" /></a></p>
<p>Cool looking <a href="https://www.google.com/maps/@42.1698258,-74.7049364,3a,75y,136.48h,90.61t/data=!3m8!1e1!3m6!1s-S22xeqIpcmM%2FU7jdUNdoLvI%2FAAAAAAACgJk%2Fw-Y3rGMEI-k!2e4!3e11!6s%2F%2Flh3.googleusercontent.com%2F-S22xeqIpcmM%2FU7jdUNdoLvI%2FAAAAAAACgJk%2Fw-Y3rGMEI-k%2Fw203-h101-n-k-no%2F!7i10884!8i5442">house</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://justinlin.net/2016/03/12/photo-sphere-gems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">1505</post-id>	</item>
		<item>
		<title>Surface Pro 4</title>
		<link>https://justinlin.net/2015/11/02/surface-pro-4/</link>
		<comments>https://justinlin.net/2015/11/02/surface-pro-4/#respond</comments>
		<pubDate>Tue, 03 Nov 2015 02:50:16 +0000</pubDate>
		<dc:creator><![CDATA[justin]]></dc:creator>
				<category><![CDATA[New York]]></category>

		<guid isPermaLink="false">http://justinlin.net/?p=1493</guid>
		<description><![CDATA[I went to Best Buy cash in hand ready to buy a Surface Pro 4. The motivation for this for this decision was that I had recently discovered that using the Microsoft Remote Desktop app on my iPad Air 2 wasn&#8217;t going to fly. While things rendered really fast, and it was really responsive, some &#8230; <a href="https://justinlin.net/2015/11/02/surface-pro-4/" class="more-link">Continue reading <span class="screen-reader-text">Surface Pro 4</span></a>]]></description>
				<content:encoded><![CDATA[<p>I went to Best Buy cash in hand ready to buy a Surface Pro 4.</p>
<p>The motivation for this for this decision was that I had recently discovered that using the <a href="https://itunes.apple.com/us/app/microsoft-remote-desktop/id714464092?mt=8">Microsoft Remote Desktop app</a> on my iPad Air 2 wasn&#8217;t going to fly. While things rendered really fast, and it was really responsive, some simple things like CTRL+&lt;Key&gt; do not work even with a bluetooth keyboard. I have a desktop at home and a phone, so I just needed a portable device to do the following:</p>
<ul>
<li>Read PDF&#8217;s (in portrait mode)</li>
<li>Watch movies (on the plane)</li>
<li>Remote Desktop (into my work computer)</li>
</ul>
<p>It seemed like the Surface Pro 4 would be perfect for these things, especially the last one given that Remote Desktop is a Microsoft product. It also has a slightly bigger screen size and tons more storage (I keep running out on my iPad), which are all plusses. Furthermore, the keyboard looked great. On paper, it was perfect.</p>
<p>They say that it&#8217;s wise to try before you buy. Thankfully, BestBuy had 2 models on display (as well as a Surface Book). I won&#8217;t bore you with <em>all</em> the details, but <em>Jesus Christ</em>, how can software be <em>so</em> bad.</p>
<p>I&#8217;ll just focus on one aspect of the experience: the on-screen keyboard. It took me over 15 minutes to just figure out how to bring that up. I&#8217;m a CS major, and it took me that long to figure out how to access the most basic feature of a tablet computer. Want to know how you even get it to work? It&#8217;s hidden in this screen:</p>
<p><a href="https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_1.jpg"><img class="alignnone wp-image-1534 size-large" src="https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_1-1200x900.jpg" width="650" height="488" srcset="https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_1-1200x900.jpg 1200w, https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_1-420x315.jpg 420w, https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_1-750x563.jpg 750w, https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_1-768x576.jpg 768w" sizes="(max-width: 650px) 100vw, 650px" /></a></p>
<p>To have the on-screen keyboard ever appear (even when the keyboard is not attached), you have to click a tiny button in the taskbar, then press another button in the corner to turn on &#8220;tablet mode&#8221;.</p>
<p>This is a complete design fail. The on-screen keyboard should just come up if no physical keyboard is connected.</p>
<p>That&#8217;s not even the worst part. The worst part is that the keyboard won&#8217;t even come up in &#8220;tablet mode&#8221; if you unplug the keyboard while not on the lock screen. Rotation seems to stop working too. <a href="http://answers.microsoft.com/en-us/surface/forum/surfpro-surfgetstart/on-screen-keyboard-does-not-display-in-tablet-mode/bac31ce7-cb18-4c1a-bd98-cd4bec763b8c">This</a> is apparently a bug since the first Surface computer. So, if you unplug the keyboard while not on the lock screen, you essentially have a tablet with no way to input text.</p>
<p>I&#8217;m sure there&#8217;s a workaround (maybe), but should you really need workarounds to use the demo device? Also, come on.. this is basic marketing: put some nicer photos on your demo device. Seems ridiculous to put low-resolution bland photos on a device whose screen is, on paper, supposed to be amazing.<a href="https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_2.jpg"><img class="alignnone wp-image-1535 size-large" src="https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_2-1200x900.jpg" width="650" height="488" srcset="https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_2-1200x900.jpg 1200w, https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_2-420x315.jpg 420w, https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_2-750x563.jpg 750w, https://justinlin.net/wp-content/uploads/2015/11/surface_pro_4_2-768x576.jpg 768w" sizes="(max-width: 650px) 100vw, 650px" /></a></p>
<p>There&#8217;s lots of other flaws (screen is too reflective, feels bulky, gets really hot doing nothing, feels slow despite the i5, inconsistent font sizes, etc..), but it just seems ridiculous that a 4th gen production device&#8217;s on-screen keyboard doesn&#8217;t work consistently.</p>
<p>I walked out cash in hand.</p>
]]></content:encoded>
			<wfw:commentRss>https://justinlin.net/2015/11/02/surface-pro-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">1493</post-id>	</item>
		<item>
		<title>I heard you like sigmas..</title>
		<link>https://justinlin.net/2015/10/26/yo-dawg-i-heard-you-like-sigmas/</link>
		<comments>https://justinlin.net/2015/10/26/yo-dawg-i-heard-you-like-sigmas/#comments</comments>
		<pubDate>Tue, 27 Oct 2015 00:07:28 +0000</pubDate>
		<dc:creator><![CDATA[justin]]></dc:creator>
				<category><![CDATA[New York]]></category>

		<guid isPermaLink="false">http://justinlin.net/?p=1488</guid>
		<description><![CDATA[]]></description>
				<content:encoded><![CDATA[<p><a href="https://justinlin.net/wp-content/uploads/2015/10/sigmas.png"><img class="alignnone wp-image-1532 size-large" src="https://justinlin.net/wp-content/uploads/2015/10/sigmas-1200x1067.png" width="650" height="578" srcset="https://justinlin.net/wp-content/uploads/2015/10/sigmas-1200x1067.png 1200w, https://justinlin.net/wp-content/uploads/2015/10/sigmas-420x374.png 420w, https://justinlin.net/wp-content/uploads/2015/10/sigmas-750x667.png 750w, https://justinlin.net/wp-content/uploads/2015/10/sigmas-768x683.png 768w" sizes="(max-width: 650px) 100vw, 650px" /></a></p>
]]></content:encoded>
			<wfw:commentRss>https://justinlin.net/2015/10/26/yo-dawg-i-heard-you-like-sigmas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">1488</post-id>	</item>
		<item>
		<title>Flickr Homepage</title>
		<link>https://justinlin.net/2015/08/01/flickr-homepage/</link>
		<comments>https://justinlin.net/2015/08/01/flickr-homepage/#respond</comments>
		<pubDate>Sat, 01 Aug 2015 20:24:08 +0000</pubDate>
		<dc:creator><![CDATA[justin]]></dc:creator>
				<category><![CDATA[New York]]></category>

		<guid isPermaLink="false">http://justinlin.net/?p=1473</guid>
		<description><![CDATA[Quick hack to have myself a spiffy new homepage. Sauce: https://github.com/jylin/flickr-homepage]]></description>
				<content:encoded><![CDATA[<p>Quick hack to have myself a spiffy new <a href="http://cdn.justinlin.net/flickr/">homepage</a>.</p>
<p>Sauce: <a href="https://github.com/jylin/flickr-homepage">https://github.com/jylin/flickr-homepage</a></p>
<p><a href="http://cdn.justinlin.net/flickr/"><img class="alignnone size-full wp-image-1478" src="http://justinlin.net/wp-content/uploads/2015/08/flickr-homepage.png" alt="flickr-homepage" width="716" height="600" /></a></p>
]]></content:encoded>
			<wfw:commentRss>https://justinlin.net/2015/08/01/flickr-homepage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">1473</post-id>	</item>
		<item>
		<title>Lens Arbitrage (24-70mm Zeiss FE f/4 Lens)</title>
		<link>https://justinlin.net/2015/07/26/lens-arbitrage-24-70mm-zeiss-fe-f4-lens/</link>
		<comments>https://justinlin.net/2015/07/26/lens-arbitrage-24-70mm-zeiss-fe-f4-lens/#respond</comments>
		<pubDate>Sun, 26 Jul 2015 20:22:52 +0000</pubDate>
		<dc:creator><![CDATA[justin]]></dc:creator>
				<category><![CDATA[New York]]></category>

		<guid isPermaLink="false">http://justinlin.net/?p=1468</guid>
		<description><![CDATA[tl;dr Save $300 on lenses by buying from Canada! I was on the market for a lens for my new camera, and the one I settled on was the 24-70mm f/4 Zeiss lens. Despite the somewhat concerning reviews, it still seemed like the best lens for the focal range I needed. The main point of &#8230; <a href="https://justinlin.net/2015/07/26/lens-arbitrage-24-70mm-zeiss-fe-f4-lens/" class="more-link">Continue reading <span class="screen-reader-text">Lens Arbitrage (24-70mm Zeiss FE f/4 Lens)</span></a>]]></description>
				<content:encoded><![CDATA[<p>tl;dr Save $300 on lenses by buying from Canada!</p>
<p>I was on the market for a lens for my new <a href="http://www.amazon.com/gp/product/B00PX8CHO6/ref=as_li_tl?ie=UTF8&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B00PX8CHO6&#038;linkCode=as2&#038;tag=justinlinnet-20&#038;linkId=5HBEEXMLVMTCIIX3">camera</a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=justinlinnet-20&#038;l=as2&#038;o=1&#038;a=B00PX8CHO6" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />, and the one I settled on was the <a href="http://www.amazon.com/gp/product/B00FSB79FU/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00FSB79FU&amp;linkCode=as2&amp;tag=justinlinnet-20&amp;linkId=RIGZCY74LV63S2I4">24-70mm f/4 Zeiss lens</a><img style="border: none !important; margin: 0px !important;" src="http://ir-na.amazon-adsystem.com/e/ir?t=justinlinnet-20&amp;l=as2&amp;o=1&amp;a=B00FSB79FU" alt="" width="1" height="1" border="0" />. Despite the somewhat concerning <a href="http://www.dpreview.com/forums/post/53341796">reviews</a>, it still seemed like the best lens for the focal range I needed. The main point of contention was whether it was actually better at all than the kit lens, which was less than a third of the price. Ultimately, although most of the sample shots I could find on the internet looked really similar, I felt like I did want the &#8220;Zeiss colors&#8221;, slightly wider angle and hopefully sharper corners and middle.</p>
<p>However, I wasn&#8217;t willing to pay the full $1200USD for this almost 3 year old lens. That&#8217;s hard to stomach. One option to save some money was to simply buy a used version from Amazon. I ended up doing that on Prime Day (with another 15% off Amazon Warehouse used items) for a total of $900USD, but when I received the item, it turns out I got the right lens box, but the lens inside was the kit lens! Whoever returned the item to Amazon like this was committing some pretty serious fraud by buying a $1200USD item and returning a $270USD item in the box. Appalling to say the least, but Amazon is really good about returns, so this was only a minor setback for me.</p>
<p>I wasn&#8217;t about to buy another used lens from Amazon given this experience, so I needed a plan B. I looked at other retailers selling used lenses, but they were all too pricey and even considered <a href="https://www.lensrentals.com/">renting</a> the lens. Finally, I found something interesting digging through forums. Some people buy lenses from Canada and have them shipped to the States. Henry&#8217;s is a popular camera store in Canada, and this was their listing for the lens I wanted.</p>
<p><a href="http://justinlin.net/wp-content/uploads/2015/07/henrys-lens.png"><img class="alignnone size-full wp-image-1470" src="http://justinlin.net/wp-content/uploads/2015/07/henrys-lens.png" alt="henrys lens" width="2188" height="1974" /></a></p>
<p>Compare that to an equivalent US camera store.</p>
<p><a href="http://justinlin.net/wp-content/uploads/2015/07/bhphotovideo-lens.png"><img class="alignnone size-full wp-image-1471" src="http://justinlin.net/wp-content/uploads/2015/07/bhphotovideo-lens.png" alt="bhphotovideo lens" width="2060" height="1928" /></a>See the difference? Not only did Henry&#8217;s have a discount, but notice that one is in USD and the other is in CAD. Given the current favorable exchange rate, buying the <strong>new</strong> lens from Henry&#8217;s turned out to be ~$842 USD! That&#8217;s way cheaper than even the used lens prices on Amazon. Shipping to the States in about 4 business days costs about $12CAD, and you always lose a little bit on exchange fees, so in total it ended up $877USD for a <strong>new</strong> lens! Talk about an awesome deal.</p>
<p>I think the general case for this kind of discount is if your currency is stronger than another country&#8217;s currency, then you can buy products that are a couple of years old for a significant discount. The reasoning is that these products had their price set when their currency was stronger, but after exchange rates have moved, they were never repriced. You rarely ever see products get repriced to be more expensive. Hence, you can buy these types of products at a very favorable price. Besides lenses, I noticed that this applies to Apple products as well such as iPads.</p>
]]></content:encoded>
			<wfw:commentRss>https://justinlin.net/2015/07/26/lens-arbitrage-24-70mm-zeiss-fe-f4-lens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">1468</post-id>	</item>
		<item>
		<title>Ultra-productivity</title>
		<link>https://justinlin.net/2015/06/07/ultra-productivity/</link>
		<comments>https://justinlin.net/2015/06/07/ultra-productivity/#comments</comments>
		<pubDate>Sun, 07 Jun 2015 16:11:46 +0000</pubDate>
		<dc:creator><![CDATA[justin]]></dc:creator>
				<category><![CDATA[New York]]></category>

		<guid isPermaLink="false">http://justinlin.net/?p=1460</guid>
		<description><![CDATA[This is a pretty good list to improve productivity. Here&#8217;s a paraphrased list: Anything that can be done now should be done now. Don&#8217;t save tasks for later. Get to a good stopping point before leaving for the day. This way, you&#8217;ll have a good starting point for the next day. Do the least &#8220;appetizing&#8221; tasks first &#8230; <a href="https://justinlin.net/2015/06/07/ultra-productivity/" class="more-link">Continue reading <span class="screen-reader-text">Ultra-productivity</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.forbes.com/sites/travisbradberry/2015/05/13/11-things-ultra-productive-people-do-differently/">This</a> is a pretty good list to improve productivity. Here&#8217;s a paraphrased list:</p>
<ol>
<li>Anything that can be done now should be done now. Don&#8217;t save tasks for later.</li>
<li>Get to a good stopping point before leaving for the day. This way, you&#8217;ll have a good starting point for the next day.</li>
<li>Do the least &#8220;appetizing&#8221; tasks first and get them out of the way.</li>
<li>Don&#8217;t re-prioritize every time a new seemingly urgent tasks comes in. Stay focused on the longer term goals.</li>
<li>Time-box meetings, which are typically huge time wasters.</li>
<li>Say no when possible.</li>
<li>Check e-mail at fixed times throughout the day and disable new e-mail notifications.</li>
<li>Work on one task at a time and finish them before moving on to the next one.</li>
<li>The only way to contact you where you actually get notified should be through phone calls.</li>
<li>Delegate when possible.</li>
<li>Embrace technology to do as much as possible of your uninteresting work.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>https://justinlin.net/2015/06/07/ultra-productivity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">1460</post-id>	</item>
		<item>
		<title>uWSGI vs Passenger vs PHP-FPM</title>
		<link>https://justinlin.net/2015/05/18/uwsgi-vs-passenger-vs-php-fpm/</link>
		<comments>https://justinlin.net/2015/05/18/uwsgi-vs-passenger-vs-php-fpm/#respond</comments>
		<pubDate>Tue, 19 May 2015 03:39:26 +0000</pubDate>
		<dc:creator><![CDATA[justin]]></dc:creator>
				<category><![CDATA[New York]]></category>

		<guid isPermaLink="false">http://justinlin.net/?p=1456</guid>
		<description><![CDATA[I wish someone would write the comparison between these three application servers. PHP is nice because it&#8217;s really easy to deploy using either mod_php with Apache or nginx with php-fpm. All you need to configure is your app&#8217;s root folder. Deploying Ruby or Python applications is slightly more involved. One way to deploy them is &#8230; <a href="https://justinlin.net/2015/05/18/uwsgi-vs-passenger-vs-php-fpm/" class="more-link">Continue reading <span class="screen-reader-text">uWSGI vs Passenger vs PHP-FPM</span></a>]]></description>
				<content:encoded><![CDATA[<p>I wish someone would write the comparison between these three application servers. PHP is nice because it&#8217;s really easy to deploy using either mod_php with Apache or nginx with php-fpm. All you need to configure is your app&#8217;s root folder. Deploying Ruby or Python applications is slightly more involved. One way to deploy them is using something like <a href="http://supervisord.org/">supervisor</a> to start and monitor your Ruby or Python processes. I&#8217;ve recently discovered <a href="http://uwsgi-docs.readthedocs.org/en/latest/Emperor.html">uWSGI Emperor</a> which seems like Python&#8217;s equivalent to Ruby&#8217;s Passenger. It might seem like something really simple to just run a process and keep it up, but there&#8217;s subtleties like <a href="http://uwsgi-docs.readthedocs.org/en/latest/articles/TheArtOfGracefulReloading.html">reloading apps</a> that makes it nice to have a well-written applications server.</p>
]]></content:encoded>
			<wfw:commentRss>https://justinlin.net/2015/05/18/uwsgi-vs-passenger-vs-php-fpm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">1456</post-id>	</item>
		<item>
		<title>Plex &#8220;This server is not powerful enough to convert video&#8221; error</title>
		<link>https://justinlin.net/2015/05/11/plex-this-server-is-not-powerful-enough-to-convert-video-error/</link>
		<comments>https://justinlin.net/2015/05/11/plex-this-server-is-not-powerful-enough-to-convert-video-error/#respond</comments>
		<pubDate>Mon, 11 May 2015 22:00:38 +0000</pubDate>
		<dc:creator><![CDATA[justin]]></dc:creator>
				<category><![CDATA[New York]]></category>

		<guid isPermaLink="false">http://justinlin.net/?p=1434</guid>
		<description><![CDATA[Plex is a pretty cool media manager that I use to organize a personal collection of TV shows and movies. The media server supports a nice web UI, so I can just watch video content in my browser without using any video player like VLC. However, I noticed that a good number of videos don&#8217;t &#8230; <a href="https://justinlin.net/2015/05/11/plex-this-server-is-not-powerful-enough-to-convert-video-error/" class="more-link">Continue reading <span class="screen-reader-text">Plex &#8220;This server is not powerful enough to convert video&#8221; error</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="https://plex.tv/">Plex</a> is a pretty cool media manager that I use to organize a personal collection of TV shows and movies. The media server supports a nice web UI, so I can just watch video content in my browser without using any video player like VLC. However, I noticed that a good number of videos don&#8217;t play in the browser. When you try to play them, they just give a &#8220;This server is not powerful enough to convert video&#8221; error message. My <a href="https://www.synology.com/en-us/support/download/DS213">Synology</a> NAS, where the Plex server is running, is obviously not powerful enough to do any reasonable amount of transcoding. I don&#8217;t really want any of my computers to be doing a ton of work every time I want to watch a movie anyway though.</p>
<p>So, how do you get around this limitation? Looking at the JS console sheds some light on why exactly this doesn&#8217;t work:</p>
<p><a href="http://justinlin.net/wp-content/uploads/2015/05/plex-js-console-transcode-error.png"><img class="alignnone size-full wp-image-1446" src="http://justinlin.net/wp-content/uploads/2015/05/plex-js-console-transcode-error.png" alt="plex-js-console-transcode-error" width="1088" height="808" /></a></p>
<p>There&#8217;s a whole bunch of errors. Basically, the video needs to be in an an mp4 container with the right audio and video codecs for it to play in the browser. The exact codecs needed can be seen here: <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats">https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats</a>. Chrome supports VP8 and VP9. However, the more commonly supported codecs across browsers are H.264 and AAC.</p>
<p>Another restriction that I believe only Plex imposes (somewhat needlessly) is that the video needs to be &#8220;web-optimized&#8221;. So, here are your options:</p>
<ul>
<li>Use <a href="https://plex.tv/downloads#plex-pht">Plex Home Theater</a> to play the videos instead of your browser. This way, the videos are decoded locally are only the bits are streamed by the server.</li>
<li>Try to convert to the videos to the right container format with the right video and audio codecs.</li>
</ul>
<p>Option 2 is a possibly a long and perilous journey. In one of the better cases, your video has the mp4 extension, the h.264 video codec, and the aac audio codec, but it&#8217;s not web-optimized. In that case, just use qt-faststart, and the video can be optimized with no transcoding needed:</p>
<blockquote><p>pip install qt-faststart<br />
qt-faststart video.mp4 /tmp/video.mp4<br />
mv -f /tmp/video.mp4 video.mp4</p></blockquote>
<p>If it needs any transcoding, then your best bet is either to use <a href="https://www.ffmpeg.org/">ffmpeg</a> or <a href="https://handbrake.fr/">Handbrake</a>. Handbrake is more user-friendly, but ffmpeg is a command-line tool, so it&#8217;s easier to script. A command like this can be used to convert video:</p>
<blockquote><p>ffmpeg -i Citizenfour.avi -vcodec h264 -acodec aac Citizenfour.mp4<br />
&lt;qt-faststart commands above&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>https://justinlin.net/2015/05/11/plex-this-server-is-not-powerful-enough-to-convert-video-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<post-id xmlns="com-wordpress:feed-additions:1">1434</post-id>	</item>
	</channel>
</rss>
