<?xml version="1.0" encoding="iso-8859-1"?>
        <?xml-stylesheet type="text/css" href="http://www.miek.nl/blog/"?>
<rss version="2.0"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:admin="http://webns.net/mvcb/"
 xmlns:atom="http://www.w3.org/2005/Atom"
>
<channel>
<title>Filed under: linux | Miek</title>
<atom:link href="http://www.miek.nl/blog/archives/linux/index-rss.xml" rel="self" type="application/rss+xml" />
<link>http://www.miek.nl/blog</link>
<description>Thoughts on (technical) stuff</description>
<dc:language>en-us</dc:language>
<dc:creator>Miek Gieben</dc:creator>
<dc:date>2013-03-26T22:21:51+01:00</dc:date>
<admin:generatorAgent rdf:resource="http://nanoblogger.sourceforge.net" />

<item>
<link>http://www.miek.nl/blog/archives/2013/02/27/persistent_synaptic_touchpad_settings_in_ubuntu_12_10/index.html</link>
<guid isPermaLink="true">http://www.miek.nl/blog/archives/2013/02/27/persistent_synaptic_touchpad_settings_in_ubuntu_12_10/index.html</guid>
<title>Persistent Synaptic Touchpad settings in Ubuntu 12.10+</title>
<dc:date>2013-02-27T20:29:45+01:00</dc:date>
<dc:creator>Miek Gieben</dc:creator>
<dc:subject> linux</dc:subject>
<description><![CDATA[<p>I was wondering how to make my touchpad settings permanent in Ubuntu. I could find a few pointers on the net, like:</p>
<ul>
<li><p>http://tombuntu.com/index.php/2011/11/06/persistent-touchpad-configuration-in-ubuntu-11-10/</p></li>
<li><p>http://ubuntuforums.org/archive/index.php/t-1538147.html</p></li>
</ul>
<p>But sometimes it makes sense to look at your own system's documentation:</p>
<pre><code>% cd /usr/share/X11/xorg.conf.d
% head 50-synaptics.conf
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
#   Option &quot;OptionName&quot; &quot;value&quot;
#
Section &quot;InputClass&quot;</code></pre>
<p>Which seems pretty obvious to me. I added</p>
<pre><code>Option &quot;TabButton2&quot; &quot;3&quot;
Option &quot;TabButton3&quot; &quot;2&quot;</code></pre>
<p>as my personal configuration.</p>]]></description>

</item>
<item>
<link>http://www.miek.nl/blog/archives/2013/01/22/pandoc2rfc_and_xml2rfc/index.html</link>
<guid isPermaLink="true">http://www.miek.nl/blog/archives/2013/01/22/pandoc2rfc_and_xml2rfc/index.html</guid>
<title>Pandoc2rfc and xml2rfc</title>
<dc:date>2013-01-22T12:23:55+01:00</dc:date>
<dc:creator>Miek Gieben</dc:creator>
<dc:subject> pandoc, linux</dc:subject>
<description><![CDATA[<p>Thanks to the help of Marc Petit-Huguenin I have been able to create (and upload) debian packages (install fine on Ubuntu) for Pandoc2rfc and xml2rfc. For Pandoc2rfc I choose to add a little shell script that calls pandoc and xml2rfc for you. So creating an I-D is as simple as:</p>
<pre><code>pandoc2rfc *.mkd    # or a few other extensions</code></pre>
<p>The shell script depends on <code>transform.xsl</code> to be installed in <code>/usr/lib/pandoc2rfc/</code>, allthough this can be overridden with a flag. When pandoc2rfc is installed you don't have carry the supports scripts inside your I-D's source repo. My pandoc2rfc I-D source directory now only has: <code>template.xml</code>, <code>abstract.pdc</code>, <code>back.pdc</code>, <code>middle.pdc</code> and a <code>bib/</code> directory with references.</p>
<h1 id="debian-packages">Debian packages</h1>
<p>As said there are now debian packages, see below on the setup. If you are finished you can install the pandoc2rfc and xml2rfc combo with:</p>
<pre><code>sudo apt-get install python-xml2rfc pandoc2rfc</code></pre>
<p>I'm still learning this create-deb-and-upload stuff, so some breakage might be expected....</p>
<p>With the help of Marc Petit-Huguenin I have access to a debian infra structure over at pandoc2rfc.implementers.org</p>
<p>Here's what you should probably put in your: /etc/apt/sources.list.d/pandoc2rfc.list:</p>
<pre><code>deb http://pandoc2rfc.implementers.org/ testing/$(ARCH)/
deb http://pandoc2rfc.implementers.org/ testing/all/
deb http://pandoc2rfc.implementers.org/ stable/$(ARCH)/
deb http://pandoc2rfc.implementers.org/ stable/all/
deb-src http://pandoc2rfc.implementers.org/ testing/source/
deb-src http://pandoc2rfc.implementers.org/ stable/source/</code></pre>
<p>Note that if the apt-transport-https package is installed then I recommend to use https instead:</p>
<pre><code>deb https://pandoc2rfc.implementers.org/ testing/$(ARCH)/
deb https://pandoc2rfc.implementers.org/ testing/all/
deb https://pandoc2rfc.implementers.org/ stable/$(ARCH)/
deb https://pandoc2rfc.implementers.org/ stable/all/
deb-src https://pandoc2rfc.implementers.org/ testing/source/
deb-src https://pandoc2rfc.implementers.org/ stable/source/</code></pre>
<p>All the packages are automatically signed, you can install the public key like this:</p>
<pre><code>wget https://pandoc2rfc.implementers.org/config/key.asc
sudo apt-key add key.asc</code></pre>
<p>The fingerprint of the key is as follow:</p>
<pre><code>CDB3 BC52 DFDC 8A58 35F1 714D 0309 943D 9AD0 8F3F</code></pre>]]></description>

