<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <link>http://mikewatkins.ca/tags/hacks/</link>
  <atom:link href="http://mikewatkins.ca/tags/hacks/feeds/rss" type="application/rss+xml" rel="self"/>
  <lastBuildDate>Fri, 08 Apr 2011 18:54:31 GMT</lastBuildDate>
  <title>mike watkins dot ca</title>
  <description>XML Feed for mike watkins dot ca</description>
  <language>en</language>
  <generator>Parlez/0.1</generator>
<item>
  <title>Twitter: @PMHarper follows @freepornpics</title>
  <link>http://mikewatkins.ca/2011/04/08/twitter-pmharper-follows-freepornpics/</link>
  <description><![CDATA[
<div class="document">
<div class="noborder figure">
<img alt="http://mikewatkins.ca/2011/04/08/twitter-pmharper-follows-freepornpics/file/5acd859bb4b8/" src="http://mikewatkins.ca/2011/04/08/twitter-pmharper-follows-freepornpics/file/5acd859bb4b8/" />
</div>
<p>Why is the <a class="reference external" href="http://twitter.com/#!/PMHarper">&#64;PMHarper Twitter account</a>, verified by Twitter as belonging to Stephen Harper, following the porn-industry related account <strong>&#64;freepornpics</strong>?</p>
<p>Apparently &#64;PMHarper has been following &#64;freepornpics for quite some time. In the blog <a class="reference external" href="http://jmortonmusings.blogspot.com/2010/08/pmharper-verified-follows-freepornpics.html">Morton's Musings</a>, James C Morton (a candidate for the Liberals in Oshawa) apparently first noted the connection back on August 3, 2010.</p>
<p>Sure enough, the twitter relationship is still there as of this writing. I confirmed the linkage by using the Twitter Application Program Interface to download a list of numerical user ID's -- used internally by Twitter -- relating to the followers of &#64;freepornpics, and sure enough &#64;PMHarper's id is among those ids.</p>
<p>Stephen Harper's &#64;PMHarper numerical twitter id is 7401202.
&#64;freepornpics numerical twitter id is: 38949870. With that information in hand we can search the list of numerical twitter ids for &#64;freepornpics followers to see if  &#64;PMHarper's id is within the data. It is:</p>
<pre class="literal-block">
$ curl http://twitter.com/followers/ids.xml?screen_name=freepornpics &gt;freepornpics-twitter-followers
$ grep 7401202 freepornpics-twitter-followers
&lt;id&gt;7401202&lt;/id&gt;
</pre>
<p>It will probably comfort Stephen Harper to know that &#64;freepornpics also returns the favour and follows &#64;PMHarper right back:</p>
<pre class="literal-block">
$ curl http://twitter.com/followers/ids.xml?screen_name=PMHarper &gt;pmharper-twitter-followers
$ grep 38949870 harper-twitter-followers
&lt;id&gt;38949870&lt;/id&gt;
</pre>
<p>Apparently pornographers are interested in Stephen Harper too. That's quite a big blue tent Harper has, uh, erected.</p>
<p>One doubts that Stephen Harper gets up late at night to surf the internet for porn but he ought to at least face the question.</p>
<p><em>Help yourself to the images or data!</em></p>
</div>

]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:828</guid>
  <pubDate>Fri, 08 Apr 2011 18:54:31 GMT</pubDate>
  <category>election</category>
  <category>gaffes</category>
  <category>hacks</category>
  <category>harper</category>
  <category>politics</category>
</item>
<item>
  <title>Colorized Interpreter</title>
  <link>http://mikewatkins.ca/2008/12/10/colorized-interpreter/</link>
  <description><![CDATA[
<div class="document">
<p>Antonio Cuni <a class="reference external" href="http://morepypy.blogspot.com/2008/06/pdb-and-rlcompleterng.html">yesterday posted a useful hack</a> that brings colour and improved completions to the Python interpreter.</p>
<div class="figure">
<img alt="http://64.21.147.48/tv-20081210-122107.gif" src="http://64.21.147.48/tv-20081210-122107.gif" />
</div>
<p>Attached is a minor <a class="reference external" href="http://mikewatkins.ca/2008/12/10/colorized-interpreter/file/4c90771250cd/">patch which updates</a> <tt class="docutils literal"><span class="pre">rlcompleter_ng.py</span></tt> to run on both Python 2 <em>and</em> 3 platforms.</p>
<p>On FreeBSD (and virtually every other system with a stock <tt class="docutils literal"><span class="pre">libreadline</span></tt> v 5.2) you'll need to patch <tt class="docutils literal"><span class="pre">libreadline</span></tt> - apply <a class="reference external" href="http://mikewatkins.ca/2008/12/10/colorized-interpreter/file/c105c14d5f1c/">this patch</a> to the source in <tt class="docutils literal"><span class="pre">/usr/src/contrib/libreadline</span></tt>. Don't forget to remake Python after making and installing the patched <tt class="docutils literal"><span class="pre">libreadline</span></tt>.</p>
<p>Looks lovely, thanks Antonio!</p>
</div>

]]></description>
  <guid isPermaLink="false">tag:mikewatkins.ca,2007-10-10:journal:mw:entry:682</guid>
  <pubDate>Wed, 10 Dec 2008 20:24:57 GMT</pubDate>
  <category>hacks</category>
  <category>python</category>
</item>
</channel></rss>