<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Ryan Kavanagh's /dev/brain—Planet Ubuntu feed</title>
 <link href="http://ryanak.ca/feeds/planet-ubuntu.xml" rel="self"/>
 <link href="http://ryanak.ca"/>
 <updated>2013-05-03T16:59:29-04:00</updated>
 <id>http://ryanak.ca/</id>
 <author>
   <name>Ryan Kavanagh</name>
   <email>rak@debian.org</email>
 </author>

 
 <entry>
   <title>Setting up full-disk encryption in OpenBSD 5.3</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/planet-ubuntu/2013/03/26/Setting-up-full-disk-encryption-in-OpenBSD-5.3.html"/>
   <updated>2013-03-26T13:40:54-04:00</updated>
   <id>tag:ryanak.ca,2013-03-26:/planet-ubuntu/2013/03/26/Setting-up-full-disk-encryption-in-OpenBSD-5.3</id>
   <content type="html">&lt;p&gt;I recently decided to try out a snapshot of &lt;a href='http://openbsd.org/53.html'&gt;OpenBSD 5.3&lt;/a&gt;, intrigued by the notice that&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;softraid(4) RAID1 and crypto volumes are now bootable on i386 and amd64 (full disk encryption).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I&amp;#8217;ve always used an encrypted LVM (as setup by the alternate CD) with a fully encrypted root on my netbook and laptop when running Debian/Kubuntu and never noticed much a performance hit. Unfortunately, I&amp;#8217;m &lt;a href='http://comments.gmane.org/gmane.os.openbsd.misc/203166'&gt;not the only one&lt;/a&gt; who has noticed a significant drop in performance with full-disk encryption on OpenBSD.&lt;/p&gt;

&lt;p&gt;Although the steps required to setup full-disk encryption (as opposed to requiring &lt;a href='http://geekyschmidt.com/2011/01/19/configuring-openbsd-softraid-fo-encryption'&gt;manual intervention at boot&lt;/a&gt; or the equivalent of &lt;a href='http://geekyschmidt.com/2011/01/24/configuring-openbsd-svnd-for-encrypted-volumes'&gt;loop-mounted&lt;/a&gt; &lt;a href='http://www.geektechnique.org/projectlab/84/'&gt;encrypted images&lt;/a&gt; via &lt;a href='http://www.openbsd.org/cgi-bin/man.cgi?query=vnconfig&amp;amp;apropos=0&amp;amp;sektion=8'&gt;&lt;code&gt;vnconfig(8)&lt;/code&gt;&lt;/a&gt;) on OpenBSD are not explicitly documented anywhere, searching through the mailing lists, man pages, and trial and error provided the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Boot from your install media. Select the &lt;code&gt;(S)hell&lt;/code&gt; option.&lt;/li&gt;

&lt;li&gt;Assuming the disk you&amp;#8217;re installing to is &amp;#8221;&lt;code&gt;wd0&lt;/code&gt;&amp;#8221;, run &lt;code&gt;fdisk -i
wd0&lt;/code&gt; if you&amp;#8217;re on an i386. If I&amp;#8217;m not mistaken, you can skip to the following step otherwise.&lt;/li&gt;

&lt;li&gt;Run &lt;code&gt;disklabel -E wd0&lt;/code&gt;. Create a label (typically &lt;code&gt;b&lt;/code&gt;) of the appropriate size of type &lt;code&gt;swap&lt;/code&gt; for swap, and then add a label &lt;code&gt;a&lt;/code&gt; using the remainder of the space of type &lt;code&gt;RAID&lt;/code&gt;. We aren&amp;#8217;t going to put &lt;code&gt;swap&lt;/code&gt; on our crypto device since OpenBSD has encrypted the swap partition by default &lt;a href='http://www.openbsd.org/plus38.html'&gt;since 2005&lt;/a&gt;.&lt;/li&gt;

