<?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>Jody Mickey</title>
	<atom:link href="http://www.jodymickey.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.jodymickey.com</link>
	<description>The thoughts, projects, and notes of a web developer dude.</description>
	<lastBuildDate>Sat, 03 Jul 2010 07:05:19 +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>New Theme</title>
		<link>http://www.jodymickey.com/?p=42</link>
		<comments>http://www.jodymickey.com/?p=42#comments</comments>
		<pubDate>Sat, 03 Jul 2010 07:05:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.jodymickey.com/?p=42</guid>
		<description><![CDATA[I must admit, it&#8217;s pretty bland and I don&#8217;t really like the colors, but this new F2 theme seems to be customizable enough &#8211; maybe one day I&#8217;ll give it some love &#8211; and it fits the one requirement I really have for my blog: the content column is wide enough to paste code snippets. [...]]]></description>
			<content:encoded><![CDATA[<p>I must admit, it&#8217;s pretty bland and I don&#8217;t really like the colors, but this new F2 theme seems to be customizable enough &#8211; maybe one day I&#8217;ll give it some love &#8211; and it fits the one requirement I really have for my blog: the content column is wide enough to paste code snippets.  It&#8217;s not fun trying to read source code in a 400 pixel wide column.   This theme is a fluid width and you can turn on both side columns.</p>
<p><span id="more-42"></span></p>
<p>I also upgraded from a very old WordPress installation (2.1) to 3.0.  The admin interface is pretty smooth.</p>
<p>As far as useful content goes, I am gainfully employed, finally, so I will likely have some things worth writing about.  At work we use Zend Framework for pretty much everything on the frontend.  I can think of several notes this week alone I could jot down here if I could only remember that I actually have a blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jodymickey.com/?feed=rss2&amp;p=42</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug with PHP 5.3 and MySQLi Stmt</title>
		<link>http://www.jodymickey.com/?p=38</link>
		<comments>http://www.jodymickey.com/?p=38#comments</comments>
		<pubDate>Mon, 02 Nov 2009 03:17:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[bug]]></category>

		<guid isPermaLink="false">http://www.jodymickey.com/?p=38</guid>
		<description><![CDATA[After recently upgrading to PHP 5.3, the news posts on my old webpage (http://www.duelingmonkeys.com) were being truncated to a maximum of 256 characters.  To make a long story short, it appears that prepared statements with the mysqli extension were only allowing 256 characters when pulling data, even if the field type is text. I should [...]]]></description>
			<content:encoded><![CDATA[<p>After recently upgrading to PHP 5.3, the news posts on my old webpage (http://www.duelingmonkeys.com) were being truncated to a maximum of 256 characters.  To make a long story short, it appears that prepared statements with the mysqli extension were only allowing 256 characters when pulling data, even if the field type is text.</p>
<p>I should do my duty and file a bug report, but I need to do some more experimentation and see if it happens only with SELECT statements or also with INSERT/UPDATE statements.  For now, I&#8217;m getting around this by dropping the prepared statement.</p>
<p>FYI.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jodymickey.com/?feed=rss2&amp;p=38</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back From The Dead</title>
		<link>http://www.jodymickey.com/?p=25</link>
		<comments>http://www.jodymickey.com/?p=25#comments</comments>
		<pubDate>Thu, 01 Oct 2009 18:28:07 +0000</pubDate>
		<dc:creator>jody</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.jodymickey.com/?p=25</guid>
		<description><![CDATA[Almost 1 year to the day, I have returned to my abandoned blog.  A few months ago I wanted to make an update but couldn&#8217;t remember the url to the admin page and forgot the password to ssh in and take a look.  I was far too lazy to figure all this out until recently [...]]]></description>
			<content:encoded><![CDATA[<p>Almost 1 year to the day, I have returned to my abandoned blog.  A few months ago I wanted to make an update but couldn&#8217;t remember the url to the admin page and forgot the password to ssh in and take a look.  I was far too lazy to figure all this out until recently when I moved the site to a new host.</p>
<p>I have almost completely forgotten what I started this blog for except that I know I wanted to snatch up jodymickey.com before someone else did (paranoid much?) and needed something to put on it.  I did mention learning Python (which I&#8217;ve done absolutely nothing with) but I think I did say that I&#8217;d not be so specific and expand to all things web.</p>
<p>Over the past year I&#8217;ve had the misfortune of losing my job in this poor economy, although things are looking up so it seems.  I&#8217;ve had a few freelance projects and while more keep falling into my lap, it&#8217;s still not constant enough to make me feel comfortable.  So, I continue to search for a full time job.  I&#8217;ve missed out on some great opportunities for various reasons (hesitation, bad timing, other crappy excuses) and some others that looked promising didn&#8217;t work out for reasons out of my control.  I guess I&#8217;ll just hope that it was for the best, but my credit card statement would argue otherwise.</p>
<p>For one large project I decided to learn the <a href="http://www.symfony-project.org" target="_blank">Symfony Framework</a> with <a href="http://www.doctrine-project.org/" target="_blank">Doctrine ORM</a> and I like it quite a bit.  If I had kept up with this blog I&#8217;m sure I could have written lots of posts about it along the way.  I&#8217;ll try to remember to jot down handy things in the future.</p>
<p>Hopefully the next update will come before the turn of the decade.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jodymickey.com/?feed=rss2&amp;p=25</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reply To All</title>
		<link>http://www.jodymickey.com/?p=23</link>
		<comments>http://www.jodymickey.com/?p=23#comments</comments>
		<pubDate>Mon, 29 Sep 2008 20:36:50 +0000</pubDate>
		<dc:creator>jody</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.jodymickey.com/?p=23</guid>
		<description><![CDATA[DISCLAIMER: This entry doesn&#8217;t have anything to do with web development at all, it&#8217;s just a rant. The &#8220;Reply To All&#8221; button needs an idiot warning.  Moreso, the &#8220;Forward&#8221; button should be abolished.  The only thing I hate worse than getting forwards is getting forwards in my work support inbox.  The only thing I hate [...]]]></description>
			<content:encoded><![CDATA[<p>DISCLAIMER: This entry doesn&#8217;t have anything to do with web development at all, it&#8217;s just a rant.</p>
<p>The &#8220;Reply To All&#8221; button needs an idiot warning.  Moreso, the &#8220;Forward&#8221; button should be abolished.  The only thing I hate worse than getting forwards is getting forwards in my work support inbox.  The only thing I hate worse than getting forwards in my work support inbox is getting replies to forwards in my work support inbox.</p>
<p>Look folks, I don&#8217;t care about your seemingly funny joke, your political views, your religious views, or probably anything else with a subject line starting with &#8220;Fwd:&#8221;.  Before you go selecting your entire contact list, please consider who&#8217;s on that list.  If you fall victim to an email forward, please restrain yourself to the &#8220;Reply&#8221; button and do not tell us all that you don&#8217;t want to recieve emails any more.  I don&#8217;t either, but I especially don&#8217;t want to hear you whine about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jodymickey.com/?feed=rss2&amp;p=23</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Internet Explorer and PNG&#8217;s</title>
		<link>http://www.jodymickey.com/?p=19</link>
		<comments>http://www.jodymickey.com/?p=19#comments</comments>
		<pubDate>Wed, 13 Aug 2008 19:31:46 +0000</pubDate>
		<dc:creator>jody</dc:creator>
				<category><![CDATA[Design/CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.jodymickey.com/?p=19</guid>
		<description><![CDATA[Let me put this out there at the very start:  I am not a graphic designer.  I wish I had the eye for it, but I don&#8217;t.  I don&#8217;t really know the difference between the colors mustard and custard, but I can tell the difference between two distinct shades of gray.  So can Firefox, and [...]]]></description>
			<content:encoded><![CDATA[<p>Let me put this out there at the very start:  I am not a graphic designer.  I wish I had the eye for it, but I don&#8217;t.  I don&#8217;t really know the difference between the colors mustard and custard, but I <em>can</em> tell the difference between two distinct shades of gray.  So can Firefox, and Safari, and Opera isn&#8217;t bad at it either, but Internet Explorer is having some issues.</p>
<p><span id="more-19"></span></p>
<p>I&#8217;ve got a page with a gray background, with the content centered.  There is a small drop shadow effect around the content, which has a white background.  Of course the way to achieve this is to fade from the drop shadow to the background color with an image, and then use a background color for the rest of the sides of the page.  At first I thought that things were messing up because I was using an unsafe web color for the background, but it turns out that IE is just rendering the image wrong.</p>
<p>I came across this fairly old blog post about <a href="http://www.easy-reader.net/archives/2006/02/18/png-color-oddities-in-ie/" target="_blank">PNG color oddities</a> which noted the same thing, but this was for IE6 and 7 beta.  Thankfully they finally decided to support transparent PNG&#8217;s, but it seems that they&#8217;ve still got some work to do.  The blog I linked to above was using 8-bit PNG&#8217;s, while I was using 24-bit.  My solution is to just use JPEG, which works great, but that is not a fix, it&#8217;s a cover up.  All I want to do is use PNG&#8217;s!  Make it work, IE team!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jodymickey.com/?feed=rss2&amp;p=19</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mod_rewrite with a Dynamic RewriteMap</title>
		<link>http://www.jodymickey.com/?p=10</link>
		<comments>http://www.jodymickey.com/?p=10#comments</comments>
		<pubDate>Tue, 17 Jun 2008 01:23:45 +0000</pubDate>
		<dc:creator>jody</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[vhost]]></category>

		<guid isPermaLink="false">http://www.jodymickey.com/?p=10</guid>
		<description><![CDATA[Apache&#8217;s mod_rewrite is a beast.  The opening lines of documentation admits it before you even get started.  It&#8217;s very powerful, but sometimes hard to wrap your head around what&#8217;s going on. Today I needed to dynamically point a request to a folder depending on what the %{SERVER_NAME} is. After reading a bit of documentation, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Apache&#8217;s mod_rewrite is a beast.  The opening lines of documentation admits it before you even get started.  It&#8217;s very powerful, but sometimes hard to wrap your head around what&#8217;s going on.</p>
<p>Today I needed to dynamically point a request to a folder depending on what the %{SERVER_NAME} is. After reading a bit of documentation, I&#8217;ve found a slick little solution.</p>
<p><span id="more-10"></span></p>
<p>Let me give a little more info about this setup before I get started&#8230;</p>
<p>I&#8217;ve got a web application that serves multiple sites.  If you point your domain to the app&#8217;s IP address it will do a lookup on the server name to determine if that site exists in the app.  If so, it serves the site.  If not, it tells you to go away!  Any request for www.example.com &#8211; from any or no subdomain &#8211; should check to see if example.com is a valid domain. I don&#8217;t care if someone points wiki.example.com, www2.example.com, or just example.com to my app&#8217;s IP &#8211; I am only looking for example.com in my valid sites list.</p>
<p>All of the code for this app belongs in one common directory, but what about site specific (user uploaded) files?  They need to be in a separate location but still easily referenced from some common fake directory (relative to web root) such as &#8220;/files&#8221;.</p>
<p>There are a number of ways to handle this, but I wanted apache to do the work for me.  I&#8217;m already using mod_rewrite to route all requests through a single controller, so I can just add another rule to point requests to static files where they should go.</p>
<p>Lets say a request comes in for http://example.com/files/headshot.jpg.  I really want to view %{DOCUMENT_ROOT}/userfiles/example.com/headshot.jpg.  That&#8217;s pretty simple:</p>

<div class="wp_syntax"><div class="code"><pre class="apache apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteRule</span> ^/<span style="color: #00007f;">files</span>/(.*) /userfiles/%{SERVER_NAME}/headshot.jpg</pre></div></div>

<p>But what happens when a request for http://<strong>www.</strong>example.com/files/headshot.jpg?  The rule above will try to look in /userfiles/www.example.com/headshot.jpg.  That folder doesn&#8217;t exist, so we&#8217;ll get a 404.</p>
<p>We need to convert www.example.com to example.com.  Sadly, there are only a few internal functions in Apache and you can&#8217;t define your own, so we need to use a RewriteMap.  The most basic RewriteMap would be a plain text file of key-to-value lines.  But in this case we don&#8217;t know how which domain is being requested, let alone which subdomain might be present.  It&#8217;s a little too hairy for a standard txt rewrite map, so we&#8217;ll use an external program.  This code evolves from the <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html" target="_blank">documentation</a> on apache&#8217;s website.</p>

<div class="wp_syntax"><div class="code"><pre class="perl perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
<span style="color: #0000ff;">$|</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span>;
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@parts</span> <span style="color: #339933;">=</span> <span style="color: #000066;">split</span><span style="color: #009900;">&#40;</span><span style="">'\.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#41;</span>;
    <span style="color: #000066;">print</span> <span style="color: #0000ff;">@parts</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> . <span style="">'.'</span> . <span style="color: #0000ff;">@parts</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span>;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This file, which I&#8217;m calling domainfix.pl, will serve as our dynamic rewrite map.  Don&#8217;t forget to give apache (or the user that starts apache) execute permissions for this file otherwise it won&#8217;t work!</p>
<p>Now we add the RewriteMap line to go along with a sliightly modified version of our previous rule:</p>

<div class="wp_syntax"><div class="code"><pre class="apache apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteMap</span>          domainfix  prg:/etc/httpd/conf.d/domainfix.pl
<span style="color: #00007f;">RewriteRule</span>         ^/<span style="color: #00007f;">files</span>/(.*) /userfiles/${domainfix:%{SERVER_NAME}}/$<span style="color: #ff0000;">1</span> [NC,L]</pre></div></div>

<p>And that&#8217;s it!  After I figured out what exactly it is I&#8217;m doing here it was much easier to search for similar notes on doing this kind of thing, but hopefully this will expand Google&#8217;s hits for those who are struggling.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jodymickey.com/?feed=rss2&amp;p=10</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Blog Addendum</title>
		<link>http://www.jodymickey.com/?p=8</link>
		<comments>http://www.jodymickey.com/?p=8#comments</comments>
		<pubDate>Sat, 07 Jun 2008 18:29:45 +0000</pubDate>
		<dc:creator>jody</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.jodymickey.com/?p=8</guid>
		<description><![CDATA[In my first blog entry I said that this blog was all about my quest to learn python.  Well today I was thinking that if that were the case, I should have registered jodymickeysquesttolearnpythonandnothingelse.com  But I didn&#8217;t, and that would be silly.  So instead, I am going to make the python quest a project of [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="/?p=3">first blog entry</a> I said that this blog was all about my quest to learn python.  Well today I was thinking that if that were the case, I should have registered jodymickeysquesttolearnpythonandnothingelse.com  But I didn&#8217;t, and that would be silly.  So instead, I am going to make the python quest a project of the site, along with some other projects that may or may not ever come to be, and also some little entries for things like handy <a href="/?tag=mysql">mysql queries</a>, <a href="/?tag=linux">linux commands</a>, and various other tidbits of information for when I can&#8217;t remember how to do something.</p>
<p>Sadly, this entry provides no useful information aside from telling you what&#8217;s going on, but at least I&#8217;m up to date for the next two years of <a href="/?p=3#comment-2">required blog entries</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jodymickey.com/?feed=rss2&amp;p=8</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bloggin&#8217;</title>
		<link>http://www.jodymickey.com/?p=3</link>
		<comments>http://www.jodymickey.com/?p=3#comments</comments>
		<pubDate>Thu, 05 Jun 2008 20:00:38 +0000</pubDate>
		<dc:creator>jody</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[google app]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.jodymickey.com/?p=3</guid>
		<description><![CDATA[I want to learn the programming language Python.  I need a project, and for once I&#8217;d like to document my learning experience so I can look back later, and in case someone is bored enough to follow along.  My first idea was to do both in one swoop:  write some simple blogging code and document [...]]]></description>
			<content:encoded><![CDATA[<p>I want to learn the programming language <a href="http://www.python.org">Python</a>.  I need a project, and for once I&#8217;d like to document my learning experience so I can look back later, and in case someone is bored enough to follow along.  My first idea was to do both in one swoop:  write some simple blogging code and document it all at the same time.  There is a bit of circular reference goign on in that scenario, and getting Python to run under mod_python was a bit troublesome.  Once I did get it running, I saw that most implementations use PSP (Python Server Pages) or frameworks like <a href="http://www.djangoproject.com">Django</a>.  That&#8217;s all fine and dandy, but I was hoping to learn more core Python than building a site Ruby-On-Rails style with a framework targeted at getting sites up as quickly as possible.  I&#8217;m sure once I learn more, I&#8217;ll look at those frameworks with a humble eye and use what&#8217;s available to make things easy, but for now, I want to figure it out.</p>
<p><span id="more-3"></span></p>
<p>My friend <a href="http://www.drewcking.com">Drew</a> suggested that I just drop wordpress in to handle the blog writing so I don&#8217;t have to keep writing blog entries in a text editor until the thing is actually built.  I&#8217;m not permanently settled on writing blogging software (simply because there are so many existing &#8211; and better &#8211; solutions out there) but at the moment that&#8217;s still the plan.  I will be using Google App though, since it&#8217;s the latest web-craze and because they just emailed me my key a few weeks ago.  Drew also suggested that I could handle this blog and project from a PHP Developer&#8217;s perspective, since that&#8217;s my bread and butter.  Hopefully I&#8217;ll be able to present some kind of relationship between the two (PHP and Python) languages for various tasks.</p>
<p>Readers Beware:  It&#8217;s summertime.  When I&#8217;m not working, I will be outside quite a bit doing various things that I like to do like play volleyball, disc golf, horseshoes, etc.  Therefore, this may very well be my slowest project ever.  You&#8217;ve been warned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jodymickey.com/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
