<?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>lifecoding.com Blog &#187; Utilities</title>
	<atom:link href="http://lifecoding.com/blog/index.php/category/utilities/feed/" rel="self" type="application/rss+xml" />
	<link>http://lifecoding.com/blog</link>
	<description>(define (life-coding life code) (organize life (using code)))</description>
	<lastBuildDate>Wed, 11 Jun 2008 03:29:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Make Pound And SSL Play Nice With OS X</title>
		<link>http://lifecoding.com/blog/2006/06/09/how-to-make-pound-and-ssl-play-nice-with-os-x/</link>
		<comments>http://lifecoding.com/blog/2006/06/09/how-to-make-pound-and-ssl-play-nice-with-os-x/#comments</comments>
		<pubDate>Fri, 09 Jun 2006 22:23:31 +0000</pubDate>
		<dc:creator>Trotter Cashion</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://lifecoding.com/blog/?p=29</guid>
		<description><![CDATA[Though building sites with ssl is cool and gives your users a sense of security, configuring a webserver with ssl can be a royal pain. Thankfully, there&#8217;s pound.  Pound is a &#8220;is a reverse proxy, load balancer and HTTPS front-end for Web server(s).&#8221;
Pound is dead simple to setup and configure. Unfortunately, the darwin port [...]]]></description>
			<content:encoded><![CDATA[<p>Though building sites with ssl is cool and gives your users a sense of security, configuring a webserver with ssl can be a royal pain. Thankfully, there&#8217;s pound.  <a href="">Pound</a> is a &#8220;is a reverse proxy, load balancer and HTTPS front-end for Web server(s).&#8221;</p>
<p>Pound is dead simple to setup and configure. Unfortunately, the darwin port for pound is old and does not work. So this guide will help you build pound on your own. Besides, everyone feels cooler after compiling that hot fire. Click on for the steps.</p>
<ol>
<span id="more-29"></span></p>
<li>Open terminal.</li>
<li>Install zlib</li>
<pre>
mkdir ~/temp
curl -O http://www.zlib.net/zlib-1.2.3.tar.gz
tar xzvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=/usr/local --shared
make
sudo make install
</pre>
<li>Install openssl</li>
<pre>
curl -O http://www.openssl.org/source/openssl-0.9.8b.tar.gz
tar xzvf openssl-0.9.8b.tar.gz
cd openssl-0.9.8b
./config -L/usr/local/lib --openssldir=/usr/local/etc/openssl \\
    zlib no-asm no-krb5 shared
make
sudo make install
</pre>
<li>Install Pound 2.0 or greater</li>
<pre>
curl -O http://www.apsis.ch/pound/Pound-2.0.tgz
tar xzvf Pound-2.0.tgz
cd Pound-2.0
sed "s/-o bin -g bin //g" < Makefile.in > Makefile.in.new
mv Makefile.in.new Makefile.in  # Hit y to override any restrictions
./configure --with-ssl=/usr/local/etc/openssl/ --prefix=/usr/local
make
sudo make install
</pre>
<li>Generate an ssl certificate.</li>
<pre>
cd /usr/local/etc
</pre>
<p>You can put the next line in ~/.bash_profile if you want openssl available everytime you open the terminal.</p>
<pre>
export PATH="/usr/local/etc/openssl/bin:$PATH"
sudo openssl/bin/openssl req -x509 -newkey rsa:1024 -keyout our_cert.pem \\
    -out our_cert.pem -days 365 -nodes
</pre>
<p>Fill out the required information to generate the ssl certificate.</p>
<li>Create a pound.cfg file.</li>
<pre>
cd /usr/local/etc # You should already be here
</pre>
<p>This next piece uses a trick called a heredoc. Instead of copying and pasting the below command into terminal, you could also just copy and paste the text into pound.cfg in /usr/local/etc/pound.cfg</p>
<pre>
cat &gt; ~/tmp_file &lt;&lt;EOF
ListenHTTP
  Address 0.0.0.0
  Port    80
  Service
    BackEnd
      Address 127.0.0.1
      Port    3000
    End
  End
End

ListenHTTPS
  Address 0.0.0.0
  Port    443
  Cert    "/usr/local/etc/our_cert.pem"
  # pass along https hint
  AddHeader "X-Forwarded-Proto: https"
  HeadRemove "X-Forwarded-Proto"
  Service
    BackEnd
      Address 127.0.0.1
      Port    3000
    End
  End
End
EOF
sudo mv ~/tmp_file ./pound.cfg
</pre>
<li>Make sure that pound works.</li>
<pre>
pound -v -c
</pre>
<p>You should see Config file /usr/local/etc/pound.cfg is OK.<br />
If not, make sure that you copied your config file correctly<br />
using &#8216;cat pound.cfg&#8217; to view what is in the file.</p>
<li>Turn off apache (assuming it&#8217;s running).</li>
<pre>sudo apachectl stop</pre>
<li>Turn on pound.</li>
<pre>sudo pound -v</pre>
<li>Start mongrel/webrick/lighty.</li>
<pre>
cd ~/work/my_killer_app
mongrel_rails start # Or ruby script/server (if you're still on lighty/webrick)
</pre>
<li>Marvel at your wonderous creation by pointing your browser to http://localhost/ or https://localhost/</li>
</ol>
<p>TODO (feel free to do these and post how to do them in the comments):
<ul>
<li>Make pound start when the computer loads.</li>
<li>Use darwin ports to install zlib and openssl, but not pound.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://lifecoding.com/blog/2006/06/09/how-to-make-pound-and-ssl-play-nice-with-os-x/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Web Presentations</title>
		<link>http://lifecoding.com/blog/2006/02/26/web-presentations/</link>
		<comments>http://lifecoding.com/blog/2006/02/26/web-presentations/#comments</comments>
		<pubDate>Mon, 27 Feb 2006 01:35:08 +0000</pubDate>
		<dc:creator>Trotter Cashion</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://lifecoding.com/blog/?p=18</guid>
		<description><![CDATA[While working on the upcoming presentation, I came to the realization that I have never used Microsoft Powerpoint. Being a good dork, I decided that now was not the time to learn and instead set out to find presentation software that would allow me to post my presentation to the web.  S5 to the [...]]]></description>
			<content:encoded><![CDATA[<p>While working on the upcoming presentation, I came to the realization that I have never used Microsoft Powerpoint. Being a good dork, I decided that now was not the time to learn and instead set out to find presentation software that would allow me to post my presentation to the web.  <a href="http://www.meyerweb.com/eric/tools/s5/">S5</a> to the rescue.  S5 is a creation of Eric Meyer that runs on html, css, and javascript.  It looks great, is easy to use, and your presentation can be viewed by anyone anywhere. Great work Eric!</p>
]]></content:encoded>
			<wfw:commentRss>http://lifecoding.com/blog/2006/02/26/web-presentations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oh websense, let me count the ways I hate thee.</title>
		<link>http://lifecoding.com/blog/2006/02/24/oh-websense-let-me-count-the-ways-i-hate-thee/</link>
		<comments>http://lifecoding.com/blog/2006/02/24/oh-websense-let-me-count-the-ways-i-hate-thee/#comments</comments>
		<pubDate>Sat, 25 Feb 2006 00:41:50 +0000</pubDate>
		<dc:creator>Trotter Cashion</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Free Speech]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[proxy servers]]></category>

		<guid isPermaLink="false">http://lifecoding.com/blog/?p=15</guid>
		<description><![CDATA[So, I&#8217;m sure you&#8217;re sitting there wondering what kind of bum doesn&#8217;t update his blog with more super cool posts about higher order procedures like he said he would.  Well, it&#8217;s not my fault, honest.  I wanted to post cool little blurbs about how fun it can be to map array elements, but [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;m sure you&#8217;re sitting there wondering what kind of bum doesn&#8217;t update his blog with more super cool posts about higher order procedures like he said he would.  Well, it&#8217;s not my fault, honest.  I wanted to post cool little blurbs about how fun it can be to map array elements, but big bad <a href="http://www.websense.com">Websense</a> said no. Read a little bit more, and I&#8217;ll tell you my proposed solution.</p>
<p><span id="more-15"></span></p>
<p>For those of you not in the know, websense is this stuff that goes between your work computer and the internet.  It prevents you from doing cool things like looking at Flickr or downloading songs on iTunes (damn billionth song).  It works by maintaining a master database of domain names.  You try to access a domain that&#8217;s disallowed, it says no.  You try to access a domain it doesn&#8217;t know about, it sends its little bot out to catalog it.  If the bot decides the site is bad, it disallows it.</p>
<p>Now that we know how it works lets look at ways around it.  First, we could vnc to a remote computer and use that computer to browse the web.  Good idea, but I think that little webcrawler is going to try to access the ip address, notice it can&#8217;t do anything with it, and block it. Second, we can try using the google and yahoo caches.  These are cool options, but I can&#8217;t use them to log into this blog.  Also, they&#8217;re fairly clunky as far as navigation goes.  Third, we could design an open source proxy server that could be easily installed on any computer. If you just try to access the server itself, it could return the google page to psych out the Websense spider. If Websense does manage to catch on to the proxy game, you just setup the server on a different ip. Woo hoo, screw you Websense.</p>
<p>Needless to say, I&#8217;m a fan of option three. It sounds cool, and I like to build stuff. Of course, if anyone has a working copy of this option in existence, let me know. As much as a like to build, I&#8217;d really like to be posting from work immediately.</p>
]]></content:encoded>
			<wfw:commentRss>http://lifecoding.com/blog/2006/02/24/oh-websense-let-me-count-the-ways-i-hate-thee/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Perils of Global Variables</title>
		<link>http://lifecoding.com/blog/2006/02/20/perils-of-global-variables/</link>
		<comments>http://lifecoding.com/blog/2006/02/20/perils-of-global-variables/#comments</comments>
		<pubDate>Mon, 20 Feb 2006 16:17:14 +0000</pubDate>
		<dc:creator>Trotter Cashion</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Languages]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://lifecoding.com/blog/?p=11</guid>
		<description><![CDATA[I just spent 20 minutes trying to find an annoying bug in my program.  The cause of the bug?  I accidently used the variable &#8216;i&#8217; in a for loop instead of &#8216;i__&#8217;.  For now, let&#8217;s just accept that I have to use global variables and weird names such as i__.  It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent 20 minutes trying to find an annoying bug in my program.  The cause of the bug?  I accidently used the variable &#8216;i&#8217; in a for loop instead of &#8216;i__&#8217;.  For now, let&#8217;s just accept that I have to use global variables and weird names such as i__.  It&#8217;s part of the requirements of the current project on which I&#8217;m working.  Anyway, this is a bug that could occur in any number of situations where global variables are present.  So, we need a way to quickly hunt and destroy these bugs.</p>
<p>My proposed solution?  <strong>For any programming language that you work in, you should have a utility that allows you to quickly identify variables within a certain scope and to see what type of value they might contain.</strong>  This would have allowed me to select the function I was working on and notice that there was an extra variable &#8216;i&#8217; that was initialized as global.</p>
<p>I can think of another situation in which this type of tool would be handy. <strong>It could be used to add macro writing capabillites (ala lisp) to any desired language.</strong>   It already has full knowledge of the constructs of the language and the functions and variables that exist. And so long as the macro could be compiled to the desired language, macro functionality would be available.  Maybe you&#8217;ll see this sort of tool available here in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://lifecoding.com/blog/2006/02/20/perils-of-global-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

