<?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>damonparker.org &#187; General</title>
	<atom:link href="http://damonparker.org/blog/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://damonparker.org</link>
	<description>code / ecommerce / life</description>
	<lastBuildDate>Thu, 24 Feb 2011 21:29:16 +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>Linux Grep Tips</title>
		<link>http://damonparker.org/blog/2010/11/17/linux-grep-tips/</link>
		<comments>http://damonparker.org/blog/2010/11/17/linux-grep-tips/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 21:04:33 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://damonparker.org/?p=553</guid>
		<description><![CDATA[Search for red OR green: grep 'red\&#124;green' files Search for searchtext at the beginning of a line in files: grep '^searchtext' files Search for searchtext at the end of a line in files: grep 'searchtext$' files Search files for blank lines: grep '^$' files Search files for US formatted phone numbers (###-###-####): grep '[0-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]' files [...]]]></description>
			<content:encoded><![CDATA[<p></p><div style="padding:2px 0 30px 0;">Search for <em>red</em> OR <em>green</em>:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep <span style="color: #ff0000;">'red<span style="color: #000099; font-weight: bold;">\|</span>green'</span> files</div></div>
</div>
<div style="padding:2px 0 30px 0;">Search for <em>searchtext</em> at the beginning of a line in <em>files</em>:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep <span style="color: #ff0000;">'^searchtext'</span> files</div></div>
</div>
<div style="padding:2px 0 30px 0;">Search for <em>searchtext</em> at the end of a line in <em>files</em>:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep <span style="color: #ff0000;">'searchtext$'</span> files</div></div>
</div>
<div style="padding:2px 0 30px 0;">Search <em>files</em> for blank lines:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep <span style="color: #ff0000;">'^$'</span> files</div></div>
</div>
<div style="padding:2px 0 30px 0;">Search <em>files</em> for US formatted phone numbers (###-###-####):</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep <span style="color: #ff0000;">'[0-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]'</span> files</div></div>
<p>or:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep <span style="color: #ff0000;">'[0-9]<span style="color: #000099; font-weight: bold;">\{</span>3<span style="color: #000099; font-weight: bold;">\}</span>-[0-9]<span style="color: #000099; font-weight: bold;">\{</span>3<span style="color: #000099; font-weight: bold;">\}</span>-[0-9]<span style="color: #000099; font-weight: bold;">\{</span>4<span style="color: #000099; font-weight: bold;">\}</span>'</span> files</div></div>
</div>
<div style="padding:2px 0 30px 0;">Search for <em>e-commerce</em> or <em>ecommerce</em> in <em>files</em>:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep e-<span style="color: #66cc66;">*</span>commerce files</div></div>
</div>
<div style="padding:2px 0 30px 0;">Search for <em>searchtext</em> case-insenstively in <em>files</em>:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep -i searchtext files</div></div>
</div>
<div style="padding:2px 0 30px 0;">Search for <em>searchtext</em> at the beginning of a line in <em>files</em>:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep <span style="color: #ff0000;">'^searchtext'</span> files</div></div>
</div>
<div style="padding:2px 0 30px 0;">Chain two grep commands together for more advanced searches.  Search for lines in <em>files</em> that contain both <em>partial_name</em> and <em>function</em>:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grep partial_name files <span style="color: #66cc66;">|</span> grep <span style="color: #b1b100;">function</span></div></div>
<p>That one is great for searching source directories for a function definition when you can&#8217;t remember the completely function name.</p></div>
 <img src="http://damonparker.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=553" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=553&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2010/11/17/linux-grep-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Goodreader and Email</title>
		<link>http://damonparker.org/blog/2010/04/28/iphone-goodreader-and-email/</link>
		<comments>http://damonparker.org/blog/2010/04/28/iphone-goodreader-and-email/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 23:19:30 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://purple.damonparker.org/?p=499</guid>
		<description><![CDATA[Goodreader is simply the best PDF / document reader around for the iPad. It allows you to download documents in a dozen different ways and store them locally on your device. Another great feature is the ability to directly email these as attachments from inside Goodreader. Unfortunately, said feature is limited somewhat by the limitations [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Goodreader is simply the best PDF / document reader around for the iPad. It allows you to download documents in a dozen different ways and store them locally on your device. Another great feature is the ability to directly email these as attachments from inside Goodreader.</p>
<p>Unfortunately, said feature is limited somewhat by the limitations of the device. Trying to compose a message in the tiny popup box is a pain&#8230; especially when the box starts jumping around on every keypress as the tiny window tries to alternately flow the text and show the attachment. </p>
<p>Good thing there is a fix for any app using the iPhone/iPad built-in mail functionality. Simply type something in the text field to put something in the message body.  I use a couple of returns or set the To: address. Then close the message. When the app asks if you would like to save the draft, hit Yes and the message along with attachment will be saved in your Mail Drafts folder. You can retrieve it there any time to finish writing your message and send the attachment. </p>
<p>If you fail to type something in the new message pop up, the mail app wont ask you if you want to save the draft. It will exit and trash your message.<br />
<img src="http://cdn.damonparker.org/q9i5a4w8/cds/dp/wp-content/uploads/2010/05/cap.ipad_.goodreader.mail_-300x225.jpg" alt="Sending File Attachment in Goodreader" /></p>
 <img src="http://damonparker.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=499" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=499&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2010/04/28/iphone-goodreader-and-email/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back</title>
		<link>http://damonparker.org/blog/2009/08/29/back/</link>
		<comments>http://damonparker.org/blog/2009/08/29/back/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 19:54:05 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/?p=408</guid>
		<description><![CDATA[After nearly two years with not much to say, I decided to pick up the blog again. It was a long and winding journey, this time in between. Maybe more on that later. I should be updating the pages of the blog with current info about myself and my projects over the next few weeks. [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>After nearly two years with not much to say, I decided to pick up the blog again.  It was a long and winding journey, this time in between.  Maybe more on that later.</p>
<p>I should be updating the pages of the blog with current info about myself and my projects over the next few weeks.  </p>
<p>As always, the shop is open for any <a href="http://damonparker.org/blog/contact/">sysadmin or development projects</a>.</p>
 <img src="http://damonparker.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=408" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=408&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2009/08/29/back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blattodephobia</title>
		<link>http://damonparker.org/blog/2007/09/10/blattodephobia/</link>
		<comments>http://damonparker.org/blog/2007/09/10/blattodephobia/#comments</comments>
		<pubDate>Mon, 10 Sep 2007 05:55:30 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Dictionary]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/09/10/blattodephobia/</guid>
		<description><![CDATA[n. The fear of cockroaches]]></description>
			<content:encoded><![CDATA[<p></p><p><em>n.</em> The fear of cockroaches</p>
 <img src="http://damonparker.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=379" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=379&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/09/10/blattodephobia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grep Replace and Word Processing</title>
		<link>http://damonparker.org/blog/2007/06/25/grep-replace-and-word-processing/</link>
		<comments>http://damonparker.org/blog/2007/06/25/grep-replace-and-word-processing/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 16:57:35 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Lifehacks]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/06/25/grep-replace-and-word-processing/</guid>
		<description><![CDATA[I spend so much time in a text editor, its hard to get my head around a word processor sometimes. Text and formatting at the same time? Moving some content around I found myself with a ton of links formatted in an unordered list. I only needed the plaintext of the name and link separate [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I spend so much time in a text editor, its hard to get my head around a word processor sometimes.  Text and formatting at the same time?</p>
<p>Moving some content around I found myself with a ton of links formatted in an unordered list.  I only needed the plaintext of the name and link separate for the current project.  My trusty BBEdit with Grep search and replace support yield the following search and replacement patterns to make quick work of the list. </p>
<p>Search Grep Pattern</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>li<span style="color: #66cc66;">&gt;&lt;</span>a <span style="color: #0000ff;">href=</span><span style="color: #ff0000;">&quot;(.*)&quot;</span><span style="color: #66cc66;">&gt;</span><span style="color: #66cc66;">&#40;</span>.<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&lt;</span>\<span style="color: #66cc66;">/</span>a<span style="color: #66cc66;">&gt;</span> ?<span style="color: #66cc66;">&lt;</span>strong<span style="color: #66cc66;">&gt;</span> ?\<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>.<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span>\<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&lt;</span>\<span style="color: #66cc66;">/</span>strong<span style="color: #66cc66;">&gt;&lt;</span>\<span style="color: #66cc66;">/</span>li<span style="color: #66cc66;">&gt;</span></div></div>
<p>Replace Grep Pattern</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">\<span style="color: #cc66cc;">2</span>\t\<span style="color: #66cc66;">&#40;</span>\<span style="color: #cc66cc;">3</span>\<span style="color: #66cc66;">&#41;</span>\r\<span style="color: #cc66cc;">1</span>\r</div></div>
<p>Turned this</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&lt;</span>li<span style="color: #66cc66;">&gt;&lt;</span>a href=<span style="color: #ff0000;">&quot;http://www.agentb.com/&quot;</span><span style="color: #66cc66;">&gt;</span>AgentB<span style="color: #66cc66;">&lt;/</span>a<span style="color: #66cc66;">&gt;</span> <span style="color: #66cc66;">&lt;</span>strong<span style="color: #66cc66;">&gt;</span> <span style="color: #66cc66;">&#40;</span>Deals<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&lt;/</span>strong<span style="color: #66cc66;">&gt;&lt;/</span>li<span style="color: #66cc66;">&gt;</span></div></div>
<p>into this</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AgentB&nbsp; (Deals)<br />
http://www.agentb.com/</div></div>
<p>I always keep an empty BBedit window for text processing like this.  Its easy to paste a chunk of text, process it and then paste it back into your word processor.</p>
<p>Note:<br />
I&#8217;m almost good enough at Grep search patterns to make this viable in all situations.  It used to take me 5 minutes to debug and expression that would have taken 2 minutes to cut and paste manually.    I had this one whipped out in much less time than it would have taken to manually cut and paste a hundred of these.</p>
 <img src="http://damonparker.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=363" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=363&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/06/25/grep-replace-and-word-processing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Saved Queries</title>
		<link>http://damonparker.org/blog/2007/06/12/mysql-saved-queries/</link>
		<comments>http://damonparker.org/blog/2007/06/12/mysql-saved-queries/#comments</comments>
		<pubDate>Tue, 12 Jun 2007 22:15:50 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/06/12/mysql-saved-queries/</guid>
		<description><![CDATA[phpMyAdmin&#8216;s SQL popup has an interesting bookmarking feature called SQL History. I have plenty of saved queries to produce different reports on many of the client databases that I administer. I was looking for a way to supply a variable to search on in some of the queries. A little trial and error with the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://phpmyadmin.net" rel="external">phpMyAdmin</a>&#8216;s SQL popup has an interesting bookmarking feature called <a href="https://atlas.siliconsys.com/db_admin/Documentation.html#faqbookmark" rel="external">SQL History</a>.</p>
<p><img src="/images/dp/pma-sql-history.jpg" alt="PMA SQL History" width="" height="" border="0" /></p>
<p>I have plenty of saved queries to produce different reports on many of the <a href="http://damonparker.org/blog/services/">client databases</a> that I administer.  I was looking for a way to supply a variable to search on in some of the queries.  A little trial and error with the SQL bookmarks and the answer was right there.</p>
<p>If you need to use a query like this:</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">SELECT</span> sum<span style="color: #66cc66;">&#40;</span> products_weight <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> total_weight <span style="color: #993333; font-weight: bold;">FROM</span> products <span style="color: #993333; font-weight: bold;">WHERE</span> products_id <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> products_id <span style="color: #993333; font-weight: bold;">FROM</span> orders_products <span style="color: #993333; font-weight: bold;">WHERE</span> orders_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'10204'</span> <span style="color: #66cc66;">&#41;</span></div></div>
<p>But you need to lookup specific orders and need to pass an orders_id to the bookmarked query&#8230; create a bookmark like this</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">SELECT</span> sum<span style="color: #66cc66;">&#40;</span> products_weight <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> total_weight <span style="color: #993333; font-weight: bold;">FROM</span> products <span style="color: #993333; font-weight: bold;">WHERE</span> products_id <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> products_id <span style="color: #993333; font-weight: bold;">FROM</span> orders_products <span style="color: #993333; font-weight: bold;">WHERE</span> orders_id <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'/*[VARIABLE]*/'</span> <span style="color: #66cc66;">&#41;</span></div></div>
<p>phpMyAdmin will replace the placeholder</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">/*[VARIABLE]*/</span></div></div>
<p>with the variable entered in to the field at right.</p>
<p>Bookmarks seem to be unique to the database that is selected.  I found this out the hard way when I was editing a different database and tried to access bookmarks from another DB on the same server.</p>
 <img src="http://damonparker.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=285" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=285&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/06/12/mysql-saved-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ValidRcptTo.cdb Patch for Qmailrocks</title>
		<link>http://damonparker.org/blog/2007/05/07/validrcpttocdb-patch-for-qmailrocks/</link>
		<comments>http://damonparker.org/blog/2007/05/07/validrcpttocdb-patch-for-qmailrocks/#comments</comments>
		<pubDate>Mon, 07 May 2007 22:10:01 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/05/07/validrcpttocdb-patch-for-qmailrocks/</guid>
		<description><![CDATA[Received a call from a client this morning about not receiving any email for the last few days. Viewing the queue on their server showed 50,000 messages in the local queue. Tailing the logs, showed dozens of messages being received every minute to non-existent addresses to valid domains on the server. Qmail was accepting the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Received a call from a client this morning about not receiving any email for the last few days.  Viewing the queue on their server showed 50,000 messages in the local queue.  Tailing the logs, showed dozens of messages being received every minute to non-existent addresses to valid domains on the server.  Qmail was accepting the messages only to eventually bounce them after failing to deliver locally to the fake local address.  If only Qmail could check for valid email addresses in the initial SMTP connection and reject mail for addresses that do not exist.  </p>
<p><a href="http://qmail.jms1.net/patches/validrcptto.cdb.shtml" rel="external">ValidRcptTo.cdb</a> is a patch for Qmail that does just this.  There are several implementations of this functionality, but John Simpson&#8217;s version handles aliases, vpopmail <strong>and</strong> system accounts, Qmail&#8217;s <em>.qmail-default</em> aliases and utilizes a <a href="http://cr.yp.to/cdb.html" rel="external">cdb</a> database for speed.  </p>
<p>Patching my existing QMR install proved to be troublesome.  qmail-smtpd.c and the Makefile blew rejects.  I manually worked these rejected code chunks into the QMR Qmail source and produced a new patch file to use on the other installs I manage.</p>
<p>For full details on using ValidRcptTo see <a href="http://qmail.jms1.net/patches/validrcptto.cdb.shtml" rel="external">John&#8217;s page</a>.</p>
<h4><a href="http://damonparker.org/files/validrcptto.cdb.patch">Original ValidRcptTo.cdb Patch</a></h4>
<h4><a href="http://damonparker.org/files/validrcptto-qmr.cdb.patch">QMR 2.2.1 ValidRcptTo.db Patch</a></h4>
<p>John also maintains a bundle of other worthwhile Qmail patches at <a href="http://qmail.jms1.net/patches/combined.shtml" rel="external">his site</a>.</p>
 <img src="http://damonparker.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=353" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=353&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/05/07/validrcpttocdb-patch-for-qmailrocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Todo.txt &#8211; A Command Line Task Tracker</title>
		<link>http://damonparker.org/blog/2007/03/28/todotxt-a-command-line-task-tracker/</link>
		<comments>http://damonparker.org/blog/2007/03/28/todotxt-a-command-line-task-tracker/#comments</comments>
		<pubDate>Wed, 28 Mar 2007 20:34:25 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Lifehacks]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/03/28/todotxt-a-command-line-task-tracker/</guid>
		<description><![CDATA[I found Todo.txt by Gina Trapani, randomly last weekend and have been playing with it all week. Todo.txt is a todo list written in shell script. It should run fine under any system that supports a Unix like shell&#8230; Linux, OS X, Cygwin etc. At any given time I have a half dozen post-it pads [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I found <a href="http://todotxt.com/" rel="external">Todo.txt</a> by Gina Trapani, randomly last weekend and have been playing with it all week.  Todo.txt is a todo list written in shell script.  It should run fine under any system that supports a Unix like shell&#8230; Linux, OS X, Cygwin etc.  </p>
<p>At any given time I have a half dozen post-it pads going with todo lists, usually the things that have to get done TODAY!  Todo.txt is so simple to use I&#8217;ve misplaced most of my post-it pads (still need paper for the grocery list).  <img src='http://cdn.damonparker.org/q9i5a4w8/cds/dp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Some examples:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">todo.sh add This is my first task</div></div>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">todo.sh add Another task</div></div>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">todo.sh list<br />
02 Another task<br />
01 This is my first task<br />
--<br />
TODO: <span style="color: #cc66cc;">2</span> tasks <span style="color: #b1b100;">in</span> <span style="color: #66cc66;">/</span>Users<span style="color: #66cc66;">/</span>damonp<span style="color: #66cc66;">/</span>etc<span style="color: #66cc66;">/</span>todo.txt.</div></div>
<p>Set task number one to the highest priority, A.</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">todo.sh pri <span style="color: #cc66cc;">1</span> A<br />
todo.sh list<br />
01 <span style="color: #66cc66;">&#40;</span>A<span style="color: #66cc66;">&#41;</span> This is my first task<br />
02 Another task<br />
--<br />
TODO: <span style="color: #cc66cc;">2</span> tasks <span style="color: #b1b100;">in</span> <span style="color: #66cc66;">/</span>Users<span style="color: #66cc66;">/</span>damonp<span style="color: #66cc66;">/</span>etc<span style="color: #66cc66;">/</span>todo.txt.</div></div>
<p>I haven&#8217;t gotten much further than adding, prioritizing and marking off items, but the builtin help shows options for archiving, reporting, appending, prepending and deleting items.</p>
 <img src="http://damonparker.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=336" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=336&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/03/28/todotxt-a-command-line-task-tracker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced OSX Mail Searches</title>
		<link>http://damonparker.org/blog/2007/03/25/advanced-osx-mail-searches/</link>
		<comments>http://damonparker.org/blog/2007/03/25/advanced-osx-mail-searches/#comments</comments>
		<pubDate>Sun, 25 Mar 2007 16:30:20 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Apple / Mac]]></category>
		<category><![CDATA[Lifehacks]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/03/25/advanced-osx-mail-searches/</guid>
		<description><![CDATA[When you live and breathe email for work and play, it can be quite important to keep messages around for reference. In my business, client and project specific correspondence is supremely important as a record of what has been done, what needs done and project cost quotes among other things. The important information usually gets [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>When you live and breathe email for work and play, it can be quite important to keep messages around for reference.  In my business, client and project specific correspondence is supremely important as a record of what has been done, what needs done and project cost quotes among other things.  The important information usually gets copied into my bug tracker, project information database and billing applications, but there is just something about the chronological nature of email that helps me follow a project.</p>
<p>What&#8217;s the point of keeping email around if you can&#8217;t accurately find the messages you are looking for?  Apple&#8217;s Mail application can be used to do some heavy lifting searches if you can think outside of the box a little.  Below are some examples of the general boolean search available directly in Mail.</p>
<p>Heads AND Tails</p>
<div class="code">heads &#038; tails</div>
<p>Heads OR Tails</p>
<div class="code">heads | tails</div>
<p>Heads but NOT Tails</p>
<div class="code">heads ! tails</div>
<p>Heads AND either Tails OR Both</p>
<div class="code">heads &#038; (tails | both)</div>
<p>While researching these search options I found some users that reported that <em>and</em>, <em>or</em> and <em>not</em> worked as well.  This is not listed in the Mail documentation and I was not able to confirm their usage.  These did not work on my machine.  For reference, I am running 10.4.9 and Mail 2.1 (752/752.2).</p>
<p>From the Mail help system:</p>
<blockquote><p>If you search the From, To, or Subject fields in selected mailboxes, Mail finds messages that contain the entire search phrase, in the order you entered the words. If you search an entire message or search in all mailboxes, Mail finds only messages containing words that have the same prefix (or the same beginning letters) as any of the words you entered in the Search field. The words can be in any order. For example, if you enter &#8220;box&#8221; in the Search field, the results would include &#8220;boxcar&#8221; but would not include &#8220;mailbox,&#8221; because &#8220;box&#8221; is not part of the prefix in that word.</p></blockquote>
<p>The help document also mentions that any IMAP accounts need to be configured to &#8220;Keep copies of messages for offline viewing&#8221;.  This setting is configured from the <em>Advanced</em> tab of the <em>Accounts</em> pane in <em>Mail Preferences</em>.  The default is to cache &#8220;All messages and their attachments.&#8221;  I use &#8220;All messages but omit their attachments.&#8221;  I would like to use &#8220;Only messages I&#8217;ve read,&#8221; as that would omit all of the uncaught spam and messages that get deleted without being read, but from my tests that option still caches the attachments.  I think caching attachments is a waste of bandwidth and local disk space, plus it doesn&#8217;t fit in with my normal usage.  When I get an important attachment, I download it to a local folder, either a client folder to keep with the rest of the client data or to my general downloads folder where it can be dealt with and deleted when no longer needed.</p>
<p>I have been using a beta version of <a href="http://www.indev.ca/MailTags.html" rel="external">MailTags</a> for a month now and am finding it more and more invaluable in tracking project and client emails.  It adds customizable fields to messages so may easily tag a message with a project name or add notes to a message and adds to the built-in Mail search so you can search by these tags specifically.  It also integrates nicely with OSX&#8217;s Calendar application, allowing you to create To Do items directly from the MailTags pane in a message.</p>
<p>Another searching option is to create a Smart Mailbox with your search parameters.  Smart Mailboxes can be used to mix and match multiple search parameters in the same search.  Don&#8217;t be shy about creating a Smart Mailbox to do a one-off search.  Wouldn&#8217;t it be faster to create a Smart Mailbox, use it to find your messages and delete it afterwards than to manually search for a message for twenty minutes?  You can also create a Smart Mailbox to pre-select a group of messages, say by including all messages from all of the parties involved in a particular project and then using Mail&#8217;s basic search over that Smart Mailbox to find only those messages that contain a particular keyword.</p>
<p>There are some shortcomings I find in Mail&#8217;s search and Smart Mailbox implementations.  My biggest beef is that Mail won&#8217;t let you Cmd-select multiple locations to do a keyword search over.  For instance, you cannot search for an email address that appears in the From or To fields.  You can do separate searches for both and manually merge them in your head or setup a Smart Mailbox to do the task.  </p>
<p>The Smart Mailbox implementation is also crippled in that you can only select messages by all the criterion you supply or by any single criteria not some of these but none of those.  This can be overcome by using multiple Smart Mailboxes, one to select all of the messages you want and a second mailbox to deselect the ones you don&#8217;t need that happen to fall in to the first mailbox.  </p>
<p>Say you would like all messages from a particular domain except the general address info@domain.com.  First create the deselect mailbox that finds all messages from info@domain.com, then create a second Smart Mailbox that selects all messages from domain.com and add a second criteria to it that says &#8220;Mail is not in mailbox&#8221; and choose the deselect Smart Mailbox you created.  This is a simplistic example that can be overcome by creating a box that manually selects all messages from user1@domain.com &#8230; userN@domain.com, but that would require you to know all of the addresses and key them in.</p>
<p>All in all Mail&#8217;s searching implementation is powerful if you know the right tricks.  Have some more Mail search tricks?  Post via the comments below.</p>
 <img src="http://damonparker.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=310" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=310&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/03/25/advanced-osx-mail-searches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Code Search</title>
		<link>http://damonparker.org/blog/2007/03/09/google-code-search/</link>
		<comments>http://damonparker.org/blog/2007/03/09/google-code-search/#comments</comments>
		<pubDate>Fri, 09 Mar 2007 21:21:17 +0000</pubDate>
		<dc:creator>damonp</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://damonparker.org/blog/2007/03/09/google-code-search/</guid>
		<description><![CDATA[Bad code haunts you forever&#8230; Google Code Search]]></description>
			<content:encoded><![CDATA[<p></p><p>Bad code haunts you forever&#8230; <a href="http://www.google.com/codesearch" rel="external">Google Code Search</a></p>
<p><!-- ckey="57F64664" --></p>
 <img src="http://damonparker.org/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=321" width="1" height="1" style="display: none;" /><img src="http://damonparker.org/?ak_action=api_record_view&id=321&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://damonparker.org/blog/2007/03/09/google-code-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using xcache
Database Caching 75/91 queries in 0.011 seconds using xcache
Content Delivery Network via cdn.damonparker.org/q9i5a4w8/cds/dp

Served from: damonparker.org @ 2012-02-04 13:45:04 -->