&lt;li&gt;Setup the crypto volume as described in &lt;a href='http://www.openbsd.org/cgi-bin/man.cgi?query=bioctl&amp;amp;apropos=0&amp;amp;sektion=8&amp;amp;manpath=OpenBSD+5.3&amp;amp;arch=i386&amp;amp;format=html'&gt;&lt;code&gt;bioctl(8)&lt;/code&gt;&lt;/a&gt;. You will be prompted for a passphrase and presented with a message along the lines of &lt;code&gt;softraid0: SR CRYPTO volume attached as sd0&lt;/code&gt; on successful setup. I used &lt;code&gt;bioctl -c C -l /dev/wd0a softraid0&lt;/code&gt; where - &lt;code&gt;-c C&lt;/code&gt; specifies a device with raidlevel &amp;#8220;CRYPTO&amp;#8221;, - &lt;code&gt;-l /dev/wd0a&lt;/code&gt; specifies the label of type RAID created in step 3 to use for the CRYPTO device, and - &lt;code&gt;softraid0&lt;/code&gt; is the softraid device to configure (this value should work unless you already have a &lt;code&gt;softraid0&lt;/code&gt; device).&lt;/li&gt;

&lt;li&gt;&lt;code&gt;exit&lt;/code&gt; from the shell and &lt;code&gt;(I)nstall&lt;/code&gt; as normal, installing to the disk &lt;code&gt;sd0&lt;/code&gt; (or whichever disk the crypto volume got attached as). In the partitioning dialog, you may need to manually adjust things since the auto-partitioning creates an additional swap label on &lt;code&gt;sd0&lt;/code&gt;, which we don&amp;#8217;t need given we already have &lt;code&gt;wd0b&lt;/code&gt;.&lt;/li&gt;

&lt;li&gt;Using &lt;a href='http://www.openbsd.org/cgi-bin/man.cgi?query=ed&amp;amp;apropos=0&amp;amp;sektion=1'&gt;&lt;code&gt;ed(1)&lt;/code&gt;&lt;/a&gt;, add the line &lt;code&gt;1a8bab44e9cc178d.b none swap
sw&lt;/code&gt; to &lt;code&gt;/mnt/etc/fstab&lt;/code&gt;, assuming that &lt;code&gt;1a8bab44e9cc178d&lt;/code&gt; is the DUID associated with &lt;code&gt;wd0&lt;/code&gt; (you can find this out by running &lt;code&gt;sysctl hw.disknames&lt;/code&gt;, which will output something like &lt;code&gt;hw.disknames=wd0:1a8bab44e9cc178d,cd0:,rd0:6ce80c78714fa32f,sd0:fce7bfa23c8ec20d&lt;/code&gt;; just search for the DUID associated with &lt;code&gt;wd0&lt;/code&gt;). Alternatively, wait until you boot into your system, and add it to your &lt;code&gt;/etc/fstab&lt;/code&gt; using &lt;a href='http://www.openbsd.org/cgi-bin/man.cgi?query=vi&amp;amp;apropos=0&amp;amp;sektion=1'&gt;&lt;code&gt;vi(1)&lt;/code&gt;&lt;/a&gt; or &lt;a href='http://www.openbsd.org/cgi-bin/man.cgi?query=mg&amp;amp;apropos=0&amp;amp;sektion=1'&gt;&lt;code&gt;mg(1)&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;

&lt;li&gt;Reboot, and you&amp;#8217;ll be prompted for your passhprase. You&amp;#8217;re done!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here&amp;#8217;s a screenshot of steps 1 through 4.&lt;/p&gt;

&lt;p&gt;&lt;img alt='Steps 1 through 4' src='/files/2013-03-26-113954_720x400_scrot.png' /&gt;&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s a screenshot of the passphrase prompt, after successfully entering the passphrase:&lt;/p&gt;

&lt;p&gt;&lt;img alt='Passphrase prompt' src='/files/2013-03-26-125344_720x400_scrot.png' /&gt;&lt;/p&gt;