</item>
<item>
<link>http://www.miek.nl/blog/archives/2012/09/14/updated_dns_syntax_file_for_vim/index.html</link>
<guid isPermaLink="true">http://www.miek.nl/blog/archives/2012/09/14/updated_dns_syntax_file_for_vim/index.html</guid>
<title>Updated DNS syntax file for VIM</title>
<dc:date>2012-09-14T14:08:46+01:00</dc:date>
<dc:creator>Miek Gieben</dc:creator>
<dc:subject> linux, dns(sec)</dc:subject>
<description><![CDATA[<p>When editing zone files with vim I always get annoyed by the fact that the syntax highlighting did not understand newer types 'n stuff. I never did anything about until now.</p>
<p><a href="http://www.miek.nl/downloads/2012/bindzone.vim">Download this vim syntax file</a> and drop it in <code>~/.vim/syntax</code>. It adds newer (DNSSEC) types and base64 highlighting. Base64 only works when there are no embedded spaces (patch welcome to fix that btw!)</p>]]></description>

</item>
<item>
<link>http://www.miek.nl/blog/archives/2012/07/03/leap_second_insertion_at_work/index.html</link>
<guid isPermaLink="true">http://www.miek.nl/blog/archives/2012/07/03/leap_second_insertion_at_work/index.html</guid>
<title>Leap second insertion at work</title>
<dc:date>2012-07-03T14:17:27+01:00</dc:date>
<dc:creator>Miek Gieben</dc:creator>
<dc:subject> linux</dc:subject>
<description><![CDATA[<p><code>Puppetd</code> (ruby) was going nuts.</p>
<pre><code>Jul  1 01:59:59 elektron kernel: [183728.001601] Clock: inserting leap second 23:59:60 UTC</code></pre>
<p>Results in:</p>
<img src="http://miek.nl/gfx/2012/leap-second.png"/>]]></description>

</item>
<item>
<link>http://www.miek.nl/blog/archives/2012/06/22/munin_port_traffic_plugin/index.html</link>
<guid isPermaLink="true">http://www.miek.nl/blog/archives/2012/06/22/munin_port_traffic_plugin/index.html</guid>
<title>Munin port traffic plugin</title>
<dc:date>2012-06-22T15:31:03+01:00</dc:date>
<dc:creator>Miek Gieben</dc:creator>
<dc:subject> linux, site</dc:subject>
<description><![CDATA[<p>I wanted to look at the increase in <code>ntp</code> traffic now that I've joined the <code>pool.ntp.org</code> ranks. Unfortunately <code>munin</code> didn't have a watch-port-x-and-draw-something-plugin. So I wrote my own based upon the <code>ip_</code> plugin.</p>
<p>The plugin monitors both v6, v4, tcp and udp and plots them together, as send and received. Just symlink the port number to the plugin:</p>
<pre><code>ip_port_123 -&gt; ip_port_</code></pre>
<p>For it to work, you <em>do</em> need some <code>iptables</code> rules, so yes, this plugin only works in Linux. See the <a href="http://miek.nl/downloads/2012/ip_port_">munin plugin</a> for the documentation.</p>
<p>Obligatory screenshot:</p>
<img src="http://miek.nl/gfx/2012/ip_port_123-day.png"/>]]></description>

