<?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>Popcornfarmer.com &#187; howto</title>
	<atom:link href="http://www.popcornfarmer.com/category/knowledge/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.popcornfarmer.com</link>
	<description>an unlikely place for a CS grad student.</description>
	<lastBuildDate>Wed, 21 Jul 2010 02:33:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SSH Tunneling Tutorial</title>
		<link>http://www.popcornfarmer.com/2009/01/ssh-tunneling-tutorial/</link>
		<comments>http://www.popcornfarmer.com/2009/01/ssh-tunneling-tutorial/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 22:57:41 +0000</pubDate>
		<dc:creator>twood</dc:creator>
				<category><![CDATA[gibberish]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.popcornfarmer.com/?p=225</guid>
		<description><![CDATA[Note: this post is another technical one, so if you are a member of my immediate family, you probably won&#8217;t find it of much interest.  If &#8220;ports&#8221; make you think of boats (rather than the numbers 80 and 22), then why don&#8217;t you mosey on over to my christmas photos? I frequently have trouble communicating [...]]]></description>
			<content:encoded><![CDATA[<p><em>Note: this post is another technical one, so if you are a member of my immediate family, you probably won&#8217;t find it of much interest.  If &#8220;ports&#8221; make you think of boats (rather than the numbers 80 and 22), then why don&#8217;t you mosey on over to my <a href="http://picasaweb.google.com/twwood/Christmas08#">christmas photos</a>? </em></p>
<p>I frequently have trouble communicating between systems which are separated by different private LANs. This often happens when you have your computer on a home wireless network which is separated from the rest of the internet via a router and firewall.  Fortunately, SSH tunnels can be used to link these machines together, provided you know which ports need to be interfaced and you have a common server which both machines can reach. Here is how.<span id="more-225"></span></p>
<h4>Remote Access with SSH</h4>
<p>Normally SSH is used to remotely log into servers in order to run commands or copy files. However, SSH can also be used to create &#8220;tunnels&#8221; between two servers. These tunnels are particularly useful for two reasons: they are encrypted and you can make network traffic going to one system magically appear at the end of the tunnel.</p>
<p>There are two basic kinds of SSH tunnels: remote and local. In all cases you create a tunnel that connects one port number on a remote server to a port on the local machine where you run the command.</p>
<p>Note: The commands here are primarily geared towards computers running linux or mac os x, although widows users can do the same if they install cygwin.</p>
<p><strong>Remote Tunnels</strong> are used to forward all traffic from some remote port back to your own system. You would do this if you want to run a web server or some other service on your own machine, but the remote server can&#8217;t reach it because of your router. In effect, you are creating a listener on the remote machine which will accept the webpage requests, and forward them to your own computer.</p>
<p style="text-align: center;"><img class="size-full wp-image-237 aligncenter" title="remote" src="http://www.popcornfarmer.com/log/wp-content/uploads/2009/01/remote.png" alt="remote" width="306" height="105" /></p>
<p>You can create a remote tunnel with the following command:</p>
<pre>ssh -R *:8080:localhost:80 user@remoteserver.com -N ## run this on home
## -R   = remote tunnel
## 8080 = port on remote machine that will accept traffic
## 80   = port on local machine to forward traffic to
## -N   = creates the ssh connection without opening an interactive shell
## -f   = (optional) use this to make the command create the tunnel
##         and return immediately.</pre>
<p>This will make it so that all requests on the remoteserver.com to port 8080 are redirected to <em>home</em> port 80 (the default web server port). However, the remote tunnel only makes it so users on remoteserver.com itself are able to utilize the port forward. Thus localhost:8080 tunnels correctly from that server, but remoteserver.com:8080 will not go through the tunnel. To let a third user access the website, we need to also create a local tunnel.</p>
<p style="text-align: center;"><img class="size-full wp-image-236 aligncenter" title="nolocal" src="http://www.popcornfarmer.com/log/wp-content/uploads/2009/01/nolocal.png" alt="nolocal" width="518" height="105" /></p>
<p><strong>Local Tunnels</strong> let you make a port on your own machine actually send traffic to a port on a remote machine. Often you need to combine a remote and a local tunnel if you want a user within a second private LAN to reach your machine.</p>
<pre>ssh -L 8888:localhost:8080 remoteserver.com -N ## run this on work
## -L   = create a local tunnel
## 8888 = the port on the local machine for the tunnel entrance
## 8080 = the port on the remote machine</pre>
<p>This will make it so that from the perspective of users on <em>work</em>, requests to localhost:8888 are forwarded to remoteserver.com:8080.  This in turn is connected to the original tunnel, creating the full tunnel back to <em>home</em>.</p>
<p style="text-align: center;"><img class="size-full wp-image-235 aligncenter" title="local" src="http://www.popcornfarmer.com/log/wp-content/uploads/2009/01/local.png" alt="local" width="494" height="105" /></p>
<p>These kinds of tunnels can be very useful for connecting systems separated by routers and firewalls. Depending on the application you are trying to reach, you will need to use a different port number. Here is a <a href="http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers">good list</a> of commonly used port numbers.</p>
<p>Of course there are some security implications here and your company IT people may not like these tunnels much. In effect, this lets you connect any two machines, even if they are supposed to be separated by secure VPNs. Of course, since only one port is being opened, and the commands generally aren&#8217;t left running for a long time, it shouldn&#8217;t be an issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.popcornfarmer.com/2009/01/ssh-tunneling-tutorial/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Popcornfarmer.com Learning Center</title>
		<link>http://www.popcornfarmer.com/2009/01/popcornfarmercom-learning-center/</link>
		<comments>http://www.popcornfarmer.com/2009/01/popcornfarmercom-learning-center/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 20:01:06 +0000</pubDate>
		<dc:creator>twood</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[knowledge]]></category>

		<guid isPermaLink="false">http://www.popcornfarmer.com/2009/01/popcornfarmercom-learning-center/</guid>
		<description><![CDATA[I am pleased to annouce the grand opening of the Popcornfarmer.com Learning Center. There isn&#8217;t too much in there right now, and mostly it is just notes for myself.  In any case, some of it might be useful to somebody, so rather than just keeping it hidden away I figure I will share it. Most [...]]]></description>
			<content:encoded><![CDATA[<p>I am pleased to annouce the grand opening of the <a href="/learn">Popcornfarmer.com Learning Center</a>. There isn&#8217;t too much in there right now, and mostly it is just notes for myself.  In any case, some of it might be useful to somebody, so rather than just keeping it hidden away I figure I will share it.</p>
<p>Most of the information is pretty technical, so unless you are interested in doing some Bash shell scripting or need to make some regression plots in R, it may not be of much use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.popcornfarmer.com/2009/01/popcornfarmercom-learning-center/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy as&#8230;cake</title>
		<link>http://www.popcornfarmer.com/2008/10/easy-ascake/</link>
		<comments>http://www.popcornfarmer.com/2008/10/easy-ascake/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 02:30:40 +0000</pubDate>
		<dc:creator>twood</dc:creator>
				<category><![CDATA[gibberish]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.popcornfarmer.com/?p=144</guid>
		<description><![CDATA[I&#8217;ve been trying out CakePHP, a framework for creating DB driven PHP based websites using the MVC design pattern. Warning: In case the above sentence didn&#8217;t make this clear, this post is largely technical gibberish. If that&#8217;s not your thing, then you can move along and look at the pretty pictures from a hiking trip [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cakephp.org"><img class="alignright size-full wp-image-149" style="border:none" title="cake-logo" src="http://www.popcornfarmer.com/log/wp-content/uploads/2008/10/cake-logo.png" alt="" width="180" height="180" /></a>I&#8217;ve been trying out <a href="http://cakephp.org/">CakePHP</a>, a framework for creating DB driven PHP based websites using the MVC design pattern.</p>
<p><em>Warning: In case the above sentence didn&#8217;t make this clear, this post is largely technical gibberish. If that&#8217;s not your thing, then you can move along and look at the pretty pictures from a hiking trip up <a href="http://picasaweb.google.com/twwood/MtMonadnock#">Mt. Monadnock</a> from back in September. </em></p>
<p>My feelings with CakePHP so far are mixed. As with many open source projects, the documentation for getting started is a little rough.  To help with that, here is the list of resources I&#8217;ve found most useful so far.</p>
<p><span id="more-144"></span></p>
<h4>CakePHP Tutorials</h4>
<p><a href="http://www.ibm.com/developerworks/edu/os-dw-os-php-cake1.html">IBM&#8217;s Cake Tutorial</a> &#8211; 5 parts, including scaffolding and baking (topics not included in the Cake Book tutorial). Also has section on user authentication. In some ways the blog demo below is a better place to start since it gives you a more complete application quicker, but once you have the basic idea down this is full of good information, and I&#8217;ve only gone through part 1 so far&#8230;</p>
<p><a href="http://book.cakephp.org/view/219/Blog">The Cake Book Blog Tutorial</a> &#8211; provides a good step by step guide for making a simple blog, but does not discuss the &#8220;bake&#8221; command or anything about personalizing the appearance of the site.</p>
<p><a href="http://www.pseudocoder.com/archives/2008/02/10/cakephp-tutorials/">List of Cake Tutorials</a> &#8211; links to lots of good information, although a lot of it is beyond my level right now. Hopefully I&#8217;ll get to the AJAX tutorials and do some nifty stuff.</p>
<h4>General Documentation</h4>
<p><a href="http://book.cakephp.org/">The Cake Book</a> &#8211; seems like it has a lot of useful information, including a guide to the MVC principles.  Some intro material is too basic, and other parts are too advanced, so it is a little hard to find the right pieces.</p>
<p><a href="http://www.avatarfinancial.com/pages/cake/">21 Things</a> &#8211; some good tidbits not covered in the docs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.popcornfarmer.com/2008/10/easy-ascake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Staying Organized</title>
		<link>http://www.popcornfarmer.com/2007/10/organize-research/</link>
		<comments>http://www.popcornfarmer.com/2007/10/organize-research/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 17:44:10 +0000</pubDate>
		<dc:creator>twood</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[organization]]></category>

		<guid isPermaLink="false">http://www.popcornfarmer.com/log/?p=11</guid>
		<description><![CDATA[There are three keys to keeping an organized research project: A good research notebook for informal notes and plans A collaborative place to keep track of your results and general strategy A way to keep track of your todos, meetings, and deadlines Each of these has its own use, and none can completely cover for [...]]]></description>
			<content:encoded><![CDATA[<p>There are three keys to keeping an organized research project:</p>
<ol>
<li>A good research notebook for informal notes and plans</li>
<li>A collaborative place to keep track of your results and general strategy</li>
<li>A way to keep track of your todos, meetings, and deadlines</li>
</ol>
<p>Each of these has its own use, and none can completely cover for another. Here are my suggestions for each&#8230;<span id="more-11"></span></p>
<p><strong>The Research Notebook</strong></p>
<p>When I first started grad school I used a 99 cent notebook from the local drug store to keep all the notes about my project. It only survived for six months before the binding had fallen apart and I ran out of pages since I had been pulling them out to use for class notes as needed.</p>
<p>My current research notebook is a hardbound, 8.2 x 5.25, <a href="http://en.wikipedia.org/wiki/Moleskine" target="_blank">Moleskine</a> with 240 sheets of graph paper.  It costs about 15 times as much as the previous one, but it will definitely last a lot longer.  Spending the extra couple bucks on it also has the psychological effect of making me automatically take better care of it.  In fact, I&#8217;ve become rather attached to it.</p>
<p>I use the notebook to jot down quick notes or thoughts, as well as to plan out basic experiment and research plans.  Of course it is also important to bring to meetings or seminars for taking down notes and comments.  I do not record experimental results or exact implementation details in the notebook, as those are usually much better suited for an electronic format.  Which leads us to&#8230;</p>
<p><strong>The Wiki</strong></p>
<p>I&#8217;ve become a huge fan of wikis.  The point of a wiki is to be collaborative and make it trivial for both the original author and others to add comments and revisions.  You can set up your own, but it&#8217;s even better to have a shared one for your lab. A lab wiki lets everyone keep track of what others are doing and gives a central, permanent place to store things such as experimental results and information useful to all lab members.  Use it to quickly let others see your graphs and comment on them or to plan out your algorithms as a group.</p>
<p>Even if you use a shared wiki for your lab, you should keep a personal section where you can make your own notes.  I find this particularly useful for recording basic code tricks, linux commands, installation notes, etc.  The goal here is to make it as easy as possible for you to write down <em>anything</em> which might come in handy later.  You think you&#8217;ll remember <em>X</em> in <strike>a year</strike> a month?  No, you won&#8217;t.  Trust me.  So put it in your wiki and you can find it when you need it!</p>
<p>There are a ton of different wiki platforms to choose from. A simple one used by my lab which is convenient because it does not require any kind of special database is <a href="http://www.pmwiki.com/" target="_blank">PmWiki</a>. Even easier would be to use a wiki hosted by someone else such as <a href="http://pbwiki.com/">pbwiki</a> (as easy as making a peanut butter sandwich). Of course if you are doing super top secret research, you may want a more private place to keep your notes <img src='http://www.popcornfarmer.com/log/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>If you don&#8217;t need something shared with others (or if it is just with a selected group) then you can also try something like <a href="http://backpackit.com/?referrer=BPZS9N">backpack</a>. It&#8217;s not exactly a wiki, but it provides an easy interface to create pages and add notes, images, and task lists to them. Pages can be shared with others or kept private.</p>
<p><strong>The Calendar Task List</strong></p>
<p>Now you have a place to take notes on your future plans and a spot to post your results, so what do you do next?  Ah, well it seems you need a way to keep track of exactly that &#8212; your short term to do list. There are a lot of resources on the web for daily planning and keeping yourself organized.  The GTD (<a href="http://www.43folders.com/2004/09/08/getting-started-with-getting-things-done" target="_blank">Get Things Done</a>) cult is gaining a lot of followers.  I&#8217;ve read (most of) <a href="http://www.amazon.com/gp/product/0142000280?ie=UTF8&amp;tag=popcorfarmern-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0142000280" target="_blank">the book</a>, and it is worth a look.  The key idea is simple enough to implement on your own: have an organized place where you keep track of the list of &#8220;next steps&#8221; for each of your projects.  These steps should be small ones, the idea being that if you always have a clear idea of your next manageable task, you are much more likely to do it than if your to do list for today just says &#8220;write Ph.D dissertation&#8221;.</p>
<p>There are a lot of online resources to help here.  I&#8217;ve tried some larger life/project management solutions like <a href="http://www.rousette.org.uk/projects/" target="_blank">Tracks</a> and <a href="http://www.basecamphq.com/" target="_blank">basecamp</a>, but I think they are generally overkill for one person projects.  Instead, I like the combination of an online calendar and to-do list. For the calendar, I use <a href="http://30boxes.com" target="_blank">30 Boxes</a> since it has a very natural method for adding events (just type in &#8220;Meet advisor every thursday at 9am&#8221; and it will create the recurring appointment). I have been using <a href="http://www.rememberthemilk.com/" target="_blank">Remember the Milk</a> as a basic to-do list.  It lets you easily create multiple lists and assign deadlines for each task to help you prioritize.</p>
<p>To make sure you actually use the calendar and list, you need to make them easy for you to see and edit.  For this, I&#8217;ve been using <a href="http://www.netvibes.com" target="_blank">netvibes</a> to create a web portal which includes my calendar, to do lists, bookmarks, etc as embeddable widgets.  Here&#8217;s what my page looks like:</p>
<p><a href="http://www.popcornfarmer.com/log/wp-content/uploads/2007/10/netvibes.png" title="netvibes start page"><img src="http://www.popcornfarmer.com/log/wp-content/uploads/2007/10/netvibes.png" alt="netvibes start page" /></a></p>
<p>From this one page I can then instantly see (and edit) my weekly calendar and my list of upcoming tasks.  You can make your own page which includes calendars, bookmark lists, rss feeds, and all kinds of other content.</p>
<p><strong>Conclusions</strong></p>
<p>Sadly, even the most organized of us still have to spend most of our time actually doing the research which makes that organization worthwhile.  There is also a certain danger of spending too much time getting organized and not enough time producing work to organize. In any case, there are undoubtedly ways that we can all further refine our work process so that we aren&#8217;t wasting time either figuring out what to do next or repeating what we&#8217;ve already done.</p>
<p><strong> Resources</strong></p>
<p>Wikis</p>
<ul>
<li><a href="http://www.pmwiki.com/" aiotarget="true" aiotitle="PmWiki - doesn't need a database" target="_blank">PmWiki</a> &#8211; doesn&#8217;t need a database<a href="http://www.pmwiki.com/" aiotarget="true" aiotitle="PmWiki - doesn't need a database" target="_blank"><br />
</a></li>
<li><a href="http://pbwiki.com/">pbwiki</a> &#8211; hosted by them</li>
</ul>
<p>Calendars / To do lists</p>
<ul>
<li><a href="http://www.30boxes.com" target="_blank">30 boxes</a> &#8211; easy to use calendar<a href="http://www.30boxes.com" target="_blank"><br />
</a></li>
<li><a href="http://www.rememberthemilk.com/" target="_blank">Remember the Milk</a> &#8211; nice to do list<a href="http://www.rememberthemilk.com/" target="_blank"><br />
</a></li>
<li><a href="http://www.techcrunch.com/2006/05/08/do-more-online-to-do-lists-compared/" target="_blank">To do list roundup</a> &#8211; more to do list options<a href="http://www.techcrunch.com/2006/05/08/do-more-online-to-do-lists-compared/" target="_blank"><br />
</a></li>
<li><a href="http://www.43folders.com/2004/09/08/getting-started-with-getting-things-done/" target="_blank">GDT Introduction</a> &#8211; learn how to organize your life<a href="http://www.43folders.com/2004/09/08/getting-started-with-getting-things-done/" target="_blank"><br />
</a></li>
<li><a href="http://www.rousette.org.uk/projects/" target="_blank">Tracks</a> &#8211; full GTD system</li>
<li><a href="http://www.basecamphq.com/">Basecamp</a> &#8211; full project management solution</li>
<li><a href="http://backpackit.com/?referrer=BPZS9N">Backpack</a> &#8211; smaller scale self management with nice interface</li>
<li><a href="http://www.netvibes.com">Netvibes</a> &#8211; customizable start page made up of widgets</li>
</ul>
<p>General Life Organization Resources</p>
<ul>
<li><a href="http://www.43folders.com/" target="_blank">43 Folders</a></li>
<li><a href="http://www.lifehack.org/" target="_blank">Life Hack<br />
</a></li>
<li><a href="http://lifehacker.com" target="_blank">Lifehacker</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.popcornfarmer.com/2007/10/organize-research/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.613 seconds -->
