<?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; awesome</title>
	<atom:link href="http://www.ralree.com/tag/awesome/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>How pilots should talk</title>
		<link>http://www.ralree.com/2010/02/27/how-pilots-should-talk/</link>
		<comments>http://www.ralree.com/2010/02/27/how-pilots-should-talk/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 04:18:37 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[flight]]></category>
		<category><![CDATA[guns]]></category>
		<category><![CDATA[pilots]]></category>
		<category><![CDATA[terrorism]]></category>

		<guid isPermaLink="false">http://www.ralree.com/2010/02/27/how-pilots-should-talk/</guid>
		<description><![CDATA[Oh, what a better world it would be&#8230;
]]></description>
			<content:encoded><![CDATA[<p>Oh, what a better world it would be&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2010/02/27/how-pilots-should-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.ralree.com/newblog/wp-content/uploads/2010/02/How_Pilots_Should_Talk.mp3" length="660266" type="audio/mpeg" />
		</item>
		<item>
		<title>Putting Music from Amarok 2 on the iPod Touch</title>
		<link>http://www.ralree.com/2010/02/10/putting-music-from-amarok-2-on-the-ipod-touch/</link>
		<comments>http://www.ralree.com/2010/02/10/putting-music-from-amarok-2-on-the-ipod-touch/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 19:56:34 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[ipod touch]]></category>
		<category><![CDATA[jailbreak]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[sshfs]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22773</guid>
		<description><![CDATA[In case I ever forget this again, I&#8217;m posting these instructions here.  It&#8217;s actually really easy.

Install OpenSSH from Cydia
Mount the iPod&#8217;s filesystem: mkdir -p ~/touch &#38;&#38; sshfs -o allow_other root@192.168.1.7:/ ~/touch/
Then, in Amarok 2, go to the collection browser, and find all the songs that match your criteria (I use ratings):



Highlight them and right-click drag them [...]]]></description>
			<content:encoded><![CDATA[<p>In case I ever forget this again, I&#8217;m posting these instructions here.  It&#8217;s actually really easy.</p>
<ul>
<li>Install OpenSSH from Cydia</li>
<li>Mount the iPod&#8217;s filesystem: <span style="font-family: monospace; line-height: 18px; font-size: 12px; white-space: pre;">mkdir -p ~/touch &amp;&amp; sshfs -o allow_other root@192.168.1.7:/ ~/touch/</span></li>
<li>Then, in Amarok 2, go to the collection browser, and find all the songs that match your criteria (I use ratings):</li>
</ul>
<p><img class="aligncenter size-full wp-image-22777" title="snapshot1" src="http://www.ralree.com/newblog/wp-content/uploads/2010/02/snapshot1.png" alt="" width="296" height="206" /></p>
<ul>
<li>Highlight them and <strong>right-click drag them</strong> into the Dolphin/Nautilus window showing the directory ~<code>/touch/private/var/mobile/Media/Music/</code></li>
<li>You may have to create the above directory.</li>
<li>When you drop them, choose <strong>Copy</strong>.  Then, wait, and they&#8217;ll all copy over the wireless to the device.  It&#8217;s awesome.</li>
<li>Get PwnPlayer from Cydia and enjoy!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2010/02/10/putting-music-from-amarok-2-on-the-ipod-touch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Hand and the Canon XSI</title>
		<link>http://www.ralree.com/2010/02/03/my-hand-and-the-canon-xsi/</link>
		<comments>http://www.ralree.com/2010/02/03/my-hand-and-the-canon-xsi/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 01:53:19 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[canon]]></category>
		<category><![CDATA[hand]]></category>
		<category><![CDATA[hdr]]></category>
		<category><![CDATA[xsi]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22767</guid>
		<description><![CDATA[I just took this picture with my new Canon XSI DSLR.  I really like it.  Even though I&#8217;m going to have to buy all new lenses, I think this picture, which was shot freehand with my left hand hanging in the air, makes it all worth it.
Geet asked me what inspired me to switch to [...]]]></description>
			<content:encoded><![CDATA[<p><p class="flickrTag_container"><a href="http://farm3.static.flickr.com/2790/4329311214_0d231c0df6.jpg" class="flickr" title="HDR Hand &lt;a href=&quot;http://www.flickr.com/photos/79248695@N00/4329311214/&quot;&gt;view&amp;nbsp;on&amp;nbsp;flickr&amp;raquo;&lt;/a&gt;" rel="lightbox"><img src="http://farm3.static.flickr.com/2790/4329311214_0d231c0df6_m.jpg" alt="Array" class="flickr small photo" /></a></p><br />
I just took this picture with my new Canon XSI DSLR.  I really like it.  Even though I&#8217;m going to have to buy all new lenses, I think this picture, which was shot freehand with my left hand hanging in the air, makes it all worth it.</p>
<p>Geet asked me what inspired me to switch to Canon after my devotion to Nikon and coveting of his D90.  I was intrigued by the D90 and other Nikon offerings, but I preferred to stay in the $500 camera territory (D90 bodies start around $700 used).  True, I would not have had to buy new lenses, but my current lens situation isn&#8217;t really to die for (kit lens, 55-200mm VR lens, and 50mm 1.4 manual focus prime lens).  I&#8217;ve had the most fun with the prime lens, and I&#8217;ll probably spend some real money this time on a Canon version with auto-focus.</p>
<p>The real selling points for me for the Canon XSI over the Nikon D40x were the following:</p>
<ul>
<li>Auto-exposure bracketing (for HDR mainly)</li>
<li>Shot Rate: 3.5 fps vs. the D40x 3fps.  Minor, but still better.</li>
<li>Image stabilization in the kit lens (a bit gimmicky since it&#8217;s a low focal length, but still nice)</li>
<li>Automatic Sensor cleaning (D40x doesn&#8217;t have it)</li>
<li>More stuff in the viewfinder, like ISO settings.</li>
<li>Better menu, more features to configure</li>
<li>Larger screen (I usually use the viewfinder though)</li>
<li>Live View (very minor advantage, see previous comment).  It will be nice when I&#8217;m taking a picture away from my face.</li>
<li>Weight with the kit lens seems lighter than the D40x (I could be imagining things)</li>
<li>Auto-focus metering is better, and the up-close performance is better</li>
<li>Low-light performance seems to be better at ISO 800, but there are so many factors here that it could just be settings away.</li>
</ul>
<p>The cons exist though:</p>
<ul>
<li>The D40x has configurable hardware buttons, which is cool.  I don&#8217;t see this on the Canon</li>
<li>None of my filters will fit the funky 58mm format!  I have quite a few :(</li>
<li>The SD card slot door isn&#8217;t spring loaded &#8211; the Nikon&#8217;s is.  Very very minor.</li>
<li>After taking a picture or a set of them, it shows on the screen, but you have to hit the play button to activate review mode before hitting a directional button.  On the Nikon, if you hit a directional button when a picture is showing, you&#8217;re magically in review mode.</li>
<li>The sound!  The squeaky nasty gear-driven shutter sound is rather awful, while the mechanical-sounding Nikon shutter sound is totally awesome.</li>
<li>The feel of the adjustment wheel is better on the Nikon.  It seems cheaper on the Canon.</li>
<li>Deleting pictures on the camera is more cumbersome.</li>
</ul>
<p>Overall, I&#8217;m still happy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2010/02/03/my-hand-and-the-canon-xsi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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>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>Diving into OOC, a fun new programming language</title>
		<link>http://www.ralree.com/2009/11/12/diving-into-ooc-a-fun-new-programming-language/</link>
		<comments>http://www.ralree.com/2009/11/12/diving-into-ooc-a-fun-new-programming-language/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 14:41:42 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[gist]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[ooc]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22722</guid>
		<description><![CDATA[OOC is cool.  Yesterday I started writing some code in it after reading about it on the github blog.  Here is the first result:
I&#8217;m extremely happy with how well this performs.  Using the latest ooc Java compiler from the github trunk to handle the each() functions, this compiles down to a bunch of C code, [...]]]></description>
			<content:encoded><![CDATA[<p>OOC is cool.  Yesterday I started writing some code in it after reading about it on the github blog.  Here is the first result:</p>
<p><script src="http://gist.github.com/232942.js"></script></p>
<p>I&#8217;m extremely happy with how well this performs.  Using the latest ooc Java compiler from the github trunk to handle the each() functions, this compiles down to a bunch of C code, and then is automagically compiled behind the scenes into an ELF Binary!  This is totally awesome, and I have to commend nddrylliog and the other contributors for their work on this awesome project.  Now I should use it for something useful :D</p>
<p>A quick note about getting it running on Ubuntu:</p>
<pre><code>
sudo apt-get install sun-java6-jdk
git clone git://github.com/nddrylliog/ooc.git
cd ooc
JAVA_HOME=/usr/lib/jvm/java-6-sun/ make
</code></pre>
<p>At least, that&#8217;s how I did it.  Then I compile all my ooc with a Makefile like this:</p>
<pre><code>
INPUTS=$(wildcard *.ooc)
TARGETS=$(patsubst %.ooc, %, $(INPUTS))

all: $(TARGETS)

%: %.ooc
  java -jar ~/repos/ooc/bin/ooc.jar $@
</code></pre>
<p>That will compile all ooc files in the directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2009/11/12/diving-into-ooc-a-fun-new-programming-language/feed/</wfw:commentRss>
		<slash:comments>0</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>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 1.154 seconds -->
