<?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>The Homepage of Phill Kenoyer</title>
	<atom:link href="http://phill.kenoyer.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://phill.kenoyer.com</link>
	<description>Ramblings of a happy man</description>
	<lastBuildDate>Sun, 05 Feb 2012 01:55:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Custom Post Type and Post Meta Queries</title>
		<link>http://phill.kenoyer.com/custom-post-type-and-post-meta-queries/</link>
		<comments>http://phill.kenoyer.com/custom-post-type-and-post-meta-queries/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 01:49:23 +0000</pubDate>
		<dc:creator>Phill</dc:creator>
				<category><![CDATA[Journal]]></category>

		<guid isPermaLink="false">http://phill.kenoyer.com/?p=2545</guid>
		<description><![CDATA[I spent most of the day today trying to figure out how to sort and search WordPress post meta data. I did a lot of Google searches trying to figure this out. I found just enough to piece it together. Here it is. if ( !is_admin() ) add_filter( 'posts_clauses', 'ors_rental_query' ); function ors_rental_query($clauses) { if [...]]]></description>
			<content:encoded><![CDATA[<p>I spent most of the day today trying to figure out how to sort and search WordPress post meta data. I did a lot of Google searches trying to figure this out.  I found just enough to piece it together.  Here it is.</p>
<p><code>if ( !is_admin() ) add_filter( 'posts_clauses', 'ors_rental_query' );<br />
function ors_rental_query($clauses) {<br />
  if ( !strstr($clauses['where'], 'rental') ) return $clauses;<br />
  global $wpdb, $ors_rental_cookies;<br />
  $clauses['fields'] .= ", CAST((select {$wpdb->postmeta}.meta_value from {$wpdb->postmeta} where {$wpdb->postmeta}.post_id = {$wpdb->posts}.ID and {$wpdb->postmeta}.meta_key = 'price') as decimal) as price";<br />
  $clauses['fields'] .= ", CAST((select {$wpdb->postmeta}.meta_value from {$wpdb->postmeta} where {$wpdb->postmeta}.post_id = {$wpdb->posts}.ID and {$wpdb->postmeta}.meta_key = 'home_size') as decimal) as home_size";<br />
  $clauses['fields'] .= ", CAST((select {$wpdb->postmeta}.meta_value from {$wpdb->postmeta} where {$wpdb->postmeta}.post_id = {$wpdb->posts}.ID and {$wpdb->postmeta}.meta_key = 'bedrooms') as decimal) as bedrooms";<br />
  $clauses['fields'] .= ", CAST((select {$wpdb->postmeta}.meta_value from {$wpdb->postmeta} where {$wpdb->postmeta}.post_id = {$wpdb->posts}.ID and {$wpdb->postmeta}.meta_key = 'bathrooms') as decimal) as bathrooms";<br />
  $clauses['having'] = array();<br />
  $clauses['orderby'] = '';<br />
  if ( isset($ors_rental_cookies['text_search']) and $ors_rental_cookies['text_search'] != '' ) {<br />
    $clauses['where'] .= " and ({$wpdb->posts}.post_title like '%{$ors_rental_cookies['text_search']}%'";<br />
    $clauses['where'] .= " or {$wpdb->posts}.post_content like '%{$ors_rental_cookies['text_search']}%')";<br />
  }<br />
  $search_params = array('bedrooms', 'bathrooms');<br />
  foreach ($search_params as $param) {<br />
    if ( isset($ors_rental_cookies[$param]) and $ors_rental_cookies[$param] != '' ) {<br />
      $clauses['having'][] = "$param = '$ors_rental_cookies[$param]'";<br />
    }<br />
  }<br />
  if ( !empty($clauses['having']) ) {<br />
    $clauses['where'] .= ' HAVING ' . implode(' and ', $clauses['having']);<br />
  }<br />
  $order_params = array('price' => 'price_near', 'home_size' => 'size_near');<br />
  foreach ($order_params as $field => $param) {<br />
    if ( isset($ors_rental_cookies[$param]) and $ors_rental_cookies[$param] != '' ) {<br />
      $clauses['orderby'] .= ", ABS({$ors_rental_cookies[$param]} - $field)";<br />
    }<br />
  }<br />
  if ( $clauses['orderby'] == '' ) $clauses['orderby'] = 'price ASC';<br />
  else $clauses['orderby'] = substr($clauses['orderby'], 2);<br />
  return $clauses;<br />
}</code></p>
<p>New in WordPress 3.1 is the posts_clauses filter. There is no documentation page on it, so I had to Google for the usage. But it works awesome for what I needed.</p>
<p>I use the $clauses['fields'] to subquery in the meta data. Then I&#8217;m able to do sort orders on it. I can order by price or whatever from the aliased subqueries. In my case I use special &#8220;near&#8221; method to find the prices that are near the search param.</p>
<p>To find an exact match like in my bathrooms and bedrooms, I use a HAVING clause to get access to my aliases. I just tack it to the end of the $clauses['where'] and it works like a charm.</p>
<p>I make sure to use CAST to cast my strings to integers for sorting by price and size.  No buggy string number sorts here.</p>
<p>The above code does a lot and it might be more than you need but it should point you in the right direction.</p>
]]></content:encoded>
			<wfw:commentRss>http://phill.kenoyer.com/custom-post-type-and-post-meta-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Business Update 2012</title>
		<link>http://phill.kenoyer.com/business-update-2012/</link>
		<comments>http://phill.kenoyer.com/business-update-2012/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 17:08:00 +0000</pubDate>
		<dc:creator>Phill</dc:creator>
				<category><![CDATA[Journal]]></category>

		<guid isPermaLink="false">http://phill.kenoyer.com/?p=2535</guid>
		<description><![CDATA[Things are going pretty good with ORS.  Jane is onboard building sites, the 01click project is moving pretty good, and I have two more projects on the back burner waiting for time.  I also have two internal projects that I would really like to get going this year. Jane is doing awesome at launching sites. [...]]]></description>
			<content:encoded><![CDATA[<p>Things are going pretty good with ORS.  Jane is onboard building sites, the 01click project is moving pretty good, and I have two more projects on the back burner waiting for time.  I also have two internal projects that I would really like to get going this year.</p>
<p>Jane is doing awesome at launching sites.  <a href="http://www.thejane.com/">TheJane</a>, <a href="http://www.weraceagainsthunger.com/">We Race Against Hunger</a>, and a few others.  She is also converting all my old sites from HTML to WordPress.  I&#8217;ll soon be able to turn off that old Slicehost server.</p>
<p>I might have to hire someone to do my back burner Rails projects.  I have two that could be pretty good.  I don&#8217;t have the money to hire anyone though, so that will be hard.  Can&#8217;t find anyone to work for free. <img src='http://phill.kenoyer.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   If they weren&#8217;t automotive related I could probably get my friend Dave to help me, but he is looking for something outside of that realm as a side project.</p>
<p>Anyway, gotta get back to work.  I&#8217;ll be in SF tomorrow at the Heroku Waza.</p>
]]></content:encoded>
			<wfw:commentRss>http://phill.kenoyer.com/business-update-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Carb Tuning</title>
		<link>http://phill.kenoyer.com/carb-tuning/</link>
		<comments>http://phill.kenoyer.com/carb-tuning/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 21:30:40 +0000</pubDate>
		<dc:creator>Phill</dc:creator>
				<category><![CDATA[Wheeling]]></category>

		<guid isPermaLink="false">http://phill.kenoyer.com/?p=2527</guid>
		<description><![CDATA[Been trying to get the carbs tuned on my chopper.  It&#8217;s not easy.  I have a bunch of jets and I&#8217;m trying to figure it out.  Lots of manuals out there so it shouldn&#8217;t be too hard.  I think one more time and I&#8217;ll have it running again.  Then it will be fine tuning.  Hope [...]]]></description>
			<content:encoded><![CDATA[<p>Been trying to get the carbs tuned on my chopper.  It&#8217;s not easy.  I have a bunch of jets and I&#8217;m trying to figure it out.  Lots of manuals out there so it shouldn&#8217;t be too hard.  I think one more time and I&#8217;ll have it running again.  Then it will be fine tuning.  Hope to get it solved this weekend.</p>
]]></content:encoded>
			<wfw:commentRss>http://phill.kenoyer.com/carb-tuning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merry Christmas 2011</title>
		<link>http://phill.kenoyer.com/merry-christmas-2011/</link>
		<comments>http://phill.kenoyer.com/merry-christmas-2011/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 21:28:25 +0000</pubDate>
		<dc:creator>Phill</dc:creator>
				<category><![CDATA[Journal]]></category>

		<guid isPermaLink="false">http://phill.kenoyer.com/?p=2525</guid>
		<description><![CDATA[Had a great time with family this year.  No snow, so driving was easy.  Got everything I wanted.]]></description>
			<content:encoded><![CDATA[<p>Had a great time with family this year.  No snow, so driving was easy.  Got everything I wanted.</p>
]]></content:encoded>
			<wfw:commentRss>http://phill.kenoyer.com/merry-christmas-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TextMate 2</title>
		<link>http://phill.kenoyer.com/textmate-2/</link>
		<comments>http://phill.kenoyer.com/textmate-2/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 21:15:55 +0000</pubDate>
		<dc:creator>Phill</dc:creator>
				<category><![CDATA[Journal]]></category>

		<guid isPermaLink="false">http://phill.kenoyer.com/?p=2522</guid>
		<description><![CDATA[TextMate 2 Alpha was released to the public recently for evaluation.  It&#8217;s been a long time coming.  It is alpha, so a lot of things will probably change.  But, I just hate it for some reason.  Maybe when it finally hits beta it will be better.  There are things that I feel should have been [...]]]></description>
			<content:encoded><![CDATA[<p>TextMate 2 Alpha was released to the public recently for evaluation.  It&#8217;s been a long time coming.  It is alpha, so a lot of things will probably change.  But, I just hate it for some reason.  Maybe when it finally hits beta it will be better.  There are things that I feel should have been much further ahead by now with all the time that has past.  Some things feel like they have gone backwards in usability.</p>
<p>And I don&#8217;t like the new icon.</p>
<p>But, maybe things will change next year.</p>
]]></content:encoded>
			<wfw:commentRss>http://phill.kenoyer.com/textmate-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chopper Is Running Again</title>
		<link>http://phill.kenoyer.com/chopper-is-running-again/</link>
		<comments>http://phill.kenoyer.com/chopper-is-running-again/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 00:07:10 +0000</pubDate>
		<dc:creator>Phill</dc:creator>
				<category><![CDATA[Journal]]></category>

		<guid isPermaLink="false">http://phill.kenoyer.com/?p=2519</guid>
		<description><![CDATA[Got new parts for my bike on monday and haven&#8217;t had time until today to get into the garage.  New jets for the carb are in and the bike is now running awesome! I just need to finish up the wiring and fender struts so I can ride it!]]></description>
			<content:encoded><![CDATA[<p><img src="https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc7/374826_10150508007165406_500925405_11200176_680080613_n.jpg" alt="Chopper Is Running" width="768" height="574" /></p>
<p>Got new parts for my bike on monday and haven&#8217;t had time until today to get into the garage.  New jets for the carb are in and the bike is now running awesome!</p>
<p>I just need to finish up the wiring and fender struts so I can ride it!</p>
]]></content:encoded>
			<wfw:commentRss>http://phill.kenoyer.com/chopper-is-running-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Motorcycle Time</title>
		<link>http://phill.kenoyer.com/motorcycle-time/</link>
		<comments>http://phill.kenoyer.com/motorcycle-time/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 00:58:46 +0000</pubDate>
		<dc:creator>Phill</dc:creator>
				<category><![CDATA[Journal]]></category>

		<guid isPermaLink="false">http://phill.kenoyer.com/?p=2515</guid>
		<description><![CDATA[For a few months now I&#8217;ve been checking out old school choppers, bobbers and such. Thinking about biking. Last month I was given a Honda CL350 all in parts. It got me thinking more about biking. Last weekend I got my motorcycle license and now I&#8217;m looking for a bike. The Honda would have been [...]]]></description>
			<content:encoded><![CDATA[<p>For a few months now I&#8217;ve been checking out old school choppers, bobbers and such. Thinking about biking. Last month I was given a Honda CL350 all in parts. It got me thinking more about biking. Last weekend I got my motorcycle license and now I&#8217;m looking for a bike.</p>
<p>The Honda would have been a pretty cool little bike, but it has no title. Can&#8217;t register it and when I went to DMV they just gave me the run-a-round. Looks like it will be a PITA to get a title for it, so I&#8217;m going to dump that idea.</p>
<p>So there are these cool sites. <a href="http://xs650chopper.com">http://xs650chopper.com</a> and <a href="http://chopcult.com">http://chopcult.com</a></p>
<p>I&#8217;ve been checking out all the photos and stuff and I&#8217;ve decided that I want a Yamaha XS650. Fixed up they are really sweet bikes. So I&#8217;ve been scouring Craig&#8217;s List for one. I really didn&#8217;t want to spend over $1000, but I&#8217;ve found a few that are mostly built already and just need to be finished up. Most of them are in AZ and TX.</p>
<p>Found one in Vacaville area that looks like a really sweet deal. Getting more info right now on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://phill.kenoyer.com/motorcycle-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wicked Zuk Front Axle Updates</title>
		<link>http://phill.kenoyer.com/wicked-zuk-front-axle-updates/</link>
		<comments>http://phill.kenoyer.com/wicked-zuk-front-axle-updates/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 19:56:30 +0000</pubDate>
		<dc:creator>Phill</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Wheeling]]></category>

		<guid isPermaLink="false">http://phill.kenoyer.com/?p=2507</guid>
		<description><![CDATA[Just spent way too much money on my front Dana 44 axle.  New cromo shafts and 300M u-joints.  New Ford big bearing outers, and drive flanges. I better not break any axles after this all gets setup.  I sure hope I&#8217;m wheeling next weekend too.  Takes forever to get this stuff done. I&#8217;ve also put [...]]]></description>
			<content:encoded><![CDATA[<p>Just spent way too much money on my front Dana 44 axle.  New cromo shafts and 300M u-joints.  New Ford big bearing outers, and drive flanges.</p>
<p>I better not break any axles after this all gets setup.  I sure hope I&#8217;m wheeling next weekend too.  Takes forever to get this stuff done.</p>
<p>I&#8217;ve also put the rig up for sale.  !!OH NOES!!</p>
<p>Yep.  Just getting tired of sinking money into it I guess.  We are talking about moving also.  So if we move back to the Bay Area it will be a PITA to go wheeling.</p>
<p>My plans are to buy a Santa Cruz Blur TR Carbon mountain bike and get back into that.  I used to have a lot of fun riding.  I&#8217;m also way, way out of shape from sitting around for the past 10 years.  The last 3 being the worst.  No exercise at all.</p>
<p>So the rig is up for sale for $14,000.  That&#8217;s about half of what I have into it.  No hits yet, and probably won&#8217;t get any for a long time.  I&#8217;ll just keep wheeling it until it gets sold.</p>
]]></content:encoded>
			<wfw:commentRss>http://phill.kenoyer.com/wicked-zuk-front-axle-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hack 4 Reno</title>
		<link>http://phill.kenoyer.com/hack-4-reno/</link>
		<comments>http://phill.kenoyer.com/hack-4-reno/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 19:50:34 +0000</pubDate>
		<dc:creator>Phill</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://phill.kenoyer.com/?p=2490</guid>
		<description><![CDATA[We&#8217;ve been talking about putting together a real hack-a-thon in Reno for some time now. Something with sponsors and prizes.  Bring your ideas and compete to win the 24 hour hack off. We now have an event coming soon to create something from Reno local city data.  Talks are underway for the event.  You can get more [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been talking about putting together a real hack-a-thon in Reno for some time now. Something with sponsors and prizes.  Bring your ideas and compete to win the 24 hour hack off.</p>
<p>We now have an event coming soon to create something from Reno local city data.  Talks are underway for the event.  You can get more news by signing up at: http://hack4reno.com/</p>
<p>This is going to be really good for Reno. We need more Reno developer recognition and getting the Reno developer community together for this event will certainly do it. Lets put Reno on the map and show the world that good developers are not only in San Francisco.</p>
]]></content:encoded>
			<wfw:commentRss>http://phill.kenoyer.com/hack-4-reno/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The New and Growing List of Mac Text Editors</title>
		<link>http://phill.kenoyer.com/the-new-and-growing-list-of-mac-text-editors/</link>
		<comments>http://phill.kenoyer.com/the-new-and-growing-list-of-mac-text-editors/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 22:07:06 +0000</pubDate>
		<dc:creator>Phill</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://phill.kenoyer.com/?p=2493</guid>
		<description><![CDATA[In the past the only good editor was BB-Edit, not that I personally ever thought of it as a &#8220;good&#8221; editor.  Then came along TextMate and that redefined the Mac Text Editor. Before TextMate I was using VIM.  I liked VIM, but I wanted something more Mac like. So when TextMate came out I jumped [...]]]></description>
			<content:encoded><![CDATA[<p>In the past the only good editor was BB-Edit, not that I personally ever thought of it as a &#8220;good&#8221; editor.  Then came along TextMate and that redefined the Mac Text Editor.</p>
<p>Before TextMate I was using VIM.  I liked VIM, but I wanted something more Mac like. So when TextMate came out I jumped on it.  I loved it for many years, but the author seemed stuck on his next version —TextMate 2 where are you?— while the current version with its many bugs got stale.</p>
<p>Many other people grew tired of the bugs in TM and wanted something better.  A lot of people moved to MacVIM.  Others started working on new text editors for the Mac.</p>
<p>Here is my list of new Mac Editors (work in progress):</p>
<ul>
<li><a href="https://github.com/b4winckler/macvim">MacVIM</a> &#8211; Its pretty good.</li>
<li><a href="http://kodapp.com/">Kod</a> &#8211; Still very early development, but has an interesting platform below it.</li>
<li><a href="http://www.vicoapp.com/">Vico</a> &#8211; The newest entry that is like VIM but all new and Mac like.</li>
<li><a href="http://www.sublimetext.com/blog/articles/sublime-text-2-beta">Sublime Edit</a> - People are really liking the features of this editor.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://phill.kenoyer.com/the-new-and-growing-list-of-mac-text-editors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

