<?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>Jason Filley - SnakeLegs &#187; Main</title>
	<atom:link href="http://www.snakelegs.org/category/main/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.snakelegs.org</link>
	<description>Upon thy belly shalt thou go....</description>
	<lastBuildDate>Mon, 10 Oct 2011 03:12:18 +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>Catching Flies With Alice</title>
		<link>http://www.snakelegs.org/2011/09/19/catching-flies-with-alice/</link>
		<comments>http://www.snakelegs.org/2011/09/19/catching-flies-with-alice/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 04:19:56 +0000</pubDate>
		<dc:creator>Jason Filley</dc:creator>
				<category><![CDATA[Main]]></category>

		<guid isPermaLink="false">http://www.snakelegs.org/?p=565</guid>
		<description><![CDATA[Back in the day, I worked in Alzheimer&#8217;s units in nursing homes.  My favorite patient &#8212; or &#8216;resident&#8217; &#8212; was Alice, who couldn&#8217;t remember my name, though she recognized me and was very friendly.  Her medication had her manic, and she was forever walking restlessly.  She once had a cut on her knee, and she <a href='http://www.snakelegs.org/2011/09/19/catching-flies-with-alice/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Back in the day, I worked in Alzheimer&#8217;s units in nursing homes.  My favorite patient &#8212; or &#8216;resident&#8217; &#8212; was Alice, who couldn&#8217;t remember my name, though she recognized me and was very friendly.  Her medication had her manic, and she was forever walking restlessly.  She once had a cut on her knee, and she got in and out of bed so frequently that I could count the blood polka dots on the edge of the bed.</p>
<p>The Alzheimer&#8217;s unit had 8&#8242; drop ceilings, and there were usually flies on the ceiling [classy joint].  So, I&#8217;d fill up a cup with water and add a little detergent.  Alice and I would walk up and down the long main hall, and when I saw a fly on the ceiling I&#8217;d lift the cup up slowly under the fly, and the fly would drop into the cup, get trapped by the detergent, and squirm to death.  I&#8217;d hold the cup down for Alice to watch, and she got a kick out of it.  We spent <em>hours</em> walking up and down that hall, holding hands and catching flies [the other residents decided to sleep].  It was the easiest way to keep her calm.</p>
<p>This weekend, my sleeping schedule got screwed up, and at midnight I ended up grabbing a book of the shelf for a good re-read.  The book is &#8220;God Bless You, Mr. Rosewater,&#8221; by Kurt Vonnegut Jr., of course, and I hadn&#8217;t read it since high school.  Plugging along, I got to page 78:</p>
<blockquote><p><em>&#8220;The tumbler-and-soapsuds techniqe worked like this:  A woman would look for a fly hanging upside down.  She would then bring her tumbler of suds directly under the fly very slowly, taking advantage of the fact that an upside-down fly, when approached by danger, will drop striaght down two inches or more, in a free fall, before using his wings.  Ideally, the fly would not sense danger until it was directly below him, and he would obligingly drop into the suds to be caught, to work his way down through the bubbles, to drown.&#8221;</em></p>
<p><em>&#8220;Of this technique Eliot often said: &#8216;Nobody believes it until she tries it.  Once she finds out it works, she never wants to quit.&#8217;&#8221;</em></p></blockquote>
<p>So <em><span style="text-decoration: underline;">that&#8217;s</span></em> where I picked that up!  What an unexpected surprise!  Nostalgia &#8230;. catching flies with Alice&#8230;&#8230;</p>
<p>Alice&#8217;s doctor played around with her medication, and there was about a two week period where Alice was lucid and could remember my name.  &#8220;Alice, do you know my name?&#8221;  &#8220;Jason,&#8221; and she&#8217;d smile like she was a six-year-old who just got a new bicycle.  Then she went downhill and ended up in the hospital.  I went to visit her every day, but she was near death and couldn&#8217;t even open her eyes.  The nurses put a respirator mask over her mouth, to keep out the flies.  She died pretty shortly after entering the hospital.</p>
<p>How strange that as I approach 40, one of my fondest memories is the hours spent with a 70-year-old woman with dementia, who couldn&#8217;t remember my name, walking up and down the hall, holding hands, catching flies in a cup of dishwater&#8230;..</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snakelegs.org/2011/09/19/catching-flies-with-alice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete Old Files with PowerShell</title>
		<link>http://www.snakelegs.org/2011/08/22/delete-old-files-with-powershell/</link>
		<comments>http://www.snakelegs.org/2011/08/22/delete-old-files-with-powershell/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 02:10:26 +0000</pubDate>
		<dc:creator>Jason Filley</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Main]]></category>

		<guid isPermaLink="false">http://www.snakelegs.org/?p=545</guid>
		<description><![CDATA[On UNIX, it&#8217;s simple to delete matching files in a directory, over a certain age (e.g., all .txt files over 2 days old): find /some/directory -type f -ctime +2 -name \*.txt -exec rm -f '{}' \; On Windows, it&#8217;s ridiculously complicated.  Here&#8217;s a PowerShell script, modified from somewhere&#8230;.: $a = Get-ChildItem 'C:\Temp\subdir\*' -include *.txt if ($a.count <a href='http://www.snakelegs.org/2011/08/22/delete-old-files-with-powershell/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>On UNIX, it&#8217;s simple to delete matching files in a directory, over a certain age (e.g., all .txt files over 2 days old):</p>
<pre><span style="color: #0000ff;">find /some/directory -type f -ctime +2 -name \*.txt -exec rm -f '{}' \;</span></pre>
<p>On Windows, it&#8217;s ridiculously complicated.  Here&#8217;s a PowerShell script, modified from somewhere&#8230;.:</p>
<pre><span style="color: #0000ff;">$a = Get-ChildItem 'C:\Temp\subdir\*' -include *.txt</span>
<span style="color: #0000ff;">if ($a.count -gt 1) {</span>
<span style="color: #0000ff;">    foreach($x in $a) {</span>
<span style="color: #0000ff;">        $y = ((Get-Date) - $x.CreationTime).Days</span>
<span style="color: #0000ff;">        if ($y -gt 7 -and $x.PsISContainer -ne $True) {</span>
<span style="color: #008000;">            #$x.Delete()  #uncomment here to delete</span>
<span style="color: #0000ff;">            Write-Host $x</span>
<span style="color: #0000ff;">        }</span>
<span style="color: #0000ff;">    }</span>
<span style="color: #0000ff;">}</span></pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snakelegs.org/2011/08/22/delete-old-files-with-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Miscellany</title>
		<link>http://www.snakelegs.org/2011/08/19/miscellany/</link>
		<comments>http://www.snakelegs.org/2011/08/19/miscellany/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 17:26:12 +0000</pubDate>
		<dc:creator>Jason Filley</dc:creator>
				<category><![CDATA[Main]]></category>

		<guid isPermaLink="false">http://www.snakelegs.org/?p=539</guid>
		<description><![CDATA[1) Rather odd to see a sickle and hammer on a Microsoft employee&#8217;s contact info: &#160;   &#160; 2) When I see an ad for 5hourenergydrink.com, I think of RFC 1123 (http://www.faqs.org/rfcs/rfc1123.html).  Does that make me some sort of geek? &#8220;The syntax of a legal Internet host name was specified in RFC-952 [DNS:4].  One aspect of host <a href='http://www.snakelegs.org/2011/08/19/miscellany/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>1) Rather odd to see a sickle and hammer on a Microsoft employee&#8217;s contact info:</p>
<p>&nbsp;</p>
<p> <a href="http://www.snakelegs.org/wp-content/uploads/2011/08/msft_sickle_and_hammer.png"><img class="aligncenter size-full wp-image-540" title="msft_sickle_and_hammer" src="http://www.snakelegs.org/wp-content/uploads/2011/08/msft_sickle_and_hammer.png" alt="" width="480" height="360" /></a></p>
<p>&nbsp;</p>
<p>2) When I see an ad for 5hourenergydrink.com, I think of RFC 1123 (<a href="http://www.faqs.org/rfcs/rfc1123.html">http://www.faqs.org/rfcs/rfc1123.html</a>).  Does that make me some sort of geek?</p>
<p>&#8220;The syntax of a legal Internet host name was specified in <a href="http://www.faqs.org/rfcs/rfc952.html">RFC-952</a> [DNS:4].  One aspect of host name syntax is hereby changed: the restriction on the first character is relaxed to allow either a       letter or a digit.  Host software MUST support this more liberal syntax.&#8221;  And 3com rejoiced.</p>
<p>3) In tuxedo pants, there&#8217;s a hole in the top of the pockets so you can pull down your shirt to unwrinkle it.  Why don&#8217;t they have those in other pants/jeans?  It&#8217;s mighty convenient.</p>
<p>4) You never see Frequently Unasked Questions.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snakelegs.org/2011/08/19/miscellany/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNS Load Balancing</title>
		<link>http://www.snakelegs.org/2011/07/03/dns-load-balancing/</link>
		<comments>http://www.snakelegs.org/2011/07/03/dns-load-balancing/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 22:44:41 +0000</pubDate>
		<dc:creator>Jason Filley</dc:creator>
				<category><![CDATA[Main]]></category>

		<guid isPermaLink="false">http://www.snakelegs.org/?p=529</guid>
		<description><![CDATA[A &#8220;Poor Man&#8217;s Load Balancer&#8221; is just publishing multiple DNS records for the same resource. However, it doesn&#8217;t really work, and it certainly doesn&#8217;t work the way novices expect it to. The publishing DNS server can give them in any order, or it may give them in a specific order, or it might give different <a href='http://www.snakelegs.org/2011/07/03/dns-load-balancing/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>A &#8220;Poor Man&#8217;s Load Balancer&#8221; is just publishing multiple DNS records for the same resource.  However, it doesn&#8217;t really work, and it certainly doesn&#8217;t work the way novices expect it to.  The publishing DNS server can give them in any order, or it may give them in a specific order, or it might give different result sets to different clients, or any intervening caching server my truncate or reorder results, or your client OS may want to sort result sets its own way, or your application may cache and sort its own results.  Different resolver libraries handle results differently, and you can get different results by which function your application calls (getaddrinfo? gethostbyname? IPv4 or IPv6?).</p>
<p>Relevant links</p>
<ul>
<li><a href="http://tenereillo.com./GSLBPageOfShame.htm">Why DNS Based Global Server Load Balancing (GSLB) Doesnt Work</a></li>
<li><a href="http://tenereillo.com/BrowserDNSCache.htm">Overview of DNS Caching In Browsers &#8211; Addendum to Why DNS Based GSLB Doesnt Work</a></li>
<li><a href="http://marc.info/?l=openbsd-cvs&amp;m=124414529431601&amp;w=2">&#8216;Re  CVS  cvs.openbsd.org  src&#8217; &#8211; MARC</a></li>
<li><a href="http://lists.debian.org/debian-glibc/2006/02/msg00270.html">Bug#340514  marked as done (libc6  dns resolver sort ip address list)</a></li>
<li><a href="http://blogs.technet.com/b/networking/archive/2009/04/17/dns-round-robin-and-destination-ip-address-selection.aspx">DNS Round Robin and Destination IP address selection &#8211; Microsoft Enterprise Networking Team &#8211; Site Home &#8211; TechNet Blogs</a></li>
<li><a href="http://etutorials.org/Networking/Integrated+cisco+and+unix+network+architectures/Chapter+12.+Designing+for+High+Availability/DNS+Shuffle+Records+and+Round-Robin+DNS+RR/">DNS Shuffle Records and Round-Robin (DNS RR)    Chapter 12. Designing for High Availability    Integrated cisco and unix network architectures    Networking    eTutorials.org</a></li>
<li><a href="http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/dns-round-robin-is-useless.html">FGA  The uselessness of Round Robin  resource record set shuffling</a></li>
<li><a href="http://cr.yp.to/djbdns/balance.html">djbdns &#8211; How to balance load among many web servers</a></li>
<li><a href="http://www.ietf.org/mail-archive/web/tls/current/msg07143.html">Re  [TLS] Server Name Indication (SNI) in an IPv6 world </a></li>
<li><a href="http://linux.die.net/man/5/resolv.conf">resolv.conf(5)  resolver config file &#8211; Linux man page</a></li>
<li><a href="http://www.kutukupret.com/2010/08/24/test-the-round-robin-dns-features-of-the-resolver-functions/">test the round robin DNS features of the resolver functions » KutuKupret</a></li>
<li><a href="http://www.tylek.org/?p=33">What is DNS round robin and subnet prioritization </a></li>
<li><a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;968920">Windows Vista and Windows Server 2008 DNS clients do not honor DNS round robin by default</a></li>
<li><a href="http://web2.minasi.com/forum/topic.asp?TOPIC_ID=3388">Mark Minasi&#8217;s Reader Forum &#8211; DNS resolution order</a></li>
<li><a href="http://www.minasi.com/forum/topic.asp?whichpage=1&amp;TOPIC_ID=19595">Mark Minasi&#8217;s Reader Forum &#8211; Name Resolution Order</a></li>
<li><a href="http://wiki.blitzed.org/DNS_balancing">DNS balancing</a></li>
<li><a href="http://zytrax.com/books/dns/ch7/queries.html#rrset-order">BIND&#8217;s rrset-order statement</a></li>
<li><a href="http://support.microsoft.com/kb/263558">How Internet Explorer uses the cache for DNS host entries</a></li>
<li><a href="http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B318803">How to Disable Client-Side DNS Caching in Windows XP and Windows Server 2003</a></li>
<li><a href="http://www.isc.org/software/bind/documentation/arm94">BIND 9.4 Manual &#8211; Load Balancing</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.snakelegs.org/2011/07/03/dns-load-balancing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>squid and adzapper miscellany</title>
		<link>http://www.snakelegs.org/2011/05/08/squid-and-adzapper-miscellany/</link>
		<comments>http://www.snakelegs.org/2011/05/08/squid-and-adzapper-miscellany/#comments</comments>
		<pubDate>Sun, 08 May 2011 17:38:24 +0000</pubDate>
		<dc:creator>Jason Filley</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Main]]></category>

		<guid isPermaLink="false">http://www.snakelegs.org/?p=523</guid>
		<description><![CDATA[File:  squid.zip Miscellany.  Overview diagram in Visio and PNG.  adzapper postmatch.  squid examples to redirect based on source IP.  squid tee.  Wiki squid/adzapper template.  Wiki template for Java client config file (you&#8217;d be surprised how many people don&#8217;t know about it&#8230;).]]></description>
			<content:encoded><![CDATA[<p>File:  <a href="http://www.snakelegs.org/squid.zip">squid.zip</a></p>
<p>Miscellany.  Overview diagram in Visio and PNG.  adzapper postmatch.  squid examples to redirect based on source IP.  squid tee.  Wiki squid/adzapper template.  Wiki template for Java client config file (you&#8217;d be surprised how many people don&#8217;t know about it&#8230;).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snakelegs.org/2011/05/08/squid-and-adzapper-miscellany/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drawing Protocol, Packet, Sequence, State, and General Diagrams</title>
		<link>http://www.snakelegs.org/2011/03/11/drawing-protocol-packet-sequence-state-and-general-diagrams/</link>
		<comments>http://www.snakelegs.org/2011/03/11/drawing-protocol-packet-sequence-state-and-general-diagrams/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 05:58:25 +0000</pubDate>
		<dc:creator>Jason Filley</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Main]]></category>

		<guid isPermaLink="false">http://www.snakelegs.org/?p=512</guid>
		<description><![CDATA[Here&#8217;s the quickest way I&#8217;ve found to produce good diagrams for certain types of technical diagrams.  You can export them to SVG or EPS and use them in most anything. Protocol Diagrams (packet diagrams): use the LaTeX bytefield package.  It&#8217;s easy. Sequence Diagrams: use Mscgen.  Easier than Graphviz on this. Graphs (general): use Graphviz. And <a href='http://www.snakelegs.org/2011/03/11/drawing-protocol-packet-sequence-state-and-general-diagrams/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the quickest way I&#8217;ve found to produce good diagrams for certain types of technical diagrams.  You can export them to SVG or EPS and use them in most anything.</p>
<p><strong>Protocol Diagrams (packet diagrams)</strong>: use the LaTeX <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/bytefield/">bytefield</a> package.  It&#8217;s easy.</p>
<p><strong>Sequence Diagrams</strong>: use <a href="http://www.mcternan.me.uk/mscgen/">Mscgen</a>.  Easier than <a href="https://mailman.research.att.com/pipermail/graphviz-interest/2005q2/002301.html">Graphviz</a> on this.</p>
<p><strong>Graphs</strong> (general): use <a href="http://www.graphviz.org/">Graphviz</a>. And the <a href="http://search.cpan.org/dist/GraphViz/">Perl module</a> generally makes life easier.</p>
<p><strong>State Diagrams</strong>: use <a href="http://www.graphviz.org/content/fsm">Graphviz</a>, or <a href="http://www.texample.net/tikz/examples/state-machine/">Tikz</a>.  Tikz is intimidating, but state diagrams are simple enough.</p>
<p><strong>General drawing</strong>: try <a href="http://inkscape.org/">Inkscape</a>, and don&#8217;t forget <a href="http://www.openclipart.org/">OpenClipArt.org</a>.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snakelegs.org/2011/03/11/drawing-protocol-packet-sequence-state-and-general-diagrams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Password</title>
		<link>http://www.snakelegs.org/2011/02/25/my-password/</link>
		<comments>http://www.snakelegs.org/2011/02/25/my-password/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 04:24:46 +0000</pubDate>
		<dc:creator>Jason Filley</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Main]]></category>

		<guid isPermaLink="false">http://www.snakelegs.org/?p=509</guid>
		<description><![CDATA[It&#8217;s terrible practice, I know, but my password is the name of my dog.  My dog&#8217;s name is H^7a(;tQ.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s terrible practice, I know, but my password is the name of my dog.  My dog&#8217;s name is H^7a(;tQ.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snakelegs.org/2011/02/25/my-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Performance on Terminal Services RDP 7.1</title>
		<link>http://www.snakelegs.org/2011/02/22/flash-performance-on-terminal-services-rdp-7-1/</link>
		<comments>http://www.snakelegs.org/2011/02/22/flash-performance-on-terminal-services-rdp-7-1/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 19:37:27 +0000</pubDate>
		<dc:creator>Jason Filley</dc:creator>
				<category><![CDATA[Main]]></category>

		<guid isPermaLink="false">http://www.snakelegs.org/?p=506</guid>
		<description><![CDATA[[This is a followup to my 2008 post on Flash performance over RDP.] Windows Server 2008 R2 Service Pack 1 is being released to the masses today, and the graphics improvements Microsoft picked up when they bought Calista are now released as RemoteFX.  This RDP 7.1 update should provide better display performance for those forced <a href='http://www.snakelegs.org/2011/02/22/flash-performance-on-terminal-services-rdp-7-1/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>[This is a followup to <a href="http://www.snakelegs.org/2008/10/14/flash-performance-on-terminal-services-rdp/">my 2008 post on Flash performance over RDP</a>.]</p>
<p>Windows Server 2008 R2 Service Pack 1 is being released to the masses  today, and the graphics improvements Microsoft picked up when they  bought Calista are now released as <a href="http://www.microsoft.com/windowsserver2008/en/us/rds-remotefx.aspx">RemoteFX</a>.  This RDP 7.1 update should  provide better display performance for those forced by a cruel and  uncaring universe to make Adobe Flash available over RDP over  broadband.  One hopes.</p>
<p>The most effective course of action remains to block Flash  advertisements at the proxy server (squid + adzapper, or <a href="http://www.privoxy.org/">Privoxy</a>), and  require the user to enable Flash when needed.  If the Flash file (.swf, say) is blocked, multiply all your performance hits by 0 &#8212; there&#8217;s nothing to transfer or optimize.  Block all the junk you don&#8217;t need.</p>
<p>Notes&#8230;..<br />
<span id="more-506"></span><br />
<a href="http://www.ie7pro.com/">IE7Pro</a> has worked well on 2003, but it doesn&#8217;t work properly on 2008R2, and development is closed (and stagnated?).  It shouldn&#8217;t be so difficult&#8230;.</p>
<h1>Globally Disable and Enable Flash</h1>
<p><a href="http://flash.melameth.com/">Toggle Flash</a> is an IE plug-in that toggles Flash (clear enough).</p>
<p>Changing a registry entry is all that&#8217;s required to enable and disable Flash. (see below)</p>
<p>Possibly, on terminal server login, disable Flash.  User must explicitly re-enable it.</p>
<p>Powershell (scripting out loud&#8230;.)</p>
<pre>&lt;# flashwatch.ps1
Enable flash.  Hang around a while and after 15 minutes or so, keep an eye on Internet Explorer.  
If IE isn't running, disable Flash again.todo: make sure only one copy of this script is running
per user.#&gt;

function flash-disable {
 $RegKey ="HKCU:\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\{D27CDB6E-AE6D-11CF-96B8-444553540000}"
 Set-ItemProperty -path $RegKey -name Flags -value 1
}

function flash-enable {
 $RegKey ="HKCU:\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\{D27CDB6E-AE6D-11CF-96B8-444553540000}"
 Set-ItemProperty -path $RegKey -name Flags -value 0
}

flash-enable
sleep -s 900

$keeprunning = $true
while ($keeprunning) {
 if ((Get-Process "iexplore" -ea SilentlyContinue) -eq $Null){
   flash-disable
   $keeprunning = $false
 }
 else {
   sleep -s 60
 }
}</pre>
<p>A timestamp would be better.  Enable -&gt; write timestamp.  Have periodic job check if time is expired (<a href="http://technet.microsoft.com/en-us/library/ee176916.aspx">New-Timespan</a>), and disable Flash after. Powershell is awkward.  It&#8217;s odd when Perl is easier&#8230;.</p>
<h1>Limit Flash to Specific Domains</h1>
<h2>IE 8 &#8211; per-site ActiveX Control</h2>
<p>Per-Site ActiveX Controls<br />
<a href="http://msdn.microsoft.com/en-us/library/dd433050%28VS.85%29.aspx">http://msdn.microsoft.com/en-us/library/dd433050%28VS.85%29.aspx</a></p>
<p>How to Disable Adobe Flash Animations for All but White-Listed Sites in Internet Explorer 8<br />
<a href="http://www.winhelponline.com/blog/disable-flash-all-but-whitelist-sites-ie8/">http://www.winhelponline.com/blog/disable-flash-all-but-whitelist-sites-ie8/</a></p>
<p>regedit /s flash_allow.reg</p>
<p>[flash_allow.reg]<br />
Windows Registry Editor Version 5.00<br />
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{D27CDB6E-AE6D-11CF-96B8-444553540000}\iexplore\AllowedDomains\youtube.com]</p>
<p>The user can just say &#8220;run on all sites&#8221; so you may have to regularly remove<br />
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{D27CDB6E-AE6D-11CF-96B8-444553540000}\iexplore\AllowedDomains\*]</p>
<p>Problems with Per-Site ActiveX Controls</p>
<ul>
<li> Annoying information bar which is IMPOSSIBLE TO SHUT UP.</li>
<li>User can just add all sites.</li>
<li>Setting is per-user setting, so it&#8217;s a PIA to restrict to specific machines (GP loopback).</li>
</ul>
<h2>IE 9 &#8211; ActiveX Filtering</h2>
<p>IE 9 (currently at RC) is set to include ActiveX Filtering, enabling you  to restrict ActiveX controls to certain domains.  But it&#8217;s apparently  global. You can restrict or allow <em>all </em>ActiveX controls on certain sites, but you  can&#8217;t restrict individual controls.  It would be desirable to be able  to restrict the Flash plug-in to youtube.com, or to restrict <a href="http://www.alternatiff.com/">AlternaTIFF</a> to designated sites.  Being able to  specify these per machine would be better yet.  This looks passably adequate.</p>
<p><a href="http://ie.microsoft.com/testdrive/Browser/ActiveXFiltering/About.html">About ActiveX Filtering</a></p>
<p>&#8220;Sites you have not approved cannot run these controls, and the browser  <strong>will not show prominent notifications prompting you to install or enable  them</strong>.&#8221;  Hallelujah, Brother.</p>
<p><a href="http://www.ditii.com/2011/02/10/how-to-manage-your-internet-explorer-9-activex-filtering-exceptions/">How To Manage Your Internet Explorer 9 ActiveX Filtering Exceptions</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snakelegs.org/2011/02/22/flash-performance-on-terminal-services-rdp-7-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RFC Map (rfcmap.pl)</title>
		<link>http://www.snakelegs.org/2011/02/12/rfc-map-rfcmap-pl/</link>
		<comments>http://www.snakelegs.org/2011/02/12/rfc-map-rfcmap-pl/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 01:47:05 +0000</pubDate>
		<dc:creator>Jason Filley</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Main]]></category>

		<guid isPermaLink="false">http://www.snakelegs.org/?p=493</guid>
		<description><![CDATA[rfcmap.pl parses the RFC index and produces Graphviz output. For example, here&#8217;s the output for &#8220;perl -T rfcmap.pl RFC0821 RFC0822 RFC1035&#8243; which covers some of the initial documents on SMTP, mail message format, and domain  names. Could be better; could be worse. # Copyright (c) 2011 Jason Filley jason@snakelegs.org # # Permission to use, copy, <a href='http://www.snakelegs.org/2011/02/12/rfc-map-rfcmap-pl/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>rfcmap.pl parses the <a href="ftp://ftp.rfc-editor.org/in-notes/rfc-ref.txt">RFC index</a> and produces <a href="http://www.graphviz.org/">Graphviz</a> output.</p>
<p>For example, here&#8217;s the output for &#8220;perl -T rfcmap.pl RFC0821 RFC0822 RFC1035&#8243; which covers some of the initial documents on SMTP, mail message format, and domain  names.</p>
<p><a href="http://www.snakelegs.org/wp-content/uploads/2011/02/email_and_domains.png"><img class="aligncenter size-medium wp-image-494" title="email_and_domains" src="http://www.snakelegs.org/wp-content/uploads/2011/02/email_and_domains-235x300.png" alt="" width="235" height="300" /></a></p>
<p>Could be better; could be worse.</p>
<p><span id="more-493"></span></p>
<pre><tt><em><span style="color: #9a1900;"># Copyright (c) 2011 Jason Filley jason@snakelegs.org</span></em>
<em><span style="color: #9a1900;">#</span></em>
<em><span style="color: #9a1900;"># Permission to use, copy, modify, and distribute this software for any</span></em>
<em><span style="color: #9a1900;"># purpose with or without fee is hereby granted, provided that the above</span></em>
<em><span style="color: #9a1900;"># copyright notice and this permission notice appear in all copies.</span></em>
<em><span style="color: #9a1900;">#</span></em>
<em><span style="color: #9a1900;"># THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES</span></em>
<em><span style="color: #9a1900;"># WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF</span></em>
<em><span style="color: #9a1900;"># MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR</span></em>
<em><span style="color: #9a1900;"># ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</span></em>
<em><span style="color: #9a1900;"># WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span></em>
<em><span style="color: #9a1900;"># ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF</span></em>
<em><span style="color: #9a1900;"># OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</span></em>
<em><span style="color: #9a1900;">#</span></em>
<em><span style="color: #9a1900;"># Name: rfcmap.pl</span></em>
<em><span style="color: #9a1900;"># Purpose: Output Graphviz .dot format for dated graph of specified RFC's, plus</span></em>
<em><span style="color: #9a1900;">#   documents obsoleting or obsoleted by it/them.</span></em>
<em><span style="color: #9a1900;"># Input file:  ftp://ftp.rfc-editor.org/in-notes/rfc-ref.txt</span></em>
<em><span style="color: #9a1900;"># Usage example:  perl -T rfcmap.pl RFC1035 RFC0821 RFC0822 &gt; output.dot</span></em>
<em><span style="color: #9a1900;">#   arguments are names of documents from first column, as written</span></em>

<strong><span style="color: #0000ff;">use</span></strong> strict<span style="color: #990000;">;</span>
<strong><span style="color: #0000ff;">use</span></strong> warnings<span style="color: #990000;">;</span>
<strong><span style="color: #0000ff;">use</span></strong> <span style="color: #993399;">5.010</span><span style="color: #990000;">;</span>

<strong><span style="color: #0000ff;">if</span></strong> <span style="color: #990000;">(</span> <span style="color: #009900;">$#ARGV</span> <span style="color: #990000;">&lt;</span> <span style="color: #993399;">0</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">die</span></strong> <span style="color: #ff0000;">"Specify the RFC's to use as command-line parameters\n"</span><span style="color: #990000;">;</span>
<span style="color: #ff0000;">}</span>

<strong><span style="color: #0000ff;">sub</span></strong> stripwhitespace <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$string</span> <span style="color: #990000;">=</span> <strong><span style="color: #0000ff;">shift</span></strong><span style="color: #990000;">;</span>
    <span style="color: #009900;">$string</span> <span style="color: #990000;">=~</span> <strong><span style="color: #0000ff;">s</span></strong><span style="color: #ff6600;">/[\n\r\s]+//</span><strong><span style="color: #0000ff;">g</span></strong><span style="color: #990000;">;</span>
    <strong><span style="color: #0000ff;">return</span></strong> <span style="color: #009900;">$string</span><span style="color: #990000;">;</span>
<span style="color: #ff0000;">}</span>

<strong><span style="color: #0000ff;">sub</span></strong> trim <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$a</span> <span style="color: #990000;">=</span> <strong><span style="color: #0000ff;">shift</span></strong><span style="color: #990000;">;</span>
    <span style="color: #009900;">$a</span> <span style="color: #990000;">=~</span> <strong><span style="color: #0000ff;">s</span></strong><span style="color: #ff6600;">/^[\n\r\s]+//</span><strong><span style="color: #0000ff;">g</span></strong><span style="color: #990000;">;</span>
    <span style="color: #009900;">$a</span> <span style="color: #990000;">=~</span> <strong><span style="color: #0000ff;">s</span></strong><span style="color: #ff6600;">/[\n\r\s]+$//</span><strong><span style="color: #0000ff;">g</span></strong><span style="color: #990000;">;</span>
    <strong><span style="color: #0000ff;">return</span></strong> <span style="color: #009900;">$a</span><span style="color: #990000;">;</span>
<span style="color: #ff0000;">}</span>

<strong><span style="color: #0000ff;">sub</span></strong> grabyear <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$year</span> <span style="color: #990000;">=</span> <strong><span style="color: #0000ff;">shift</span></strong><span style="color: #990000;">;</span>
    <span style="color: #009900;">$year</span> <span style="color: #990000;">=~</span> <span style="color: #ff0000;">/(\d{4})\.$/</span><span style="color: #990000;">;</span>
    <strong><span style="color: #0000ff;">return</span></strong> <span style="color: #009900;">$1</span><span style="color: #990000;">;</span>
<span style="color: #ff0000;">}</span>

<strong><span style="color: #0000ff;">sub</span></strong> uniq <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">%h</span><span style="color: #990000;">;</span>
    <strong><span style="color: #0000ff;">return</span></strong> <strong><span style="color: #0000ff;">grep</span></strong> <span style="color: #ff0000;">{</span> <span style="color: #990000;">!</span><span style="color: #009900;">$h</span><span style="color: #ff0000;">{</span><span style="color: #009900;">$_</span><span style="color: #ff0000;">}</span><span style="color: #990000;">++</span> <span style="color: #ff0000;">}</span> <span style="color: #009900;">@_</span><span style="color: #990000;">;</span>
<span style="color: #ff0000;">}</span>

<strong><span style="color: #0000ff;">sub</span></strong> GetTitleOnly <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$title</span> <span style="color: #990000;">=</span> <strong><span style="color: #0000ff;">shift</span></strong><span style="color: #990000;">;</span>
    <span style="color: #009900;">$title</span> <span style="color: #990000;">=~</span> <span style="color: #ff0000;">/([A-Za-z]*)(0*)(\d*)/</span><span style="color: #990000;">;</span>
    <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$toreturn</span> <span style="color: #990000;">=</span> <span style="color: #009900;">$1</span> <span style="color: #990000;">.</span> <span style="color: #ff0000;">" "</span> <span style="color: #990000;">.</span> <span style="color: #009900;">$3</span><span style="color: #990000;">;</span>
    <strong><span style="color: #0000ff;">return</span></strong> <span style="color: #009900;">$toreturn</span><span style="color: #990000;">;</span>
<span style="color: #ff0000;">}</span>

<strong><span style="color: #0000ff;">sub</span></strong> GetFullTitle <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$title</span> <span style="color: #990000;">=</span> <strong><span style="color: #0000ff;">shift</span></strong><span style="color: #990000;">;</span>
    <span style="color: #009900;">$title</span> <span style="color: #990000;">=~</span> <span style="color: #ff0000;">/(\"(.*)\\\")/</span><span style="color: #990000;">;</span>
    <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$toreturn</span> <span style="color: #990000;">=</span> <span style="color: #009900;">$2</span><span style="color: #990000;">;</span>
    <strong><span style="color: #0000ff;">return</span></strong> <span style="color: #009900;">$toreturn</span><span style="color: #990000;">;</span>
<span style="color: #ff0000;">}</span>

<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">@lines</span>   <span style="color: #990000;">=</span> <span style="color: #990000;">();</span>
<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">@todo</span>    <span style="color: #990000;">=</span> <span style="color: #990000;">();</span>
<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">@done</span>    <span style="color: #990000;">=</span> <span style="color: #990000;">();</span>
<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">@final</span>   <span style="color: #990000;">=</span> <span style="color: #990000;">();</span>
<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">%srcHoA</span>  <span style="color: #990000;">=</span> <span style="color: #990000;">();</span>
<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">%srcbib</span>  <span style="color: #990000;">=</span> <span style="color: #990000;">();</span>
<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">%srcdate</span> <span style="color: #990000;">=</span> <span style="color: #990000;">();</span>

<strong><span style="color: #0000ff;">push</span></strong><span style="color: #990000;">(</span> <span style="color: #009900;">@todo</span><span style="color: #990000;">,</span> <span style="color: #009900;">@ARGV</span> <span style="color: #990000;">);</span>
<span style="color: #009900;">@todo</span> <span style="color: #990000;">=</span> <strong><span style="color: #000000;">uniq</span></strong><span style="color: #990000;">(</span><span style="color: #009900;">@todo</span><span style="color: #990000;">);</span>

<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$file</span> <span style="color: #990000;">=</span> <span style="color: #ff0000;">"rfc-ref.txt"</span><span style="color: #990000;">;</span>

<strong><span style="color: #0000ff;">open</span></strong><span style="color: #990000;">(</span> RFCREF<span style="color: #990000;">,</span> <span style="color: #ff0000;">"&lt;$file"</span> <span style="color: #990000;">)</span> <span style="color: #990000;">||</span> <strong><span style="color: #0000ff;">die</span></strong> <span style="color: #ff0000;">"Can't open file.\n"</span><span style="color: #990000;">;</span>
<strong><span style="color: #0000ff;">while</span></strong> <span style="color: #990000;">(</span><span style="color: #ff0000;">&lt;RFCREF&gt;</span><span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">if</span></strong> <span style="color: #990000;">(</span><span style="color: #ff0000;">/^RFC/</span><span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
        <strong><span style="color: #0000ff;">push</span></strong><span style="color: #990000;">(</span> <span style="color: #009900;">@lines</span><span style="color: #990000;">,</span> <span style="color: #009900;">$_</span> <span style="color: #990000;">);</span>
    <span style="color: #ff0000;">}</span>
<span style="color: #ff0000;">}</span>
<strong><span style="color: #0000ff;">close</span></strong><span style="color: #990000;">(</span>RFCREF<span style="color: #990000;">);</span>

<em><span style="color: #9a1900;"># link all references</span></em>
<strong><span style="color: #0000ff;">while</span></strong> <span style="color: #990000;">(</span> <strong><span style="color: #000000;">scalar</span></strong><span style="color: #990000;">(</span><span style="color: #009900;">@todo</span><span style="color: #990000;">)</span> <span style="color: #990000;">&gt;</span> <span style="color: #993399;">0</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$item</span> <span style="color: #990000;">=</span> <strong><span style="color: #0000ff;">shift</span></strong><span style="color: #990000;">(</span><span style="color: #009900;">@todo</span><span style="color: #990000;">);</span>
    <strong><span style="color: #0000ff;">foreach</span></strong> <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$entry</span> <span style="color: #990000;">(</span><span style="color: #009900;">@lines</span><span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
        <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">@line</span> <span style="color: #990000;">=</span> <strong><span style="color: #0000ff;">split</span></strong><span style="color: #990000;">(</span> <span style="color: #ff0000;">'\|'</span><span style="color: #990000;">,</span> <span style="color: #009900;">$entry</span> <span style="color: #990000;">);</span>
        <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$RFC</span> <span style="color: #990000;">=</span> <strong><span style="color: #000000;">stripwhitespace</span></strong><span style="color: #990000;">(</span> <span style="color: #009900;">$line</span><span style="color: #990000;">[</span><span style="color: #993399;">0</span><span style="color: #990000;">]</span> <span style="color: #990000;">);</span>

        <em><span style="color: #9a1900;">#hash of arrays (RFC -&gt; @ObsoletedByList)</span></em>
        <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$ObsoletedBy</span> <span style="color: #990000;">=</span> <strong><span style="color: #000000;">stripwhitespace</span></strong><span style="color: #990000;">(</span> <span style="color: #009900;">$line</span><span style="color: #990000;">[</span><span style="color: #993399;">1</span><span style="color: #990000;">]</span> <span style="color: #990000;">);</span>
        <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">@ObsoletedByList</span> <span style="color: #990000;">=</span> <strong><span style="color: #0000ff;">split</span></strong><span style="color: #990000;">(</span> <span style="color: #ff0000;">','</span><span style="color: #990000;">,</span> <span style="color: #009900;">$ObsoletedBy</span> <span style="color: #990000;">);</span>
        <span style="color: #009900;">$srcHoA</span><span style="color: #ff0000;">{</span><span style="color: #009900;">$RFC</span><span style="color: #ff0000;">}</span> <span style="color: #990000;">=</span> <span style="color: #990000;">[</span><span style="color: #009900;">@ObsoletedByList</span><span style="color: #990000;">];</span>

        <em><span style="color: #9a1900;">#hash (RFC -&gt; Bib)</span></em>
        <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$Bib</span> <span style="color: #990000;">=</span> <span style="color: #009900;">$line</span><span style="color: #990000;">[</span><span style="color: #993399;">2</span><span style="color: #990000;">];</span>
        <strong><span style="color: #0000ff;">chomp</span></strong> <span style="color: #009900;">$Bib</span><span style="color: #990000;">;</span>
        <span style="color: #009900;">$Bib</span> <span style="color: #990000;">=</span> <strong><span style="color: #000000;">trim</span></strong><span style="color: #990000;">(</span><span style="color: #009900;">$Bib</span><span style="color: #990000;">);</span>
        <span style="color: #009900;">$Bib</span> <span style="color: #990000;">=~</span> <strong><span style="color: #0000ff;">s</span></strong><span style="color: #ff6600;">/(\")/\\$1/</span><strong><span style="color: #0000ff;">g</span></strong><span style="color: #990000;">;</span>
        <span style="color: #009900;">$srcbib</span><span style="color: #ff0000;">{</span><span style="color: #009900;">$RFC</span><span style="color: #ff0000;">}</span> <span style="color: #990000;">=</span> <span style="color: #009900;">$Bib</span><span style="color: #990000;">;</span>

        <em><span style="color: #9a1900;">#hash (RFC -&gt; date)</span></em>
        <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">@working</span> <span style="color: #990000;">=</span> <span style="color: #990000;">();</span>
        <strong><span style="color: #0000ff;">push</span></strong><span style="color: #990000;">(</span> <span style="color: #009900;">@working</span><span style="color: #990000;">,</span> <span style="color: #009900;">$RFC</span> <span style="color: #990000;">);</span>
        <strong><span style="color: #0000ff;">push</span></strong><span style="color: #990000;">(</span> <span style="color: #009900;">@working</span><span style="color: #990000;">,</span> <span style="color: #009900;">@ObsoletedByList</span> <span style="color: #990000;">);</span>

        <strong><span style="color: #0000ff;">if</span></strong> <span style="color: #990000;">(</span> <span style="color: #009900;">$item</span> <span style="color: #990000;">~~</span> <span style="color: #009900;">@working</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
            <strong><span style="color: #0000ff;">unless</span></strong> <span style="color: #990000;">(</span> <span style="color: #009900;">$entry</span> <span style="color: #990000;">~~</span> <span style="color: #009900;">@final</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
                <strong><span style="color: #0000ff;">push</span></strong><span style="color: #990000;">(</span> <span style="color: #009900;">@final</span><span style="color: #990000;">,</span> <span style="color: #009900;">$entry</span> <span style="color: #990000;">);</span>    <em><span style="color: #9a1900;">#only if not already in @final</span></em>
                <span style="color: #009900;">$srcdate</span><span style="color: #ff0000;">{</span><span style="color: #009900;">$RFC</span><span style="color: #ff0000;">}</span> <span style="color: #990000;">=</span> <strong><span style="color: #000000;">grabyear</span></strong><span style="color: #990000;">(</span><span style="color: #009900;">$Bib</span><span style="color: #990000;">);</span>
            <span style="color: #ff0000;">}</span>

            <strong><span style="color: #0000ff;">foreach</span></strong> <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$workitem</span> <span style="color: #990000;">(</span><span style="color: #009900;">@working</span><span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
                <strong><span style="color: #0000ff;">unless</span></strong> <span style="color: #990000;">(</span> <span style="color: #990000;">(</span> <span style="color: #009900;">$workitem</span> <span style="color: #990000;">~~</span> <span style="color: #009900;">@done</span> <span style="color: #990000;">)</span> <span style="color: #990000;">||</span> <span style="color: #990000;">(</span> <span style="color: #009900;">$workitem</span> <span style="color: #990000;">~~</span> <span style="color: #009900;">@todo</span> <span style="color: #990000;">)</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
                    <strong><span style="color: #0000ff;">push</span></strong><span style="color: #990000;">(</span> <span style="color: #009900;">@todo</span><span style="color: #990000;">,</span> <span style="color: #009900;">$workitem</span> <span style="color: #990000;">);</span>
                <span style="color: #ff0000;">}</span>
            <span style="color: #ff0000;">}</span>
        <span style="color: #ff0000;">}</span>
    <span style="color: #ff0000;">}</span>
    <span style="color: #009900;">@todo</span> <span style="color: #990000;">=</span> <strong><span style="color: #0000ff;">grep</span></strong> <span style="color: #ff0000;">{</span> <span style="color: #009900;">$_</span> ne <span style="color: #009900;">$item</span> <span style="color: #ff0000;">}</span> <span style="color: #009900;">@todo</span><span style="color: #990000;">;</span>
    <strong><span style="color: #0000ff;">push</span></strong><span style="color: #990000;">(</span> <span style="color: #009900;">@done</span><span style="color: #990000;">,</span> <span style="color: #009900;">$item</span> <span style="color: #990000;">);</span>
<span style="color: #ff0000;">}</span>

<em><span style="color: #9a1900;"># find lowest to highest quoted years (e.g., 1981..2010)</span></em>
<em><span style="color: #9a1900;"># todo: what if only one year?</span></em>
<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$highest_val</span> <span style="color: #990000;">=</span> <span style="color: #990000;">(</span> <strong><span style="color: #0000ff;">sort</span></strong> <span style="color: #ff0000;">{</span> <span style="color: #009900;">$b</span> <span style="color: #ff0000;">&lt;=&gt;</span> <span style="color: #009900;">$a</span> <span style="color: #ff0000;">}</span> <strong><span style="color: #0000ff;">values</span></strong> <span style="color: #009900;">%srcdate</span> <span style="color: #990000;">)[</span><span style="color: #993399;">0</span><span style="color: #990000;">];</span>
<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$lowest_val</span>  <span style="color: #990000;">=</span> <span style="color: #990000;">(</span> <strong><span style="color: #0000ff;">sort</span></strong> <span style="color: #ff0000;">{</span> <span style="color: #009900;">$a</span> <span style="color: #ff0000;">&lt;=&gt;</span> <span style="color: #009900;">$b</span> <span style="color: #ff0000;">}</span> <strong><span style="color: #0000ff;">values</span></strong> <span style="color: #009900;">%srcdate</span> <span style="color: #990000;">)[</span><span style="color: #993399;">0</span><span style="color: #990000;">];</span>
<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">@dates</span> <span style="color: #990000;">=</span> <span style="color: #990000;">(</span> <span style="color: #009900;">$lowest_val</span> <span style="color: #990000;">..</span> <span style="color: #009900;">$highest_val</span> <span style="color: #990000;">);</span>

<em><span style="color: #9a1900;"># draw the graph</span></em>
<em><span style="color: #9a1900;"># A: Because I didn't have the time to figure out why the Graphviz perl module</span></em>
<em><span style="color: #9a1900;"># kept munging my ranks....</span></em>
<strong><span style="color: #0000ff;">print</span></strong>
<span style="color: #ff0000;">"digraph test { graph [ratio=fill, fontsize=24];\nnode [label=\"\\N\", fontsize=24];\n"</span><span style="color: #990000;">;</span>

<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$yearnodes</span><span style="color: #990000;">;</span>
<strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$yearedges</span><span style="color: #990000;">;</span>    <em><span style="color: #9a1900;">#what if only one?</span></em>

<em><span style="color: #9a1900;">#draw the years</span></em>
<strong><span style="color: #0000ff;">for</span></strong> <span style="color: #990000;">(</span> <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$count</span> <span style="color: #990000;">=</span> <span style="color: #993399;">0</span> <span style="color: #990000;">;</span> <span style="color: #009900;">$count</span> <span style="color: #990000;">&lt;=</span> <span style="color: #009900;">$#dates</span> <span style="color: #990000;">;</span> <span style="color: #009900;">$count</span><span style="color: #990000;">++</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
    <span style="color: #009900;">$yearnodes</span> <span style="color: #990000;">.=</span>
      <span style="color: #009900;">$dates</span><span style="color: #990000;">[</span><span style="color: #009900;">$count</span><span style="color: #990000;">]</span> <span style="color: #990000;">.</span> <span style="color: #ff0000;">" [label="</span> <span style="color: #990000;">.</span> <span style="color: #009900;">$dates</span><span style="color: #990000;">[</span><span style="color: #009900;">$count</span><span style="color: #990000;">]</span> <span style="color: #990000;">.</span> <span style="color: #ff0000;">", shape=plaintext];\n"</span><span style="color: #990000;">;</span>
    <strong><span style="color: #0000ff;">unless</span></strong> <span style="color: #990000;">(</span> <span style="color: #009900;">$count</span> <span style="color: #990000;">==</span> <span style="color: #993399;">0</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
        <span style="color: #009900;">$yearedges</span> <span style="color: #990000;">.=</span>
            <span style="color: #009900;">$dates</span><span style="color: #990000;">[</span> <span style="color: #009900;">$count</span> <span style="color: #990000;">-</span> <span style="color: #993399;">1</span> <span style="color: #990000;">]</span> <span style="color: #990000;">.</span> <span style="color: #ff0000;">" -&gt; "</span>
          <span style="color: #990000;">.</span> <span style="color: #009900;">$dates</span><span style="color: #990000;">[</span><span style="color: #009900;">$count</span><span style="color: #990000;">]</span>
          <span style="color: #990000;">.</span> <span style="color: #ff0000;">" [style=dotted, shape=none];\n"</span><span style="color: #990000;">;</span>
    <span style="color: #ff0000;">}</span>
<span style="color: #ff0000;">}</span>

<strong><span style="color: #0000ff;">print</span></strong> <span style="color: #009900;">$yearnodes</span><span style="color: #990000;">;</span>
<strong><span style="color: #0000ff;">print</span></strong> <span style="color: #009900;">$yearedges</span><span style="color: #990000;">;</span>

<em><span style="color: #9a1900;"># draw the bib nodes</span></em>
<strong><span style="color: #0000ff;">foreach</span></strong> <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$rfcnode</span> <span style="color: #990000;">(</span><span style="color: #009900;">@done</span><span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">if</span></strong> <span style="color: #990000;">(</span> <span style="color: #009900;">$rfcnode</span> <span style="color: #990000;">=~</span> <span style="color: #ff0000;">/^RFC/</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>

        <strong><span style="color: #0000ff;">print</span></strong> <span style="color: #009900;">$rfcnode</span>
          <span style="color: #990000;">.</span> <span style="color: #ff0000;">" [label = \""</span>
          <span style="color: #990000;">.</span> <strong><span style="color: #000000;">GetTitleOnly</span></strong><span style="color: #990000;">(</span><span style="color: #009900;">$rfcnode</span><span style="color: #990000;">)</span> <span style="color: #990000;">.</span> <span style="color: #ff0000;">"\\n"</span>
          <span style="color: #990000;">.</span> <strong><span style="color: #000000;">GetFullTitle</span></strong><span style="color: #990000;">(</span> <span style="color: #009900;">$srcbib</span><span style="color: #ff0000;">{</span><span style="color: #009900;">$rfcnode</span><span style="color: #ff0000;">}</span> <span style="color: #990000;">)</span>
          <span style="color: #990000;">.</span> <span style="color: #ff0000;">"\" shape=plaintext, style=filled, color=lightskyblue];\n"</span><span style="color: #990000;">;</span>
    <span style="color: #ff0000;">}</span>
    <strong><span style="color: #0000ff;">else</span></strong> <span style="color: #ff0000;">{</span>
        <strong><span style="color: #0000ff;">print</span></strong> <span style="color: #009900;">$rfcnode</span>
          <span style="color: #990000;">.</span> <span style="color: #ff0000;">" [label = \""</span>
          <span style="color: #990000;">.</span> <strong><span style="color: #000000;">GetTitleOnly</span></strong><span style="color: #990000;">(</span><span style="color: #009900;">$rfcnode</span><span style="color: #990000;">)</span>
          <span style="color: #990000;">.</span> <span style="color: #ff0000;">"\" shape=box, style=filled, color=mediumorchid];\n"</span><span style="color: #990000;">;</span>
    <span style="color: #ff0000;">}</span>
<span style="color: #ff0000;">}</span>

<em><span style="color: #9a1900;"># set ranks</span></em>
<strong><span style="color: #0000ff;">foreach</span></strong> <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$srcnode</span> <span style="color: #990000;">(</span><span style="color: #009900;">@done</span><span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">if</span></strong> <span style="color: #990000;">(</span> <span style="color: #009900;">$srcnode</span> <span style="color: #990000;">=~</span> <span style="color: #ff0000;">/^RFC/</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
        <strong><span style="color: #0000ff;">print</span></strong> <span style="color: #ff0000;">"{rank=same; "</span> <span style="color: #990000;">.</span> <span style="color: #009900;">$srcnode</span> <span style="color: #990000;">.</span> <span style="color: #ff0000;">" "</span> <span style="color: #990000;">.</span> <span style="color: #009900;">$srcdate</span><span style="color: #ff0000;">{</span><span style="color: #009900;">$srcnode</span><span style="color: #ff0000;">}</span> <span style="color: #990000;">.</span> <span style="color: #ff0000;">";}\n"</span><span style="color: #990000;">;</span>
    <span style="color: #ff0000;">}</span>
<span style="color: #ff0000;">}</span>

<em><span style="color: #9a1900;"># draw the edges</span></em>
<strong><span style="color: #0000ff;">foreach</span></strong> <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$srcnode</span> <span style="color: #990000;">(</span><span style="color: #009900;">@done</span><span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
    <strong><span style="color: #0000ff;">if</span></strong> <span style="color: #990000;">(</span> <span style="color: #009900;">$srcnode</span> <span style="color: #990000;">=~</span> <span style="color: #ff0000;">/^RFC/</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
        <strong><span style="color: #0000ff;">if</span></strong> <span style="color: #990000;">(</span> @<span style="color: #ff0000;">{</span> <span style="color: #009900;">$srcHoA</span><span style="color: #ff0000;">{</span><span style="color: #009900;">$srcnode</span><span style="color: #ff0000;">}</span> <span style="color: #ff0000;">}</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
            <strong><span style="color: #0000ff;">foreach</span></strong> <strong><span style="color: #0000ff;">my</span></strong> <span style="color: #009900;">$ref</span> <span style="color: #990000;">(</span> @<span style="color: #ff0000;">{</span> <span style="color: #009900;">$srcHoA</span><span style="color: #ff0000;">{</span><span style="color: #009900;">$srcnode</span><span style="color: #ff0000;">}</span> <span style="color: #ff0000;">}</span> <span style="color: #990000;">)</span> <span style="color: #ff0000;">{</span>
                <strong><span style="color: #0000ff;">print</span></strong> <span style="color: #009900;">$srcnode</span> <span style="color: #990000;">.</span> <span style="color: #ff0000;">" -&gt; "</span> <span style="color: #990000;">.</span> <span style="color: #009900;">$ref</span> <span style="color: #990000;">.</span> <span style="color: #ff0000;">";\n"</span><span style="color: #990000;">;</span>
            <span style="color: #ff0000;">}</span>
        <span style="color: #ff0000;">}</span>
    <span style="color: #ff0000;">}</span>
<span style="color: #ff0000;">}</span>

<em><span style="color: #9a1900;">#close the graph</span></em>
<strong><span style="color: #0000ff;">print</span></strong> <span style="color: #ff0000;">"}\n"</span>

</tt></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.snakelegs.org/2011/02/12/rfc-map-rfcmap-pl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PageUp System Requirements</title>
		<link>http://www.snakelegs.org/2011/02/09/pageup-system-requirements/</link>
		<comments>http://www.snakelegs.org/2011/02/09/pageup-system-requirements/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 07:07:38 +0000</pubDate>
		<dc:creator>Jason Filley</dc:creator>
				<category><![CDATA[Main]]></category>

		<guid isPermaLink="false">http://www.snakelegs.org/?p=490</guid>
		<description><![CDATA[Page-Ups are the handiest little gadgets.  Watch out for the shipping costs.  Especially look out to make sure you meet the minimum system requirements.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mypageup.com/">Page-Ups</a> are the handiest little gadgets.  Watch out for the shipping costs.  Especially look out to make sure you meet the minimum system requirements.</p>
<p><a href="http://www.snakelegs.org/wp-content/uploads/2011/02/pageup.png"><img class="aligncenter size-full wp-image-491" title="pageup" src="http://www.snakelegs.org/wp-content/uploads/2011/02/pageup.png" alt="" width="628" height="482" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.snakelegs.org/2011/02/09/pageup-system-requirements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

