<?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>Alan Blaine Whitney &#187; getting it done</title>
	<atom:link href="http://www.alanblainewhitney.com/category/getting-it-done/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alanblainewhitney.com</link>
	<description>Web Development</description>
	<lastBuildDate>Thu, 06 May 2010 18:06:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Reloading Information</title>
		<link>http://www.alanblainewhitney.com/2010/02/24/reloading-information/</link>
		<comments>http://www.alanblainewhitney.com/2010/02/24/reloading-information/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 14:36:17 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[getting it done]]></category>
		<category><![CDATA[reloading]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=143</guid>
		<description><![CDATA[The other day I was thinking some about reloading shells. The process of taking spent rifle brass, and making them ready to go again. I am reloading for .270 winchester. The load my rifle has fellen in love with is 130 grain hornady SST in front of 55 grains of IMR-4350, touched off by a [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was thinking some about reloading shells. The process of taking spent rifle brass, and making them ready to go again. I am reloading for .270 winchester. The load my rifle has fellen in love with is 130 grain hornady SST in front of 55 grains of IMR-4350, touched off by a CCI 200 primers. Rifle groups pretty good with them.</p>
<p>Just thought I would share my cost. For 100 rounds, I need about 3/4 of a pound of powder, 100 bullets, 100 primers. I have plenty of brass, so this assumes that is not an issue. Plus 30.06 brass is easy to come by, which is one trip in the resizing die and becomes 270 brass.</p>
<p>Here are the cost of making 100 rounds of ammo.</p>
<table border="1" cellpadding="5">
<tbody>
<tr>
<th></th>
<th>Van Raymonds</th>
<th>Midway</th>
<th>Cabelas</th>
</tr>
<tr>
<td>100 x CCI 200 large rifle primers</td>
<td>$4.50</td>
<td>$3.09</td>
<td>$3.29</td>
</tr>
<tr>
<td>1 lb x IMR-4350</td>
<td>$33.99</td>
<td>$22.99</td>
<td>$24.99</td>
</tr>
<tr>
<td>100 x 130 grain hornady SST</td>
<td>$37.99</td>
<td>$26.99</td>
<td>$26.99</td>
</tr>
<tr>
<td>total reloading cost per 100</td>
<td>$76.48</td>
<td>$53.07</td>
<td>$55.27</td>
</tr>
<tr>
<td>100 rounds of purchased live ammo</td>
<td>$179.95</td>
<td>$124.95</td>
<td>$129.95</td>
</tr>
</tbody>
</table>
<p>So midwayusa is the cheapest, but it cost about 30 to ship the stuff.  Cabelas is pretty good too, but about a three hour drive away.  Even buying components locally at van raymonds is cheaper than buying pre-loaded ammo at cabelas.</p>
<p>So in theory reloading saves about 55% the cost of buying pre-loaded factory ammo.  It&#8217;s generally more accurate to boot and you can customize loads to your gun.  Reloading is fun too.</p>
<p>The down side of reloading, you actually don&#8217;t save a penny.  I am not even talking about the up front equipment cost.  I mean, you will shoot twice as much as before, and you shoot away any savings you may of had, but it&#8217;s fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2010/02/24/reloading-information/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SQL CSV Export</title>
		<link>http://www.alanblainewhitney.com/2010/01/15/sql-csv-export/</link>
		<comments>http://www.alanblainewhitney.com/2010/01/15/sql-csv-export/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 14:35:06 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Tech Stuff]]></category>
		<category><![CDATA[getting it done]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=129</guid>
		<description><![CDATA[Nothing new here, but had forgot how easy it is to export to csv in mysql

SELECT * INTO OUTFILE 'result.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '&#34;' LINES TERMINATED BY '\n' FROM my_table;

Note that this file will be created on the mysql server, not the client.
]]></description>
			<content:encoded><![CDATA[<p>Nothing new here, but had forgot how easy it is to export to csv in mysql</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">INTO</span> <span style="color: #993333; font-weight: bold;">OUTFILE</span> <span style="color: #ff0000;">'result.csv'</span> <span style="color: #993333; font-weight: bold;">FIELDS</span> TERMINATED <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">','</span> <span style="color: #993333; font-weight: bold;">OPTIONALLY</span> <span style="color: #993333; font-weight: bold;">ENCLOSED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'&quot;'</span> <span style="color: #993333; font-weight: bold;">LINES</span> TERMINATED <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span> <span style="color: #993333; font-weight: bold;">FROM</span> my_table;</pre></div></div>

<p>Note that this file will be created on the mysql server, not the client.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2010/01/15/sql-csv-export/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursive Find and Replace</title>
		<link>http://www.alanblainewhitney.com/2009/06/11/recursive-find-and-replace-2/</link>
		<comments>http://www.alanblainewhitney.com/2009/06/11/recursive-find-and-replace-2/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 18:34:29 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Tech Stuff]]></category>
		<category><![CDATA[getting it done]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=113</guid>
		<description><![CDATA[This works on most linux boxes.
find /path/to/start/from/ -type f &#124; xargs perl -pi -e &#8217;s/applicationX/applicationY/g&#8217;
]]></description>
			<content:encoded><![CDATA[<p>This works on most linux boxes.</p>
<p><span id="intelliTxt">find /path/to/start/from/ -type f | xargs perl -pi -e &#8217;s/applicationX/applicationY/g&#8217;</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2009/06/11/recursive-find-and-replace-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian &amp; svn</title>
		<link>http://www.alanblainewhitney.com/2009/06/10/debian-svn/</link>
		<comments>http://www.alanblainewhitney.com/2009/06/10/debian-svn/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 20:19:05 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Tech Stuff]]></category>
		<category><![CDATA[getting it done]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=109</guid>
		<description><![CDATA[For those of you who just updated your Debian Lenny install and and had your subversion stop working, this is for you.  If you are getting this error:
svn: OPTIONS of 'http://dust.sephone.com/projects/mslha': could not connect to server (http://dust.sephone.com)
You need to put
http-library=serf
On the last line of ~/.subversion/servers
]]></description>
			<content:encoded><![CDATA[<p>For those of you who just updated your Debian Lenny install and and had your subversion stop working, this is for you.  If you are getting this error:</p>
<p><code>svn: OPTIONS of 'http://dust.sephone.com/projects/mslha': could not connect to server (http://dust.sephone.com)</code></p>
<p>You need to put</p>
<p><code>http-library=serf</code></p>
<p>On the last line of ~/.subversion/servers</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2009/06/10/debian-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving Subversion Repositories</title>
		<link>http://www.alanblainewhitney.com/2009/05/07/moving-subversion-repositories/</link>
		<comments>http://www.alanblainewhitney.com/2009/05/07/moving-subversion-repositories/#comments</comments>
		<pubDate>Thu, 07 May 2009 19:36:09 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[getting it done]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=107</guid>
		<description><![CDATA[Here is a how to on moving subversion repositories from one server to another.
First, go to your old server, find the directory and do svnadmin dump name &#62; dumpfile.
FTP over dumpfile to your new server.
Go to your new server and do svnadmin create newname; svnadmin import newname &#60; dumpfile
How you need to update the places [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a how to on moving subversion repositories from one server to another.</p>
<p>First, go to your old server, find the directory and do svnadmin dump name &gt; dumpfile.</p>
<p>FTP over dumpfile to your new server.</p>
<p>Go to your new server and do svnadmin create newname; svnadmin import newname &lt; dumpfile</p>
<p>How you need to update the places where you have this repository checked out with this command svn switch &#8211;relocate http://&lt;old-server&gt;/&lt;old-name&gt; http://&lt;new-server&gt;/&lt;new-name&gt;</p>
<p>Just like that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2009/05/07/moving-subversion-repositories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comments in RSS feed</title>
		<link>http://www.alanblainewhitney.com/2009/02/13/comments-in-rss-feed/</link>
		<comments>http://www.alanblainewhitney.com/2009/02/13/comments-in-rss-feed/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 20:54:18 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[getting it done]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=95</guid>
		<description><![CDATA[For the most part, every project I do starts with cakephp, jquery and 960 grid.  Just about everytime I need to do an rss feed, I follow the directions in the cook book.  This has worked great.
Today I got wondering about the how feedburner does the comment count within their feed flare.  It seems to [...]]]></description>
			<content:encoded><![CDATA[<p>For the most part, every project I do starts with <a href="http://www.jquery.com">cakephp</a>, <a href="http://www.jquery.com">jquery</a> and <a href="http://www.960.gs">960 grid</a>.  Just about everytime I need to do an rss feed, I follow the <a href="http://book.cakephp.org/view/483/Creating-an-RSS-feed-with-the-RssHelper">directions in the cook book</a>.  This has worked great.</p>
<p>Today I got wondering about the how feedburner does the comment count within their feed flare.  It seems to work with word press.  Auto-magically.  I wanted to make it happen outside of wordpress.  Turns out that it is pretty easy.  It uses a new namespace in the XML, wfw.</p>
<p>To add that namespace, one first needs to put a new xmlns attribuate in the rss tag, like below.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rss</span> <span style="color: #000066;">xmlns:wfw</span>=<span style="color: #ff0000;">&quot;http://wellformedweb.org/CommentAPI/&quot;</span>  <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;2.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></pre></div></div>

<p>Well, you would think that is pretty easy in cake, add an array to some $rss method call.  Well, this was a rare instance in cake where I couldn&#8217;t quite get it to work.  So I had to make changes to the rss help.  First, copy the rss helper from  cake/libs/view/helpers/rss.php to app/views/helpers/rss.php.  Once it&#8217;s copied, I manually changed the document method to this</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">function</span> document<span style="color: #009900;">&#40;</span><span style="color: #000088;">$attrib</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$attrib</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$attrib</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attrib</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'version'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attrib</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'version'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$attrib</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'version'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">version</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attrib</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'xmlns:wfw'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attrib</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'xmlns:wfw'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$attrib</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'xmlns:wfw'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://wellformedweb.org/CommentAPI/'</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">elem</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rss'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$attrib</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Now just one last change to make, in the my view, which was located at app/views/articles/rss/feed.ctp, where the item is added</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #b1b100;">echo</span>  <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">'title'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$article</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Article'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'comments'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array_merge</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'comments'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'wfw:commentRss'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_NAME'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/comments/'</span> <span style="color: #339933;">.</span> 
				<span style="color: #0000ff;">'index/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$article</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Article'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'.rss'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'link'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$url</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'guid'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$url</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'isPermaLink'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'true'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">'description'</span> <span style="color: #339933;">=&gt;</span>  <span style="color: #000088;">$bodyText</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">'pubDate'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$article</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Article'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And that is about it, then it just worked with feedburner&#8217;s feed flare comment counter.  Just like wordpress.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2009/02/13/comments-in-rss-feed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cake 1.2 Final Auth Problems</title>
		<link>http://www.alanblainewhitney.com/2008/12/31/cake-12-final-auth-problems/</link>
		<comments>http://www.alanblainewhitney.com/2008/12/31/cake-12-final-auth-problems/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 15:19:27 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[getting it done]]></category>
		<category><![CDATA[cake]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=91</guid>
		<description><![CDATA[I had auth working in 1.2RC3 just fine.  What I wanted was all of the non-admin stuff to not need auth, but all of the admin stuff to have auth.  Here is what my code used to look like

	function beforeFilter&#40;&#41; &#123;
		$this-&#62;Auth-&#62;allow&#40;'*'&#41;;
		if &#40;isset&#40;$this-&#62;params&#91;'admin'&#93;&#41;&#41; &#123;
 			$this-&#62;Auth-&#62;deny&#40;&#34;*&#34;&#41;;
		&#125;
       &#125;

That didn&#8217;t work [...]]]></description>
			<content:encoded><![CDATA[<p>I had auth working in 1.2RC3 just fine.  What I wanted was all of the non-admin stuff to not need auth, but all of the admin stuff to have auth.  Here is what my code used to look like</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">function</span> beforeFilter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">allow</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'admin'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">deny</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;*&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
       <span style="color: #009900;">&#125;</span></pre></div></div>

<p>That didn&#8217;t work in 1.2 final, here was the modification I had to make to get it working again.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">function</span> beforeFilter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">allow</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Allow Everything by default</span>
		<span style="color: #000088;">$admin</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>Configure<span style="color: #339933;">::</span><span style="color: #004000;">read</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Routing.admin'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$strlen</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$admin</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">allowedActions</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$strlen</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$admin</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">deny</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Disable an admin_ like action</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_a</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;UsersController&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">deny</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'login'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'admin'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">layout</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'admin'</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RequestHandler</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isAjax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">layout</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'ajax'</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>That seemed to fix it up.  Go figure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2008/12/31/cake-12-final-auth-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cake 1.2RC3 to Final</title>
		<link>http://www.alanblainewhitney.com/2008/12/30/cake-12rc3-to-final/</link>
		<comments>http://www.alanblainewhitney.com/2008/12/30/cake-12rc3-to-final/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 15:49:16 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[Tech Stuff]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[getting it done]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=85</guid>
		<description><![CDATA[Recently the cake 1.2 has been released.  On several of my applications I have upgrading all along the 1.2 release cycle.  Here are my tweaks that I needed to do from RC3 to 1.2 Final.
To start the upgrade, I simply swapped out my cake directory for the new one.  Dropped the tmp dir with this [...]]]></description>
			<content:encoded><![CDATA[<p>Recently the <a href="http://debuggable.com/posts/extra-hot-cakephp-1.2-stable-is-finally-released!:4954151c-f87c-434b-abbd-4e404834cda3">cake 1.2 has been released</a>.  On several of my applications I have upgrading all along the 1.2 release cycle.  Here are my tweaks that I needed to do from RC3 to 1.2 Final.</p>
<p>To start the upgrade, I simply swapped out my cake directory for the new one.  Dropped the tmp dir with this command.</p>
<blockquote><p>find app/tmp/ -name &#8216;cake*&#8217; | xargs rm</p></blockquote>
<p>For the most part it worked right off the back.  The only problem I had was to switch some things in my &#8220;app/app_controller.php&#8221;.  In RC3, if it was an ajax request, it automatically switched to an ajax layout.  It stopped doing that in RC4 and final.  So I when to put functionality back in.</p>
<p>To start I added the request handler component and use beforeFilter().</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$components</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'RequestHandler'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> beforeFilter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RequestHandler</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isAjax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">layout</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'ajax'</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>I actually had several things happening in my &#8216;app/app_controller.php&#8217; already, here is my actual file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$components</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Auth'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Email'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'RequestHandler'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> beforeFilter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fields</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'username'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'username'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">loginAction</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'controller'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'users'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'action'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'login'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">allow</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'navPoint'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'admin'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">layout</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'admin'</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Auth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">deny</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'*'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #666666; font-style: italic;">// Lets set the sort order</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Session</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">check</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sort'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Session</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">write</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sort'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Application.date_created DESC'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RequestHandler</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isAjax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">layout</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'ajax'</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2008/12/30/cake-12rc3-to-final/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In The Morning</title>
		<link>http://www.alanblainewhitney.com/2008/08/04/in-the-morning/</link>
		<comments>http://www.alanblainewhitney.com/2008/08/04/in-the-morning/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 20:38:17 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[getting it done]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=64</guid>
		<description><![CDATA[Starting tomorrow, I am going to change the way I start my work day.  Normally, I check email, phone messages, check my feed reader, maybe even make a few phone calls.  I think I am wasting my mornings.  The first hour, maybe two hours of my day are sort of quick.  Not everyone is in [...]]]></description>
			<content:encoded><![CDATA[<p>Starting tomorrow, I am going to change the way I start my work day.  Normally, I check email, phone messages, check my feed reader, maybe even make a few phone calls.  I think I am wasting my mornings.  The first hour, maybe two hours of my day are sort of quick.  Not everyone is in the office.</p>
<p>More than just that it is still quick, also my mind is still fresh.  Once I read emails, feed reader, etc.  I have stuff on my mind.  I am already distracted some.</p>
<p>So here is my game plan tomorrow morning.  Come in and get right two it.  Check email and feedreader before lunch sometime but later.  I will comment with how it worked.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2008/08/04/in-the-morning/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Work time</title>
		<link>http://www.alanblainewhitney.com/2008/03/18/work-time/</link>
		<comments>http://www.alanblainewhitney.com/2008/03/18/work-time/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 13:12:55 +0000</pubDate>
		<dc:creator>Alan Whitney</dc:creator>
				<category><![CDATA[getting it done]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[37 signals]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[work time]]></category>

		<guid isPermaLink="false">http://www.alanblainewhitney.com/?p=30</guid>
		<description><![CDATA[Google allows it&#8217;s people to work 20% of their work time on whatever they feel passionate about.  Recently, I read a post about 37 signals switching to 4 day work weeks.  It got me thinking
If you have the right type of people, it&#8217;s good to let them have freedom to play around with stuff, just [...]]]></description>
			<content:encoded><![CDATA[<p>Google allows it&#8217;s people to work 20% of their work time on whatever they feel passionate about.  Recently, I read a post about 37 signals switching to 4 day work weeks.  It got me thinking</p>
<p>If you have the right type of people, it&#8217;s good to let them have freedom to play around with stuff, just experiment.  One they learn stuff, making them a better employee, it&#8217;s cheaper than college or often going to conferences.  Another thing is that the people are fresher, feel less bogged down.  Just a few random thoughts on that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alanblainewhitney.com/2008/03/18/work-time/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