&lt;p&gt;If I&amp;#8217;ve made any errors in the steps above, please point them out in the comments below or by sending me an email.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Search RCS and CVS ",v" files with rcsgrep</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/planet-ubuntu/2013/02/20/Grep-RCS-CVS-files-with-rcsgrep.html"/>
   <updated>2013-02-20T08:52:09-05:00</updated>
   <id>tag:ryanak.ca,2013-02-20:/planet-ubuntu/2013/02/20/Grep-RCS-CVS-files-with-rcsgrep</id>
   <content type="html">&lt;p&gt;A few years ago I was doing research comparing how large software distributions handled shared object libraries, and studied Debian, FreeBSD, and Ubuntu. Extracting data about Debian packages was easy thanks to Peter Palfrader&amp;#8217;s &lt;a href='http://snapshot.debian.org/'&gt;snapshot.debian.org&lt;/a&gt; service, which provides a machine-usable interface to Debian&amp;#8217;s package history. FreeBSD&amp;#8217;s data is equally accessible, albeit in a less pleasant format: their ports tree was stored in &lt;a href='http://www.freebsd.org/developers/cvs.html'&gt;CVS&lt;/a&gt; until July 2012. One could easily rsync a copy of the ports tree&amp;#8217;s CVS repository to a local machine to analyze the data. This left you with a local tree full of &lt;code&gt;,v&lt;/code&gt; files, each corresponding to the history of a given file with at that location. I needed to extract all kinds of data from a tree full of these files, such as what revisions contained lines matching a regex, when these revisions were checked in, any tags associated with it, etc. To make things easier, it also helped to know the line numbers of the matching lines. Hence the birth of &lt;code&gt;rcsgrep&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;rcsgrep&lt;/code&gt; is a Python script that makes use of Paul McGuire&amp;#8217;s fabulous &lt;a href='http://pyparsing.wikispaces.com/'&gt;pyparsing&lt;/a&gt; library. It allows you to search a &lt;a href='http://www.freebsd.org/cgi/man.cgi?query=rcsfile'&gt;RCS&lt;/a&gt; file (the &lt;code&gt;,v&lt;/code&gt; file format used by RCS and CVS to store revision history) using a Python regex, and the output format is customizable to allow printing only certain kinds of information, such as the revision number, the line number, the matching line, the line&amp;#8217;s author, the date it appeared, any tags associated with the line, and (useful when running over a large number of files) the file name. To make machine parsing (using AWK of course) easier, you can also specify the column separator.&lt;/p&gt;

&lt;p&gt;For example, I entered the lines &amp;#8220;The quick brown&amp;#8221;, &amp;#8220;fox jumped over&amp;#8221;, &amp;#8220;the lazy dog. Woof!&amp;#8221; into the file abc, checking in the changes after each line. The invocation &lt;code&gt;./rcsgrep -s &amp;#39; &amp;#39; -f rlLda &amp;#39;.*&amp;#39; abc,v&lt;/code&gt;, with spaces for column separation, and format options &lt;code&gt;r&lt;/code&gt; is for revision, &lt;code&gt;l&lt;/code&gt; for line number, &lt;code&gt;L&lt;/code&gt; for line contents, &lt;code&gt;d&lt;/code&gt; for date, and &lt;code&gt;a&lt;/code&gt; for author, outputs:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;1.3    1    The quick brown    2013.02.20.14.24.09    ryan
1.3    2    jumped over the    2013.02.20.14.24.09    ryan
1.3    3    lazy dog. Woof!    2013.02.20.14.24.09    ryan
1.2    1    The quick brown    2013.02.20.14.23.48    ryan
1.2    2    jumped over the    2013.02.20.14.23.48    ryan
1.1    1    The quick brown    2013.02.20.14.23.25    ryan&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I&amp;#8217;m particularly proud about my &lt;code&gt;grep()&lt;/code&gt; function in &lt;code&gt;rcsfile.py&lt;/code&gt;, which goes through each revision, tracking additions and deletions, but only keeping the lines matching the regex in memory. In any case, &lt;code&gt;rcsgrep&lt;/code&gt; is licensed under the ISC license and can be found on &lt;a href='https://github.com/ryanakca/rcsgrep'&gt;github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Addendum:&lt;/em&gt; I learned after the fact that O&amp;#8217;Reilly&amp;#8217;s &lt;a href='http://books.google.ca/books?id=tDDb5zRoONwC&amp;amp;pg=SA13-PA6&amp;amp;lpg=SA13-PA6&amp;amp;dq=rcsgrep&amp;amp;source=bl&amp;amp;ots=wSg6OtbJ8W&amp;amp;sig=KNiqy2zZtF95_KaCS1ObUGjDHwE&amp;amp;hl=en&amp;amp;sa=X&amp;amp;ei=Qt8kUaOOGMmCrAGl0oCQCQ&amp;amp;redir_esc=y#v=onepage&amp;amp;q=rcsgrep&amp;amp;f=false'&gt;&amp;#8220;UNIX Power Tools&amp;#8221;&lt;/a&gt; offers something similar by the same name, except that it is runs several processes, such as &lt;code&gt;co&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt; and &lt;code&gt;sed&lt;/code&gt;, as opposed to a single Python script.&lt;/p&gt;</content>
 </entry>
 
 <entry>
   <title>Fixing mutt header cache</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/planet-ubuntu/2012/07/03/Fixing-mutt-header-cache.html"/>
   <updated>2012-07-03T10:47:37-04:00</updated>
   <id>tag:ryanak.ca,2012-07-03:/planet-ubuntu/2012/07/03/Fixing-mutt-header-cache</id>
   <content type="html">&lt;p&gt;Every now and then I have to kill mutt, which if done at the wrong time, can
