<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: Jstetser's Code Snippets</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 12:08:20 GMT</pubDate>
    <description>DZone Snippets: Jstetser's Code Snippets</description>
    <item>
      <title>MySQL Launchd item for Mac OS X Tiger</title>
      <link>http://snippets.dzone.com/posts/show/369</link>
      <description>(Originally posted at &lt;a href="http://blog.unquiet.net/archives/2005/05/19/launchd-item-for-mysql/"&gt;Unquiet&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;I had to reinstall Mysql because it wasn&#226;&#8364;&#8482;t one of the things I backed up before erasing my hard drive. Since I&#226;&#8364;&#8482;m now running Mac OS X 10.4 &#226;&#8364;&#339;Tiger&#226;&#8364;?, I decided to set it up to start when the system boots, but the system for creating startup items has changed slightly. So I saved the following xml in &lt;strong&gt;/Library/LaunchDaemons/com.mysql.Mysql.plist&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;br /&gt;    &lt;!DOCTYPE plist PUBLIC &lt;br /&gt;         "-//Apple Computer//DTD PLIST 1.0//EN" "&lt;br /&gt;        http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;&lt;br /&gt;    &lt;plist version="1.0"&gt;&lt;br /&gt;    &lt;dict&gt;&lt;br /&gt;        &lt;key&gt;Label&lt;/key&gt;&lt;br /&gt;        &lt;string&gt;com.mysql.Mysql&lt;/string&gt;&lt;br /&gt;        &lt;key&gt;OnDemand&lt;/key&gt;&lt;br /&gt;        &lt;false/&gt;&lt;br /&gt;        &lt;key&gt;ProgramArguments&lt;/key&gt;&lt;br /&gt;        &lt;array&gt;&lt;br /&gt;                &lt;string&gt;/usr/local/mysql/bin/mysqld_safe&lt;/string&gt;&lt;br /&gt;        &lt;/array&gt;&lt;br /&gt;        &lt;key&gt;ServiceDescription&lt;/key&gt;&lt;br /&gt;        &lt;string&gt;Mysql 4.1 Database Server&lt;/string&gt;&lt;br /&gt;        &lt;key&gt;UserName&lt;/key&gt;&lt;br /&gt;        &lt;string&gt;mysql&lt;/string&gt;&lt;br /&gt;        &lt;key&gt;WorkingDirectory&lt;/key&gt;&lt;br /&gt;        &lt;string&gt;/usr/local/mysql&lt;/string&gt;&lt;br /&gt;    &lt;/dict&gt;&lt;br /&gt;    &lt;/plist&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Note that I'm using the official OSX distribution of MySQL... but with a few changes to match your database location, you can get this to work with other installs (fink, darwinports, etc).</description>
      <pubDate>Tue, 07 Jun 2005 16:14:06 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/369</guid>
      <author>jstetser (Jake Stetser)</author>
    </item>
    <item>
      <title>WordPress with clean urls on Lighttpd</title>
      <link>http://snippets.dzone.com/posts/show/368</link>
      <description>This single line seems to work for my WP install. I needed to add a couple of redirects and rewrites to handle my RSS feed, since I use Feedburner, but this line does all the heavy lifting...&lt;br /&gt;&lt;br /&gt;Place it after server.document-root, either in the main section or in your virtual host sub-sections...&lt;br /&gt;&lt;br /&gt;&lt;code&gt;server.error-handler-404 = "/index.php?error=404"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and use this as your clean urls template&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/%year%/%monthnum%/%day%/%postname%/&lt;/code&gt;</description>
      <pubDate>Tue, 07 Jun 2005 16:12:59 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/368</guid>
      <author>jstetser (Jake Stetser)</author>
    </item>
  </channel>
</rss>
