<?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>One hand clapping &#187; Uncategorized</title>
	<atom:link href="http://warped.org/blog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://warped.org/blog</link>
	<description>Max Baker -- A Man with a Hand</description>
	<lastBuildDate>Mon, 10 May 2010 03:26:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Spam / Ham Learning folders for VirtualMin / Maildir-based systems</title>
		<link>http://warped.org/blog/2009/12/17/spam-ham-learning-folders-for-virtualmin-maildir-based-systems/</link>
		<comments>http://warped.org/blog/2009/12/17/spam-ham-learning-folders-for-virtualmin-maildir-based-systems/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 19:56:51 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=88</guid>
		<description><![CDATA[I&#8217;ve created a simple script that will monitor folders called &#8216;ham&#8217; and &#8217;spam&#8217; for new entries.   Once found, the &#8216;ham&#8217; folder will send the message to sa-learn --ham, strip off the headers, and return it to the inbox.   The spam folder will simply run sa-learn --spam on the message.
Any additions are [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created a simple script that will monitor folders called &#8216;ham&#8217; and &#8217;spam&#8217; for new entries.   Once found, the &#8216;ham&#8217; folder will send the message to <tt>sa-learn --ham</tt>, strip off the headers, and return it to the inbox.   The spam folder will simply run <tt>sa-learn --spam</tt> on the message.</p>
<p>Any additions are welcome!<br />
<a href='http://warped.org/linux/spam_folders' >Download : spam_folders script</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl -w</span>
<span style="color: #666666; font-style: italic;"># spam_folder - Turns the 'ham' and 'spam' folders </span>
<span style="color: #666666; font-style: italic;">#               into training folders for spam assassin</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># For VirtualMin</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Max Baker &lt;max @warped.org&gt; 12/17/09</span>
<span style="color: #666666; font-style: italic;"># No license retained, distribute and modify freely</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> File<span style="color: #339933;">::</span><span style="color: #006600;">Glob</span> <span style="color: #009966; font-style: italic;">qw/bsd_glob/</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> File<span style="color: #339933;">::</span><span style="color: #006600;">Temp</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> File<span style="color: #339933;">::</span><span style="color: #006600;">Copy</span> <span style="color: #009966; font-style: italic;">qw/copy/</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Config</span>
<span style="color: #0000ff;">$sa_learn</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'/usr/bin/sa-learn'</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$sa</span>       <span style="color: #339933;">=</span> <span style="color: #ff0000;">'/usr/bin/spamassassin'</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">@spam</span>  <span style="color: #339933;">=</span> bsd_glob<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;/home/*/homes/*/Maildir/.spam/cur/*&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">@ham</span>   <span style="color: #339933;">=</span> bsd_glob<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;/home/*/homes/*/Maildir/.ham/cur/*&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Mark everything in spam folder that's not already marked as spam</span>
<span style="color: #666666; font-style: italic;">#  (trust spamassassin header)</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$s</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@spam</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">next</span> <span style="color: #b1b100;">if</span> is_marked<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$s</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">system</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$sa_learn --spam <span style="color: #000099; font-weight: bold;">\&quot;</span>$s<span style="color: #000099; font-weight: bold;">\&quot;</span> &gt; /dev/null&quot;</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #b1b100;">and</span> <span style="color: #000066;">warn</span> <span style="color: #ff0000;">&quot;sa-learn errored on $s<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Mark everything in ham folder as ham, strip off junk and move into</span>
<span style="color: #666666; font-style: italic;"># inbox</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$h</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@ham</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;"># Strip off headers</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$tmp</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> File<span style="color: #339933;">::</span><span style="color: #006600;">Temp</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$tmp_file</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$tmp</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">filename</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">system</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$sa -d <span style="color: #000099; font-weight: bold;">\&quot;</span>$h<span style="color: #000099; font-weight: bold;">\&quot;</span> &gt; $tmp_file&quot;</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #b1b100;">and</span> <span style="color: #000066;">die</span> <span style="color: #ff0000;">&quot;$sa errored on $h<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># Unmark as spam</span>
    <span style="color: #000066;">system</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$sa_learn --ham $tmp_file &gt; /dev/null&quot;</span><span style="color: #009900;">&#41;</span> 
        <span style="color: #b1b100;">and</span> <span style="color: #000066;">warn</span> <span style="color: #ff0000;">&quot;$sa_learn errored on $tmp_file<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># Remove from ham</span>
    <span style="color: #000066;">unlink</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$h</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <span style="color: #000066;">die</span> <span style="color: #ff0000;">&quot;Can't remove $h. $!<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># Move to inbox</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$new_h</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$h</span><span style="color: #339933;">;</span>
    <span style="color: #0000ff;">$new_h</span> <span style="color: #339933;">=~</span> <span style="color: #000066;">s</span><span style="color: #339933;">,</span>Maildir<span style="color: #339933;">/.</span><span style="color: #0000ff;">*cur</span><span style="color: #339933;">/,</span>Maildir<span style="color: #339933;">/</span>cur<span style="color: #339933;">/,;</span>
    copy<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$tmp_file</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$new_h</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <span style="color: #000066;">die</span> <span style="color: #ff0000;">&quot;Can't move message to inbox. $tmpfile -&gt; $new_h.  $!<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># is_marked() - Looks to see if spam assassin has already tagged this,</span>
<span style="color: #000000; font-weight: bold;">sub</span> is_marked <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$s</span> <span style="color: #339933;">=</span> <span style="color: #000066;">shift</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">open</span> <span style="color: #009900;">&#40;</span>S<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&lt; $s&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <span style="color: #000066;">return</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$is</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009999;">&lt;S&gt;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^X-Spam-Flag: YES/i</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #0000ff;">$is</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">last</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066;">close</span> S<span style="color: #339933;">;</span>
    <span style="color: #000066;">return</span> <span style="color: #0000ff;">$is</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>max<span style="color: #339933;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2009/12/17/spam-ham-learning-folders-for-virtualmin-maildir-based-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mythdora 10 / MythTV + Antec Fusion 430 VFD LCD + lircd + LCDd</title>
		<link>http://warped.org/blog/2009/11/22/mythdora-10-mythtv-antec-fusion-430-vfd-lcd-lircd-lcdd/</link>
		<comments>http://warped.org/blog/2009/11/22/mythdora-10-mythtv-antec-fusion-430-vfd-lcd-lircd-lcdd/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 05:47:22 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[antec]]></category>
		<category><![CDATA[LCDd]]></category>
		<category><![CDATA[lcdproc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lirc]]></category>
		<category><![CDATA[myth]]></category>
		<category><![CDATA[mythtv]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=80</guid>
		<description><![CDATA[Problem
This guide is how to setup the Antec Fusion 430 Case to work with Mythdora 10 and MythTV.   I found a lot of guides on how to setup the drivers, but they were all out of date.
Pieces
There are three things you need to get running :

lirc_imon kernel driver
LCDd daemon
mythlcdserver daemon

All of these things [...]]]></description>
			<content:encoded><![CDATA[<h1>Problem</h1>
<p>This guide is how to setup the Antec Fusion 430 Case to work with Mythdora 10 and MythTV.   I found a lot of guides on how to setup the drivers, but they were all out of date.</p>
<h1>Pieces</h1>
<p>There are three things you need to get running :</p>
<ol>
<li>lirc_imon kernel driver</li>
<li>LCDd daemon</li>
<li>mythlcdserver daemon</li>
</ol>
<p>All of these things came installed w/ Myth and didn&#8217;t require any additional patching or compiling.</p>
<p>To see the exact device we&#8217;re working with, run <strong>lsusb</strong> :</p>
<pre lang=sh>
Bus 003 Device 002: ID 15c2:ffdc SoundGraph Inc. iMON PAD Remote Controller
</pre>
<p>This is all for the &#8220;Old&#8221; imon, or 1st generation, or &#8220;FFDC&#8221; version of the LCD device.</p>
<h2>1. LIRC lirc_imon kernel driver</h2>
<pre lang=sh>
yum install lirc lirc-libs
</pre>
<p>Edit /etc/modprob.conf and add this line :</p>
<pre lang=conf>
options lirc_imon display_type=1
</pre>
<p>The <strong>display_type=1</strong> option was not documented well, but that was the key in making the module work.  Without it I was seeing the following in the /var/log/messages after adding <strong>debug=1</strong> to the above.  I also was missing /dev/lcd0 even though the kernel driver was loading!</p>
<pre>
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: found IMON device
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: found IR endpoint
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: found VFD endpoint
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: device has no display
Nov 22 21:18:09 localhost kernel: lirc_imon: ir_onboard_decode: 1
Nov 22 21:18:09 localhost kernel: lirc_dev: lirc_register_plugin: sample_rate: 0
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: Registered iMON plugin(minor:1)
Nov 22 21:18:09 localhost kernel: lirc_imon: imon_probe: iMON device on usb&lt;3:2> initialized
</pre>
<p>That &#8220;device has no display&#8221; line is cured by the &#8220;display_type=1&#8243; option.   /var/log/messages now looks like this (with debug=1) :</p>
<pre>
Nov 22 21:21:55 localhost kernel: lirc_imon: Driver for Soundgraph iMON MultiMedia IR/VFD, v0.4
Nov 22 21:21:55 localhost kernel: lirc_imon: Venky Raju <dev @venky.ws>
Nov 22 21:21:55 localhost kernel: lirc_imon: imon_probe: found IMON device
Nov 22 21:21:55 localhost kernel: lirc_imon: imon_probe: found IR endpoint
Nov 22 21:21:55 localhost kernel: lirc_imon: imon_probe: found VFD endpoint
Nov 22 21:21:55 localhost kernel: lirc_imon: ir_onboard_decode: 1
Nov 22 21:21:55 localhost kernel: lirc_imon: vfd_proto_6p: 1
Nov 22 21:21:55 localhost kernel: lirc_dev: lirc_register_plugin: sample_rate: 0
Nov 22 21:21:55 localhost kernel: lirc_imon: imon_probe: Registered iMON plugin(minor:1)
Nov 22 21:21:55 localhost kernel: lirc_imon: Registering VFD with sysfs
Nov 22 21:21:55 localhost kernel: lirc_imon: imon_probe: iMON device on usb&lt;3:2> initialized
Nov 22 21:21:55 localhost kernel: usbcore: registered new interface driver lirc_imon
</dev></pre>
<p>At this point you should have a /dev/lcd0 and you can test it with this command : </p>
<pre lang=shell>
echo "hello world" > /dev/lcd0
</pre>
<p>OK, now that we have a working kernel driver, let&#8217;s move on to the LCD daemon</p>
<h2>2. LCDd Daemon</h2>
<ol>
<li>yum install lcdproc</li>
<li>Edit /etc/sysconfig/lcdproc/LCD.conf to look like this :
<pre code=conf>
[server]
Driver=imon
Bind=127.0.0.1
Port=13666

# Sets the reporting level; defaults to 2 (warnings and errors only).
#ReportLevel=3

# Should we report to syslog instead of stderr ? Default: no
ReportToSyslog=yes

# Sets the default time in seconds to displays a screen.
WaitTime=5

# User to run as.  LCDd will drop its root priviledges,
# if any, and run as this user instead.
User=nobody

# If yes, the the serverscreen will be rotated as a usual info screen. If no,
# it will be a background screen, only visible when no other screens are
# active.
ServerScreen=no

# The server will stay in the foreground if set to true.
#Foreground=no

DriverPath=/usr/lib/lcdproc/

# GoodBye message: each entry represents a display line; default: builtin
GoodBye=""
GoodBye=""

ToggleRotateKey=Enter
PrevScreenKey=Left
NextScreenKey=Right

[menu]
MenuKey=Escape
EnterKey=Enter
UpKey=Up
DownKey=Down

[imon]
Device=/dev/lcd0
Size=16x2
</pre>
<p>Note that you want the <strong>imon</strong> driver, not <strong>imon_lcd</strong> or any other one.
</li>
<li>Boot the driver
<pre lang=sh>
service LCDd restart
tail /var/log/messages
dmesg | tail
</pre>
</li>
</ol>
<p>At this point you should see the output of LCDd on the VFD display.    If not, rinse and repeat.</p>
<h2>3. mythlcdserver</h2>
<p>Follow <a href="http://www.mythtv.org/wiki/Mythlcdserver">these directions on mythtv.org</a> to turn on the LCD settings in MythTV from the front-end in the Appearance menu.   Restart the front-end and it should launch mythlcdserver.  If not, you can launch mythlcdserver as the same user as the front-end.</p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2009/11/22/mythdora-10-mythtv-antec-fusion-430-vfd-lcd-lircd-lcdd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating your BIOS in DOS w/ Window 7 / Vista using a USB Drive</title>
		<link>http://warped.org/blog/2009/11/22/updating-your-bios-in-dos-w-window-7-vista-using-a-usb-drive/</link>
		<comments>http://warped.org/blog/2009/11/22/updating-your-bios-in-dos-w-window-7-vista-using-a-usb-drive/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 22:55:58 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://warped.org/blog/?p=76</guid>
		<description><![CDATA[Problem
You need to update your BIOS using a DOS boot disk and you&#8217;re running Windows 7, or Vista.   Chances are you haven&#8217;t seen a DOS floppy, much less the floppy drive to put it in, since 1985.  
Solution
I found many sites telling you how to make a USB stick bootable for installing [...]]]></description>
			<content:encoded><![CDATA[<h1>Problem</h1>
<p>You need to update your BIOS using a DOS boot disk and you&#8217;re running Windows 7, or Vista.   Chances are you haven&#8217;t seen a DOS floppy, much less the floppy drive to put it in, since 1985.  </p>
<h1>Solution</h1>
<p>I found many sites telling you how to make a USB stick bootable for installing Windows 7, but none on how to make it bootable for DOS for upgrading the BIOS or other diag.</p>
<p>Here is one solution I found :</p>
<ol>
<li>Download a Windows 98 Bootable CD image from <a href="http://www.allbootdisks.com/download/iso.html">http://www.allbootdisks.com/download/iso.html</a> and burn it to a CD.
</li>
<li>Download the HP Flash Drive Format program that you will find mentioned on tons of differents sites : <a href="http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&#038;cc=us&#038;swItem=MTX-UNITY-I23839&#038;jumpid=reg_R1002_USEN">http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&#038;cc=us&#038;swItem=MTX-UNITY-I23839&#038;jumpid=reg_R1002_USEN</a>  and install it.</li>
<li>Using that utility, format your flash drive with FAT32,  Make it Bootable, and point the utility to your CDROM drive with the CD you made in Step 1.</li>
<li>Copy your BIOS and flash utility to the USB drive</li>
<li>Boot the computer using the USB stick.  This may require entering a Boot Menu w/ F11 or F12, and/or changing some settings in the BIOS such as &#8220;Enable Legacy USB Support&#8221;.   Chances are it will just work by putting the USB stick in and rebooting.</li>
<li>Follow the motherboard manufacturer instructions on how to flash the BIOS.</li>
</ol>
<p>Good luck and enjoy!<br />
-m</p>
]]></content:encoded>
			<wfw:commentRss>http://warped.org/blog/2009/11/22/updating-your-bios-in-dos-w-window-7-vista-using-a-usb-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
