<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>ertius.org - blog</title>
    <subtitle>A Rarely Updated Blog</subtitle>
    <link rel="self" type="application/atom+xml" href="https://ertius.org/blog/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://ertius.org/blog/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2023-07-16T00:00:00+00:00</updated>
    <id>https://ertius.org/blog/atom.xml</id>
    <entry xml:lang="en">
        <title>Today I Learnt</title>
        <published>2023-07-16T00:00:00+00:00</published>
        <updated>2023-07-16T00:00:00+00:00</updated>
        
        <author>
          <name>rweir@ertius.org (Rob Weir)</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ertius.org/blog/til/"/><id>https://ertius.org/blog/til/</id>
        <content type="html" xml:base="https://ertius.org/blog/til/">&lt;p&gt;Inspired by &lt;a rel=&quot;external&quot; href=&quot;https://til.simonwillison.net/&quot;&gt;Simon Willison&lt;/a&gt;&#39;s site, I made my own &lt;a href=&quot;../til/&quot;&gt;&lt;em&gt;today I learnt&lt;/em&gt;&lt;/a&gt;.  It has definitely led to me writing more stuff down, at least.&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>What Loads Urls on Twitter</title>
        <published>2011-01-22T00:00:00+00:00</published>
        <updated>2011-01-22T00:00:00+00:00</updated>
        
        <author>
          <name>rweir@ertius.org (Rob Weir)</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ertius.org/blog/what-loads-urls-on-twitter/"/><id>http://ertius.org//blog/what-loads-urls-on-twitter/</id>
        <content type="html" xml:base="https://ertius.org/blog/what-loads-urls-on-twitter/">&lt;p&gt;So a little while ago (at &lt;code&gt;19:56:40&lt;/code&gt;) I posted a tweet containing just a &lt;a rel=&quot;external&quot; href=&quot;http://ertius.org/what_loads_twitter_urls&quot;&gt;single url&lt;/a&gt;. Within seconds, I had these bots requesting the file:&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:128.242.241.122 - - [22/Jan/2011:19:56:43 +1100] &amp;quot;HEAD /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 0 &amp;quot;-&amp;quot; &amp;quot;Twitterbot/0.1&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:128.242.241.122 - - [22/Jan/2011:19:56:43 +1100] &amp;quot;HEAD /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 0 &amp;quot;-&amp;quot; &amp;quot;Twitterbot/0.1&amp;quot;&lt;/span&gt;&lt;/span&gt;&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 class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:66.249.67.72 - - [22/Jan/2011:19:56:43 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 143 &amp;quot;-&amp;quot; &amp;quot;Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Google twitter search foo. Probably already had my robots.txt.&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:128.242.241.122 - - [22/Jan/2011:19:56:43 +1100] &amp;quot;HEAD /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 0 &amp;quot;-&amp;quot; &amp;quot;Twitterbot/0.1&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:128.242.241.122 - - [22/Jan/2011:19:56:43 +1100] &amp;quot;HEAD /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 0 &amp;quot;-&amp;quot; &amp;quot;Twitterbot/0.1&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Twitter again.&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:65.52.2.212 - - [22/Jan/2011:19:56:44 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 199 &amp;quot;-&amp;quot; &amp;quot;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;&lt;/span&gt;&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 class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:216.52.242.14 - - [22/Jan/2011:19:56:44 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 169 &amp;quot;-&amp;quot; &amp;quot;LinkedInBot/1.0 (compatible; Mozilla/5.0; Jakarta Commons-HttpClient/3.1 +&amp;lt;http://www.linkedin.com&amp;gt;)&amp;quot;&lt;/span&gt;&lt;/span&gt;&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 class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:128.242.241.122 - - [22/Jan/2011:19:56:44 +1100] &amp;quot;HEAD /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 0 &amp;quot;-&amp;quot; &amp;quot;Twitterbot/0.1&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:128.242.241.122 - - [22/Jan/2011:19:56:45 +1100] &amp;quot;HEAD /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 0 &amp;quot;-&amp;quot; &amp;quot;Twitterbot/0.1&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Twitter again.&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:67.195.115.246 - - [22/Jan/2011:19:56:46 +1100] &amp;quot;GET /robots.txt HTTP/1.0&amp;quot; 200 146 &amp;quot;-&amp;quot; &amp;quot;Mozilla/5.0 (compatible; Yahoo! Slurp; &amp;lt;http://help.yahoo.com/help/us/ysearch/slurp&amp;gt;)&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:67.195.115.246 - - [22/Jan/2011:19:56:46 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.0&amp;quot; 404 169 &amp;quot;-&amp;quot; &amp;quot;Mozilla/5.0 (compatible; Yahoo! Slurp; &amp;lt;http://help.yahoo.com/help/us/ysearch/slurp&amp;gt;)&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The very polite and honest yahoo bot.&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:38.113.234.181 - - [22/Jan/2011:19:56:47 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 169 &amp;quot;-&amp;quot; &amp;quot;Voyager/1.0&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Some social media search company called ‘kosmix’. Forgot to ask for robots.txt.&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:65.52.17.79 - - [22/Jan/2011:19:56:47 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 199 &amp;quot;-&amp;quot; &amp;quot;Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Another MS bot, maybe bing again.&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:89.151.116.52 - - [22/Jan/2011:19:56:48 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 529 &amp;quot;-&amp;quot; &amp;quot;Mozilla/5.0 (compatible; MSIE 6.0b; Windows NT 5.0) Gecko/2009011913 Firefox/3.0.6 TweetmemeBot&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;No idea. Reverses to bearpub.favsys.net, but (&lt;code&gt;www.favsys.net&lt;/code&gt; 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 class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:72.30.161.218 - - [22/Jan/2011:19:56:48 +1100] &amp;quot;GET /robots.txt HTTP/1.0&amp;quot; 200 146 &amp;quot;-&amp;quot; &amp;quot;Mozilla/5.0 (compatible; Yahoo! Slurp; &amp;lt;http://help.yahoo.com/help/us/ysearch/slurp&amp;gt;)&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:72.30.161.218 - - [22/Jan/2011:19:56:48 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.0&amp;quot; 404 169 &amp;quot;-&amp;quot; &amp;quot;Mozilla/5.0 (compatible; Yahoo! Slurp; &amp;lt;http://help.yahoo.com/help/us/ysearch/slurp&amp;gt;)&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Yahoo again.&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:50.16.239.114 - - [22/Jan/2011:19:56:52 +1100] &amp;quot;GET /robots.txt HTTP/1.1&amp;quot; 200 146 &amp;quot;-&amp;quot; &amp;quot;Mozilla/5.0 (compatible; Birubot/1.0) Gecko/2009032608 Firefox/3.0.8&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:50.16.239.114 - - [22/Jan/2011:19:56:52 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 169 &amp;quot;-&amp;quot; &amp;quot;Mozilla/5.0 (compatible; Birubot/1.0) Gecko/2009032608 Firefox/3.0.8&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:50.16.239.114 - - [22/Jan/2011:19:56:52 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 169 &amp;quot;-&amp;quot; &amp;quot;Mozilla/5.0 (compatible; Birubot/1.0) Gecko/2009032608 Firefox/3.0.8&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Some ec2-hosted link trawling thing I guess.&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:216.52.242.14 - - [22/Jan/2011:19:56:52 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 169 &amp;quot;-&amp;quot; &amp;quot;LinkedInBot/1.0 (compatible; Mozilla/5.0; Jakarta Commons-HttpClient/3.1 +&amp;lt;http://www.linkedin.com&amp;gt;)&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Linkedin again.&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:184.73.156.250 - - [22/Jan/2011:19:57:02 +1100] &amp;quot;HEAD /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 0 &amp;quot;-&amp;quot; &amp;quot;Firefox&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:184.73.156.250 - - [22/Jan/2011:19:57:02 +1100] &amp;quot;HEAD /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 0 &amp;quot;-&amp;quot; &amp;quot;Firefox&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Random ec2 customer with a fake User-agent.&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2620:0:10c0:1002:a800:1ff:fe00:11fe - - [22/Jan/2011:19:57:22 +1100] &amp;quot;HEAD /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 0 &amp;quot;-&amp;quot; &amp;quot;@hourlypress&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Google ipv6 space! Given the user-agent and lack of rDNS, maybe it’s some software running on appengine?&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:74.112.128.61 - - [22/Jan/2011:19:57:24 +1100] &amp;quot;GET /robots.txt HTTP/1.0&amp;quot; 200 146 &amp;quot;-&amp;quot; &amp;quot;Mozilla/5.0 (compatible; Butterfly/1.0; +&amp;lt;http://labs.topsy.com/butterfly/&amp;gt;) Gecko/2009032608 Firefox/3.0.8&amp;quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:74.112.128.62 - - [22/Jan/2011:19:57:24 +1100] &amp;quot;GET /what_loads_twitter_urls HTTP/1.0&amp;quot; 404 169 &amp;quot;-&amp;quot; &amp;quot;Mozilla/5.0 (compatible; Butterfly/1.0; +&amp;lt;http://labs.topsy.com/butterfly/&amp;gt;) Gecko/2009032608 Firefox/3.0.8&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Some social web search engine startup I guess.&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;::ffff:75.101.170.136 - - [22/Jan/2011:19:57:51 +1100] &amp;quot;HEAD /what_loads_twitter_urls HTTP/1.1&amp;quot; 404 0 &amp;quot;-&amp;quot; &amp;quot;PycURL/7.18.2&amp;quot;&lt;/span&gt;&lt;/span&gt;&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;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>wsgiref + multiprocessing ftw</title>
        <published>2010-11-09T00:00:00+00:00</published>
        <updated>2010-11-09T00:00:00+00:00</updated>
        
        <author>
          <name>rweir@ertius.org (Rob Weir)</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ertius.org/blog/wsgiref-plus-multiprocessing-ftw/"/><id>http://ertius.org//blog/wsgiref-plus-multiprocessing-ftw/</id>
        <content type="html" xml:base="https://ertius.org/blog/wsgiref-plus-multiprocessing-ftw/">&lt;p&gt;So, I wanted to do some very simple functional tests using a real-ish webserver, but I didn’t want to have to depend on twisted.web or an external setup. So I did this:&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;from&lt;/span&gt;&lt;span&gt; wsgiref&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;simple_server&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt; import&lt;/span&gt;&lt;span&gt; make_server&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;from&lt;/span&gt;&lt;span&gt; multiprocessing&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt; import&lt;/span&gt;&lt;span&gt; Process&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;span&gt; Queue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;z-l-8 z-d-16&quot;&gt; TestPosting&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-l-1&quot;&gt;unittest&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-l-1&quot;&gt;TestCase&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-6 z-d-5 z-d-i&quot;&gt;    #&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-17 z-d-i&quot;&gt; FIXME&lt;/span&gt;&lt;span class=&quot;z-l-6 z-d-5 z-d-i&quot;&gt;: THIS IS TERROBLE&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;    def&lt;/span&gt;&lt;span class=&quot;z-l-5 z-d-4&quot;&gt; setUp&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1 z-d-3&quot;&gt;        self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;q&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt; Queue&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1 z-d-3&quot;&gt;        self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;p&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt; Process&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-l-8 z-d-3&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-3&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-d-13&quot;&gt;serve&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;z-l-8 z-d-3&quot;&gt; args&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-3&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-d-13&quot;&gt;q&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1 z-d-3&quot;&gt;        self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;p&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1 z-d-3&quot;&gt;        self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;port&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-3&quot;&gt; self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;q&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;    def&lt;/span&gt;&lt;span class=&quot;z-l-5 z-d-4&quot;&gt; serve&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt; q&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        httpd&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt; make_server&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-12&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt; simple_app_maker&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-13&quot;&gt;q&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        port&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span&gt; httpd&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;server_port&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        q&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-13&quot;&gt;port&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        httpd&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;serve_forever&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;    def&lt;/span&gt;&lt;span class=&quot;z-l-5 z-d-4&quot;&gt; tearDown&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1 z-d-3&quot;&gt;        self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;p&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;terminate&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;    def&lt;/span&gt;&lt;span class=&quot;z-l-5 z-d-4&quot;&gt; test_something&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        url&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt; &amp;quot;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-9&quot;&gt;http://locahost:&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-12&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-9&quot;&gt;/whatever&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; %&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-3&quot;&gt; self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;port&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1 z-d-12&quot;&gt;        ...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        result&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-3&quot;&gt; self&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;queue&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-6 z-d-5 z-d-i&quot;&gt;        #&lt;/span&gt;&lt;span class=&quot;z-l-6 z-d-5 z-d-i&quot;&gt; make some assertions on the results&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;z-l-5 z-d-4&quot;&gt; simple_app_maker&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;queue&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;    def&lt;/span&gt;&lt;span class=&quot;z-l-5 z-d-4&quot;&gt; simple_app&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;environ&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt; start_response&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        post_env&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span&gt; environ&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;copy&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        post_env&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-9&quot;&gt;QUERY_STRING&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        post&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span&gt; cgi&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;FieldStorage&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-8 z-d-3&quot;&gt;            fp&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;z-d-13&quot;&gt;environ&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-9&quot;&gt;wsgi.input&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-8 z-d-3&quot;&gt;            environ&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;z-d-13&quot;&gt;post_env&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-8 z-d-3&quot;&gt;            keep_blank_values&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-12&quot;&gt;True&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-d-7&quot;&gt;        )&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        q&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;put&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-12&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-l-6 z-d-5 z-d-i&quot;&gt; #&lt;/span&gt;&lt;span class=&quot;z-l-6 z-d-5 z-d-i&quot;&gt; put the relevant stuff in the queue&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        status&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-9&quot;&gt;200 OK&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        response_headers&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt; [&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-9&quot;&gt;Content-type&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-9&quot;&gt;text/plain&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-d-3&quot;&gt;        start_response&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-d-13&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;z-d-13&quot;&gt; response_headers&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;        return&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt; [&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-9&quot;&gt;Hello world!&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-12&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;    return&lt;/span&gt;&lt;span&gt; simple_app&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;just have the &lt;code&gt;simple_app&lt;/code&gt; 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;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Dune2 on Linux</title>
        <published>2010-07-27T00:00:00+00:00</published>
        <updated>2010-07-27T00:00:00+00:00</updated>
        
        <author>
          <name>rweir@ertius.org (Rob Weir)</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ertius.org/blog/dune2-on-linux/"/><id>http://ertius.org//blog/dune2-on-linux/</id>
        <content type="html" xml:base="https://ertius.org/blog/dune2-on-linux/">&lt;p&gt;Download it from &lt;a rel=&quot;external&quot; href=&quot;https://nahoo.net/games/dune-2/downloads/&quot;&gt;this site&lt;/a&gt; (with a browser, it does some redirect crap). Install &lt;code&gt;dosbox&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;shellsession&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1&quot;&gt;sudo aptitude install dosbox&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It is a self-extracting zip file, so you can either use &lt;code&gt;wine&lt;/code&gt; to unzip (holy nuclear option, batman) or install &lt;code&gt;unzip&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;shellsession&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1&quot;&gt;sudo aptitude install unzip&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create a directory that we can ask dosbox to mount as &lt;code&gt;C:&lt;/code&gt;, then unzip it:&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;shellsession&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1&quot;&gt;mkdir -p ~/.dos/Dune2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1&quot;&gt;cd ~/.dos/Dune2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1&quot;&gt;unzip ~/Downloads/Dune2.exe&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Get a default config file by starting up dosbox:&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;shellsession&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1&quot;&gt;dosbox&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and (in &lt;code&gt;dosbox&lt;/code&gt;) ask it to write out a config file for you:&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;shellsession&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1&quot;&gt;config -writeconf /home/you/.dosbox.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;type &lt;code&gt;exit&lt;/code&gt; in the dosbox window to, er, exit. Add the line to mount the directory we created:&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;shellsession&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1&quot;&gt;echo &amp;quot;mount c /home/you/.dos&amp;quot; &amp;gt;&amp;gt; ~/.dosbox.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and start &lt;code&gt;dosbox&lt;/code&gt; again (with that config):&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;shellsession&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1&quot;&gt;dosbox -conf ~/.dosbox.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and run Dune2 in the dosbox window (dosbox’s shell has tab completion, yay):&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;shellsession&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1&quot;&gt;cd Dune2&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1&quot;&gt;Dune2.exe&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Clicking in the window will make dosbox grab your mouse and keyboard - &lt;code&gt;ctrl-f10&lt;/code&gt; to escape.&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Highlighting trailing whitespace in vim</title>
        <published>2010-06-23T00:00:00+00:00</published>
        <updated>2010-06-23T00:00:00+00:00</updated>
        
        <author>
          <name>rweir@ertius.org (Rob Weir)</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ertius.org/blog/highlighting-trailing-whitespace-in-vim/"/><id>http://ertius.org//blog/highlighting-trailing-whitespace-in-vim/</id>
        <content type="html" xml:base="https://ertius.org/blog/highlighting-trailing-whitespace-in-vim/">&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 class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;viml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;:&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-16&quot;&gt;highlight&lt;/span&gt;&lt;span&gt; ExtraWhitespace ctermbg&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt;=&lt;/span&gt;&lt;span&gt;red guibg&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt;=&lt;/span&gt;&lt;span&gt;red&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;autocmd&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-16&quot;&gt; Syntax&lt;/span&gt;&lt;span&gt; * &lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;syn&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-16&quot;&gt; match&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt; ExtraWhitespace &lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-18&quot;&gt;/\s\+$\| \+\ze\t/&lt;/span&gt;&lt;/span&gt;&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...&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Using your iphone as a modem under Debian</title>
        <published>2010-06-01T00:00:00+00:00</published>
        <updated>2010-06-01T00:00:00+00:00</updated>
        
        <author>
          <name>rweir@ertius.org (Rob Weir)</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ertius.org/blog/iphone-tethering-on-debian/"/><id>http://ertius.org//blog/iphone-tethering-on-debian/</id>
        <content type="html" xml:base="https://ertius.org/blog/iphone-tethering-on-debian/">&lt;p&gt;Thanks to the awesome work of &lt;a rel=&quot;external&quot; href=&quot;https://web.archive.org/web/*/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;