leave the header cache in an open state. Then attempting to restart mutt will
cause it to hang at the &quot;Selecting INBOX&quot; stage. If mutt is compiled with
support for the Tokyo Cabinet header cache backend (as it appears to be in
Debian), a quick fix for this issue is to repair the header cache database using
the Tokyo Cabinet utility &lt;code&gt;tcbmgr&lt;/code&gt; from the
&lt;code&gt;tokyocabinet-bin&lt;/code&gt; package. Simply running &lt;code&gt;tcbmgr optimize -nl
    ~/.mutt/cache/headers&lt;/code&gt; does the trick, and is much nicer of a fix than
deleting the header cache.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>mutt-fetchbug&#58; fetch BTS bug reports from mutt</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/Debian/planet-ubuntu/2012/01/05/mutt-fetchbug.html"/>
   <updated>2012-01-05T15:58:00-05:00</updated>
   <id>tag:ryanak.ca,2012-01-05:/Debian/planet-ubuntu/2012/01/05/mutt-fetchbug</id>
   <content type="html">&lt;p&gt;I've been a longtime mutt user, but have gotten somewhat annoyed of having to
open a new terminal when I want to read or reply to a Debian bug with mutt
(using '&lt;code&gt;bts show 123456&lt;/code&gt;'). How nice it would be to be able to fetch
a bug report from within mutt! And so, ladies and gentlemen, I present to you
&lt;code&gt;mutt-fetchbug&lt;/code&gt;.  It's extensively based on Zack's &lt;a
    href=&quot;http://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/&quot;&gt;
    &lt;code&gt;mutt-notmuch&lt;/code&gt;&lt;/a&gt; script (a nice interface between mutt and
notmuch for searching mail, I highly recommend it).&lt;/p&gt;

&lt;p&gt;By adding a line like the following to your &lt;code&gt;~/.muttrc&lt;/code&gt;, you can
simply press &quot;&lt;code&gt;F7&lt;/code&gt;&quot; and enter a bug number from your mutt index in
order to fetch and display a bug report's mbox file:&lt;/p&gt;

&lt;pre&gt;
    macro index &lt;F7&gt; \
        &quot;&lt;enter-command&gt;unset wait_key&lt;enter&gt;&lt;shell-escape&gt;~/bin/mutt-fetchbug --prompt search&lt;enter&gt;&lt;change-folder-readonly&gt;~/.cache/mutt_btsresults&lt;enter&gt;&lt;enter-command&gt;set wait_key&lt;enter&gt;&quot; \
        &quot;fetch bug(s) (using bts show)&quot;
&lt;/pre&gt;

&lt;p&gt;The above presupposes you've downloaded &lt;a
    href=&quot;/files/mutt-fetchbug&quot;&gt;&lt;code&gt;mutt-fetchbug&lt;/code&gt;&lt;/a&gt; and placed it
