<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Schadenfreude &#187; linux</title>
	<atom:link href="http://www.ralree.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ralree.com</link>
	<description>Malicious enjoyment derived from observing someone else's misfortune</description>
	<lastBuildDate>Sun, 28 Feb 2010 04:18:37 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Extracting M2TS length from a BDMV directory in Linux</title>
		<link>http://www.ralree.com/2010/01/14/extracting-m2ts-length-from-a-bdmv-directory-in-linux/</link>
		<comments>http://www.ralree.com/2010/01/14/extracting-m2ts-length-from-a-bdmv-directory-in-linux/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 15:32:06 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[bluray]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[m2ts]]></category>
		<category><![CDATA[mpls]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22760</guid>
		<description><![CDATA[I was having the hardest time getting various programs to echo the runtime of m2ts files in Linux, and it turns out someone wrote a parser for the files in the BDMV/PLAYLIST directory, which have all of this information.

Get bdtools.  I got Version 1.4.  You can find it here.
./configure &#38;&#38; make &#38;&#38; sudo [...]]]></description>
			<content:encoded><![CDATA[<p>I was having the hardest time getting various programs to echo the runtime of m2ts files in Linux, and it turns out someone wrote a parser for the files in the BDMV/PLAYLIST directory, which have all of this information.</p>
<ul>
<li>Get bdtools.  I got Version 1.4.  You can find it <a href="http://www.stebbins.biz/source/">here</a>.</li>
<li><code>./configure &amp;&amp; make &amp;&amp; sudo make install</code></li>
<li>Try running mpls_dump.  I got this error when running:
<pre><code>mpls_dump: error while loading shared libraries: libbd-1.0.so.1: cannot open shared object file:
No such file or directory</pre>
<p></code></li>
<li>To fix it, do this:
<pre><code>echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf
sudo ldconfig</pre>
<p></code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2010/01/14/extracting-m2ts-length-from-a-bdmv-directory-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing PARI-GP under OpenSUSE 11.2</title>
		<link>http://www.ralree.com/2010/01/11/installing-pari-gp-under-opensuse-11-2/</link>
		<comments>http://www.ralree.com/2010/01/11/installing-pari-gp-under-opensuse-11-2/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 13:47:29 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gp]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[pari]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[zypper]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22751</guid>
		<description><![CDATA[I have no idea why this package isn&#8217;t in the default community repositories.  I highly recommend they add it.  Use the following commands to add the repository and install the package:

sudo zypper ar ftp://ftp5.gwdg.de/pub/opensuse/repositories/home:/mkng:/science/openSUSE_11.1/ PARI
sudo zypper in pari-gp
]]></description>
			<content:encoded><![CDATA[<p>I have no idea why this package isn&#8217;t in the default community repositories.  I highly recommend they add it.  Use the following commands to add the repository and install the package:</p>
<pre><code>
sudo zypper ar ftp://ftp5.gwdg.de/pub/opensuse/repositories/home:/mkng:/science/openSUSE_11.1/ PARI
sudo zypper in pari-gp</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2010/01/11/installing-pari-gp-under-opensuse-11-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calibre with the Nook on Ubuntu</title>
		<link>http://www.ralree.com/2010/01/01/calibre-with-the-nook-on-ubuntu/</link>
		<comments>http://www.ralree.com/2010/01/01/calibre-with-the-nook-on-ubuntu/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 09:55:48 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[Calibre]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nook]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22747</guid>
		<description><![CDATA[Calibre is about the best thing since sliced bread.  It is able to convert basically any type of Ebook format into EPUB, which is what my Nook reads natively.  It seamlessly syncs with the Nook as well, which is a huge plus, and all of this happens in Linux.  I highly recommend [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://calibre-ebook.com/">Calibre</a> is about the best thing since sliced bread.  It is able to convert basically any type of Ebook format into EPUB, which is what my Nook reads natively.  It seamlessly syncs with the Nook as well, which is a huge plus, and all of this happens in Linux.  I highly recommend this software.  Just make sure not to queue up too many jobs, or it might DOS your computer for a bit.  The PDF conversion is especially intensive.  It makes quick work of short documents (hundreds of pages), but documents that are thousands of pages take much, much longer.  The only capability I&#8217;m missing currently is conversion of DOC to EPUB, but I can use OpenOffice to convert a DOC to HTML, and then import that into Calibre and convert it, so that works.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2010/01/01/calibre-with-the-nook-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing italics in Calibre EPUB output</title>
		<link>http://www.ralree.com/2009/12/31/fixing-italics-in-calibre-epub-output/</link>
		<comments>http://www.ralree.com/2009/12/31/fixing-italics-in-calibre-epub-output/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 16:30:05 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[Calibre]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nook]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22743</guid>
		<description><![CDATA[I converted an ebook from TXT to EPUB today using Calibre, and found that the italics (which in the TXT file are annotated /like this/) are not converted into the HTML equivalent.  I did the following to fix this:

unzip ebook.epub -d tmpbook
cd tmpbook
perl -i.bak -pe 's/([\s-,.;\'?:]+)\/(.+?)\/([\s-,.;\'?:]+)/$1&#60;i&#62;$2&#60;\/i&#62;$3/sg;' *html
That will create.bak files just in case anything went [...]]]></description>
			<content:encoded><![CDATA[<p>I converted an ebook from TXT to EPUB today using Calibre, and found that the italics (which in the TXT file are annotated /like this/) are not converted into the HTML equivalent.  I did the following to fix this:</p>
<ol>
<li>unzip ebook.epub -d tmpbook</li>
<li>cd tmpbook</li>
<li><code>perl -i.bak -pe 's/([\s-,.;\'?:]+)\/(.+?)\/([\s-,.;\'?:]+)/$1&lt;i&gt;$2&lt;\/i&gt;$3/sg;' *html</code></li>
<li>That will create.bak files just in case anything went wrong.  To revert the changes, do this:<br />
<code>for i in *.bak; do mv $i ${i%.bak}; done</code></li>
<li><code>zip -r ebook.zip * &amp;&amp; mv ebook.zip ebook.epub</code></li>
</ol>
<p>Then, I found out Calibre works beautifully with the Nook, so I just popped it on there and it worked.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2009/12/31/fixing-italics-in-calibre-epub-output/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling ConvertLit on Ubuntu Linux 9.10</title>
		<link>http://www.ralree.com/2009/12/31/compiling-convertlit-on-ubuntu-linux-9-10/</link>
		<comments>http://www.ralree.com/2009/12/31/compiling-convertlit-on-ubuntu-linux-9-10/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 14:47:40 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[converlit]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lit]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22741</guid>
		<description><![CDATA[So, ConvertLit seems to be a good solution for those looking to convert LIT ebooks into EPUB (well, into HTML, but then into EPUB&#8230;).  Unfortunately, the developers seem to be unable to properly make a good source tarball for version 1.8.  Here&#8217;s what I did:

Download Version 1.8 source from here.
unzip clit18src.zip -d convertlit
sudo apt-get install [...]]]></description>
			<content:encoded><![CDATA[<p>So, ConvertLit seems to be a good solution for those looking to convert LIT ebooks into EPUB (well, into HTML, but then into EPUB&#8230;).  Unfortunately, the developers seem to be unable to properly make a good source tarball for version 1.8.  Here&#8217;s what I did:</p>
<ol>
<li>Download Version 1.8 source from <a href="http://www.convertlit.com/download.php">here</a>.</li>
<li><code>unzip clit18src.zip -d convertlit</code></li>
<li><code>sudo apt-get install libtommath-dev</code></li>
<li>Download <a href="http://ralree.com/files/clit18.source.patch">this</a> to the convertlit directory.</li>
<li><code>patch -p1 -i clit18.source.patch</code></li>
<li>You should see the clit18/Makefile was patched</li>
<li><code>cd lib &amp;&amp; make &amp;&amp; cd ../clit18 &amp;&amp; make</code></li>
<li>the clit binary should be available in the clit18 directory</li>
<li><code>sudo cp clit18/clit /usr/local/bin/</code></li>
<li>Use it!</li>
</ol>
<p>Now I just have to figure out how to convert it to epub.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2009/12/31/compiling-convertlit-on-ubuntu-linux-9-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kopete Chat Window History is annoying</title>
		<link>http://www.ralree.com/2009/11/27/kopete-chat-window-history-is-annoying/</link>
		<comments>http://www.ralree.com/2009/11/27/kopete-chat-window-history-is-annoying/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 16:15:03 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[kopete]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22732</guid>
		<description><![CDATA[I&#8217;ve been using Kopete on my quest to convert to KDE, and I&#8217;ve been extremely annoyed by previous conversions showing up in my chat windows.  The option to disable it didn&#8217;t seem to be anywhere, but I found a forum post that pointed me to the Plugins section of the configuration.

Just disable the plugin [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Kopete on my quest to convert to KDE, and I&#8217;ve been extremely annoyed by previous conversions showing up in my chat windows.  The option to disable it didn&#8217;t seem to be anywhere, but I found a forum post that pointed me to the Plugins section of the configuration.</p>
<p><a href="http://www.ralree.com/newblog/wp-content/uploads/2009/11/asdas.jpg"><img src="http://www.ralree.com/newblog/wp-content/uploads/2009/11/asdas.jpg" alt="Kopete Annoyance" title="Kopete Annoyance" width="912" height="549" class="aligncenter size-full wp-image-22733" /></a></p>
<p>Just disable the plugin entirely or open it and mess with the configuration.  Things like that shouldn&#8217;t be on by default, along with chat window tabs (when did this become common?) and annoying buttons for fonts and emoticons.  But, maybe I&#8217;m more minimalistic than many.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2009/11/27/kopete-chat-window-history-is-annoying/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Skype Working on Ubuntu 9.10 Karmic x86-64</title>
		<link>http://www.ralree.com/2009/11/19/getting-skype-working-on-ubuntu-9-10-karmic-x86-64/</link>
		<comments>http://www.ralree.com/2009/11/19/getting-skype-working-on-ubuntu-9-10-karmic-x86-64/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 13:58:11 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[microphone]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22728</guid>
		<description><![CDATA[So, recently, I installed Ubuntu karmic cleanly on my main desktop machine here at home, and I have really liked it.  I even switched to KDE, and everything has been working better than it had been in GNOME.  I tried setting up Skype the other day, and ran into an issue with the [...]]]></description>
			<content:encoded><![CDATA[<p>So, recently, I installed Ubuntu karmic cleanly on my main desktop machine here at home, and I have really liked it.  I even switched to KDE, and everything has been working better than it had been in GNOME.  I tried setting up Skype the other day, and ran into an issue with the microphone.  It turns out that since the new Skype uses PulseAudio, there&#8217;s a further configuration step that&#8217;s not so obvious.  I found out <a href="http://superuser.com/questions/33458/running-skype-2-1-beta-with-kde-4-3/33963#33963">here</a> that you have to do the following:</p>
<pre><code>
sudo apt-get install pavucontrol
pavucontrol
</code></pre>
<p>Then, go to the Input Devices tab, and unmute the sound (click the little speaker with a red X until the controls at the bottom are enabled).  Then, change the Port setting until you can see the bars move when you tap the microphone.  Then try Skype.  This worked perfectly for me &#8211; it&#8217;s too bad it&#8217;s not connected to the KDE sound mixer, but oh well.  Maybe in the future that will happen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2009/11/19/getting-skype-working-on-ubuntu-9-10-karmic-x86-64/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SMPlayer, Lirc, and IRExec on Ubuntu Karmic</title>
		<link>http://www.ralree.com/2009/11/07/smplayer-lirc-and-irexec-on-ubuntu-karmic/</link>
		<comments>http://www.ralree.com/2009/11/07/smplayer-lirc-and-irexec-on-ubuntu-karmic/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 03:41:35 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[infrared]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lirc]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[smplayer]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22715</guid>
		<description><![CDATA[I used to use lirc with mplayer to allow my Packard Bell crappy remote to work awesomely, but I have since lost that configuration and switched to smplayer, since it&#8217;s awesome.  Today, I figured out how to control smplayer using similar means.


sudo apt-get install lirc
Make your /etc/lirc/lircrc look like this:


##### GLOBAL #####
begin
  flags = [...]]]></description>
			<content:encoded><![CDATA[<p>I used to use lirc with mplayer to allow my Packard Bell crappy remote to work awesomely, but I have since lost that configuration and switched to smplayer, since it&#8217;s awesome.  Today, I figured out how to control smplayer using similar means.</p>
<p><span id="more-22715"></span></p>
<ul>
<li>sudo apt-get install lirc</li>
<li>Make your <strong>/etc/lirc/lircrc</strong> look like this:</li>
</ul>
<pre><code>
##### GLOBAL #####
begin
  flags = startup_mode
  mode = smplayer
end

begin
  remote = PackBell
  button = Aux1
  mode = smplayer
end

begin
  button = Mute
  prog   = irexec
  repeat = 0
  config = amixer sset 'Master' toggle
end
begin
  button = VolUp
  prog   = irexec
  repeat = 2
  delay = 1
  config = amixer sset 'Master' 1+
end
begin
  button = VolDown
  prog   = irexec
  repeat = 2
  delay = 1
  config = amixer sset 'Master' 1-
end

##### MPLAYER #####
begin smplayer
  begin
      remote = PackBell
      prog = irexec
      button = Down
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action rewind2); fi
      repeat = 3
      delay = 1
  end

  begin
      remote = PackBell
      prog = irexec
      button = Up
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action forward2); fi
      repeat = 3
      delay = 1
  end

  begin
      remote = PackBell
      prog = irexec
      button = Right
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action forward1); fi
      repeat = 3
      delay = 1
  end

  begin
      remote = PackBell
      prog = irexec
      button = Left
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action rewind1); fi
      repeat = 3
      delay = 1
  end

  begin
      remote = PackBell
      prog = irexec
      button = Display
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action fullscreen); fi
      repeat = 0
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = CHUp
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action next_subtitle); fi
      repeat = 3
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = CHDown
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action next_audio); fi
      repeat = 3
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = LMB
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action pl_prev); fi
      repeat = 3
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = RMB
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action pl_next); fi
      repeat = 3
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = Zero
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action next_aspect); fi
      repeat = 3
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = One
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action rewind3); fi
      repeat = 3
      delay = 0
  end
  begin
      remote = PackBell
      prog = irexec
      button = Two
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action play_or_pause); fi
      repeat = 3
      delay = 0
  end
  begin
      remote = PackBell
      prog = irexec
      button = Three
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action forward3); fi
      repeat = 3
      delay = 0
  end
end smplayer
</code></pre>
<ul>
<li>sudo /etc/init.d/lirc restart</li>
<li>You should see the irexec daemon start</li>
<li>Start smplayer and make it play something</li>
<li>Push the AUX1 button on your Packard Bell remote</li>
<li>Now push other buttons.  It should all work.</li>
</ul>
<p>Thanks to all the blog posts and forum conversations that helped me figure all that out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2009/11/07/smplayer-lirc-and-irexec-on-ubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing MySQL 1.4 Amarok data into Amarok 2.2 Nightly</title>
		<link>http://www.ralree.com/2009/09/28/importing-mysql-1-4-amarok-data-into-amarok-2-2-nightly/</link>
		<comments>http://www.ralree.com/2009/09/28/importing-mysql-1-4-amarok-data-into-amarok-2-2-nightly/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 20:15:49 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22704</guid>
		<description><![CDATA[I was having a bunch of trouble today importing my old MySQL amarok database into the new nightly version of amarok I installed.  The Amarok Wiki had a great section on how to convert a MySQL Amarok collection into an SQLlite one.  This was the key to importing my old 1.4 collection into the new [...]]]></description>
			<content:encoded><![CDATA[<p>I was having a bunch of trouble today importing my old MySQL amarok database into the new nightly version of amarok I installed.  <span style="background-color: #ffffff; "><a href="http://amarok.kde.org/wiki/MySQL_HowTo#Amarok_1.4.8_and_MySQL_5.0.45">The Amarok Wiki</a> had a great section on how to convert a MySQL Amarok collection into an SQLlite one.  This was the key to importing my old 1.4 collection into the new 2.2 nightly version of Amarok.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2009/09/28/importing-mysql-1-4-amarok-data-into-amarok-2-2-nightly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1,000,000th Fibonacci Number One-Liner in C</title>
		<link>http://www.ralree.com/2009/09/09/1000000th-fibonacci-number-one-liner-in-c/</link>
		<comments>http://www.ralree.com/2009/09/09/1000000th-fibonacci-number-one-liner-in-c/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 05:04:40 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[one-liner]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22673</guid>
		<description><![CDATA[This is possibly the best one-liner I&#8217;ve ever written:


gcc -x c -o /tmp/out - -lgmp ]]></description>
			<content:encoded><![CDATA[<p>This is possibly the best one-liner I&#8217;ve ever written:</p>
<p><code>
<pre>
gcc -x c -o /tmp/out - -lgmp <<< '#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;stdint.h&gt;
#include &lt;gmp.h&gt;
void omg_i_love_leonardo_of_pisa(uint32_t num, mpz_t * result) { mpz_t retval, last, tmp; mpz_init(retval);
 mpz_init(last); mpz_init(tmp); uint32_t i = 1; if(num == 0) return; mpz_set_ui(retval, 1U);
mpz_set_ui(last, 0U); for(; i < num; i++) { mpz_set(tmp, retval); mpz_add(retval, retval, last);
mpz_set(last, tmp); } mpz_set(*result, retval); } int main() { uint32_t num; mpz_t fibo; mpz_init(fibo);
omg_i_love_leonardo_of_pisa(1000001, &#038;fibo); mpz_out_str(stdout, 10, fibo); printf("\n"); return 1; }
' &#038;&#038; time /tmp/out
</pre>
<p></code></p>
<p>It compiles a C program given from <code>STDIN</code>, puts it in <code>/tmp/out</code>, and runs it with time to find the time it takes to run.  It generates the 1,000,000th Fibonacci number.  <strong>Try it!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2009/09/09/1000000th-fibonacci-number-one-liner-in-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.794 seconds -->
