<?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>Codebreaker &#187; general</title>
	<atom:link href="http://blog.sumin.us/archives/category/general/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.sumin.us</link>
	<description>2bc08752a0894eb2c7afb345286e391d</description>
	<lastBuildDate>Wed, 08 Sep 2010 02:15:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>English is Amazing</title>
		<link>http://blog.sumin.us/archives/1323</link>
		<comments>http://blog.sumin.us/archives/1323#comments</comments>
		<pubDate>Wed, 08 Sep 2010 02:15:36 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1323</guid>
		<description><![CDATA['in' as a prefix in most words usually means 'not'. Examples would be 'incomplete', 'incorrect', or 'indirect'. However, the combination of a prefix 'in' with a word 'different' yields a totally different result. Instead of 'not different', it becomes 'lack of interest'.]]></description>
			<content:encoded><![CDATA[<p>'in' as a prefix in most words usually means 'not'. Examples would be 'incomplete', 'incorrect', or 'indirect'. However, the combination of a prefix 'in' with a word 'different' yields a totally different result. Instead of 'not different', it becomes 'lack of interest'.</p>
<!-- AdSense Now! V1.83 -->
<!-- Post[count: 2] -->
<div class="adsense adsense-leadout" style="text-align:center;margin: 12px;"><script type="text/javascript"><!--
google_ad_client = "pub-2353453386862167";
/* 468x60, created 10/26/09 */
google_ad_slot = "1252542387";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1323/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Double SSH Tunneling</title>
		<link>http://blog.sumin.us/archives/1318</link>
		<comments>http://blog.sumin.us/archives/1318#comments</comments>
		<pubDate>Fri, 23 Jul 2010 22:23:10 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1318</guid>
		<description><![CDATA[This is just a self-reminder. ssh -t -L 8000:localhost:8000 lec.cs.arizona.edu 'ssh -L 8000:sebeos:80 robotlab@sebeos' lec.cs.arizona.edu is in the DMZ, and sebeos.cs.arizona.edu is one of the machines in the robot lab, which is behind the firewall. So, I'm basically double tunneling to sebeos via lec to access to sebeos from outside the firewall.]]></description>
			<content:encoded><![CDATA[<p>This is just a self-reminder.</p>

<pre><code>ssh -t -L 8000:localhost:8000 lec.cs.arizona.edu 'ssh -L 8000:sebeos:80 robotlab@sebeos'
</code></pre>

<p><code>lec.cs.arizona.edu</code> is in the DMZ, and <code>sebeos.cs.arizona.edu</code> is one of the machines in the robot lab, which is behind the firewall. So, I'm basically <em>double</em> tunneling to <code>sebeos</code> via <code>lec</code> to access to <code>sebeos</code> from outside the firewall.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1318/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ah, Finally</title>
		<link>http://blog.sumin.us/archives/1308</link>
		<comments>http://blog.sumin.us/archives/1308#comments</comments>
		<pubDate>Tue, 22 Jun 2010 06:00:53 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[University of Arizona]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1308</guid>
		<description><![CDATA[This is the official job offer from the University of Arizona. I've been waiting for this for over three weeks!]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2010/06/Screen-shot-2010-06-21-at-10.41.02-PM.png" alt="" title="Screen shot 2010-06-21 at 10.41.02 PM" width="480" height="385" class="aligncenter size-full wp-image-1309" /></p>

<p>This is the official job offer from the University of Arizona. I've been waiting for this for over three weeks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1308/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diploma Finally Arrived</title>
		<link>http://blog.sumin.us/archives/1304</link>
		<comments>http://blog.sumin.us/archives/1304#comments</comments>
		<pubDate>Sun, 20 Jun 2010 08:12:02 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1304</guid>
		<description><![CDATA[This is probably the most expensive piece of paper that I've ever owned in my entire life!]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2010/06/DSC_8271.jpg" alt="" title="DSC_8271" width="480" height="320" class="aligncenter size-full wp-image-1305" /></p>

<p>This is probably the most expensive piece of paper that I've ever owned in my entire life!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1304/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My First Drawing on an iPad</title>
		<link>http://blog.sumin.us/archives/1282</link>
		<comments>http://blog.sumin.us/archives/1282#comments</comments>
		<pubDate>Sun, 04 Apr 2010 00:08:07 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1282</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2010/04/idea.jpg" alt="" title="idea" width="320" height="487" style="border:0;" class="aligncenter size-full wp-image-1287" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1282/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple Magic Mouse</title>
		<link>http://blog.sumin.us/archives/1267</link>
		<comments>http://blog.sumin.us/archives/1267#comments</comments>
		<pubDate>Fri, 12 Mar 2010 07:55:30 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Magic Mouse]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1267</guid>
		<description><![CDATA[I ordered an Apple Magic Mouse yesterday on Amazon with the 2nd day shipping option, and, surprisingly, it came through today. Since I'm on Amazon Prime trial period, it was pretty much a free overnight shipping. Even though everyone says it's a great mouse, there are things I like and things I don't like. Pros [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.sumin.us/wp-content/uploads/2010/03/DSC_7549.jpg" alt="Apple Magic Mouse" title="DSC_7549" width="480" height="320" class="aligncenter size-full wp-image-1266" /></p>

<p>I ordered an Apple Magic Mouse yesterday on Amazon with the 2nd day shipping option, and, surprisingly, it came through today. Since I'm on <a href="http://www.amazon.com/gp/subs/primeclub/signup/main.html">Amazon Prime</a> trial period, it was pretty much a free overnight shipping.</p>

<p>Even though everyone says it's a great mouse, there are things I like and things I don't like.</p>

<h2>Pros</h2>

<p>I love how the scrolling feels.<br />
No <em>cheap</em> feeling when I grab it.<br />
It uses AA batteries unlike my old mouse that uses AAA. Rechargeable batteries of size AA that I have have almost three times more capacity than AAAs I have.</p>

<h2>Cons</h2>

<p>Easily scratchable surface.<br />
The tracking speed is so damn slow! Virtually unusable even with the maximum speed in the system preferences. I even tried</p>

<pre><code> defaults write -g com.apple.mouse.scaling 12.0
</code></pre>

<p>but it seems that it only changes how it accelerates and it doesn't change the tracking speed. If I don't find a better solution for this, I might return the mouse.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1267/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Steve Jobs&#8217; 2005 Stanford Commencement Address</title>
		<link>http://blog.sumin.us/archives/1247</link>
		<comments>http://blog.sumin.us/archives/1247#comments</comments>
		<pubDate>Mon, 08 Mar 2010 13:39:26 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[2005]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Stanford]]></category>
		<category><![CDATA[Steve Jobs]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1247</guid>
		<description><![CDATA[I think this is a great speech. I hope one day I become another person who can say those thing in front of people. In the speech, Steve Jobs gave me some clues that lead me to an answer that I've been looking for a long time. Jobs said, Your time is limited, so don't [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/Hd_ptbiPoXM&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Hd_ptbiPoXM&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>

<p>I think this is a great speech. I hope one day I become another person who can say those thing in front of people. In the speech, Steve Jobs gave me some clues that lead me to an answer that I've been looking for a long time. Jobs said,</p>

<blockquote>
  <p>Your time is limited, so don't waste it living someone else's life. Don't be trapped by dogma which is living with the results of other people's thinking. Don't let the noise of others' opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.</p>
</blockquote>

<p>Even though the statement he made was highly abstract and conceptual, it forced me to re-think about everything I was doing and I have been doing. Ever since I decided to study computer science, I thought I already knew what I want to do. But there were too much of noise from others, temptations and uncertainties. Computer science is indeed a broad subject and it doesn't define me. It is just one of things I am interested in.</p>

<p>I don't think anyone else can answer to this question for me; what do I really want to become? If someone else answers to the question, it's probably not what I truly want to become. Thus I shall be the one who ultimately answers to the question, and hopefully not too late.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1247/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Project Euler Problem #20</title>
		<link>http://blog.sumin.us/archives/1244</link>
		<comments>http://blog.sumin.us/archives/1244#comments</comments>
		<pubDate>Sun, 07 Mar 2010 12:27:21 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[Project Euler]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1244</guid>
		<description><![CDATA[Problem #20 is to find the sum of the digits in the number 100! This can be easily solved with Python as the math package comes with factorial function. from math import factorial reduce(lambda x, y: int(x)+int(y), str(factorial(100)))]]></description>
			<content:encoded><![CDATA[<p><a href="http://projecteuler.net/index.php?section=problems&amp;id=20">Problem #20</a> is to find the sum of the digits in the number 100!</p>

<p>This can be easily solved with Python as the <code>math</code> package comes with <code>factorial</code> function.</p>

<pre><code>from math import factorial
reduce(lambda x, y: int(x)+int(y), str(factorial(100)))
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1244/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Euler Problem #8</title>
		<link>http://blog.sumin.us/archives/1241</link>
		<comments>http://blog.sumin.us/archives/1241#comments</comments>
		<pubDate>Fri, 05 Mar 2010 10:22:56 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[amusement]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[Project Euler]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1241</guid>
		<description><![CDATA[A friend of mine, Leon, told me about the Project Euler. One of the problems is to find the greatest product of five consecutive digits in the 1000-digit number. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861560789112949495459501737958331952853208805511 12540698747158523863050715693290963295227443043557 66896648950445244523161731856403098711121722383113 62229893423380308135336276614282806444486645238749 30358907296290491560440772390713810515859307960866 70172427121883998797908792274921901699720888093776 65727333001053367881220235421809751254540594752243 52584907711670556013604839586446706324415722155397 53697817977846174064955149290862569321978468622482 83972241375657056057490261407972968652414535100474 82166370484403199890008895243450658541227588666881 16427171479924442928230863465674813919123162824586 17866458359124566529476545682848912883142607690042 24219022671055626321111109370544217506941658960408 07198403850962455444362981230987879927244284909188 84580156166097919133875499200524063689912560717606 05886116467109405077541002256983155200055935729725 71636269561882670428252483600823257530420752963450 Here's my one-line Python solution. l [...]]]></description>
			<content:encoded><![CDATA[<p>A friend of mine, Leon, told me about the <a href="http://projecteuler.net">Project Euler</a>. <a href="http://projecteuler.net/index.php?section=problems&amp;id=8">One of the problems</a> is to find the greatest product of five consecutive digits in the 1000-digit number.</p>

<pre><code>73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
62229893423380308135336276614282806444486645238749
30358907296290491560440772390713810515859307960866
70172427121883998797908792274921901699720888093776
65727333001053367881220235421809751254540594752243
52584907711670556013604839586446706324415722155397
53697817977846174064955149290862569321978468622482
83972241375657056057490261407972968652414535100474
82166370484403199890008895243450658541227588666881
16427171479924442928230863465674813919123162824586
17866458359124566529476545682848912883142607690042
24219022671055626321111109370544217506941658960408
07198403850962455444362981230987879927244284909188
84580156166097919133875499200524063689912560717606
05886116467109405077541002256983155200055935729725
71636269561882670428252483600823257530420752963450
</code></pre>

<p>Here's my one-line Python solution. <code>l</code> is a string that contains all 1000 digits above.</p>

<pre><code>max(map(lambda a,b,c,d,e: int(a)*int(b)*int(c)*int(d)*int(e), l[:-4], l[1:-3], l[2:-2], l[3:-1], l[4:]))
</code></pre>

<p>Python for the win!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1241/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Languages of the Year 2009</title>
		<link>http://blog.sumin.us/archives/1200</link>
		<comments>http://blog.sumin.us/archives/1200#comments</comments>
		<pubDate>Wed, 23 Dec 2009 00:42:44 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[prolog]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1200</guid>
		<description><![CDATA[It's almost the end of the year 2009. This year is special because I've never dealt with so many languages in a year. Objective C, Python, Java, C++, PHP, JavaScript, Haskell, Prolog, Ruby, C#, and probably more. Some of them were for work, some for school, and others were for my personal projects. I have [...]]]></description>
			<content:encoded><![CDATA[<p>It's almost the end of the year 2009. This year is special because I've never dealt with so many languages in a year. Objective C, Python, Java, C++, PHP, JavaScript, Haskell, Prolog, Ruby, C#, and probably more. Some of them were for work, some for school, and others were for my personal projects. I have plenty of stories for each language, but I'll try to keep them brief.</p>

<h3>Objective C</h3>

<p><a href="http://cqube.mobi">CQube</a> iPhone edition was released back in March, and as you know Objective C is the language you use for iPhone application development. Objective C is a strict superset of C, so it didn't take too much effort to learn. Rather, I spent most of time to learn the Cocoa framework. All those magic keywords like <code>@property</code>, <code>@synthesize</code>, and <code>@dynamic</code> were nice to have.</p>

<h3>Python</h3>

<p>I love Python. I used Python for many different things; from disposable command line utilities to implementation of Apple Push Notification service. I also used this language to conduct a <em>classified operation</em>. After I learned Haskell, which is what I'm going to talk about in a minute, I started enjoying use of higher order functions such as <code>map</code>, <code>reduce</code>, <code>filter</code>, and so on.</p>

<h3>Java</h3>

<p>I also use Java a lot. I built a Java mobile application at my work. I also built a nearest neighbor search engine, an HTTP based real time communication framework, and a Luca compiler. There are probably more, but these are the ones I remember. There are few things that I really wish to have in Java: automatic getter/setter, operator overriding, and delegate. Could someone give me these as a Christmas gift? ;-)</p>

<h3>C++</h3>

<p>To be honest with you, I'm kind of scared of this magic language. I would say it's quite difficult and takes a considerable amount of practice to use this language properly and effectively. Well, in my compiler class, I had to use either C or C++ to implement a Luca interpreter with indirect threading.</p>

<h3>PHP</h3>

<p>I'm not a big fan of this language. Ironically, this is probably one of the top three languages that I spent most time with so far. I had a web application development job over the summer. It was a lot of PHP programming. I also had to build server side components at my current work. I wanted to use Python, but apparently not many people know Python. So, I had stick with whatever language that most people can deal with.</p>

<h3>JavaScript</h3>

<p>You would imagine using JavaScript to manipulate the DOM structure of a web page. But, this is not the only case. I used this language to build a Firefox extension (thanks to <a href="http://groups.google.com/group/ua-developers/web/firefox-extension-development-tutorial---part-1">Justin Samuel's Firefox extension development tutorial</a>). I can't tell you what it is though because it's a part of a classified operation.</p>

<h3>Haskell</h3>

<p>Haskell changed a lot of things in my point of view of programming. All the functional programming features and its imperativeness really blew my mind. Basically it made me a better developer in general. Even though I have no intention to use Haskell in production environment, I will be using things I learned from this language.</p>

<h3>Prolog</h3>

<p>Cody Jorgensen:</p>

<blockquote>
  <p>Why can't I get an element from the god damn list?</p>
</blockquote>

<h3>Ruby</h3>

<p>It was very joyful to learn Ruby as I already know how to use Python. Ruby is very similar to Python in many different aspects as C# is similar to Java. I see blocks and the yield keyword as a giant lambda function, and I kind of like it. One thing I like from this language over Python is that there's <code>end</code> keyword so that you don't have to be super careful about indentation. Because of this, there's no need to make a new template language in web application framework such as Ruby on Rails, whereas it is necessary in Python based frameworks such as Django. Oh, it's also very nice to have built-in regular expression features.</p>

<h3>C&#35;</h3>

<p>We decided to switch from Nokia's Symbian to Microsoft Windows Mobile platform at my work. I was hoping the Java code I've been writing works just fine on the Windows Mobile, but few things didn't really work out well. So, I decided to re-write the whole application in C#, and I did it over the last weekend. I wouldn't be able to make all these happen without Visual Studio's great help. Not to mention I didn't have to re-write all the server side components.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1200/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mounting Remote Filesystem over SSH</title>
		<link>http://blog.sumin.us/archives/1179</link>
		<comments>http://blog.sumin.us/archives/1179#comments</comments>
		<pubDate>Wed, 23 Sep 2009 04:29:51 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[sshfs]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1179</guid>
		<description><![CDATA[I've been using this shell script for a long time and it works pretty well unless I have really slow network connection. When I upgraded to Snow Leopard from Leopard, the installer got rid of all files under /Volumes directory where this script was located. I probably should've put the file under /usr/bin. So I'm [...]]]></description>
			<content:encoded><![CDATA[<p>I've been using this shell script for a long time and it works pretty well unless I have really slow network connection. When I upgraded to Snow Leopard from Leopard, the installer got rid of all files under <code>/Volumes</code> directory where this script was located. I probably should've put the file under <code>/usr/bin</code>. So I'm posting this as a backup just in case I lose the file again, but please feel free to use it if you have <code>sshfs</code> installed on your system.</p>

<pre><code>#!/bin/sh
# @author Sumin Byeon

URI=user@dev.sumin.us
MOUNTPOINT=/Volumes/dev.sumin.us
OPTIONS="reconnect,follow_symlinks"

if [ ! -d $MOUNTPOINT ]; then
    mkdir $MOUNTPOINT
fi

sshfs -o $OPTIONS $URI: $MOUNTPOINT
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1179/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH Tunneling for Secure Connection to Remote MySQL Server</title>
		<link>http://blog.sumin.us/archives/1109</link>
		<comments>http://blog.sumin.us/archives/1109#comments</comments>
		<pubDate>Wed, 12 Aug 2009 10:19:00 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/archives/1109</guid>
		<description><![CDATA[Introduction Database is one of the must-have items for today's web application projects. I believe there are plenty of project teams who use MySQL, and I'm one of them. During the development process, there might be a case where the team members want to share a single database instance rather than keeping separate copies for [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>

<p>Database is one of the <em>must-have</em> items for today's web application projects. I believe there are plenty of project teams who use MySQL, and I'm one of them. During the development process, there might be a case where the team members want to share a single database instance rather than keeping separate copies for each of members. However, in this case, security becomes our primary concern as MySQL does not provide a secure connection to remote clients.</p>

<p>(Still working on this part…)</p>

<p>In my opinion, SSH is such an awesome protocol. I can access to any remote computers from anywhere in this world, securely transfer files, and so on and so forth. In this article, I'll make a brief explanation on how to setup a SSH tunneling for secure connection to a remote MySQL server.</p>

<p>If you're not sure what 'tunneling' means, you might want to refer <a href="http://en.wikipedia.org/wiki/Tunneling_protocol">this article</a>.</p>

<h3>HOW-TO</h3>

<pre><code>ssh -L $LOCAL_PORT:localhost:3306 $REMOTE_SERVER
mysql -u $USER -p -h 127.0.0.1
</code></pre>

<h3>Example</h3>

<pre><code>ssh -L 3306:localhost:3306 db.sumin.us
</code></pre>

<p>Then now I can connect to</p>

<pre><code>mysql -u sumin -p -h 127.0.0.1
</code></pre>

<h3>No localhost, but 127.0.0.1</h3>

<p>If you tried to connect to <code>localhost</code>, then you probably got this kind of message.</p>

<pre><code>ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/opt/local/var/run/mysql5/mysqld.sock' (2)
</code></pre>

<p>My perception is that when you connect to <code>localhost</code> then the MySQL client tries to establish an inter process communication through <code>mysql.sock</code> file.</p>

<h3>Further Applications</h3>

<p>You can use SSH tunneling for pretty much anything you want. AFP, SMB, or FTP. You name it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1109/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Goodbye Philadelphia, Back To Tucson!</title>
		<link>http://blog.sumin.us/archives/1090</link>
		<comments>http://blog.sumin.us/archives/1090#comments</comments>
		<pubDate>Sun, 12 Jul 2009 23:56:27 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[photographs]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1090</guid>
		<description><![CDATA[So, my short term contract is over and it's time to go back home. I'm gonna miss this beautiful town. And the nice weather too. But I miss my car more than that! Walking around the town was alright - actually somewhat enjoyable - but walking a couple miles to the train station with all [...]]]></description>
			<content:encoded><![CDATA[<p>So, my short term contract is over and it's time to go back home.</p>

<div id="attachment_1092" class="wp-caption aligncenter" style="width: 330px">
<img class="size-full wp-image-1092" title="dsc_7160" src="http://blog.sumin.us/wp-content/uploads/2009/07/dsc_7160.jpg" alt="dsc_7160" width="320" height="480" /><p class="wp-caption-text">View from my apartment (@12th floor)</p></div>

<p>I'm gonna miss this beautiful town. And the nice weather too. But I miss my car more than that! Walking around the town was alright - actually somewhat enjoyable - but walking a couple miles to the train station with all my stuff was not really fun at all.</p>

<div id="attachment_1093" class="wp-caption aligncenter" style="width: 490px"><a href="http://blog.sumin.us/wp-content/uploads/2009/07/dsc_7162.jpg"><img class="size-full wp-image-1093" title="dsc_7162" src="http://blog.sumin.us/wp-content/uploads/2009/07/dsc_7162.jpg" alt="dsc_7162" width="480" height="320" /></a><p class="wp-caption-text">Feel like... floating above a layer of cotton</p></div>

<p>I was holding two jobs and a class on the top of those, and I'm a bit burnt out. I was planning to take one more class during the summer 2, but I dropped it. I would like to take some break. Working (only!) 40 hours/week or so ;)</p>

<p>Ugh, I'm gonna suffer from the heat for a while.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1090/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mac OS X Snow Leopard Developer Preview</title>
		<link>http://blog.sumin.us/archives/1086</link>
		<comments>http://blog.sumin.us/archives/1086#comments</comments>
		<pubDate>Thu, 18 Jun 2009 01:01:57 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1086</guid>
		<description><![CDATA[I can't wait until I see the new expose!]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2009/06/screenshot-on-2009-06-11-at-104745-am.png" alt="screenshot-on-2009-06-11-at-104745-am" title="screenshot-on-2009-06-11-at-104745-am" width="321" height="393" class="aligncenter size-full wp-image-1087" /></p>

<p>I can't wait until I see the new expose!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1086/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WWDC Badge</title>
		<link>http://blog.sumin.us/archives/1083</link>
		<comments>http://blog.sumin.us/archives/1083#comments</comments>
		<pubDate>Wed, 17 Jun 2009 14:16:16 +0000</pubDate>
		<dc:creator>Sumin</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[WWDC]]></category>

		<guid isPermaLink="false">http://blog.sumin.us/?p=1083</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2009/06/dsc_7053.jpg" alt="dsc_7053" title="dsc_7053" width="480" height="320" class="aligncenter size-full wp-image-1084" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sumin.us/archives/1083/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
