<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Jonathon Hill</title>
	
	<link>http://jonathonhill.net</link>
	<description>The notes, projects, and opinions of a meticulous 25-year old web developer.</description>
	<lastBuildDate>Thu, 17 Jun 2010 00:47:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/JonathonHill" /><feedburner:info uri="jonathonhill" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>How to send e-mail…that gets delivered</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/xoYILsyLqtY/</link>
		<comments>http://jonathonhill.net/2010-06-16/how-to-send-e-mail-that-gets-delivered/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 00:47:01 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[dkim]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[E-Mail]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Jeff Atwood]]></category>
		<category><![CDATA[ptr]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=236</guid>
		<description><![CDATA[I just got a really good education on how to make sure your (legit) email will navigate common spam blockers and be delivered successfully, thanks to Jeff Atwood.
Summary

Make sure the computer sending the email has a Reverse PTR record. Your ISP has to do it, not your DNS provider or web host.
Sign your messages using [...]]]></description>
			<content:encoded><![CDATA[<p>I just got a really good education on how to make sure your (legit) email will navigate common spam blockers and be delivered successfully, <a title="So You'd Like to Send Some Email (Through Code)" href="http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html" target="_blank">thanks to Jeff Atwood</a>.</p>
<h3>Summary</h3>
<ol>
<li><strong>Make sure the computer sending the email has a <a href="http://aplawrence.com/Blog/B961.html" target="_blank">Reverse PTR record</a></strong>. Your ISP has to do it, not your DNS provider or web host.</li>
<li><strong>Sign your messages using <a href="http://en.wikipedia.org/wiki/DKIM" target="_blank">DomainKeys Identified Mail</a></strong>. Requires DNS and code changes.</li>
<li><strong>Set up a <a href="http://en.wikipedia.org/wiki/Sender_ID" target="_blank">SenderID DNS record</a>.</strong> Far less critical than the first two, but still nice to have.</li>
</ol>
<h3>Did it work?</h3>
<ol>
<li><strong>Send a message to a GMail account</strong>&#8211;they provide excellent diagnostic headers. Look for <code>Received-SPF</code> and <code>Authentication-Results</code>.</li>
<li><strong>Use the <a href="mailto:check-auth@verifier.port25.com">Port25 diagnostic service</a></strong> (check-auth@verifier.port25.com). You can ignore a DomainKeys check fail if the DKIM check passes.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2010-06-16/how-to-send-e-mail-that-gets-delivered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2010-06-16/how-to-send-e-mail-that-gets-delivered/</feedburner:origLink></item>
		<item>
		<title>Avoid the void(0) in IE6</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/OPMWg_0-6G4/</link>
		<comments>http://jonathonhill.net/2010-04-07/avoid-the-void0-in-ie6/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 19:10:40 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[void]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=234</guid>
		<description><![CDATA[I recently learned the hard way that &#60;a href="javascript:void(0)"&#62; doesn&#8217;t work as expected in IE6. The solution is to use the familiar # but make sure your onclick event returns false:
&#60;a href="#" onclick="aFunction();return false;"&#62;Link&#60;/a&#62;
d&#8217;bug has a great writeup on why this works and the other doesn&#8217;t.
]]></description>
			<content:encoded><![CDATA[<p>I recently learned the hard way that <code>&lt;a href="javascript:void(0)"&gt;</code> doesn&#8217;t work as expected in IE6. The solution is to use the familiar <code>#</code> but make sure your <code>onclick</code> event returns <strong><code>false</code></strong>:</p>
<p><code>&lt;a href="#" onclick="aFunction();return false;"&gt;Link&lt;/a&gt;</code></p>
<p><a href="http://blog.reindel.com/2006/08/11/a-hrefjavascriptvoid0-avoid-the-void/" target="_blank">d&#8217;bug has a great writeup on <em>why</em> this works and the other doesn&#8217;t</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2010-04-07/avoid-the-void0-in-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2010-04-07/avoid-the-void0-in-ie6/</feedburner:origLink></item>
		<item>
		<title>Compiling subversion from source on Bluehost</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/DuFqWCagTw0/</link>
		<comments>http://jonathonhill.net/2010-01-27/compiling-subversion-from-source-on-bluehost/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 15:13:29 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[Bluehost]]></category>
		<category><![CDATA[Shared Hosting]]></category>
		<category><![CDATA[Subversion]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=223</guid>
		<description><![CDATA[I recently had to install the subversion client in a shared hosting environment (specifically Bluehost, but these instructions probably work with other web hosts as well). It goes like this:
1) Add these lines into ~/.bash_profile
export PYTHONPATH="$HOME/lib/python2.3/site-packages"
export LD_LIBRARY_PATH="$HOME/lib"
2) Download the subversion source code
mkdir ~/src
cd ~/src
wget http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.4.6.tar.gz
tar -xzvf subversion-1.4.6.tar.gz
tar -xzvf subversion-deps-1.4.6.tar.gz
cd subversion-1.4.6
3) Compile dependencies
cd apr
./configure --enable-shared [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to <a href="http://www.bluehostforum.com/showpost.php?p=51455&amp;postcount=19">install the subversion client</a> in a shared hosting environment (specifically <a href="http://bluehost.com">Bluehost</a>, but these instructions probably work with other web hosts as well). It goes like this:</p>
<p><strong>1) Add these lines into <code>~/.bash_profile</code></strong></p>
<pre class="bash">export PYTHONPATH="$HOME/lib/python2.3/site-packages"
export LD_LIBRARY_PATH="$HOME/lib"</pre>
<p><strong>2) Download the subversion source code</strong></p>
<pre class="bash">mkdir ~/src
cd ~/src
wget http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.4.6.tar.gz
tar -xzvf subversion-1.4.6.tar.gz
tar -xzvf subversion-deps-1.4.6.tar.gz
cd subversion-1.4.6</pre>
<p><strong>3) Compile dependencies</strong></p>
<pre class="bash">cd apr
./configure --enable-shared --prefix=$HOME
make &amp;&amp; make install

cd ../apr-util
./configure --enable-shared --prefix=$HOME --with-expat=builtin --with-apr=$HOME --without-berlekey-db
make &amp;&amp; make install

cd ../neon
EXTRA_CFLAGS="-L/usr/lib64 -fPIC"
CFLAGS="-L/usr/lib64 -fPIC"
./configure --prefix=/home/zzzzz/system --enable-shared --with-ssl
make &amp;&amp; make install</pre>
<p><em>Note: replace <code>zzzzz</code> with your user directory.</em></p>
<p><strong>4) Compile subversion</strong></p>
<pre class="bash">cd ..
./configure --prefix=/home/zzzzz/system --with-expat=builtin --with-ssl --with-neon=/usr/lib64
make &amp;&amp; make install</pre>
<p><em>Note: replace <code>zzzzz</code> with your user directory.</em></p>
<p><strong>5) Edit <code>~/.bash_profile</code> to add <code>~/system/bin</code> to your path</strong></p>
<pre class="bash">vim ~/.bash_profile</pre>
<p><strong>replace:</strong></p>
<pre class="bash">PATH=$PATH:$HOME/bin</pre>
<p><strong>with:</strong></p>
<pre class="bash">PATH=$PATH:$HOME/bin:$HOME/system/bin</pre>
<p><strong>6) Logout of your session and then log back in again. Subversion should now be working.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2010-01-27/compiling-subversion-from-source-on-bluehost/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2010-01-27/compiling-subversion-from-source-on-bluehost/</feedburner:origLink></item>
		<item>
		<title>What to do when WordPress 2.8+ asks for connection info to upgrade a plugin</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/-X4ZcfKW_LE/</link>
		<comments>http://jonathonhill.net/2010-01-14/wordpress-asks-for-connection-info/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 16:28:29 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=221</guid>
		<description><![CDATA[I was getting this when trying to upgrade a plugin automatically within Wordpress:

Normally this would be a filesystem permission error. You have to make sure the wp-content/plugins folder is owned by the user apache is running as. However, that didn&#8217;t change a thing.
Further googling revealed that I needed to add this constant in my wp-config.php [...]]]></description>
			<content:encoded><![CDATA[<p>I was getting this when trying to upgrade a plugin automatically within <a href="http://wordpress.org">Wordpress</a>:</p>
<p><img class="alignnone" title="Connection info needed" src="http://www.chrisabernethy.com/wp-content/uploads/2008/12/connection_info_needed.jpg" alt="" width="470" height="262" /></p>
<p>Normally this would be a filesystem permission error. You have to <a href="http://www.chrisabernethy.com/why-wordpress-asks-connection-info/">make sure the <code>wp-content/plugins</code> folder is owned by the user apache is running as</a>. However, that didn&#8217;t change a thing.</p>
<p>Further googling revealed that I needed to <a href="http://www.kgarner.com/blog/archives/2009/06/13/direct-auto-update-on-wordpress-2-8/">add this constant</a> in my <code>wp-config.php</code> file:</p>
<pre class="php">define('FS_METHOD', 'direct');</pre>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2010-01-14/wordpress-asks-for-connection-info/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2010-01-14/wordpress-asks-for-connection-info/</feedburner:origLink></item>
		<item>
		<title>jQuery table fade doesn’t work in IE7</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/-UVpxjCphhs/</link>
		<comments>http://jonathonhill.net/2010-01-01/jquery-table-fade-doesnt-work-in-ie7/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 05:19:41 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[opacity]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=217</guid>
		<description><![CDATA[While working on an up-and-coming web service, I found that apparently Internet Explorer does not cope well with fading &#60;table&#62; elements using jQuery. Here&#8217;s what I was doing:
tbl = $('#primaryColumn table');
loading = $('#primaryColumn .loading');

tbl.fadeTo(300, 0.0, function() {
    loading.show();
        tbl.load('/contacts/{pagination:page}/' + page_num + '?ajax&#38;search={pagination:search}', function() {
 [...]]]></description>
			<content:encoded><![CDATA[<p>While working on an up-and-coming web service, I found that apparently Internet Explorer does not cope well with fading <code>&lt;table&gt;</code> elements using <a href="http://jquery.com">jQuery</a>. Here&#8217;s what I was doing:</p>
<pre name="code" class="javascript">tbl = $('#primaryColumn table');
loading = $('#primaryColumn .loading');

tbl.fadeTo(300, 0.0, function() {
    loading.show();
        tbl.load('/contacts/{pagination:page}/' + page_num + '?ajax&amp;search={pagination:search}', function() {
        loading.hide();
        tbl.stop().fadeTo(300, 1.0, function() {
            tbl.css('opacity', 'auto');  // removing the CSS opacity rule restores the ClearType anti-aliasing in IE
        });
    });
});</pre>
<p>For some reason, the <code>fadeIn()</code>, <code>fadeOut()</code>, and <code>fadeTo()</code> effects do not work on <code>&lt;table&gt;</code> elements in IE, although they work great in Firefox and Opera. This also applies when using <code>animate()</code> to alter the CSS <code>opacity</code> rule (yeah, I tried them all).</p>
<p>As usual, the solution proved to be very easy: don&#8217;t animate the <code>&lt;table&gt;</code>, rather, wrap the <code>&lt;table&gt;</code> in a <code>&lt;div&gt;</code> and animate that. The only change required is the first line:</p>
<pre name="code" class="javascript">tbl = $('#primaryColumn div#table_div');</pre>
<p>Bingo! Another three-hour bug-swatting episode reinforcing my hatred for Microsoft browsers of all versions just concluded.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2010-01-01/jquery-table-fade-doesnt-work-in-ie7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2010-01-01/jquery-table-fade-doesnt-work-in-ie7/</feedburner:origLink></item>
		<item>
		<title>Javascript reserved words trigger “Expected Identifier” error on IE</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/ZMLitJKOAVA/</link>
		<comments>http://jonathonhill.net/2009-11-24/javascript-reserved-words-trigger-expected-identifier-error-on-ie/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 15:47:27 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=207</guid>
		<description><![CDATA[If you&#8217;re getting an unreasonable &#8220;Expected Identifier&#8221; Javascript error on IE6/7, check to see if you have any variable names which are reserved words.
This also goes for HTML form element names:
&#60;form name="aform"&#62;
    &#60;input type="text" name="name" /&#62;
&#60;/form&#62;
Then accessing document.aform.name.value would throw an error since name is a reserved word.
Javascript Reserved Words

abstract
alert
Anchor
Area
arguments
Array
assign
blur
boolean or Boolean
break
Button
byte
callee
caller
captureEvents
case
catch
char
Checkbox
class
clearInterval
clearTimeout
close
closed
comment
confirm
const
constructor
continue
Date
debugger
default
defaultStatus
delete
do
document
Document
double
Element
else
enum
escape
eval
export
extends
false
FileUpload
final
finally
find
float
focus
for
Form
Frame
frames
function
Function
getClass
goto
Hidden
history or [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re getting an unreasonable &#8220;Expected Identifier&#8221; Javascript error on IE6/7, check to see if you have any variable names which are reserved words.</p>
<p>This also goes for HTML form element names:</p>
<pre><code>&lt;form name="aform"&gt;
    &lt;input type="text" name="name" /&gt;
&lt;/form&gt;</code></pre>
<p>Then accessing <code>document.aform.name.value</code> would throw an error since <em>name</em> is a reserved word.</p>
<h2>Javascript Reserved Words</h2>
<ul>
<li>abstract</li>
<li>alert</li>
<li>Anchor</li>
<li>Area</li>
<li>arguments</li>
<li>Array</li>
<li>assign</li>
<li>blur</li>
<li>boolean or Boolean</li>
<li>break</li>
<li>Button</li>
<li>byte</li>
<li>callee</li>
<li>caller</li>
<li>captureEvents</li>
<li><strong>case</strong></li>
<li>catch</li>
<li>char</li>
<li>Checkbox</li>
<li><strong>class</strong></li>
<li>clearInterval</li>
<li>clearTimeout</li>
<li>close</li>
<li><strong>closed</strong></li>
<li><strong>comment</strong></li>
<li><strong>confirm</strong></li>
<li>const</li>
<li>constructor</li>
<li>continue</li>
<li>Date</li>
<li>debugger</li>
<li><strong>default</strong></li>
<li>defaultStatus</li>
<li>delete</li>
<li>do</li>
<li>document</li>
<li>Document</li>
<li>double</li>
<li>Element</li>
<li>else</li>
<li>enum</li>
<li><strong>escape</strong></li>
<li>eval</li>
<li><strong>export</strong></li>
<li>extends</li>
<li>false</li>
<li>FileUpload</li>
<li>final</li>
<li>finally</li>
<li>find</li>
<li>float</li>
<li>focus</li>
<li>for</li>
<li>Form</li>
<li>Frame</li>
<li>frames</li>
<li>function</li>
<li>Function</li>
<li>getClass</li>
<li>goto</li>
<li>Hidden</li>
<li>history or History</li>
<li>home</li>
<li>if</li>
<li><strong>Image</strong></li>
<li>implements</li>
<li>import</li>
<li>in</li>
<li>Infinity</li>
<li>innerHeight</li>
<li>innerWidth</li>
<li>instanceOf</li>
<li>int</li>
<li>interface</li>
<li>isFinite</li>
<li>isNan</li>
<li>java</li>
<li>JavaArray</li>
<li>JavaClass</li>
<li>JavaObject</li>
<li>JavaPackage</li>
<li><strong>label</strong></li>
<li><strong>length</strong></li>
<li>Link</li>
<li><strong>location</strong> or Location</li>
<li>locationbar</li>
<li>long</li>
<li>Math</li>
<li>menubar</li>
<li>MimeType</li>
<li>moveBy</li>
<li>moveTo</li>
<li><strong>name</strong></li>
<li>NaN</li>
<li>native</li>
<li>navigate</li>
<li>navigator or Navigator</li>
<li>netscape</li>
<li>new</li>
<li>null</li>
<li>Number</li>
<li>Object</li>
<li>onBlur</li>
<li>onError</li>
<li>onFocus</li>
<li>onLoad</li>
<li>onUnload</li>
<li>open</li>
<li>opener</li>
<li>Option</li>
<li>outerHeight</li>
<li>outerWidth</li>
<li><strong>package</strong></li>
<li>Packages</li>
<li>pageXoffset</li>
<li>pageYoffset</li>
<li><strong>parent</strong></li>
<li>parseFloat</li>
<li>parseInt</li>
<li>Password</li>
<li>personalbar</li>
<li>Plugin</li>
<li>print</li>
<li>private</li>
<li>prompt</li>
<li>protected</li>
<li>prototype</li>
<li>public</li>
<li>Radio</li>
<li>ref</li>
<li>RegExp</li>
<li>releaseEvents</li>
<li>Reset</li>
<li>resizeBy</li>
<li>resizeTo</li>
<li>return</li>
<li>routeEvent</li>
<li>scroll</li>
<li>scrollbars</li>
<li>scrollBy</li>
<li>scrollTo</li>
<li>Select</li>
<li>self</li>
<li>setInterval</li>
<li>setTimeout</li>
<li>short</li>
<li>static</li>
<li><strong>status</strong></li>
<li>statusbar</li>
<li>stop</li>
<li>String</li>
<li>Submit</li>
<li>sun</li>
<li>super</li>
<li>switch</li>
<li>synchronized</li>
<li>taint</li>
<li>Text</li>
<li>Textarea</li>
<li>this</li>
<li>throw</li>
<li>throws</li>
<li><strong>toolbar</strong></li>
<li><strong>top</strong></li>
<li>toString</li>
<li>transient</li>
<li>true</li>
<li>try</li>
<li>typeof</li>
<li>unescape</li>
<li>untaint</li>
<li>unwatch</li>
<li>valueOf</li>
<li>var</li>
<li>void</li>
<li>watch</li>
<li>while</li>
<li><strong>window</strong></li>
<li>Window</li>
<li>with</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2009-11-24/javascript-reserved-words-trigger-expected-identifier-error-on-ie/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2009-11-24/javascript-reserved-words-trigger-expected-identifier-error-on-ie/</feedburner:origLink></item>
		<item>
		<title>Reasonable Defaults for MySQL Server</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/sMjqFfyjsSQ/</link>
		<comments>http://jonathonhill.net/2009-11-16/reasonable-defaults-for-mysql-server/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 14:05:02 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[Hardening]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=195</guid>
		<description><![CDATA[Jeremy Zawodny posted yet another great article over at Linux Magazine on some improved defaults that can save you a lot of grief when your network fails intermittently. In summary:
Faster replication heartbeat (old default is 3600 seconds = 1 hour):
slave_net_timeout 10
Disable DNS hostname lookups:
skip-name-resolve
Sane connection timeout (may need to be raised if your network is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jeremy.zawodny.com/blog/">Jeremy Zawodny</a> posted <a href="http://www.linux-mag.com/id/7615">yet another great article</a> over at Linux Magazine on some improved defaults that can save you a lot of grief when your network fails intermittently. In summary:</p>
<p><strong>Faster replication heartbeat</strong> (old default is 3600 seconds = 1 hour):</p>
<pre style="padding-left: 30px">slave_net_timeout 10</pre>
<p><strong>Disable DNS hostname lookups:</strong></p>
<pre style="padding-left: 30px">skip-name-resolve</pre>
<p><strong>Sane connection timeout</strong> (may need to be raised if your network is flaky):</p>
<pre style="padding-left: 30px">connect_timeout 5</pre>
<p><strong>Disable host blacklisting</strong> after x number of failed connections:</p>
<pre style="padding-left: 30px">max_connect_errors 1844674407370954751</pre>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2009-11-16/reasonable-defaults-for-mysql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2009-11-16/reasonable-defaults-for-mysql-server/</feedburner:origLink></item>
		<item>
		<title>Human Name Parsing in PHP</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/s8xh02Haf84/</link>
		<comments>http://jonathonhill.net/2009-10-31/human-name-parsing-in-php/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 02:25:27 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[Human Names]]></category>
		<category><![CDATA[nameparse]]></category>
		<category><![CDATA[Parsing]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=193</guid>
		<description><![CDATA[Parsing human names are not exactly easy, but they can be done. Keith Beckman&#8217;s nameparse.php is an excellent PHP library for doing this.
Download nameparse.php
nameparse.php can recognize names in &#8220;[title]first[middles]last[,][suffix]&#8221; and &#8220;last,first[middles][,][suffix]&#8221; forms, which, when you think about it, cover most if not all well-formed name input formats. nameparse.php handles last names of arbitrary complexity, such [...]]]></description>
			<content:encoded><![CDATA[<p>Parsing human names are not exactly easy, but they can be done. Keith Beckman&#8217;s <a href="http://alphahelical.com/code/misc/nameparse/"><code>nameparse.php</code></a> is an excellent PHP library for doing this.</p>
<p><a href="http://alphahelical.com/code/misc/nameparse/nameparse.php.txt"><strong>Download nameparse.php</strong></a></p>
<blockquote><p><code>nameparse.php</code> can recognize names in &#8220;[title]first[middles]last[,][suffix]&#8221; and &#8220;last,first[middles][,][suffix]&#8221; forms, which, when you think about it, cover most if not all well-formed name input formats. <code>nameparse.php</code> handles last names of arbitrary complexity, such as &#8220;bin Laden&#8221;, &#8220;van der Vort&#8221;, and &#8220;Garcia y Vega&#8221;, as well as middle names of arbitrary size and complexity, differentiating between most last names and the first or middle names or initials preceding them.</p>
<p>An example of names correctly parse by nameparse.php:</p>
<ul>
<li>Doe, John. A. Kenneth III</li>
<li>Velasquez y Garcia, Dr. Juan, Jr.</li>
<li>Dr. Juan Q. Xavier de la Vega, Jr.</li>
</ul>
<p>To use, simple <code>include()</code> or <code>require()</code> <code>nameparse.php</code> and call <code>parse_name($string)</code> on any name. <code>parse_name()</code> returns an associative array of all name segments found of &#8220;title&#8221;,&#8221;first&#8221;,&#8221;middle&#8221;,&#8221;last&#8221;, and &#8220;suffix&#8221;. Do note that no spelling, capitalization, or punctuation of titles, prefixes, or suffixes is normalized. That is, every token remains as entered: <code>nameparse.php</code> is a semantic parser only. If you want orthographic or other normalization, you&#8217;ll have to postprocess the output. However, since the name is now semantically parsed, such postprocessing is (for applications which require it) simple.</p>
<p><code> print_r(parse_name('Velasquez y Garcia, Dr. Juan Q. Xavier III')); </code></p>
<p>yields . . .</p>
<pre>Array
(
    [title] =&gt; Dr.
    [first] =&gt; Juan
    [middle] =&gt; Q. Xavier
    [suffix] =&gt; III
    [last] =&gt; Velasquez y Garcia
)</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2009-10-31/human-name-parsing-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2009-10-31/human-name-parsing-in-php/</feedburner:origLink></item>
		<item>
		<title>Performing a bitwise NOT on arbitrarily long integers</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/RtT_HLZTLLE/</link>
		<comments>http://jonathonhill.net/2009-09-04/performing-a-bitwise-not-on-arbitrarily-long-integers/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 21:34:00 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[64-bit]]></category>
		<category><![CDATA[Boolean Logic]]></category>
		<category><![CDATA[GMP]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=191</guid>
		<description><![CDATA[Here&#8217;s the surprisingly simple solution to a fairly challenging problem. I do not understand why PHPs GMP extension does not include a gmp_not() function.
function gmp_not($n) {

	# convert to binary string
	$n = gmp_strval($n, 2);

	# invert each bit, one at a time
	for($i = 0; $i < strlen($n); $i++) {
		$n[$i] = ~$n[$i];
	}

	# convert back to decimal
	return gmp_strval(gmp_init($n, 2), [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the surprisingly simple solution to a fairly challenging problem. I do not understand why PHPs GMP extension does not include a gmp_not() function.</p>
<pre><code>function gmp_not($n) {

	# convert to binary string
	$n = gmp_strval($n, 2);

	# invert each bit, one at a time
	for($i = 0; $i < strlen($n); $i++) {
		$n[$i] = ~$n[$i];
	}

	# convert back to decimal
	return gmp_strval(gmp_init($n, 2), 10);
}</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2009-09-04/performing-a-bitwise-not-on-arbitrarily-long-integers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2009-09-04/performing-a-bitwise-not-on-arbitrarily-long-integers/</feedburner:origLink></item>
		<item>
		<title>Arbitrary-length base conversion in PHP</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/rFT1_BKYyxQ/</link>
		<comments>http://jonathonhill.net/2009-09-04/arbitrary-length-base-conversion-in-php/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 21:31:08 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[Base conversion]]></category>
		<category><![CDATA[Binary]]></category>
		<category><![CDATA[Decimal]]></category>
		<category><![CDATA[Extended arithmetic]]></category>
		<category><![CDATA[GMP]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=189</guid>
		<description><![CDATA[After some digging, I found a great way to convert number bases when dealing with arbitrary length integers (esp. integers &#62; 32 bits):
return gmp_strval(gmp_init($n, 2), 10);
This will convert a large base 2 (binary) number to base 10 (decimal).
]]></description>
			<content:encoded><![CDATA[<p>After some digging, I found a great way to convert number bases when dealing with arbitrary length integers (esp. integers &gt; 32 bits):</p>
<p><code>return gmp_strval(gmp_init($n, 2), 10);</code></p>
<p>This will convert a large base 2 (binary) number to base 10 (decimal).</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2009-09-04/arbitrary-length-base-conversion-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2009-09-04/arbitrary-length-base-conversion-in-php/</feedburner:origLink></item>
		<item>
		<title>Ten Things You Didn’t Know Apache (2.2) Could Do</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/JbwVCJ3CzOM/</link>
		<comments>http://jonathonhill.net/2009-09-01/ten-things-you-didnt-know-apache-2-2-could-do/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 16:08:20 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux Magazine]]></category>
		<category><![CDATA[Load Balancing]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=187</guid>
		<description><![CDATA[Check out SNI (multiple SSL vhosts) and mod_proxy_balancer in this great article from Linux Magazine!
]]></description>
			<content:encoded><![CDATA[<p>Check out SNI (multiple SSL vhosts) and mod_proxy_balancer in this <a href="http://www.linux-mag.com/cache/7480/1.html">great article</a> from Linux Magazine!</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2009-09-01/ten-things-you-didnt-know-apache-2-2-could-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2009-09-01/ten-things-you-didnt-know-apache-2-2-could-do/</feedburner:origLink></item>
		<item>
		<title>How to handle headers and footers in CodeIgniter</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/bd_fKz_UIjg/</link>
		<comments>http://jonathonhill.net/2009-08-27/how-to-handle-headers-and-footers-in-codeigniter/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 02:14:24 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Footers]]></category>
		<category><![CDATA[Headers]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Views]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=185</guid>
		<description><![CDATA[I got this question from a reader and thought it would be useful to post for everyone:
Hi Jonathon,
I really like some of your solutions to making things simpler when using CodeIgniter.  On the subject, I was wondering if you had a preference for a simple way to include headers and footers in your views. [...]]]></description>
			<content:encoded><![CDATA[<p>I got this question from a reader and thought it would be useful to post for everyone:</p>
<blockquote><p>Hi Jonathon,</p>
<p>I really like some of your solutions to making things simpler when using CodeIgniter.  On the subject, I was wondering if you had a preference for a simple way to include headers and footers in your views.  I know you can either do views within views, but that just doesn&#8217;t feel right to me.  Although the advantage is only having to use one line to call your views within a controller.  The method of building your views within an action by calling each view seperately also doesn&#8217;t interest me, because I&#8217;m trying to adhere to the DRY principle.  I&#8217;ve also seen a solution where you create your own MY_controller and build the view that way then inherit from all your other controllers.</p>
<p>Do you have a recommended way to include your common views that&#8217;s simple and doesn&#8217;t require you add multiple lines of code to each controller action?  I&#8217;m trying to keep my view calling to one line within each action of the controller.</p>
<p>Thanks,</p>
<p>Lee</p></blockquote>
<p>My preference on that is simply calling views within views. It just makes sense to do it that way. If there is data that must be passed to the header and footer globally, then I would extend the Loader class with a global data function like this:</p>
<pre><code>class MY_Loader extends CI_Loader {

	function MY_Loader() {
		parent::CI_Loader();
	}

	function global_view_data($key, $val) {
		# normalize the data array
		$data = (is_array($key))? $key : array($key =&gt; $val);

		# merge into the view data array
		$this-&gt;_ci_cached_vars = array_merge($this-&gt;_ci_cached_vars, $data);
	}

}</code></pre>
<p>Copy that to a file called <strong>MY_Loader.php</strong> and save it in your libraries folder <a rel="nofollow" href="http://codeigniter.com/user_guide/general/core_classes.html">as described in the user guide</a>. Once that is done you can load data which will be passed to all views globally:</p>
<pre><code>$this-&gt;load-&gt;global_view_data($stuff);</code></pre>
<p>Note: I have found that including views within views is aggravating without a helper function, so I wrote the <a rel="nofollow" href="http://jonathonhill.net/codeigniter/modularity/">Modularity plugin</a> to help with that.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2009-08-27/how-to-handle-headers-and-footers-in-codeigniter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2009-08-27/how-to-handle-headers-and-footers-in-codeigniter/</feedburner:origLink></item>
		<item>
		<title>Excellent cron tutorial</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/E0JV2VfSwzA/</link>
		<comments>http://jonathonhill.net/2009-08-20/excellent-cron-tutorial/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 02:00:35 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=183</guid>
		<description><![CDATA[Here&#8217;s an excellent overview of cron, how to run a script every five minutes, and all that fun stuff.
]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an <a href="http://neeocis.wordpress.com/2008/07/08/crontab-every-five-minutes/">excellent overview of cron</a>, how to run a script every five minutes, and all that fun stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2009-08-20/excellent-cron-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2009-08-20/excellent-cron-tutorial/</feedburner:origLink></item>
		<item>
		<title>Easy startup scripts using crontab</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/mZff5l1xQKA/</link>
		<comments>http://jonathonhill.net/2009-08-18/easy-startup-scripts-using-crontab/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 14:53:59 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[Bootup]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reboot]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Startup]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=181</guid>
		<description><![CDATA[There is a super-easy way to start a program during system boot. Just put this in your crontab:
@reboot /path/to/my/program
The command will be executed on every (re)boot. Crontab can be modified by running:
sudo crontab -e
]]></description>
			<content:encoded><![CDATA[<p>There is a super-easy way to start a program during system boot. Just put this in your crontab:</p>
<pre><code>@reboot /path/to/my/program</code></pre>
<p>The command will be executed on every (re)boot. Crontab can be modified by running:</p>
<pre><code>sudo crontab -e</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2009-08-18/easy-startup-scripts-using-crontab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2009-08-18/easy-startup-scripts-using-crontab/</feedburner:origLink></item>
		<item>
		<title>Axioms of building a “boring” system</title>
		<link>http://feedproxy.google.com/~r/JonathonHill/~3/l0B-GMi4C9I/</link>
		<comments>http://jonathonhill.net/2009-08-11/axioms-of-building-a-boring-system/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 21:41:24 +0000</pubDate>
		<dc:creator>Jonathon</dc:creator>
				<category><![CDATA[Notebook]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Percona]]></category>
		<category><![CDATA[Stability]]></category>

		<guid isPermaLink="false">http://jonathonhill.net/?p=179</guid>
		<description><![CDATA[From a presentation from Percona. This should be on every developer&#8217;s wall:

If it worked 10, 20, 30 years ago, it is worth considering.
If a crisis makes you come alive, you have your priorities wrong.
If you are working on urgent system problems, it&#8217;s not a boring architecture.
You should be working on exciting new things that serve [...]]]></description>
			<content:encoded><![CDATA[<p>From a <a href="http://www.percona.com/ppc2009/PPC2009_Boring_MySQL.pdf">presentation from Percona</a>. This should be on every developer&#8217;s wall:</p>
<ol>
<li>If it worked 10, 20, 30 years ago, it is worth considering.</li>
<li>If a crisis makes you come alive, you have your priorities wrong.</li>
<li>If you are working on urgent system problems, it&#8217;s not a boring architecture.</li>
<li>You should be working on exciting new things that serve your customers and are otherwise unimportant.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://jonathonhill.net/2009-08-11/axioms-of-building-a-boring-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://jonathonhill.net/2009-08-11/axioms-of-building-a-boring-system/</feedburner:origLink></item>
	</channel>
</rss>