&lt;p&gt;Install &lt;a rel=&quot;external&quot; 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 rel=&quot;external&quot; href=&quot;http://packages.debian.org/sid/ipheth-utils&quot;&gt;ipheth-utils&lt;/a&gt; (the
userspace pairing daemon).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;watch the postinst build the kernel driver for your current kernel&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;plug your phone in&lt;/p&gt;
&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;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[867025.370421] ipheth 3-2:4.2: Apple iPhone USB Ethernet device attached&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and you’ll find you have a new Ethernet interface&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;enable tethering on the phone (Settings -&amp;gt; General -&amp;gt; Network -&amp;gt;
Internet Tethering)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;now the ethernet interface is running a DHCP server - select it
with &lt;code&gt;nm-applet&lt;/code&gt; or &lt;code&gt;ifup&lt;/code&gt; it or whatever you normally do&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Custom User Agent With Twisted Web Client GetPage</title>
        <published>2009-12-20T00:00:00+00:00</published>
        <updated>2009-12-20T00:00:00+00:00</updated>
        
        <author>
          <name>rweir@ertius.org (Rob Weir)</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ertius.org/blog/custom-user-agent-with-twisted-web-client-getpage/"/><id>http://ertius.org//blog/custom-user-agent-with-twisted-web-client-getPage/</id>
        <content type="html" xml:base="https://ertius.org/blog/custom-user-agent-with-twisted-web-client-getpage/">&lt;p&gt;Since &lt;code&gt;getPage&lt;/code&gt; just passes most of its’ args through to &lt;code&gt;HTTPClientFactory&lt;/code&gt;, you can just make a simple wrapper to set the user-agent:&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;from&lt;/span&gt;&lt;span&gt; twisted&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;web&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;.&lt;/span&gt;&lt;span&gt;client&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt; import&lt;/span&gt;&lt;span&gt; getPage&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-1 z-d-12&quot;&gt;...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;def&lt;/span&gt;&lt;span class=&quot;z-l-5 z-d-4&quot;&gt; my_page_getter&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; **&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;    if&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-9&quot;&gt;agent&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt; not&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt; in&lt;/span&gt;&lt;span&gt; kwargs&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        kwargs&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-9&quot;&gt;agent&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt; &amp;#39;&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-9&quot;&gt;your user agent/1.2&lt;/span&gt;&lt;span class=&quot;z-l-3 z-d-7&quot;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;    return&lt;/span&gt;&lt;span class=&quot;z-d-3&quot;&gt; getPage&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;z-d-13&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;z-l-9 z-d-4&quot;&gt; **&lt;/span&gt;&lt;span class=&quot;z-d-13&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Excluding draft posts from your feeds</title>
        <published>2009-11-28T00:00:00+00:00</published>
        <updated>2009-11-28T00:00:00+00:00</updated>
        
        <author>
          <name>rweir@ertius.org (Rob Weir)</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ertius.org/blog/draft-posts-in-ikiwiki/"/><id>http://ertius.org//blog/draft-posts-in-ikiwiki/</id>
        <content type="html" xml:base="https://ertius.org/blog/draft-posts-in-ikiwiki/">&lt;p&gt;Since feeds in &lt;a rel=&quot;external&quot; href=&quot;https://ikiwiki.org/&quot;&gt;&lt;code&gt;ikiwiki&lt;/code&gt;&lt;/a&gt; are just the result of the &lt;code&gt;[[inline]]&lt;/code&gt; directive generating a list of pages, you can use the combination of a &lt;code&gt;pagespec&lt;/code&gt; and the &lt;code&gt;tag&lt;/code&gt; plugin to stop ikiwiki from syndicating draft pages. Just include &lt;code&gt;!tagged(draft)&lt;/code&gt; 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 class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[[!inline  pages=&amp;quot;./blog/* and !*/Discussion and !tagged(draft)&amp;quot; show=&amp;quot;100&amp;quot; ]]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;then for each article you’d like to hide for now, simply add the ‘draft’ tag:&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[[!tag  foo bar baz draft]]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Nginx and IPv6</title>
        <published>2009-10-29T00:00:00+00:00</published>
        <updated>2009-10-29T00:00:00+00:00</updated>
        
        <author>
          <name>rweir@ertius.org (Rob Weir)</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ertius.org/blog/nginx-and-ipv6/"/><id>http://ertius.org//blog/nginx-and-ipv6/</id>
        <content type="html" xml:base="https://ertius.org/blog/nginx-and-ipv6/">&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 class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;nginx&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;listen&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-12&quot;&gt;   80&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;with&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;nginx&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;listen&lt;/span&gt;&lt;span&gt; [::]:80  &lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-12&quot;&gt;default&lt;/span&gt;&lt;span&gt; ipv6only=on&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&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 class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;nginx&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;listen&lt;/span&gt;&lt;span&gt;       [::]:80&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;just below&lt;/p&gt;