with executable permissions in &lt;code&gt;~/bin&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Those interested in making improvements or extending
&lt;code&gt;mutt-fetchbug&lt;/code&gt; are more than welcome to do so, it's licensed under
the GPLv3+. It can be fetched from my &lt;a
    href=&quot;https://github.com/ryanakca/ryanakca-dotfiles/blob/master/bin/mutt-fetchbug&quot;&gt;git
    branch&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Fixed the broken link to mutt-fetchbug, thanks
Christian for the heads up.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>New Kubuntu Wiki Theme</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/planet-ubuntu/kubuntu/2011/10/13/New-Kubuntu-Wiki-Theme.html"/>
   <updated>2011-10-13T08:20:18-04:00</updated>
   <id>tag:ryanak.ca,2011-10-13:/planet-ubuntu/kubuntu/2011/10/13/New-Kubuntu-Wiki-Theme</id>
   <content type="html">&lt;p&gt;The &lt;a href=&quot;https://wiki.kubuntu.org&quot;&gt;Kubuntu Wiki&lt;/a&gt; has a new wiki theme
based off of the Ubuntu Light wiki theme found on the &lt;a
    href=&quot;https://wiki.ubuntu.com&quot;&gt;Ubuntu Wiki&lt;/a&gt;. If you want to make this
theme your default theme, head to your &lt;a
    href=&quot;https://wiki.kubuntu.org/Home?action=userprefs&amp;sub=prefs&quot;&gt;preferences&lt;/a&gt;
page and set your preferred theme to &lt;code&gt;kubuntu-light&lt;/code&gt;. Thanks to all
involved in making this theme a reality!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Holiday MOTD</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/planet-ubuntu/holidays/2010/12/06/Holiday-MOTD.html"/>
   <updated>2010-12-06T20:23:00-05:00</updated>
   <id>tag:ryanak.ca,2010-12-06:/planet-ubuntu/holidays/2010/12/06/Holiday-MOTD</id>
   <content type="html">&lt;p&gt;Since it's the holiday season, I thought I'd greet my server's users with a
colourful MOTD. Feel free to use it by appending it to your current MOTD.&lt;/p&gt;

&lt;p&gt;You can do so with the command &lt;code&gt;sudo sh -c &quot;curl
    http://ryanak.ca/files/holiday-motd &amp;gt;&amp;gt; /etc/motd&quot;&lt;/code&gt; on normal
UNIX stations, &lt;code&gt;sudo sh -c &quot;curl http://ryanak.ca/files/holiday-motd
    &amp;gt;&amp;gt; /etc/motd.tail&quot;&lt;/code&gt; on Debian/Ubuntu systems.&lt;/p&gt;

&lt;p&gt;It'll end up looking a little like this (to get the full effect, including
blinking, run &lt;code&gt;curl http://ryanak.ca/files/holiday-motd&lt;/code&gt;):&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;http://img687.imageshack.us/img687/3686/happyholidaysv.png&quot;
alt=&quot;Christmas tree with banner saying Happy Holidays!&quot; title=&quot;Happy Holidays!&quot;
/&gt;
&lt;/figure&gt;

&lt;p&gt;Happy holidays!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Numbering paragraphs in LaTeX</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/planet-ubuntu/latex/2010/12/05/Numbering-paragraphs-in-LaTeX.html"/>
   <updated>2010-12-05T13:45:00-05:00</updated>
   <id>tag:ryanak.ca,2010-12-05:/planet-ubuntu/latex/2010/12/05/Numbering-paragraphs-in-LaTeX</id>
   <content type="html">&lt;p&gt;Recently, I was asked to write an essay and to number its paragraphs. I couldn't
find anything premade, so I worked something up using the &lt;code&gt;ledmac&lt;/code&gt;
package. It isn't perfect (you need to restart it after using the
&lt;code&gt;quote&lt;/code&gt; environment, etc.) but it did the trick for a simple essay.
In case anybody else is looking to do something similar, here's how I did
it:&lt;/p&gt;

