<?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>All the way from Cambridge &#187; Note to self</title>
	<atom:link href="http://blog.pc-tony.com/category/note-to-self/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.pc-tony.com</link>
	<description></description>
	<lastBuildDate>Thu, 20 Oct 2011 23:35:57 +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>[Note2Self] &#8211; Regex match multiple blocks</title>
		<link>http://blog.pc-tony.com/2011/08/note2self-regex-match-multiple-blocks/</link>
		<comments>http://blog.pc-tony.com/2011/08/note2self-regex-match-multiple-blocks/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 21:34:45 +0000</pubDate>
		<dc:creator>pctony</dc:creator>
				<category><![CDATA[Note to self]]></category>

		<guid isPermaLink="false">http://blog.pc-tony.com/?p=307</guid>
		<description><![CDATA[pattern =&#62; &#8216;^[a-z][a-z0-9_]{1,15}$&#8217; &#160; &#160;]]></description>
			<content:encoded><![CDATA[<p>pattern =&gt; &#8216;^[a-z][a-z0-9_]{1,15}$&#8217;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pc-tony.com/2011/08/note2self-regex-match-multiple-blocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ps on Solaris cut at 80 chars, no longer&#8230;</title>
		<link>http://blog.pc-tony.com/2011/05/ps-on-solaris-cut-at-80-chars-well-no-longer/</link>
		<comments>http://blog.pc-tony.com/2011/05/ps-on-solaris-cut-at-80-chars-well-no-longer/#comments</comments>
		<pubDate>Sun, 01 May 2011 22:47:17 +0000</pubDate>
		<dc:creator>pctony</dc:creator>
				<category><![CDATA[Note to self]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.pc-tony.com/?p=296</guid>
		<description><![CDATA[If like me you always forget that Solaris will trim the output of the command in ps to 80 chars, you will know just how annoying it can be.  Well I finally found a half decent way of seeing the &#8230; <a href="http://blog.pc-tony.com/2011/05/ps-on-solaris-cut-at-80-chars-well-no-longer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If like me you always forget that Solaris will trim the output of the command in ps to 80 chars, you will know just how annoying it can be.  Well I finally found a half decent way of seeing the full args to a command.</p>
<blockquote><p>ps -eo pid | xargs pargs -l</p></blockquote>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pc-tony.com/2011/05/ps-on-solaris-cut-at-80-chars-well-no-longer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mutt &#8211; Mark all messages as read</title>
		<link>http://blog.pc-tony.com/2010/10/mutt-mark-all-messages-as-read/</link>
		<comments>http://blog.pc-tony.com/2010/10/mutt-mark-all-messages-as-read/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 00:07:47 +0000</pubDate>
		<dc:creator>pctony</dc:creator>
				<category><![CDATA[Note to self]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[note to self]]></category>

		<guid isPermaLink="false">http://blog.pc-tony.com/?p=204</guid>
		<description><![CDATA[So, for as good as mutt is, it doesn&#8217;t have a default keybinding to allow you to mark all messages in a given mail folder as read.  It&#8217;s easily do-able, all you need todo is create a macro. macro index &#8230; <a href="http://blog.pc-tony.com/2010/10/mutt-mark-all-messages-as-read/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So, for as good as mutt is, it doesn&#8217;t have a default keybinding to allow you to mark all messages in a given mail folder as read.  It&#8217;s easily do-able, all you need todo is create a macro.</p>
<blockquote>
<pre>macro index M "T.*\n;WN" "Mark all messages as read"</pre>
</blockquote>
<p>That&#8217;s it. Simple eh?  This will make an &#8220;M&#8221; keystroke mark all messages in the current folder (in the index view) as read.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pc-tony.com/2010/10/mutt-mark-all-messages-as-read/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Postfix + SASL + Dovecot</title>
		<link>http://blog.pc-tony.com/2009/06/postfix-sasl-dovecot/</link>
		<comments>http://blog.pc-tony.com/2009/06/postfix-sasl-dovecot/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 10:48:44 +0000</pubDate>
		<dc:creator>pctony</dc:creator>
				<category><![CDATA[email]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Note to self]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.pc-tony.com/?p=153</guid>
		<description><![CDATA[After trying to find a way to make my postfix installation allow authenticated users (over TLS will come later) relay mail using SASL, on a CentOS machine using only CentOS packages I discovered it was not as easy as I &#8230; <a href="http://blog.pc-tony.com/2009/06/postfix-sasl-dovecot/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After trying to find a way to make my postfix installation allow authenticated users (over TLS will come later) relay mail using SASL, on a CentOS machine using only CentOS packages I discovered it was not as easy as I may have liked.</p>
<p>So after installing cyrus-sasl, postfix and dovecot all I needed to do was:</p>
<p>Edit /etc/postfix/main.cf  &#8211; At the end of your configuration add:</p>
<blockquote><p>smtpd_sasl_auth_enable = yes<br />
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination<br />
smtpd_sasl_security_options = noanonymous<br />
smtpd_sasl_type = dovecot<br />
smtpd_sasl_path = private/auth</p></blockquote>
<p>Don&#8217;t forget that postfix by default runs in it&#8217;s own chroot jail, so the smptd_sasl_path above is relative to the postfix root. So in my case on CentOS 5 that equates to &#8220;/var/spool/postfix/private/auth&#8221;</p>
<p>Now go on and edit your /etc/dovecot.conf file.  Find the lines</p>
<blockquote><p>userdb passwd {<br />
}</p></blockquote>
<p>Then add this immediately below it</p>
<blockquote><p>socket listen {<br />
client {<br />
path = /var/spool/postfix/private/auth<br />
mode = 0660<br />
user = postfix<br />
group = postfix<br />
}<br />
}</p></blockquote>
<p>Now all you need to do is restart postfix, dovecot and (re)start saslauthd</p>
<blockquote><p>/etc/init.d/postfix restart<br />
/etc/init.d/dovecot restart<br />
/etc/init.d/saslauthd restart</p></blockquote>
<p>If you now telnet to your mail server on port 25, and use EHLO you should be able to see the following</p>
<blockquote><p>ehlo me<br />
250-your.server.domain.com<br />
250-PIPELINING<br />
250-SIZE 10240000<br />
250-VRFY<br />
250-ETRN<br />
250-AUTH PLAIN LOGIN<br />
250-ENHANCEDSTATUSCODES<br />
250-8BITMIME<br />
250 DSN</p></blockquote>
<p>My next posting will include details on how to extend this to include the use of TLS</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pc-tony.com/2009/06/postfix-sasl-dovecot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Self induced regex coma</title>
		<link>http://blog.pc-tony.com/2008/10/self-induced-regex-coma/</link>
		<comments>http://blog.pc-tony.com/2008/10/self-induced-regex-coma/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 01:48:47 +0000</pubDate>
		<dc:creator>pctony</dc:creator>
				<category><![CDATA[Note to self]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://blog.pc-tony.com/?p=59</guid>
		<description><![CDATA[Tonight I had a need to produce some output to be used in conjunction with Apache HTTPD&#8217;s mod_autoindex. This site will eventually have frequent updates, so we wanted to use HEADER.html to show the recent changes, and making them links &#8230; <a href="http://blog.pc-tony.com/2008/10/self-induced-regex-coma/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Tonight I had a need to produce some output to be used in conjunction with Apache HTTPD&#8217;s <code>mod_autoindex.</code><br />
This site will eventually have frequent updates, so we wanted to use HEADER.html to show the recent changes, and making them links to make getting to those updates even easier.</p>
<p>Using <code>ls -1td /path/to/files/*/* </code> we get the output of the all content. We then pipe that through head, to essentially count the number of rows we want to show.</p>
<p>Finally we use <code>sed</code> a few times, to remove the file system paths that don&#8217;t relate to URL path, add the appropriate html tags, and using backreferences we re-use the matched string.</p>
<p>So what we have ended up with is :</p>
<blockquote><p><code>ls -1td /foo/*/* | head -n 3 | sed -r s/[^\e]foo// | sed -r s/\(.*\)/\&lt;li\&gt;\&lt;a\ href=\"\\1\"\&gt;\\1/ | sed -r s/$/\&lt;\\/li\&gt;/  </code></p></blockquote>
<p>So lets break this down.</p>
<blockquote><p><code> sed -r s/[^\e]foo// </code>  &#8211;  This essentially strips the leading file system path that doesn&#8217;t relate to the webpath.</p></blockquote>
<blockquote><p><code>sed -r s/\(.*\)/\&lt;li\&gt;\&lt;a\ href=\"\\1\"\&gt;\\1/  </code> &#8211;  This function essentialy takes the entire string, as is from the previous replacment, it then prepends the &lt;li&gt; and &lt;a href&gt; tags.</p>
<p><code> sed -r s/$/\&lt;\\/li\&gt;/  </code> &#8211;  This bit adds the trailing &lt;/li&gt; tag.</p></blockquote>
<p>So we go from</p>
<blockquote><p> <code> # ls -1td /foo/*/*</code></p>
<p><code> </code><code>/foo/Audio/Audio_track-1.mp3<br />
/foo/Audio/Audio_track-2.mp3 </code></p></blockquote>
<p>To</p>
<blockquote><p>&lt;li&gt;&lt;a href=&#8221;/Audio/Audio_track-1.mp3&#8243;&gt;/Audio/VAudio_track-1.mp3&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#8221;/Audio/Audio_track-2.mp3&#8243;&gt;/Audio/VAudio_track-2.mp3&lt;/li&gt;</p>
<div></div>
</blockquote>
<p>This is a little more complex than what I have had to deal with in the past. Granted to some of you this may be a simple task, but us Windows folks do things the hard way.  Whilst I am it, I don&#8217;t claim that this the best, or most technically accurate way of achieving the required results.  It has however taught me several new regex methods, such as back references, and that has to be a good thing, right?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pc-tony.com/2008/10/self-induced-regex-coma/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash on a TS/Citrix Server</title>
		<link>http://blog.pc-tony.com/2008/09/flash-on-a-tscitrix-server/</link>
		<comments>http://blog.pc-tony.com/2008/09/flash-on-a-tscitrix-server/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 15:33:48 +0000</pubDate>
		<dc:creator>pctony</dc:creator>
				<category><![CDATA[Note to self]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.pc-tony.com/?p=50</guid>
		<description><![CDATA[I have been battling to get this working, properly when deployed on a Windows 2003 SP2 or above server. Earlier this afternoon I found this article buried in the Adobe forum, guess what, it works!  Much to my amazement.   &#8230; <a href="http://blog.pc-tony.com/2008/09/flash-on-a-tscitrix-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been battling to get this working, properly when deployed on a Windows 2003 SP2 or above server.<br />
Earlier this afternoon I found this article buried in the Adobe forum, guess what, it works!  Much to my amazement.  </p>
<p>One for the &#8216;note-to-self&#8217; category</p>
<p> </p>
<ol>
<li>Download the latest Flash uninstaller on <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14157&amp;sliceId=1">this page</a>, and place it somewhere on your hard disk (C:\Temp is a good place)</li>
<li>Open a  command prompt, navigate to the folder where you placed the uninstaller and run  it with the &#8220;/clean&#8221; option, like this: &#8220;uninstall_flash_player.exe /clean&#8221;  (without quotes &#8211; thanks Adobe for so clearly documenting any command line  options for this tool&#8230;NOT !)</li>
<li>Click the Details button. If it lists any  files as &#8220;Delete on reboot&#8221;, then reboot now. Otherwise, just carry on.</li>
<li>Download the EXE installation package from <a href="http://www.adobe.com/support/flashplayer/ts/documents/tn_19166/Install_Flash_Player_9_ActiveX.zip">here</a></li>
<li>Use the Control Panel Add/Remove programs method to install it. This ensures  that the Windows install notification API triggers correctly (as opposed to  executing change user /install in a command prompt).</li>
<li>Use regedit and find  the following key: HKCR\CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000} (on 64-bit  Windows this one is located under  HKCR\Wow6432Node\CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000})</li>
<li>Remove any  permissions for the Everyone group. click Advanced and tick the box to propagate  the permissions to all child objects.</li>
<li>Add the Everyone group and give it  &#8220;Read&#8221; permissions on the key. Again, click the Advanced button and propagate  the permissions to all child objects.</li>
<li>Repeat steps 6 to 8 on the  subsequent key, called HKCR\CLSID\{D27CDB70-AE6D-11cf-96B8-444553540000}</li>
</ol>
<div>Works like a charm, now I have TS server that is grinding to a halt with all the Flash and Shockwave content running. Bah.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.pc-tony.com/2008/09/flash-on-a-tscitrix-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Vista failed to activate&#8230;</title>
		<link>http://blog.pc-tony.com/2008/08/vista-failed-to-activate/</link>
		<comments>http://blog.pc-tony.com/2008/08/vista-failed-to-activate/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 20:12:36 +0000</pubDate>
		<dc:creator>pctony</dc:creator>
				<category><![CDATA[Note to self]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.pc-tony.com/?p=35</guid>
		<description><![CDATA[Bah! Windows popped up today and told me I may have been using illegal version of Microsoft software. Whaaaaat? This is a $work installation of Vista. Using the VLK.  The error I was presented with is : Code: 0x8007232B Description: &#8230; <a href="http://blog.pc-tony.com/2008/08/vista-failed-to-activate/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Bah!</p>
<p>Windows popped up today and told me I may have been using illegal version of Microsoft software. Whaaaaat? This is a $work installation of Vista. Using the VLK.  The error I was presented with is :</p>
<p>Code: 0x8007232B<br />
Description: DNS name does not exist.</p>
<p>Odd, I had no other issues with name resolution.  A lot of google bashing resulted in one suggested error that during the initial install the network drivers failed to load quickly enough to complete the activation process. Resulting in this limbo state.</p>
<p>The Fix: Right click my computer, select &#8220;Re Enter My Product Key&#8221; &#8211; Do this and allow the process to complete.  Voilla! All works fine now.  Phew!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pc-tony.com/2008/08/vista-failed-to-activate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Publishing Citrix with ISA 2006</title>
		<link>http://blog.pc-tony.com/2008/07/publishing-citrix-with-isa-2006/</link>
		<comments>http://blog.pc-tony.com/2008/07/publishing-citrix-with-isa-2006/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 12:07:23 +0000</pubDate>
		<dc:creator>pctony</dc:creator>
				<category><![CDATA[Note to self]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.pc-tony.com/?p=31</guid>
		<description><![CDATA[Remember, remember the fifth of November that when publishing any applications using Citrix over HTTP to disable the ISA filter that does on the fly HTTP compression.  Leaving this enabled will cause ICA sessions to randomly fail due to the &#8230; <a href="http://blog.pc-tony.com/2008/07/publishing-citrix-with-isa-2006/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Remember, remember <span style="text-decoration: line-through;">the fifth of November</span> that when publishing any applications using Citrix over HTTP to disable the ISA filter that does on the fly HTTP compression.  Leaving this enabled will cause ICA sessions to randomly fail due to the web server not correctly decompressing the data.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pc-tony.com/2008/07/publishing-citrix-with-isa-2006/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uninstall Exchange 2003, in a Mixed Environment</title>
		<link>http://blog.pc-tony.com/2008/07/uninstall-exchange-2003-in-a-mixed-environment/</link>
		<comments>http://blog.pc-tony.com/2008/07/uninstall-exchange-2003-in-a-mixed-environment/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 21:55:19 +0000</pubDate>
		<dc:creator>pctony</dc:creator>
				<category><![CDATA[Note to self]]></category>

		<guid isPermaLink="false">http://blog.pc-tony.com/?p=28</guid>
		<description><![CDATA[When removing an Exchange 2003 Server, from a mixed environment do the following to get the last mailbox enabled accounts: Fire up ADUC Use find, at the domain level. Change to the Advanced Tab Use the field function to select: &#8230; <a href="http://blog.pc-tony.com/2008/07/uninstall-exchange-2003-in-a-mixed-environment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When removing an Exchange 2003 Server, from a mixed environment do the following to get the last mailbox enabled accounts:</p>
<ul>
<li>Fire up ADUC</li>
<li>Use find, at the domain level.</li>
<li>Change to the Advanced Tab</li>
<li>Use the field function to select: User &gt; Exchange Home Server</li>
<li>Then change condition to: Ends With</li>
<li>Enter the name of you mail server, in the value field.</li>
<li>Click Add</li>
<li>Click Find</li>
<li>Select all mailboxes, and either move or remove Exchange Attributes</li>
</ul>
<p>This took me the best part of 15 minutes on how to complete.  Bloody thing!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pc-tony.com/2008/07/uninstall-exchange-2003-in-a-mixed-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