&lt;pre class=&quot;giallo z-l-code z-d-code&quot; &gt;&lt;code data-lang=&quot;nginx&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span class=&quot;z-l-9 z-d-17&quot;&gt;listen&lt;/span&gt;&lt;span class=&quot;z-l-1 z-d-12&quot;&gt;       80&lt;/span&gt;&lt;span class=&quot;z-d-7&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;so nginx listens on both.&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>PositiveSSL Certificate Chaining</title>
        <published>2009-10-22T00:00:00+00:00</published>
        <updated>2009-10-22T00:00:00+00:00</updated>
        
        <author>
          <name>rweir@ertius.org (Rob Weir)</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://ertius.org/blog/positivessl-certificate-chaining/"/><id>http://ertius.org//blog/positivessl-certificate-chaining/</id>
        <content type="html" xml:base="https://ertius.org/blog/positivessl-certificate-chaining/">&lt;p&gt;If you have one of the free PositiveSSL certs that Namecheap gives
away with new domains, you&#39;ll find that it probably needs an
intermediate cert to make OpenSSL stop complaining. Since they list a
bunch &lt;a rel=&quot;external&quot; 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;on the Comodo website&lt;/a&gt;,
let me save you some time: you need &lt;a rel=&quot;external&quot; 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;.&lt;/p&gt;
&lt;p&gt;If you&#39;re using nginx, just add that file to the bottom of your signed
cert (i.e. the thing PositiveSSL emailed you).&lt;/p&gt;
</content>
        
    </entry>
</feed>