&lt;figure&gt;
    &lt;code&gt;
        &lt;pre&gt;
        &lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;latex&quot;&gt;    &lt;span class=&quot;k&quot;&gt;\documentclass&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;article&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\usepackage&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;lipsum&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\usepackage&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;ledmac&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;% \reversemarginpar % Uncomment for in the margin&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;% \setlength\marginparwidth{2em} % Uncomment for in the margin&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\newcounter&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;para&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;\setcounter&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;para&lt;span class=&quot;nb&quot;&gt;}{&lt;/span&gt;0&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\newcounter&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;thispara&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;\setcounter&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;thispara&lt;span class=&quot;nb&quot;&gt;}{&lt;/span&gt;0&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\newcommand*&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;\newpara&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;}{&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;%&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;\refstepcounter&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;para&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;\setcounter&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;thispara&lt;span class=&quot;nb&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;\value&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;para&lt;span class=&quot;nb&quot;&gt;}}&lt;/span&gt;
      &lt;span class=&quot;c&quot;&gt;% \marginpar} % Uncomment for in the margin&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;\textbf&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;\thepara&lt;/span&gt;. &lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;% Comment for in the margin&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\begin&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;document&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\title&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;Lorem Ipsum&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\author&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;Ryan Kavanagh&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\maketitle&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\everypar&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;\noindent\newpara&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\lipsum&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;[1]&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\lipsum&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;[2]&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\lipsum&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;[3]&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;\end&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;{&lt;/span&gt;document&lt;span class=&quot;nb&quot;&gt;}&lt;/span&gt;
        
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
        &lt;/pre&gt;
    &lt;/code&gt;
    &lt;figcaption&gt;Paragraph numbering in LaTeX&lt;/figpar&gt;
&lt;/figure&gt;

&lt;p&gt;See the instructions in the comments for having numbers in the margin.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Turnin-NG 1.1 released!</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/planet-ubuntu/turnin-ng/2010/09/01/Turnin-NG-1.1-released%21.html"/>
   <updated>2010-09-01T22:13:00-04:00</updated>
   <id>tag:ryanak.ca,2010-09-01:/planet-ubuntu/turnin-ng/2010/09/01/Turnin-NG-1.1-released!</id>
   <content type="html">&lt;p&gt;Turnin-NG version 1.1 has just been released. Turnin-NG is an assignment
submission suite written in Python and composed of turnin and turnincfg.
Students can use the turnin command to submit an assignment to a course.
Professors and TAs (teaching assistants) can use turnincfg to manage submitted
assignments, making them easier to grade.&lt;/p&gt;

&lt;p&gt;Version 1.1 fixes a vulnerability found in version 1.0.1. Courses can now be
managed by groups of users instead of by a single account. The documentation has
been expanded and numerous bugs have been fixed.&lt;/p&gt;

