<?xml version="1.0"?>
<rss version="2.0"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:dcterms="http://purl.org/dc/terms/" >
<channel>
<title>blog</title>
<link>http://ertius.org//blog/</link>
<description>Rob Weir ↜ ertius.org</description>
<item>

	<title>What loads URLs posted to twitter?</title>


	<guid isPermaLink="no">http://ertius.org//blog/what-loads-urls-on-twitter/</guid>

	<link>http://ertius.org//blog/what-loads-urls-on-twitter/</link>


	<category>/tags/bots</category>

	<category>/tags/internet</category>

	<category>/tags/twitter</category>


	<pubDate>Sat, 22 Jan 2011 20:10:00 +1100</pubDate>
	<dcterms:modified>2011-05-17T10:27:58Z</dcterms:modified>

	<description>&lt;p&gt;So a little while ago (at 19:56:40) I posted a tweet containing just a
single &lt;a href=&quot;http://ertius.org/what_loads_twitter_urls&quot;&gt;url&lt;/a&gt;.  Within
seconds, I had these bots requesting the file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:128.242.241.122 - - [22/Jan/2011:19:56:43 +1100] &quot;HEAD /what_loads_twitter_urls HTTP/1.1&quot; 404 0 &quot;-&quot; &quot;Twitterbot/0.1&quot;
::ffff:128.242.241.122 - - [22/Jan/2011:19:56:43 +1100] &quot;HEAD /what_loads_twitter_urls HTTP/1.1&quot; 404 0 &quot;-&quot; &quot;Twitterbot/0.1&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;No rDNS, but it is NTT IP space, who are who twitter hosts with, so
could well be some official url scraping bot.  Forgot to get my
robots.txt, though.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:66.249.67.72 - - [22/Jan/2011:19:56:43 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.1&quot; 404 143 &quot;-&quot; &quot;Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Google twitter search foo.  Probably already had my robots.txt.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:128.242.241.122 - - [22/Jan/2011:19:56:43 +1100] &quot;HEAD /what_loads_twitter_urls HTTP/1.1&quot; 404 0 &quot;-&quot; &quot;Twitterbot/0.1&quot;
::ffff:128.242.241.122 - - [22/Jan/2011:19:56:43 +1100] &quot;HEAD /what_loads_twitter_urls HTTP/1.1&quot; 404 0 &quot;-&quot; &quot;Twitterbot/0.1&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Twitter again.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:65.52.2.212 - - [22/Jan/2011:19:56:44 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.1&quot; 404 199 &quot;-&quot; &quot;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Microsoft space, no rDNS, maybe Bing with a fake UA?  No robots.txt retrieval.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:216.52.242.14 - - [22/Jan/2011:19:56:44 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.1&quot; 404 169 &quot;-&quot; &quot;LinkedInBot/1.0 (compatible; Mozilla/5.0; Jakarta Commons-HttpClient/3.1 +http://www.linkedin.com)&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Linkedin, obviously - not sure if they scrape all urls or just the
ones on feeds people have listed on their profiles (which I have).  No
robots.txt retrieval.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:128.242.241.122 - - [22/Jan/2011:19:56:44 +1100] &quot;HEAD /what_loads_twitter_urls HTTP/1.1&quot; 404 0 &quot;-&quot; &quot;Twitterbot/0.1&quot;
::ffff:128.242.241.122 - - [22/Jan/2011:19:56:45 +1100] &quot;HEAD /what_loads_twitter_urls HTTP/1.1&quot; 404 0 &quot;-&quot; &quot;Twitterbot/0.1&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Twitter again.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:67.195.115.246 - - [22/Jan/2011:19:56:46 +1100] &quot;GET /robots.txt HTTP/1.0&quot; 200 146 &quot;-&quot; &quot;Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)&quot;
::ffff:67.195.115.246 - - [22/Jan/2011:19:56:46 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.0&quot; 404 169 &quot;-&quot; &quot;Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The very polite and honest yahoo bot.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:38.113.234.181 - - [22/Jan/2011:19:56:47 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.1&quot; 404 169 &quot;-&quot; &quot;Voyager/1.0&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Some social media search company called &amp;#8216;kosmix&amp;#8217;.  Forgot to ask for robots.txt.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:65.52.17.79 - - [22/Jan/2011:19:56:47 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.1&quot; 404 199 &quot;-&quot; &quot;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Another MS bot, maybe bing again.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:89.151.116.52 - - [22/Jan/2011:19:56:48 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.1&quot; 404 529 &quot;-&quot; &quot;Mozilla/5.0 (compatible; MSIE 6.0b; Windows NT 5.0) Gecko/2009011913 Firefox/3.0.6 TweetmemeBot&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;No idea.  Reverses to bearpub.favsys.net, but (www.)favsys.net has no
working web server.  IP space belongs to some random dedicated server
company.  Possibly related to tweetmeme.com, some blah blah twitter
trend thing.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:72.30.161.218 - - [22/Jan/2011:19:56:48 +1100] &quot;GET /robots.txt HTTP/1.0&quot; 200 146 &quot;-&quot; &quot;Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)&quot;
::ffff:72.30.161.218 - - [22/Jan/2011:19:56:48 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.0&quot; 404 169 &quot;-&quot; &quot;Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Yahoo again.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:50.16.239.114 - - [22/Jan/2011:19:56:52 +1100] &quot;GET /robots.txt HTTP/1.1&quot; 200 146 &quot;-&quot; &quot;Mozilla/5.0 (compatible; Birubot/1.0) Gecko/2009032608 Firefox/3.0.8&quot;
::ffff:50.16.239.114 - - [22/Jan/2011:19:56:52 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.1&quot; 404 169 &quot;-&quot; &quot;Mozilla/5.0 (compatible; Birubot/1.0) Gecko/2009032608 Firefox/3.0.8&quot;
::ffff:50.16.239.114 - - [22/Jan/2011:19:56:52 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.1&quot; 404 169 &quot;-&quot; &quot;Mozilla/5.0 (compatible; Birubot/1.0) Gecko/2009032608 Firefox/3.0.8&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Some ec2-hosted link trawling thing I guess.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:216.52.242.14 - - [22/Jan/2011:19:56:52 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.1&quot; 404 169 &quot;-&quot; &quot;LinkedInBot/1.0 (compatible; Mozilla/5.0; Jakarta Commons-HttpClient/3.1 +http://www.linkedin.com)&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Linkedin again.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:184.73.156.250 - - [22/Jan/2011:19:57:02 +1100] &quot;HEAD /what_loads_twitter_urls HTTP/1.1&quot; 404 0 &quot;-&quot; &quot;Firefox&quot;
::ffff:184.73.156.250 - - [22/Jan/2011:19:57:02 +1100] &quot;HEAD /what_loads_twitter_urls HTTP/1.1&quot; 404 0 &quot;-&quot; &quot;Firefox&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Random ec2 customer with a fake User-agent.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;2620:0:10c0:1002:a800:1ff:fe00:11fe - - [22/Jan/2011:19:57:22 +1100] &quot;HEAD /what_loads_twitter_urls HTTP/1.1&quot; 404 0 &quot;-&quot; &quot;@hourlypress&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Google ipv6 space!  Given the user-agent and lack of rDNS, maybe it&amp;#8217;s
some software running on appengine?&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:74.112.128.61 - - [22/Jan/2011:19:57:24 +1100] &quot;GET /robots.txt HTTP/1.0&quot; 200 146 &quot;-&quot; &quot;Mozilla/5.0 (compatible; Butterfly/1.0; +http://labs.topsy.com/butterfly/) Gecko/2009032608 Firefox/3.0.8&quot;
::ffff:74.112.128.62 - - [22/Jan/2011:19:57:24 +1100] &quot;GET /what_loads_twitter_urls HTTP/1.0&quot; 404 169 &quot;-&quot; &quot;Mozilla/5.0 (compatible; Butterfly/1.0; +http://labs.topsy.com/butterfly/) Gecko/2009032608 Firefox/3.0.8&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Some social web search engine startup I guess.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;::ffff:75.101.170.136 - - [22/Jan/2011:19:57:51 +1100] &quot;HEAD /what_loads_twitter_urls HTTP/1.1&quot; 404 0 &quot;-&quot; &quot;PycURL/7.18.2&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Some random python ec2-using bot that forgot to change their U-A or
get my robots.txt.&lt;/p&gt;
</description>


</item>
<item>

	<title>wsgiref + multiprocessing ftw</title>


	<guid isPermaLink="no">http://ertius.org//blog/wsgiref-plus-multiprocessing-ftw/</guid>

	<link>http://ertius.org//blog/wsgiref-plus-multiprocessing-ftw/</link>


	<category>/tags/python</category>

	<category>/tags/testing</category>

	<category>/tags/web</category>

	<category>/tags/wsgi</category>


	<pubDate>Tue, 09 Nov 2010 19:49:00 +1100</pubDate>
	<dcterms:modified>2011-05-17T10:27:58Z</dcterms:modified>

	<description>&lt;p&gt;So, I wanted to do some very simple functional tests using a real-ish
webserver, but I didn&amp;#8217;t want to have to depend on twisted.web or an
external setup.  So I did this:&lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;&lt;span class=&quot;hl kwa&quot;&gt;from&lt;/span&gt; wsgiref&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;simple_server &lt;span class=&quot;hl kwa&quot;&gt;import&lt;/span&gt; make_server
&lt;span class=&quot;hl kwa&quot;&gt;from&lt;/span&gt; multiprocessing &lt;span class=&quot;hl kwa&quot;&gt;import&lt;/span&gt; Process&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt; Queue

&lt;span class=&quot;hl kwa&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;TestPosting&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;unittest&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;TestCase&lt;span class=&quot;hl sym&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;hl slc&quot;&gt;# FIXME: THIS IS TERROBLE&lt;/span&gt;

    &lt;span class=&quot;hl kwa&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;setUp&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;self&lt;span class=&quot;hl sym&quot;&gt;):&lt;/span&gt;
        self&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;q &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;Queue&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;()&lt;/span&gt;
        self&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;p &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;Process&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;target&lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt;self&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;serve&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt; args&lt;span class=&quot;hl sym&quot;&gt;=(&lt;/span&gt;self&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;q&lt;span class=&quot;hl sym&quot;&gt;,))&lt;/span&gt;
        self&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;p&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl kwd&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;()&lt;/span&gt;
        self&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;port &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; self&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;q&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl kwd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;()&lt;/span&gt;

    &lt;span class=&quot;hl kwa&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;serve&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;self&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt; q&lt;span class=&quot;hl sym&quot;&gt;):&lt;/span&gt;
        httpd &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;make_server&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;hl str&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hl num&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;simple_app_maker&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;q&lt;span class=&quot;hl sym&quot;&gt;))&lt;/span&gt;
        port &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; httpd&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;server_port
        q&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl kwd&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;port&lt;span class=&quot;hl sym&quot;&gt;)&lt;/span&gt;
        httpd&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl kwd&quot;&gt;serve_forever&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;()&lt;/span&gt;

    &lt;span class=&quot;hl kwa&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;tearDown&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;self&lt;span class=&quot;hl sym&quot;&gt;):&lt;/span&gt;
        self&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;p&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl kwd&quot;&gt;terminate&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;()&lt;/span&gt;

    &lt;span class=&quot;hl kwa&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;test_something&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;self&lt;span class=&quot;hl sym&quot;&gt;):&lt;/span&gt;
        url &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hl str&quot;&gt;&amp;quot;http://locahost:%s/whatever&amp;quot;&lt;/span&gt; &lt;span class=&quot;hl sym&quot;&gt;%&lt;/span&gt; self&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;port
        &lt;span class=&quot;hl sym&quot;&gt;...&lt;/span&gt;
        result &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; self&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;queue&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl kwd&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;hl slc&quot;&gt;# make some assertions on the results&lt;/span&gt;

&lt;span class=&quot;hl kwa&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;simple_app_maker&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;queue&lt;span class=&quot;hl sym&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;hl kwa&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;simple_app&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;environ&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt; start_response&lt;span class=&quot;hl sym&quot;&gt;):&lt;/span&gt;
        post_env &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; environ&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl kwd&quot;&gt;copy&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;()&lt;/span&gt;
        post_env&lt;span class=&quot;hl sym&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl str&quot;&gt;&#39;QUERY_STRING&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;] =&lt;/span&gt; &lt;span class=&quot;hl str&quot;&gt;&#39;&#39;&lt;/span&gt;
        post &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; cgi&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl kwd&quot;&gt;FieldStorage&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;
            fp&lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt;environ&lt;span class=&quot;hl sym&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl str&quot;&gt;&#39;wsgi.input&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;],&lt;/span&gt;
            environ&lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt;post_env&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt;
            keep_blank_values&lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;hl kwa&quot;&gt;True&lt;/span&gt;
        &lt;span class=&quot;hl sym&quot;&gt;)&lt;/span&gt;
        q&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;hl kwd&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(...)&lt;/span&gt; &lt;span class=&quot;hl slc&quot;&gt;# put the relevant stuff in the queue&lt;/span&gt;
        status &lt;span class=&quot;hl sym&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;hl str&quot;&gt;&#39;200 OK&#39;&lt;/span&gt;
        response_headers &lt;span class=&quot;hl sym&quot;&gt;= [(&lt;/span&gt;&lt;span class=&quot;hl str&quot;&gt;&#39;Content-type&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;hl str&quot;&gt;&#39;text/plain&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;)]&lt;/span&gt;
        &lt;span class=&quot;hl kwd&quot;&gt;start_response&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(&lt;/span&gt;status&lt;span class=&quot;hl sym&quot;&gt;,&lt;/span&gt; response_headers&lt;span class=&quot;hl sym&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;hl kwa&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hl sym&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl str&quot;&gt;&#39;Hello world!&lt;/span&gt;&lt;span class=&quot;hl esc&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;hl str&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;]&lt;/span&gt;
    &lt;span class=&quot;hl kwa&quot;&gt;return&lt;/span&gt; simple_app
&lt;/pre&gt;

&lt;p&gt;just have the simple_app function put whatever you want to check in
the queue, and your tests pull it out and make some assertions.  Super
nasty, but it actually works!&lt;/p&gt;
</description>


</item>
<item>

	<title>Dune2 on Linux</title>


	<guid isPermaLink="no">http://ertius.org//blog/dune2-on-linux/</guid>

	<link>http://ertius.org//blog/dune2-on-linux/</link>


	<category>/tags/debian</category>

	<category>/tags/dosbox</category>

	<category>/tags/dune2</category>

	<category>/tags/games</category>

	<category>/tags/linux</category>

	<category>/tags/wine</category>


	<pubDate>Tue, 27 Jul 2010 17:30:00 +1000</pubDate>
	<dcterms:modified>2011-05-17T10:27:58Z</dcterms:modified>

	<description>&lt;p&gt;Download it from
&lt;a href=&quot;http://nahoo.net/downloads/go/duneii.shtml?games/dune2/Dune2.exe&quot;&gt;here&lt;/a&gt;
(with a browser, it does some redirect crap).  Install dosbox:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo aptitude install dosbox
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It is a self-extracting zip file, so you can either use wine to unzip
(holy nuclear option, batman) or install unzip:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo aptitude install unzip
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Create a directory that we can ask dosbox to mount as &amp;#8216;C:&amp;#8217;, then unzip
it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mkdir -p ~/.dos/Dune2
cd ~/.dos/Dune2
unzip ~/Downloads/Dune2.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Get a default config file by starting up dosbox:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;dosbox
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and (in dosbox) ask it to write out a config file for you:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;config -writeconf /home/you/.dosbox.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;type &amp;#8216;exit&amp;#8217; in the dosbox window to, er, exit.  Add the line to mount
the directory we created:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;echo &quot;mount c /home/you/.dos&quot; &amp;gt;&amp;gt; ~/.dosbox.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and start dosbox again (with that config):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;dosbox -conf ~/.dosbox.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and run Dune2 in the dosbox window (dosbox&amp;#8217;s shell has tab completion, yay):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cd Dune2
Dune2.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Clicking in the window will make dosbox grab your mouse and keyboard -
ctrl-f10 to escape.&lt;/p&gt;
</description>


</item>
<item>

	<title>Highlighting trailing whitespace in vim</title>


	<guid isPermaLink="no">http://ertius.org//blog/highlighting-trailing-whitespace-in-vim/</guid>

	<link>http://ertius.org//blog/highlighting-trailing-whitespace-in-vim/</link>


	<category>/tags/linux</category>

	<category>/tags/vim</category>


	<pubDate>Wed, 23 Jun 2010 18:10:00 +1000</pubDate>
	<dcterms:modified>2011-05-17T10:27:58Z</dcterms:modified>

	<description>&lt;p&gt;This config snippet configures vim to highlight trailing whitespace in
a horrendous red, making it easy to spot and remove.  &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:highlight ExtraWhitespace ctermbg=red guibg=red
autocmd Syntax * syn match ExtraWhitespace /\s\+&amp;#036;\| \+\ze\t/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Even better would be to only highlight it on lines that have been
otherwise modified since the last commit&amp;#8230;&lt;/p&gt;
</description>


</item>
<item>

	<title>Using your iphone as a modem under Debian</title>


	<guid isPermaLink="no">http://ertius.org//blog/iphone-tethering-on-debian/</guid>

	<link>http://ertius.org//blog/iphone-tethering-on-debian/</link>


	<category>/tags/debian</category>

	<category>/tags/iphone</category>

	<category>/tags/linux</category>

	<category>/tags/modem</category>

	<category>/tags/tethering</category>


	<pubDate>Tue, 01 Jun 2010 20:39:00 +1000</pubDate>
	<dcterms:modified>2011-05-17T10:27:58Z</dcterms:modified>

	<description>&lt;p&gt;Thanks to the awesome work of &lt;a href=&quot;http://giagio.com/&quot;&gt;Diego Giagio&lt;/a&gt; (for
writing it) and Paul McEnery (for packaging it for Debian), using your
iPhone as a modem under Debian is about 60 seconds work:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;a href=&quot;http://packages.debian.org/sid/ipheth-dkms&quot;&gt;ipheth-dkms&lt;/a&gt;
(the kernel module side of things) and
&lt;a href=&quot;http://packages.debian.org/sid/ipheth-utils&quot;&gt;ipheth-utils&lt;/a&gt; (the
userspace pairing daemon).&lt;/li&gt;
&lt;li&gt;watch the postinst build the kernel driver for your current kernel&lt;/li&gt;
&lt;li&gt;plug your phone in&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;dmesg|grep iPhone&lt;/code&gt; should show something like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[867025.370421] ipheth 3-2:4.2: Apple iPhone USB Ethernet device attached&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and you&amp;#8217;ll find you have a new Ethernet interface&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;enable tethering on the phone (Settings -&gt; General -&gt; Network -&gt;
Internet Tethering)&lt;/li&gt;
&lt;li&gt;now the ethernet interface is running a DHCP server - select it
with nm-applet or ifup it or whatever you normally do&lt;/li&gt;
&lt;/ol&gt;
</description>


</item>
<item>

	<title>Custom User-Agent with twisted.web.client.getPage</title>


	<guid isPermaLink="no">http://ertius.org//blog/custom-user-agent-with-twisted-web-client-getPage/</guid>

	<link>http://ertius.org//blog/custom-user-agent-with-twisted-web-client-getPage/</link>


	<category>/tags/python</category>

	<category>/tags/twisted</category>

	<category>/tags/web</category>


	<pubDate>Sun, 20 Dec 2009 22:10:00 +1100</pubDate>
	<dcterms:modified>2011-05-17T10:27:58Z</dcterms:modified>

	<description>&lt;p&gt;Since &lt;code&gt;getPage&lt;/code&gt; just passes most of its&amp;#8217; args through to
HTTPClientFactory, you can just make a simple wrapper to set the
user-agent:&lt;/p&gt;

&lt;pre class=&quot;hl&quot;&gt;    &lt;span class=&quot;hl kwa&quot;&gt;from&lt;/span&gt; twisted&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;web&lt;span class=&quot;hl sym&quot;&gt;.&lt;/span&gt;client &lt;span class=&quot;hl kwa&quot;&gt;import&lt;/span&gt; getPage
    &lt;span class=&quot;hl sym&quot;&gt;...&lt;/span&gt;
    &lt;span class=&quot;hl kwa&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;my_page_getter&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(*&lt;/span&gt;args&lt;span class=&quot;hl sym&quot;&gt;, **&lt;/span&gt;kwargs&lt;span class=&quot;hl sym&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;hl kwa&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;hl str&quot;&gt;&#39;agent&#39;&lt;/span&gt; &lt;span class=&quot;hl kwa&quot;&gt;not in&lt;/span&gt; kwargs&lt;span class=&quot;hl sym&quot;&gt;:&lt;/span&gt;
            kwargs&lt;span class=&quot;hl sym&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;hl str&quot;&gt;&#39;agent&#39;&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;] =&lt;/span&gt; &lt;span class=&quot;hl str&quot;&gt;&#39;your user agent/1.2&#39;&lt;/span&gt;
        &lt;span class=&quot;hl kwa&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;hl kwd&quot;&gt;getPage&lt;/span&gt;&lt;span class=&quot;hl sym&quot;&gt;(*&lt;/span&gt;args&lt;span class=&quot;hl sym&quot;&gt;, **&lt;/span&gt;kwargs&lt;span class=&quot;hl sym&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
</description>


</item>
<item>

	<title>Excluding draft posts from your feeds</title>


	<guid isPermaLink="no">http://ertius.org//blog/draft-posts-in-ikiwiki/</guid>

	<link>http://ertius.org//blog/draft-posts-in-ikiwiki/</link>


	<category>/tags/blog</category>

	<category>/tags/ikiwiki</category>


	<pubDate>Sat, 28 Nov 2009 21:47:00 +1100</pubDate>
	<dcterms:modified>2011-05-17T10:27:58Z</dcterms:modified>

	<description>&lt;p&gt;Since feeds in &lt;a href=&quot;http://www.ikiwiki.info/&quot;&gt;ikiwiki&lt;/a&gt; are just the result
of the [[inline]] directive generation a list of pages, you can
use the combination of a pagespec and the
&lt;a href=&quot;http://ikiwiki.info/plugins/tag/&quot;&gt;tag&lt;/a&gt; plugin to stop ikiwiki from
syndicating draft pages.  Just include &amp;#8220;!tagged(draft)&amp;#8221; in your page
spec for the page that generates the feed (e.g. &lt;code&gt;blog.mdwn&lt;/code&gt;):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[[!inline  pages=&quot;./blog/* and !*/Discussion and !tagged(draft)&quot; show=&quot;100&quot; ]]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;then for each article you&amp;#8217;d like to hide for now, simply add the
&amp;#8216;draft&amp;#8217; tag:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[[!tag  foo bar baz draft]]
&lt;/code&gt;&lt;/pre&gt;
</description>


</item>
<item>

	<title>nginx and IPv6</title>


	<guid isPermaLink="no">http://ertius.org//blog/nginx-and-ipv6/</guid>

	<link>http://ertius.org//blog/nginx-and-ipv6/</link>


	<category>/tags/debian</category>

	<category>/tags/http</category>

	<category>/tags/ipv6</category>

	<category>/tags/linux</category>

	<category>/tags/nginx</category>


	<pubDate>Thu, 29 Oct 2009 13:41:00 +1100</pubDate>
	<dcterms:modified>2011-05-17T10:27:58Z</dcterms:modified>

	<description>&lt;p&gt;nginx now has ipv6 support!  Yay!  To have it work on Debian, all you
need to do is open up &lt;code&gt;/etc/nginx/sites-available/default&lt;/code&gt; and
replace:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;listen   80;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;with&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;listen [::]:80  default ipv6only=on;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;ipv6only=on&lt;/code&gt; here is a bit of a lie - it will listen on both ipv4 and ipv6.&lt;/p&gt;

&lt;p&gt;Then, in your &lt;code&gt;/etc/nginx/sites-available/*&lt;/code&gt; files, add&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;listen       [::]:80;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;just below&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;listen       80;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;so nginx listens on both.&lt;/p&gt;
</description>


</item>
<item>

	<title>PositiveSSL certificate chaining</title>


	<guid isPermaLink="no">http://ertius.org//blog/positivessl-certificate-chaining/</guid>

	<link>http://ertius.org//blog/positivessl-certificate-chaining/</link>


	<category>/tags/certificate</category>

	<category>/tags/https</category>

	<category>/tags/namecheap</category>

	<category>/tags/nginx</category>

	<category>/tags/positivessl</category>

	<category>/tags/ssl</category>


	<pubDate>Thu, 22 Oct 2009 21:42:00 +1100</pubDate>
	<dcterms:modified>2011-05-17T10:27:58Z</dcterms:modified>

	<description>&lt;p&gt;If you have one of the free PositiveSSL certs that Namecheap gives
away with new domains, you&amp;#8217;ll find that it probably needs an
intermediate cert to make OpenSSL stop complaining.  Since they list a
bunch
&lt;a href=&quot;https://support.comodo.com/index.php?_m=downloads&amp;amp;_a=view&amp;amp;parentcategoryid=4&amp;amp;pcid=1&amp;amp;nav=0,1&quot;&gt;here&lt;/a&gt;,
let me save you some time: you need
&lt;a href=&quot;https://support.comodo.com/index.php?_m=downloads&amp;amp;_a=downloadfile&amp;amp;downloaditemid=31&quot;&gt;this one&lt;/a&gt;.
If you&amp;#8217;re using nginx, just add that file to the bottom of your signed
cert (i.e. the thing PositiveSSL emailed you).&lt;/p&gt;
</description>


</item>
<item>

	<title>Silly Nagios error</title>


	<guid isPermaLink="no">http://ertius.org//blog/silly-nagios-error/</guid>

	<link>http://ertius.org//blog/silly-nagios-error/</link>


	<category>/tags/errors</category>

	<category>/tags/nagios</category>


	<pubDate>Thu, 07 May 2009 19:47:00 +1000</pubDate>
	<dcterms:modified>2011-05-17T10:27:58Z</dcterms:modified>

	<description>&lt;p&gt;If nagios claims:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Error: &#39;bar&#39; is not a valid parent for host &#39;foo&#39;!
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;it is because bar doesn&amp;#8217;t exist (e.g. you used a &lt;code&gt;name&lt;/code&gt; directive instead of a &lt;code&gt;hostname&lt;/code&gt; one).&lt;/p&gt;
</description>


</item>

</channel>
</rss>