</item>
<item>
<link>http://www.miek.nl/blog/archives/2012/06/19/ath9k_under_linux/index.html</link>
<guid isPermaLink="true">http://www.miek.nl/blog/archives/2012/06/19/ath9k_under_linux/index.html</guid>
<title>ath9k under Linux</title>
<dc:date>2012-06-19T22:39:04+01:00</dc:date>
<dc:creator>Miek Gieben</dc:creator>
<dc:subject> linux</dc:subject>
<description><![CDATA[<p>For some reason I was experiencing wifi disconnects with the <code>ath9k</code> wifi driver under Linux (Ubuntu 12.04). After reading numerous blogs and bug reports (disable ipv6, use <code>hwcrypto=0</code>, etc.), I suspected it was the power management that was somehow disabling the driver, in turn leading to a disconnect. This will probably be fixed in newer kernels (Ubuntu 12.04 ships 3.2.x).</p>
<p>For now I took a shortcut and disabled the power management on the <code>wlan0</code> interface. For this to work I created a (super)small script: <code>/etc/network/if-up.d/wifipower</code>:</p>
<pre><code>#!/bin/sh -e
case $IFACE in
    wlan0) /sbin/iwconfig &quot;$IFACE&quot; power off ;;
esac</code></pre>]]></description>

</item>
<item>
<link>http://www.miek.nl/blog/archives/2011/12/24/convert_vim_colors_to_gvim_colors/index.html</link>
<guid isPermaLink="true">http://www.miek.nl/blog/archives/2011/12/24/convert_vim_colors_to_gvim_colors/index.html</guid>
<title>Convert vim colors to gvim colors</title>
<dc:date>2011-12-24T00:08:12+01:00</dc:date>
<dc:creator>Miek Gieben</dc:creator>
<dc:subject> linux, programming</dc:subject>
<description><![CDATA[<p>I've tweaked my vim color scheme
<a href="http://www.miek.nl/blog/archives/2011/09/11/xoria256m_color_scheme/index.html">quite a bit</a>
and tried
to keep the colors of gvim (which I use less often) in sync.</p>

<p>This keeping in sync hasn't worked out, so I wrote this little
script to convert the vim colors to the gvim ones:</p>

<p>Download the <a href="http://www.miek.nl/downloads/2011/makegvim">makegvim script</a>, and
use it like:</p>

<pre><code>$ ./makegvim &lt; ~/.vim/colors/&lt;yourfile&gt; &gt; /tmp/x
$ mv /tmp/x ~/.vim/colors/&lt;yourfile&gt;
</code></pre>

<p>And now the colors of <code>gvim</code> should be identical to those of <code>vim</code>.</p>

<p>Note: colors like <code>000</code> must be used like <code>cterm=0</code> otherwise
the conversion fails (the script isn't that smart).</p>]]></description>

</item>
<item>
<link>http://www.miek.nl/blog/archives/2011/12/13/cherry-picking_remote_branches/index.html</link>
<guid isPermaLink="true">http://www.miek.nl/blog/archives/2011/12/13/cherry-picking_remote_branches/index.html</guid>
<title>Cherry-picking remote branches</title>
<dc:date>2011-12-13T08:51:14+01:00</dc:date>
<dc:creator>Miek Gieben</dc:creator>
<dc:subject> linux, programming</dc:subject>
<description><![CDATA[<p>I've create a little tool (actually an XSLT file) that
helps to write RFCs. Browsing my <a href="https://github.com/miekg/pandoc2rfc">github repo</a>
I found two different forks. And browsing those
forks, I saw some commits I wanted to have.</p>

<p>But how do you merge a commit from a forked git repository?
Turns out it is not that difficult.</p>

<p>The commit I want has 
the hash <a href="https://github.com/hamnis/pandoc2rfc/commit/5a11e88ddbef4ce7513aae93bdcd377449f45efb">5a11e88ddbef4ce7513aae93bdcd377449f45efb</a>.</p>

<p>The steps:</p>

<ul>
<li><p>Create a remote branch:</p>

<pre><code>git remote add hamnis https://github.com/hamnis/pandoc2rfc
</code></pre></li>
<li><p>Fetch the contents of it:</p>

<pre><code>git fetch hamnis
</code></pre></li>
<li><p>Cherry-pick the commit you need:</p>

<pre><code>git cherry-pick -c 5a11e88ddbef4ce7513aae93bdcd377449f45efb
[master 7501f13] transform.xsl: Supporting the output from pandoc 1.8.2.1:  
* table/title 
instead of table/caption  
* table/tgroup/thead/row/entry instead of table/thead/tr/th  
* table/tgroup/tbody/row/entry instead of table/tbody/tr/td
 Author: Trygve Laugstøl &lt;trygvis@inamo.no&gt;
 1 files changed, 3 insertions(+), 3 deletions(-)
</code></pre></li>
</ul>

<p>Voila. </p>]]></description>

</item>
<item>
<link>http://www.miek.nl/blog/archives/2011/12/05/linux_considered_harmless/index.html</link>
<guid isPermaLink="true">http://www.miek.nl/blog/archives/2011/12/05/linux_considered_harmless/index.html</guid>
<title>Linux considered harmless</title>
<dc:date>2011-12-05T09:48:12+01:00</dc:date>
<dc:creator>Miek Gieben</dc:creator>
<dc:subject> thoughts, linux</dc:subject>
<description><![CDATA[<p>At the conferences I visit (<a href="http://www.ietf.org/">IETF</a>, <a href="http://www.ripe.net/">RIPE</a>, etc.), I see almost all
nerds carrying Mac books. True, there are also people daring to use
Windows, but I'll ignore those for now. Only a minority of the people use an Open
Unix on their laptops, be it Linux or FreeBSD.
(Yes, I do not consider Mac OS X a true open source operating system).</p>

<p>I like to think of people going to IETFs as tinkerers: they want to develop
new protocols or make existing ones better. I would say perfect Linux users!</p>

<p>But no, most of them prefer Mac OS X, why? Because "it just works". And this is true. If
you use Linux on a laptop you will probably need to fiddle a little to get
everything working. On Mac OS X this isn't the case, it will just work.</p>

<p>Why do <em>I</em> still prefer Linux? Because it has thought me everything I know about
computers. Especially in the old days, it needed a lot of hand holding to get
boring things like sound working.  I want to stay sharp, on the edge and get to
know (new) stuff. I want to run a mailer daemon on my server, I want to play
with new code. I want to get distracted and sometimes I'm forced to get my
hands dirty and figure out how PulseAudio works. This takes, but, you will always learn something new.</p>

<p>If "Mail App" grinds away on the CPU and takes the load up to 100% you're stuck.
If "mutt" has such a problem (if ever!), I can probably fix this. </p>

<p>And this is the crux of the matter... How can it be that people who want
to tinker with stuff be content with a platform which is specifically designed
to prevent tinkering?</p>

<p>I'm convinced <a href="http://www.ubuntu.com">Ubuntu</a> can deliver the same user experience
as <a href="http://www.apple.com">Apple</a>, but with 100% open source software.</p>

<blockquote>
  <p>Keep on tinkering!</p>
</blockquote>

<h2>Related reading</h2>

<ul>
<li><a href="http://www.law.harvard.edu/news/2011/11/30_zittrain-the-personal-computer-is-dead.html">The personal computer is dead</a></li>
</ul>]]></description>

</item>
<item>
<link>http://www.miek.nl/blog/archives/2011/09/18/color_me_color_you/index.html</link>
<guid isPermaLink="true">http://www.miek.nl/blog/archives/2011/09/18/color_me_color_you/index.html</guid>
<title>color me, color you</title>
<dc:date>2011-09-18T09:50:03+01:00</dc:date>
<dc:creator>Miek Gieben</dc:creator>
<dc:subject> zsh, linux</dc:subject>
<description><![CDATA[<p>In <a href="http://www.miek.nl/blog/archives/2011/09/11/xoria256m_color_scheme/index.html">the xoria256m post</a>, 
I introduced my xoria256 like color scheme. Again, inspired by 
<a href="http://ethanschoonover.com/solarized">solarized</a>, I extended
this to other applications. So now I use this in the following apps:</p>

<ul>
<li>vim (see that previous post);</li>
<li>mutt (idem);</li>
<li>zsh;</li>
<li>dircolors;</li>
<li>git (a bit).</li>
</ul>

<h2>zsh</h2>

<p>See this file 
<a href="https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/spectrum.zsh">to setup the colors</a>. 
Then in my prompt I have stuff like:</p>

<pre><code>PS1=$'${vcs_info_msg_0_}$FG[067]%(1j.$myjobs% $FX[reset].$FX[reset])$FG[179]%#$FX[reset] '
RPS1="$RPSL%$MAXMID&lt;...&lt;$mypath$RPSR$FG[239]$FX[bold]$__ZH$FX[reset]${vcs_info_msg_1_}"
RPSR=$'$FX[reset]$FG[009]%(0?.$FG[reset]. $E)$FX[reset]'
</code></pre>

<p>For zsh I have two files that make up my prompt:</p>

<ul>
<li><a href="http://www.miek.nl/downloads/2011/zprompt">zprompt</a>, primary prompt setup;</li>
<li><a href="http://www.miek.nl/downloads/2011/zvcs">zvcs</a>, version control <code>vcs_info</code> stuff.</li>
</ul>

<p>Also see <a href="http://www.miek.nl/blog/archives/2008/02/20/my_zsh_prompt_setup/index.html">this older blog post</a> on this setup. 
This leads to a prompt looking like this (click for larger):</p>

<p>The normal prompt is very plain. Almost nothing is shown, left the
prompt <code>%</code> and on the right the PWD <code>~</code>:
<a href="http://miek.nl/gfx/2011/prompt-local.png"><img width="600px"
src="http://miek.nl/gfx/2011/prompt-local.png" title="Zsh " /></a></p>

<p>When logging in to a remote server, the hostname appears on the
right:
<a href="http://miek.nl/gfx/2011/prompt-remote.png"><img width="600px"
src="http://miek.nl/gfx/2011/prompt-remote.png" title="Zsh " /></a></p>

<p>When a program ends abnormally the exitcode is shown, in words (<code>-INT</code>)
and red when it isn't zero:
<a href="http://miek.nl/gfx/2011/prompt-exitcode.png"><img width="600px"
src="http://miek.nl/gfx/2011/prompt-exitcode.png" title="Zsh " /></a></p>

<p>When you background an app. the number of bg jobs appear in blue. The
one with the <code>+</code> is the current job. Multiple jobs are separated with commas:
<a href="http://miek.nl/gfx/2011/prompt-background.png"><img width="600px"
src="http://miek.nl/gfx/2011/prompt-background.png" title="Zsh " /></a></p>

<p>When you enter a git/svn/hg directory, the right side shows the type
(git, svn, hg) and on the left you get the current branch. 
<a href="http://miek.nl/gfx/2011/prompt-git.png"><img width="600px"
src="http://miek.nl/gfx/2011/prompt-git.png" title="Zsh " /></a></p>

<h1>dircolors</h1>

<p>Modified from Solarized, not quite finished, but certainly looks nice (IMHO).
See <a href="http://www.miek.nl/downloads/2011/dircolors">this dircolors file</a>, I use
it like:</p>

<pre><code>eval $(dircolors ./dircolors)
</code></pre>

<h1>git</h1>

<p>The <code>alias</code> section from my <code>.gitconfig</code>:</p>

<pre><code>[alias]
        st = status
        ci = commit
        br = branch
        co = checkout
        df = diff
        lg = log -p
        pl = pull
        ps = push
        timeline = log --graph \"--pretty=format:%C(192)%h%Creset by %C(bold 239)%an%Creset (%ar)%C(182)%d%Creset%n%s%n%b\" --all
</code></pre>

<p>The colors are selected with <code>%C(number)</code>.</p>]]></description>

</item>
</channel>
</rss>