&lt;p&gt;Here's the relevant changelog entry:&lt;/p&gt;
&lt;pre&gt;
1.1 2010-09-01
 Global:
  * Ignore build files in Git (generated documentation, build/*, etc.)
  * Always initialize all of the course's options in the config files
  * Upgrade configuration files from old releases / installations. Preserves
    previous settings, just adds the options to the config files.
  * Accept that the legacy symlink may already exist from a previous install

 turnincfg:
  * Add support for group managed courses
  * Don't die if we receive an invalid username or group when creating courses
  * Don't strip a submission if it causes an overwrite
  * Added forgotten import (sys.exit() needs sys to be imported)
  * Don't crash when raising CalledProcessError when gpg --verify fails
  * Warn on dangling signatures
  * Warn on signatures submitted by other students
  * Set the group on the compressed tarball and extracted project directory
  * Also delete tarball on delete_project if project is compressed

 turnin:
  * Don't needlessly import chown
  * Fixed vulnerability. Set student's $HOME/.turnin-ng/list to 0600 so that, on
    off chance their home directory is world readable, other students can't find
    out what their submitted file suffixes are (and thus be able to play with
    them).
  * Print a pretty error message when we try to submit to a closed project
  * Don't crash when GPG fails to sign and we try to copy a non-existent .sig file
  * Remove stale signatures on unsigned resubmits

 Documentation:
  * Fix broken infodir entry
  * Properly install info manual with install-info
  * Expand the administrative section of the info manual
&lt;/pre&gt;

&lt;p&gt;You can download the latest version of Turnin-NG &lt;a
href=&quot;http://github.com/ryanakca/Turnin-NG/downloads&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Easily download CTAN packages</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/planet-ubuntu/2010/05/16/Easily-download-CTAN-packages.html"/>
   <updated>2010-05-16T12:13:00-04:00</updated>
   <id>tag:ryanak.ca,2010-05-16:/planet-ubuntu/2010/05/16/Easily-download-CTAN-packages</id>
   <content type="html">&lt;p&gt;I use LaTeX for nearly all of my document preparation. Letters, reports, you
name it. Because I'm always finding new uses for it, I find myself frequently
downloading packages from CTAN (the Comprehensive TeX Archive Network).&lt;/p&gt;

&lt;p&gt;I find it a hassle to copy a package's URL from my desktop (where I searched
for it) to my netbook (where I want to download it). To solve this problem, I've
written a little shell function that downloads a package for me. If you want to
use it, just stick it in &lt;code&gt;$HOME/.zshrc&lt;/code&gt; if you use zsh,
&lt;code&gt;$HOME/.bashrc&lt;/code&gt; if you use bash, etc.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;ctand&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    wget http://mirror.ctan.org/macros/latex/contrib/&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;.zip &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; unzip &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;.zip
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;To download, say, the &lt;code&gt;program&lt;/code&gt; package, you'll want to run
&lt;code&gt;ctand program&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You'll need to run &lt;code&gt;source $HOME/.zshrc&lt;/code&gt; or
&lt;code&gt;source $HOME/.bashrc&lt;/code&gt; after editing either to be able to use it. Or
you can open a new terminal and use it there.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Kobby 1.0 beta 5 now available in Kubuntu Lucid</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/planet-ubuntu/2010/04/14/Kobby_1.0-beta5-now-available-in-Kubuntu-Lucid.html"/>
   <updated>2010-04-14T14:26:00-04:00</updated>
   <id>tag:ryanak.ca,2010-04-14:/planet-ubuntu/2010/04/14/Kobby_1.0-beta5-now-available-in-Kubuntu-Lucid</id>
   <content type="html">&lt;figure class=&quot;left&quot;&gt;
    &lt;a href=&quot;http://img527.imageshack.us/i/kobby10b5.png/&quot;&gt;
        &lt;img src=&quot;http://img527.imageshack.us/img527/3996/kobby10b5.th.png&quot;
             alt=&quot;Kobby&quot;&gt;
    &lt;/a&gt;
&lt;figcaption&gt;Collaboratively editing a document using Kobby&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Kobby 1.0 beta 5 is now available in Kubuntu Lucid. Some of you may be more
familiar with a gtk alternative, Gobby.&lt;/p&gt;

&lt;p&gt;Kobby is editor for collaboratively editing text documents and source files
over a network. All users can work on a file simultaneously without the need to
lock it. Kobby supports syntax highlighting for various programming and markup
languages.&lt;/p&gt;

&lt;p&gt;I hope that the UDS organizers will use the new protocol for collaborative
editing so that we can participate remotely using Kobby this time around.&lt;/p&gt;

&lt;p&gt;If you want to try it out, and don't have an infinote server to connect to,
istall the `&lt;tt&gt;infinoted&lt;/tt&gt;' package and start a server with the command
`&lt;code&gt;infinoted --security-policy=no-tls&lt;/code&gt;'.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Let's celebrate Human Achievement</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/planet-ubuntu/HAH/2010/03/27/let%27s_celebrate_human_achievement.html"/>
   <updated>2010-03-27T17:30:00-04:00</updated>
   <id>tag:ryanak.ca,2010-03-27:/planet-ubuntu/HAH/2010/03/27/let's_celebrate_human_achievement</id>
   <content type="html">&lt;figure class=&quot;left&quot;&gt;
&lt;a href=&quot;http://www.facebook.com/group.php?gid=75853650967&amp;amp;ref=ts&quot;&gt;&lt;img src=&quot;http://ryanak.ca/files/hah.jpg&quot; alt=&quot;Human Achievement Hour&quot;&gt;&lt;/a&gt;
&lt;figcaption&gt;Human Achievement Hour&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Man has progressed dramatically since the paleolithic era. Thanks to human 
achievements in the realms of science and technology, we live longer, healthier
and more easily. In the last century alone, our life expectancy has nearly
tripled, from 30 years in the early 20th century
&lt;sup&gt;&lt;a href=&quot;#ryan-footnote-1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt; to 81 years for Canadians today
&lt;sup&gt;&lt;a href=&quot;#ryan-footnote-2&quot;&gt;[2]&lt;/a&gt;&lt;/sup&gt;. Medicine has eradicated
small pox and has drastically reduced the frequency measles, polio andcountless
other diseases. Automobiles and planes have made travelling faster and
easier&amp;hellip; we've even been to the Moon. Electric lighting means we can work
and play&amp;mdash;even when the Sun has set. The computer and the Internet ease
collaboration and commerce and make the transmission of information nearly
instantaneous.&lt;/p&gt;

&lt;p&gt;Every year, hundreds of millions of people sacrifice these achievements for
a single hour. How long could they survive by sacrificing them for a week? A
month? A year?  To those who support the anthropogenic global warming theory and
believe that man has an impact on the environment, I point out that rejecting
technology is the &lt;em&gt;opposite&lt;/em&gt; of what should be done. Rather, technology
should be your solution. Why participate in an event that preaches its
sacrifice?&lt;/p&gt;

&lt;p&gt;This year, instead of celebrating Earth Hour, I'll be celebrating Human
Achievement Hour by enjoying the fruit's of man's mind. I'll be keeping my
lights, computers and heating on. We've come a long way and I think its
something worth celebrating.&lt;/p&gt;

&lt;p&gt;To celebrate Human Achievement Hour, Saturday March 27th 2010 at 20:30, you can:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;leave your lights on, watch TV, eat dinner or otherwise enjoy the fruits of man's
    mind;&lt;/li&gt;
    &lt;li&gt;spread the word;&lt;/li&gt;
    &lt;li&gt;join &lt;a href=&quot;http://www.facebook.com/group.php?gid=75853650967&amp;amp;ref=ts&quot;&gt;HAH&lt;/a&gt;
    on Facebook.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;p id=&quot;ryan-footnote-1&quot; class=&quot;reference&quot;&gt;
&lt;a href=&quot;http://en.wikipedia.org/wiki/Life_expectancy&quot;&gt;1. Life expectancy, Wikipedia&lt;/a&gt;&lt;/p&gt;

&lt;p id=&quot;ryan-footnote-2&quot; class=&quot;reference&quot;&gt;
&lt;a href=&quot;http://www.google.com/publicdata?ds=wb-wdi&amp;amp;met=sp_dyn_le00_in&amp;amp;idim=country:CAN&amp;amp;dl=en&amp;amp;hl=en&amp;amp;q=canada+life+expectancy&quot;&gt;
2. Life expectancy, Google Public Data&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>ASCIImations from 1968 and present day</title>
   <link rel="alternate" type="text/html" href="http://ryanak.ca/planet-ubuntu/2010/03/22/23-ASCIImations-from-1968-and-present-day.html"/>
   <updated>2010-03-22T15:59:00-04:00</updated>
   <id>tag:ryanak.ca,2010-03-22:/planet-ubuntu/2010/03/22/23-ASCIImations-from-1968-and-present-day</id>
   <content type="html">&lt;p&gt;Yesterday, Slashdot
&lt;a href=&quot;http://slashdot.org/story/10/03/21/1731200/Russian-ASCII-Art-Animated-Cat-From-1968&quot;&gt;
reported&lt;/a&gt; on an ASCII art animated cat from 1968, made by printing hundreds
of computer generated images of an ASCII cat and photographing them onto cinefilm.
You can check it out on
&lt;a href=&quot;http://www.youtube.com/watch?v=0O4mm3hXNgA&quot;&gt;Youtube&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For those interested in ASCIImation, you can also watch a Starwars
ASCIImation over telnet by connecting to &lt;tt&gt;towel.blinkenlights.nl&lt;/tt&gt; (IPv4 or IPv6)
on port &lt;tt&gt;23&lt;/tt&gt;. More about it
&lt;a href=&quot;http://www.blinkenlights.nl/services.html&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Anybody know of other cool ASCIImations?&lt;/a&gt;
</content>
 </entry>
 
 
</feed>
