<?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&#39;s blog</description>
<item>
	
	<title>Dune2 on Linux</title>
	
	
	  <guid>http://ertius.org//blog/dune2-on-linux/</guid>
	
	<link>http://ertius.org//blog/dune2-on-linux/</link>
	
	
	<category>debian</category>
	
	<category>dosbox</category>
	
	<category>dune2</category>
	
	<category>games</category>
	
	<category>linux</category>
	
	<category>wine</category>
	
	
	<pubDate>Tue, 27 Jul 2010 17:30:00 +1000</pubDate>
	<dcterms:modified>2010-07-27T02:58:47Z</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>
	
	
	<comments>http://ertius.org//blog/dune2-on-linux/#comments</comments>
	
</item>
<item>
	
	<title>Highlighting trailing whitespace in vim</title>
	
	
	  <guid>http://ertius.org//blog/highlighting-trailing-whitespace-in-vim/</guid>
	
	<link>http://ertius.org//blog/highlighting-trailing-whitespace-in-vim/</link>
	
	
	<category>linux</category>
	
	<category>vim</category>
	
	
	<pubDate>Wed, 23 Jun 2010 18:10:00 +1000</pubDate>
	<dcterms:modified>2010-06-24T05:21:21Z</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>
	
	
	<comments>http://ertius.org//blog/highlighting-trailing-whitespace-in-vim/#comments</comments>
	
</item>
<item>
	
	<title>Using your iphone as a modem under Debian</title>
	
	
	  <guid>http://ertius.org//blog/iphone-tethering-on-debian/</guid>
	
	<link>http://ertius.org//blog/iphone-tethering-on-debian/</link>
	
	
	<category>debian</category>
	
	<category>iphone</category>
	
	<category>linux</category>
	
	<category>modem</category>
	
	<category>tethering</category>
	
	
	<pubDate>Tue, 01 Jun 2010 20:39:00 +1000</pubDate>
	<dcterms:modified>2010-06-01T10:56:53Z</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>
	
	
	<comments>http://ertius.org//blog/iphone-tethering-on-debian/#comments</comments>
	
</item>
<item>
	
	<title>Custom User-Agent with twisted.web.client.getPage</title>
	
	
	  <guid>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>python</category>
	
	<category>twisted</category>
	
	<category>web</category>
	
	
	<pubDate>Sun, 20 Dec 2009 22:10:00 +1100</pubDate>
	<dcterms:modified>2009-12-26T08:19:32Z</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>
	
	
	<comments>http://ertius.org//blog/custom-user-agent-with-twisted-web-client-getPage/#comments</comments>
	
</item>
<item>
	
	<title>Excluding draft posts from your feeds</title>
	
	
	  <guid>http://ertius.org//blog/draft-posts-in-ikiwiki/</guid>
	
	<link>http://ertius.org//blog/draft-posts-in-ikiwiki/</link>
	
	
	<category>blog</category>
	
	<category>ikiwiki</category>
	
	
	<pubDate>Sat, 28 Nov 2009 21:47:00 +1100</pubDate>
	<dcterms:modified>2009-12-20T11:38:55Z</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>
	
	
	<comments>http://ertius.org//blog/draft-posts-in-ikiwiki/#comments</comments>
	
</item>

</channel>
</rss>
