<?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>Brain Goo &#187; Software</title>
	<atom:link href="http://www.popmartian.com/tipsntricks/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.popmartian.com/tipsntricks</link>
	<description>Carpe Crap 'em</description>
	<lastBuildDate>Mon, 10 Oct 2011 14:42:08 +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>Python HOWTO Push a Dict on to a List (push a hash on to an array)</title>
		<link>http://www.popmartian.com/tipsntricks/2010/04/23/python-howto-push-a-dict-on-to-a-list-push-a-hash-on-to-an-array/</link>
		<comments>http://www.popmartian.com/tipsntricks/2010/04/23/python-howto-push-a-dict-on-to-a-list-push-a-hash-on-to-an-array/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 14:37:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How Tos]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.popmartian.com/tipsntricks/?p=159</guid>
		<description><![CDATA[One of my more popular posts is How to Push a Hash on to an Array in PERL, but how do you push a dict on to a list in Python? Lists are one-dimensional arrays and dicts are associative arrays or hash arrays.  This means we can do the same thing we do in other [...]]]></description>
			<content:encoded><![CDATA[<p>One of my more popular posts is <a href="http://www.popmartian.com/tipsntricks/2008/08/12/perl-howto-push-a-hash-onto-an-array/">How to Push a Hash on to an Array in PERL</a>, but how do you push a dict on to a list in Python?</p>
<p>Lists are one-dimensional arrays and dicts are associative arrays or hash arrays.  This means we can do the same thing we do in other languages, with syntax to match Python&#8217;s object-oriented data structures.</p>
<p><code>import pprint</code></p>
<p><code># Define the list<br />
somelist = []</code></p>
<p><code># Do add some elements to the list<br />
somelist.append({'key1':'value1', 'key2': 'value2'})<br />
somelist.append({'key1':'value1', 'key2': 'value2'})<br />
somelist.append({'key1':'value1', 'key2': 'value2'})</code></p>
<p><code># Print it out<br />
pp = pprint.PrettyPrinter(indent=4)<br />
pp.pprint(somelist)</code></p>
<p>Will give you:</p>
<p><code>[   {   'key1': 'value1', 'key2': 'value2'},<br />
{   'key1': 'value1', 'key2': 'value2'},<br />
{   'key1': 'value1', 'key2': 'value2'}]</code></p>
<blockquote><p>Did you find this post useful or have questions or comments?  Please let  me know!</p></blockquote>
<img src="http://www.popmartian.com/tipsntricks/?ak_action=api_record_view&id=159&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.popmartian.com/tipsntricks/2010/04/23/python-howto-push-a-dict-on-to-a-list-push-a-hash-on-to-an-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PERL How To Print A List Without A Loop</title>
		<link>http://www.popmartian.com/tipsntricks/2009/02/06/perl-how-to-print-a-list-without-a-loop/</link>
		<comments>http://www.popmartian.com/tipsntricks/2009/02/06/perl-how-to-print-a-list-without-a-loop/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 16:47:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How Tos]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.popmartian.com/tipsntricks/?p=71</guid>
		<description><![CDATA[PERL has a built-in function called join() that will concatenate a list with a given string. The official perldoc states: join EXPR,LIST Joins the separate strings of LIST into a single string with fields separated by the value of EXPR, and returns that new string. Example: $rec = join(':', $login,$passwd,$uid,$gid,$gcos,$home,$shell); From the code example, you [...]]]></description>
			<content:encoded><![CDATA[<p>PERL has a built-in function called join() that will concatenate a list with a given string.  The official perldoc states:</p>
<p><em><strong>join EXPR,LIST</strong><br />
Joins the separate strings of LIST into a single string with fields separated by the value of EXPR, and returns that new string. Example:</em><br />
<code>$rec = join(':', $login,$passwd,$uid,$gid,$gcos,$home,$shell);</code></p>
<p>From the code example, you can make CSV output and all kinds of goodies, but what the doc misses and the example doesn&#8217;t show is that combining join() with a print statement makes writing lists to STDOUT or a file handle a snap.  This is where join() really shines.</p>
<p>Example:</p>
<p><em><strong>Code</strong></em><br />
<code>@names = ('Mark', 'Jim', 'Bob','Mary','Steven','Gomer');<br />
print join("\n", @names);</code></p>
<p><em><strong>Output</strong><br />
Mark<br />
Jim<br />
Bob<br />
Mary<br />
Steven<br />
Gomer</em></p>
<p>Note that this will NOT print a final or beginning string.  Join() concatenates the elements, meaning it puts the string value BETWEEN the list elements.</p>
<blockquote><p>Did you find this post useful or have questions or comments?  Please let me know!</p></blockquote>
<img src="http://www.popmartian.com/tipsntricks/?ak_action=api_record_view&id=71&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.popmartian.com/tipsntricks/2009/02/06/perl-how-to-print-a-list-without-a-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Word Press problem Unknown: Releasing SysV semaphore</title>
		<link>http://www.popmartian.com/tipsntricks/2008/07/14/word-press-releasing-sysv-semaphore/</link>
		<comments>http://www.popmartian.com/tipsntricks/2008/07/14/word-press-releasing-sysv-semaphore/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 16:20:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[How Tos]]></category>
		<category><![CDATA[offsiteHowTo]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.popmartian.com/tipsntricks/?p=21</guid>
		<description><![CDATA[If you have WordPress installed you may run in to an error that constantly prints something like this: Warning: Unknown: Releasing SysV semaphore id 58 key 0x152b in request cleanup in Unknown on line 0 This is not an error from WordPress, but from the WP Super Cache Plugin you forgot you installed. The error [...]]]></description>
			<content:encoded><![CDATA[<p>If you have WordPress installed you may run in to an error that constantly prints something like this:</p>
<p><code><b>Warning</b>:  Unknown: Releasing SysV semaphore id 58 key 0x152b in request cleanup in <b>Unknown</b> on line <b>0</b><br />
</code></p>
<p>This is not an error from WordPress, but from the <a href="http://ocaoimh.ie/wp-super-cache/">WP Super Cache</a> Plugin you forgot you installed.  The error comes when from the cache directory is not writable.</p>
<p>Change the permissions on the wp-content/cache directory to allow the web user to write and the error will disappear.</p>
<p>The solution is obvious if you check the source code on the page when the error appears.  WP Super Cache spits out the error, but it is hidden in HTML comment tags.  Your source code will look something like this:</p>
<p><code>&lt;!-- Dynamic Page Served (once) in 0.297 seconds --&gt;<br />
&lt;!-- File not cached! Super Cache Couldn't write to: wp-content/cache/wp-cache-2876abde8ce3a2aa817c8289ea85486e.html --&gt;</code></p>
<p><code>87<br />
&lt;br /&gt;<br />
&lt;b&gt;Warning&lt;/b&gt;:  Unknown: Releasing SysV semaphore id 58 key 0x152b in request cleanup in &lt;b&gt;Unknown&lt;/b&gt; on line &lt;b>0&lt;/b&gt;&lt;br /&gt;</code></p>
<img src="http://www.popmartian.com/tipsntricks/?ak_action=api_record_view&id=21&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.popmartian.com/tipsntricks/2008/07/14/word-press-releasing-sysv-semaphore/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RBLs with Exim4 (debian friendly)</title>
		<link>http://www.popmartian.com/tipsntricks/2008/01/11/rbls-with-exim4-debian-friendly/</link>
		<comments>http://www.popmartian.com/tipsntricks/2008/01/11/rbls-with-exim4-debian-friendly/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 22:44:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Email Servers]]></category>
		<category><![CDATA[Exim]]></category>
		<category><![CDATA[How Tos]]></category>
		<category><![CDATA[Mail Post]]></category>
		<category><![CDATA[RBL]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.popmartian.com/tipsntricks/2008/01/11/rbls-with-exim4-debian-friendly/</guid>
		<description><![CDATA[Denying connections based on RBLs is a snap with Exim4. Most confusion is related to ACLs and where the definition sits. The fastest way to deny based on RBL is to add it to whatever ACL you specify in acl_smtp_rcpt However, you MUST put the declaration AFTER any relay allow definitions. ACLs are based on [...]]]></description>
			<content:encoded><![CDATA[<p>Denying connections based on RBLs is a snap with Exim4.  Most confusion is related to ACLs and where the definition sits.</p>
<p>The fastest way to deny based on RBL is to add it to whatever ACL you specify in acl_smtp_rcpt</p>
<p>However, you <strong>MUST</strong> put the declaration AFTER any relay allow definitions.  ACLs are based on first-match which means they run in order and stop when they hit a match.  Implicit allow.</p>
<p>Here is my ACL declared as acl_check_rcpt</p>
<p><code></p>
<pre>
acl_check_rcpt:
  accept  hosts = :
  deny    local_parts   = ^.*[@%!/|] : ^\\.
  accept  local_parts   = postmaster
          domains       = +local_domains
  require verify        = sender
  deny    dnslists = zen.spamhaus.org
          message = Message rejected because $sender_fullhost is blacklisted at $dnslist_domain see $dnslist_text
  accept  domains       = +local_domains
          endpass
          message       = unknown user
          verify        = recipient
  accept  domains       = +relay_to_domains
          endpass
          message       = unrouteable address
          verify        = recipient
  accept  hosts         = +relay_from_hosts
  accept  authenticated = *
  deny    message       = relay not permitted
</pre>
<p></code></p>
<p>The RBL definition is toward the bottom, after we allow everyone in that we want in.  This lets people relay via SMTP-AUTH or explicit allow before checking the RBL.  If they aren&#8217;t allowed via anything we allow, then we check the RBL and die with a nice message.</p>
<p>Adverts:<br />
<a href="http://www.amazon.com/gp/product/0954452909?ie=UTF8&#038;tag=popma-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0954452909">The Exim SMTP Mail Server</a><img src="http://www.assoc-amazon.com/e/ir?t=popma-20&#038;l=as2&#038;o=1&#038;a=0954452909" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0596000987?ie=UTF8&#038;tag=popma-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0596000987">Exim: The Mail Transfer Agent</a><img src="http://www.assoc-amazon.com/e/ir?t=popma-20&#038;l=as2&#038;o=1&#038;a=0596000987" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0954452976?ie=UTF8&#038;tag=popma-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0954452976">The Exim SMTP Mail Server: Official Guide for Release 4</a><img src="http://www.assoc-amazon.com/e/ir?t=popma-20&#038;l=as2&#038;o=1&#038;a=0954452976" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0131478230?ie=UTF8&#038;tag=popma-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0131478230">A Practical Guide to Linux(R) Commands, Editors, and Shell Programming</a><img src="http://www.assoc-amazon.com/e/ir?t=popma-20&#038;l=as2&#038;o=1&#038;a=0131478230" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0596005652?ie=UTF8&#038;tag=popma-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0596005652">Understanding the Linux Kernel</a><img src="http://www.assoc-amazon.com/e/ir?t=popma-20&#038;l=as2&#038;o=1&#038;a=0596005652" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0596527209?ie=UTF8&#038;tag=popma-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0596527209">Ubuntu Hacks: Tips &#038; Tools for Exploring, Using, and Tuning Linux (Hacks)</a><img src="http://www.assoc-amazon.com/e/ir?t=popma-20&#038;l=as2&#038;o=1&#038;a=0596527209" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0596006284?ie=UTF8&#038;tag=popma-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0596006284">Linux Pocket Guide</a><img src="http://www.assoc-amazon.com/e/ir?t=popma-20&#038;l=as2&#038;o=1&#038;a=0596006284" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<img src="http://www.popmartian.com/tipsntricks/?ak_action=api_record_view&id=20&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.popmartian.com/tipsntricks/2008/01/11/rbls-with-exim4-debian-friendly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Poor man&#8217;s calendar server with iCal and Mozilla</title>
		<link>http://www.popmartian.com/tipsntricks/2007/07/25/poor-mans-calendar-server-with-ical-and-mozilla/</link>
		<comments>http://www.popmartian.com/tipsntricks/2007/07/25/poor-mans-calendar-server-with-ical-and-mozilla/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 18:54:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Calendaring]]></category>
		<category><![CDATA[How Tos]]></category>
		<category><![CDATA[iCal]]></category>
		<category><![CDATA[lightning]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Sunbird]]></category>
		<category><![CDATA[thunderbird]]></category>
		<category><![CDATA[WebDav]]></category>

		<guid isPermaLink="false">http://www.popmartian.com/tipsntricks/2007/07/25/poor-mans-calendar-server-with-ical-and-mozilla/</guid>
		<description><![CDATA[It&#8217;s easy to set up a shared calendar system with free software that scales well for a few users (great for a home network) and has tons of support from third parties. What you need: iCal client like Sunbird or Lightning from Mozilla Apache web server with WebDav installed How to do it: Install WebDav [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s easy to set up a shared calendar system with free software that scales well for a few users (great for a home network) and has tons of support from third parties.</p>
<p>What you need:</p>
<ul>
<li>iCal client like <a href="http://www.mozilla.org/projects/calendar/sunbird/">Sunbird</a> or <a href="http://www.mozilla.org/projects/calendar/lightning/">Lightning</a> from Mozilla</li>
<li>Apache web server with WebDav installed</li>
</ul>
<p>How to do it:</p>
<ol>
<li>Install WebDav and password protect a public directory on your web server.</li>
<li>Touch a .ics file for your calendar.  I called mine matt.ics</li>
<li>chmod the directory so the web user can create files and modify the .ics file</li>
<li>Install and configure an iCal client that can publish via WebDav.  <a href="http://www.mozilla.org/projects/calendar/sunbird/">Sunbird</a> is excellent for this.</li>
<li>Remove your local calendar from Sunbird</li>
<li>Add a calendar to Sunbird using the URL to your empty .ics file</li>
<li>Add an event to your calendar.  Sunbird should modify the .ics file on your web server.  You will probably be prompted for the username and password on the first try.</li>
<li>Add that calendar to as many clients as you want.  They can all share the calendar.  Create more calendars!  Party!</li>
</ol>
<img src="http://www.popmartian.com/tipsntricks/?ak_action=api_record_view&id=12&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.popmartian.com/tipsntricks/2007/07/25/poor-mans-calendar-server-with-ical-and-mozilla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Panic Releases Coda, and I can&#8217;t use it</title>
		<link>http://www.popmartian.com/tipsntricks/2007/05/17/panic-releases-coda-and-i-cant-use-it/</link>
		<comments>http://www.popmartian.com/tipsntricks/2007/05/17/panic-releases-coda-and-i-cant-use-it/#comments</comments>
		<pubDate>Thu, 17 May 2007 16:54:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[IDE]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.popmartian.com/tipsntricks/2007/05/17/panic-releases-coda-and-i-cant-use-it/</guid>
		<description><![CDATA[http://www.panic.com/ released Coda a web-oriented IDE that contains a terminal, FTP, SSH, etc. all rolled in to one. It looks great and I want it, but it&#8217;s Mac only. Some day&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.panic.com/">http://www.panic.com/</a> released Coda a web-oriented IDE that contains a terminal, FTP, SSH, etc. all rolled in to one.  It looks great and I want it, but it&#8217;s Mac only.  Some day&#8230;</p>
<img src="http://www.popmartian.com/tipsntricks/?ak_action=api_record_view&id=5&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.popmartian.com/tipsntricks/2007/05/17/panic-releases-coda-and-i-cant-use-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

