<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="index.xsl" alternate="no" ?>
<blog title="Adam" baseurl="http://adam.kungfoohampster.com">
  <chapter
      title="Adam.KungFooHampster.Com" title_size="big">
    <headline
        graphic_alt="my computer"
        graphic_src="/images/kung.jpg" 
        graphic_href="http://www.kungfoohampster.com/">
      <section 
          title="subscribed mailing lists"
          graphic_src="/lists/daemon.gif"
          graphic_alt="FreeBSD Logo"
          graphic_href="/lists/">

        I am currently archiving and making 
        <a href="/lists/freebsd-questions/threads.shtml">freebsd-questions</a>,
        <a href="/lists/freebsd-hackers/threads.shtml">freebsd-hackers</a>, 
        <a href="/lists/freebsd-stable/threads.shtml">freebsd-stable</a>, and 
        <a href="/lists/cvs-all/threads.shtml">cvs-all</a> available on my website
        with <a href="http://www.mhonarc.org/">mhonarc</a>. The lists have been
        indexed and made searchable with 
        <a href="http://www.mhonarc.org/">namazu</a>. I have found that
        <a href="/lists/freebsd-questions/threads.shtml">freebsd-questions</a>
        is usefull to people of
        any *nix platform... <a href="http://www.freebsd.org/">You can learn
        more about FreeBSD at their website. </a>

      </section>
      <section
          title="Matrox PowerDesk"
          graphic_src="/images/matrox-icon.png"
          graphic_alt="Matrox penguin"
          graphic_href="/matrox.html">

        Matrox PowerDesk makes it easy to configure my MatroxG550 graphics card
        for X11. I love how it makes dual display so simple to set up. 
        <a href="http://www.matrox.com/mga/support/drivers/files/lnx_30.cfm">You can
        get Matrox PowerDesk for Linux off of the matrox website.</a>

      </section>
    </headline>
  </chapter>
  <chapter
      title="blahg"
      title_size="medium">
    <section
        title="A.I.N.A.B.">

      Adam.KungFooHampster.Com Is Not A Blog. I don't like journals and you
      will never find anything out about my life here. <i>( update: it has been pointed out to me that this has become a blog... but.. i still won't say anything personal on here... dangit )</i>

    </section>
    <section
        title="Adaptec 2400A or Western Digital 120G Hard Drive?">

      I have been experiencing some strange issues with my machine during high
      load times... I <a href="/lists/freebsd-questions/msg17619.shtml">posted
      to freebsd-questions</a> and got a <a
      href="http://adam.kungfoohampster.com/lists/freebsd-questions/msg18929.shtml">very
      interesting responce</a>. The whole time I had assumed that the problem
      was with my raid controller card when in actuallity it may be my Western
      Digital Hard Disks.

    </section>
    <section
        title="Pong">

      I know I said that I wouldn't put journal sorta stuff on here, but I just
      couldn't pass this up. <a href="pong.avi">I was playing Atari's Pong and
      I found a sweet spot!</a> I didn't have to move the paddle!!! It just
      scored over and over and over and over and over... I found the sweet spot
      right around when I scored 5 points and I just left it there till it got
      to 21 and the level stopped. -- time passes -- WOO HOO!!! It left the
      paddle where I left it!  I was able to do it again from the start and get
      <a href="pong60seconds.avi">60 seconds of proof! The madness!!</a> WOO HOO!! 

    </section>
    <section
        title="Hi">

      I will eat your soul. 

    </section>
    <section
        title="What Happened to artwiz??">
      <i>artwiz</i> (or Youngjin Hahn) is someone whom I consider to be one of the best graphic designers right around the turn of the century (2000), and only in the 8th grade. Living proof that open source applications like <a href="http://www.gimp.org">GIMP</a> could produce professional quality graphics when driven by a professional quality user. I don't know what exactly happened. Did he burn out? He had mastered the art of detail, simplicity, and a crisp modernness that I had never seen before. This ranged from creating amazing simplistic fonts, window manager themes, and music to some sweet desktops. <a href="http://www.oswd.org/interviews.php?id=1">I came across this interview which seems to be at the end of his ambition.</a> After reading it, what can you say? He sounds burnt out. <a href="http://www.vastwaters.com/">Then I came across his home page which doesn't even mention "artwiz" at all.</a> Maybe its a way of being humble? But, I would be proud to have beared the alias <i>artwiz</i>. <a href="http://artwiz.artramp.org/">Every now and then, I go to his "downed site" in hopes that it will be rebirthed.</a> Cheers to you, <i>artwiz</i>. ... the best damn graphic artist I've ever seen and I don't even know him.
    </section>

  </chapter>
  <chapter
      title="FreeBSD General"
      title_size="medium">
    <!--<section 
        title="Mozilla: &quot;No running window found&quot;">

      It seems that people are making their way to pages in my mailing archives
      through google/yahoo/etc. So, I figure I might as well help them get to
      the page they're probably looking for. In this case &gt;&gt; <a
      href="http://adam.kungfoohampster.com/lists/freebsd-questions/msg16224.shtml">Mozilla
      1.4 problems. Help needed. No running window found.</a> Maybe, that thread
      will point you in the right direction. 

    </section>
    <section
        title="Sound Blaster 16 in FreeBSD and KDE">

      <a
      href="http://adam.kungfoohampster.com/lists/freebsd-questions/msg18933.shtml">This
      thread</a> discusses the pitfalls of a new user setting up their sound
      card to work with in a FreeBSD5.1 with the possibility of switching to
      devfs. 

    </section>
    <section
        title="Difficulty changing slice via label in FreeBSD 5.1">

      <a
      href="http://adam.kungfoohampster.com/lists/freebsd-questions/msg18931.shtml">This
      message</a> notes that one could try disklabel'ing it manually. 

    </section>
    <section
        title="Bad Sectors">

      <a
      href="http://adam.kungfoohampster.com/lists/freebsd-questions/msg18912.shtml">This
      message</a> states that modern drives have 'spare' sectors that are used
      to replace the ones gone bad. For a better explanation, take a look. 

    </section>-->
    <section
        title="Why is portupgrade so cool?">

      I personally use portupgrade on my FreeBSD system and have found it to be
      invaluable. Another <a
      href="http://bsd.slashdot.org/article.pl?sid=03/08/29/1451200">slashdot
      post</a> pointing to onlamp.com has a great
      run-thru on the <a href="http://www.onlamp.com/lpt/a/4111">power of
      portupgrade</a>. 

    </section>
    <section
        title="CVS Tags - Which should my FreeBSD system use?">

      The FreeBSD handbook has a <a
      href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvs-tags.html">great
      page</a> that explains the differences between all of the different
      branch tags so that one can decide which version is best for them. 

    </section>
    <section
        title="FreeBSD CUPS howto">

      The <a href="http://www.freebsddiary.org/">FreeBSD Diary</a> has a <a
      href="http://www.freebsddiary.org/cups.php">simple howto</a> on setting
      up the <a href="http://www.cups.org/">CUPS (Common UNIX Printing
      System)</a> server and client in FreeBSD.  <a
      href="http://adam.kungfoohampster.com/lists/freebsd-questions/msg18362.shtml">The
      message</a> this person posted to freebsd-questions seems to agree.
      Another <a
      href="http://adam.kungfoohampster.com/lists/freebsd-questions/msg20631.shtml">thread
      beginning</a> here helps a newbie get a better grasp on what files to
      look at, etc for setting up CUPS. 

    </section>
    <section
        title="KVim: freebsd configure: error: could not find Qt directory">

      When compiling on FreeBSD along with instructions on <a
      href="http://www.freehackers.org/kvim/download.html">KVim's site</a>, try
      --with-qt-dir=/usr/X11R6

    </section>
  </chapter>

  <chapter
      title="FreeBSD Jails"
      title_size="medium">
    <section
        title="What is Virtual FreeBSD?">

      <a
      href="http://adam.kungfoohampster.com/lists/freebsd-questions/msg16254.shtml">This
      message</a> explains that 'virtual FreeBSD' is simply jails on a FreeBSD
      system. You can find out more about jails by going to <a
      href="http://www.onlamp.com/lpt/a/4139">the page</a> on onlamp.com that
      was discovered on a <a
      href="http://bsd.slashdot.org/article.pl?sid=03/09/05/1317225">slashdot
      post</a>. Of course, <a
      href="http://www.freebsd.org/cgi/man.cgi?query=jail">the FreeBSD man page
      on jail</a> is a good resource too! 

    </section>
    <section 
        title="jail start-up script">

      This assumes you have all the jail stuff(Jailer, Jail Utilities) from this dude(N. Nielsen)'s <a href="http://memberwebs.com/nielsen/freebsd/jails/">jail page</a>. 

      <break/>

      <file xml:space="preserve"><font color="#008b8b">PATH</font>=<font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff">/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin</font><font color="#a52a2a"><b>&quot;</b></font>
<font color="#008b8b">JAIL_NAME</font>=jail-name
<font color="#008b8b">JAIL_HOSTNAME</font>=jail-name.hostname.com
<font color="#008b8b">JAIL_IP</font>=ip.ad.rde.ss
<font color="#008b8b">JAIL_DRIVE</font>=vn0

jail_mount_drive () <font color="#6a5acd">{</font>
  vnconfig -s labels -c <font color="#a020f0">${</font><font color="#a020f0">JAIL_DRIVE</font><font color="#a020f0">}</font> /jail/ufs/<font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font>.ufs <font color="#a52a2a"><b>&amp;&amp;</b></font> \
    disklabel -r -w <font color="#a020f0">${</font><font color="#a020f0">JAIL_DRIVE</font><font color="#a020f0">}</font> auto <font color="#a52a2a"><b>&amp;&amp;</b></font> \
    tunefs -n enable /dev/<font color="#a020f0">${</font><font color="#a020f0">JAIL_DRIVE</font><font color="#a020f0">}</font> <font color="#a52a2a"><b>&amp;&amp;</b></font> \
    mount -o noatime /dev/<font color="#a020f0">${</font><font color="#a020f0">JAIL_DRIVE</font><font color="#a020f0">}</font> /jail/home/<font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font>
<font color="#6a5acd">}</font>

jail_unmount_drive () <font color="#6a5acd">{</font>
  umount /jail/home/<font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font> <font color="#a52a2a"><b>&amp;&amp;</b></font> \
    vnconfig -u <font color="#a020f0">${</font><font color="#a020f0">JAIL_DRIVE</font><font color="#a020f0">}</font> <font color="#a52a2a"><b>&amp;&amp;</b></font> \
    vnconfig -r labels <font color="#a020f0">${</font><font color="#a020f0">JAIL_DRIVE</font><font color="#a020f0">}</font>
<font color="#6a5acd">}</font>

<font color="#a52a2a"><b>case</b></font> <font color="#a52a2a"><b>&quot;</b></font><font color="#a020f0">$1</font><font color="#a52a2a"><b>&quot;</b></font> <font color="#a52a2a"><b>in</b></font>
  start<font color="#a52a2a"><b>)</b></font>
  <font color="#a52a2a"><b>;;</b></font>
  nostart<font color="#a52a2a"><b>)</b></font>
    jails | grep -q <font color="#a52a2a"><b>&quot;</b></font><font color="#a020f0">${</font><font color="#a020f0">JAIL_HOSTNAME</font><font color="#a020f0">}</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>[</b></font> <font color="#a020f0">$?</font> <font color="#a52a2a"><b>=</b></font> <font color="#ff00ff">0</font> <font color="#a52a2a"><b>]</b></font>; <font color="#a52a2a"><b>then</b></font>
      <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#ff00ff"> already running</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>else</b></font>
      <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>[</b></font> <font color="#a52a2a"><b>-x</b></font> /jail/home/<font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font>/usr/local/sbin/jailer <font color="#a52a2a"><b>]</b></font>; <font color="#a52a2a"><b>then</b></font>
        /usr/bin/true
      <font color="#a52a2a"><b>else</b></font>
        jail_mount_drive &amp;&amp;  <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> mounted </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#a52a2a"><b>&quot;</b></font>
      <font color="#a52a2a"><b>fi</b></font>

      <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>[</b></font> <font color="#a52a2a"><b>-x</b></font> /jail/home/<font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font>/usr/local/sbin/jailer <font color="#a52a2a"><b>]</b></font>; <font color="#a52a2a"><b>then</b></font>
        /usr/sbin/jail /jail/home/<font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font> <font color="#a020f0">${</font><font color="#a020f0">JAIL_HOSTNAME</font><font color="#a020f0">}</font> <font color="#a020f0">${</font><font color="#a020f0">JAIL_IP</font><font color="#a020f0">}</font> \ 
          /usr/local/sbin/jailer &amp;&amp; <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> started </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#a52a2a"><b>&quot;</b></font>
      <font color="#a52a2a"><b>else</b></font>
        <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> error: </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#ff00ff">: could not mount</font><font color="#a52a2a"><b>&quot;</b></font>
      <font color="#a52a2a"><b>fi</b></font>
    <font color="#a52a2a"><b>fi</b></font>
    <font color="#a52a2a"><b>;;</b></font>
  stop<font color="#a52a2a"><b>)</b></font>
    jails | grep -q <font color="#a52a2a"><b>&quot;</b></font><font color="#a020f0">${</font><font color="#a020f0">JAIL_HOSTNAME</font><font color="#a020f0">}</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>[</b></font> <font color="#a020f0">$?</font> <font color="#a52a2a"><b>=</b></font> <font color="#ff00ff">0</font> <font color="#a52a2a"><b>]</b></font>; <font color="#a52a2a"><b>then</b></font>
      killjail <font color="#a020f0">${</font><font color="#a020f0">JAIL_HOSTNAME</font><font color="#a020f0">}</font> &amp;&amp; <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> stopped </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>else</b></font>
      <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#ff00ff"> already stopped</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>fi</b></font>
    <font color="#a52a2a"><b>;;</b></font>
  restart<font color="#a52a2a"><b>)</b></font>
    jails | grep -q <font color="#a52a2a"><b>&quot;</b></font><font color="#a020f0">${</font><font color="#a020f0">JAIL_HOSTNAME</font><font color="#a020f0">}</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>[</b></font> <font color="#a020f0">$?</font> <font color="#a52a2a"><b>=</b></font> <font color="#ff00ff">1</font> <font color="#a52a2a"><b>]</b></font>; <font color="#a52a2a"><b>then</b></font>
      <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#ff00ff"> not running - try start</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>else</b></font>
      killjail <font color="#a52a2a"><b>-r</b></font> <font color="#a020f0">${</font><font color="#a020f0">JAIL_HOSTNAME</font><font color="#a020f0">}</font>
    <font color="#a52a2a"><b>fi</b></font>
    <font color="#a52a2a"><b>;;</b></font>
  mount<font color="#a52a2a"><b>)</b></font>
    <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>[</b></font> <font color="#a52a2a"><b>-x</b></font> /jail/home/<font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font>/usr/local/sbin/jailer <font color="#a52a2a"><b>]</b></font>; <font color="#a52a2a"><b>then</b></font>
      <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#ff00ff"> already mounted</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>else</b></font>
      jail_mount_drive &amp;&amp;  <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> mounted </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>fi</b></font>
    <font color="#a52a2a"><b>;;</b></font>
  unmount|umount<font color="#a52a2a"><b>)</b></font>
    jails | grep -q <font color="#a52a2a"><b>&quot;</b></font><font color="#a020f0">${</font><font color="#a020f0">JAIL_HOSTNAME</font><font color="#a020f0">}</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>[</b></font> <font color="#a020f0">$?</font> <font color="#a52a2a"><b>=</b></font> <font color="#ff00ff">0</font> <font color="#a52a2a"><b>]</b></font>; <font color="#a52a2a"><b>then</b></font>
      <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> error: </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#ff00ff">: could not unmount - still running</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>else</b></font>
      <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>[</b></font> <font color="#a52a2a"><b>-x</b></font> /jail/home/<font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font>/usr/local/sbin/jailer <font color="#a52a2a"><b>]</b></font>; <font color="#a52a2a"><b>then</b></font>
        jail_unmount_drive &amp;&amp; <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#ff00ff"> unmounted</font><font color="#a52a2a"><b>&quot;</b></font>
      <font color="#a52a2a"><b>else</b></font>
        <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#ff00ff"> already unmounted</font><font color="#a52a2a"><b>&quot;</b></font>
      <font color="#a52a2a"><b>fi</b></font>
    <font color="#a52a2a"><b>fi</b></font>
    <font color="#a52a2a"><b>;;</b></font>
  status<font color="#a52a2a"><b>)</b></font>
    jails | grep -q <font color="#a52a2a"><b>&quot;</b></font><font color="#a020f0">${</font><font color="#a020f0">JAIL_HOSTNAME</font><font color="#a020f0">}</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>[</b></font> <font color="#a020f0">$?</font> <font color="#a52a2a"><b>=</b></font> <font color="#ff00ff">0</font> <font color="#a52a2a"><b>]</b></font>; <font color="#a52a2a"><b>then</b></font>
      <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> -n </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#ff00ff"> running</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>else</b></font>
      <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> -n </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff"> </font><font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font><font color="#ff00ff"> not running</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>fi</b></font>

    <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>[</b></font> <font color="#a52a2a"><b>-x</b></font> /jail/home/<font color="#a020f0">${</font><font color="#a020f0">JAIL_NAME</font><font color="#a020f0">}</font>/usr/local/sbin/jailer <font color="#a52a2a"><b>]</b></font>; <font color="#a52a2a"><b>then</b></font>
      <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> -n </font><font color="#a52a2a"><b>'</b></font><font color="#ff00ff">+mounted</font><font color="#a52a2a"><b>'</b></font>
    <font color="#a52a2a"><b>else</b></font>
      <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> -n </font><font color="#a52a2a"><b>'</b></font><font color="#ff00ff">+unmounted</font><font color="#a52a2a"><b>'</b></font>
    <font color="#a52a2a"><b>fi</b></font>
    <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font>
    <font color="#a52a2a"><b>;;</b></font>
  *<font color="#a52a2a"><b>)</b></font>
    <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;&quot;</b></font>
    <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff">Usage: </font><font color="#6a5acd">`basename </font><font color="#a020f0">$0</font><font color="#6a5acd">`</font><font color="#ff00ff"> { start | stop | restart | mount | u(n)mount }</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;&quot;</b></font>
    <font color="#a52a2a"><b>exit</b></font> <font color="#ff00ff">64</font>
    <font color="#a52a2a"><b>;;</b></font>
<font color="#a52a2a"><b>esac</b></font></file>

    </section>
  </chapter>

  <chapter
      title="Apache"
      title_size="medium">
    <section
        title="Apache Module C API: Directory tidbits">

      I have come across some intersting guideliness if one is writing an
      Apache Module in C and wants to catch directories with their
      <tt>Sethandler</tt>.
      ( Just imagine a directory as a file of type
      <tt>httpd/unix-directory</tt> or <tt>DIR_MAGIC_TYPE</tt>. ) 

      <break/>

      <tt>SetHandler</tt> doesn't affect directories inside a
      <tt>&lt;Location&gt;</tt> or <tt>&lt;Directory&gt;</tt> directive.
      <tt>SetHandler</tt> does affect all files within those directories
      recursively. 

      <break/>

      <a href="mod_mime.c.html#find_ct"><tt>mod_mime.c</tt>'s</a> first few
      lines of its "type checker" immediately rule out directories as
      <tt>r-&gt;content_type=DIR_MAGIC_TYPE</tt> and returns <tt>OK</tt>.
      <tt>mod_autoindex</tt> and <tt>mod_dir</tt> will catch this mime type. 

      <break/>

      This is why the handler of the module I am working on isn't getting a
      chance. The way my module can get a chance is by implementing its own
      "type checker". I had it access <tt>mod_mime</tt>'s configuration data and check
      to see if its <tt>cfg-&gt;handler</tt> matched the name of my module's
      handler. If it checked out then I changed <tt>r-&gt;handler</tt> to equal
      the name of my module's handler. I also added another condition to check
      if the <tt>r-&gt;uri</tt>'s last character was a slash("/"). If it wasn't
      a slash then I returned <tt>DECLINED</tt> so that <tt>mod_dir</tt> would
      redirect it to the appropriate path. 

      <break/>

      The reason I had to do this is because every module's type checker gets a
      shot to change the attributes of a request object. It gets called every
      time there is a hit to apache and does not care if you defined a
      <tt>SetHandler</tt> inside a <tt>&lt;Location&gt;</tt> or
      <tt>&lt;Directory&gt;</tt> directive. I needed to know that the object
      being requested was within the bounds of a
      <tt>SetHandler</tt>(<tt>cfg-&gt;handler</tt>) with the same name as my
      handler handler. I found this out the hard way when every virtual host on
      my site ended up with a blank page because I assumed that my module would
      only be called within a <tt>SetHandler</tt> directive and that I wouldn't have to
      verify. 

      <break/>

      I hope someone out there finds this information useful because I wasted a
      lot of time looking in the wrong places to solve my problem.

    </section>
  </chapter>
  <chapter
      title="Samba"
      title_size="medium">
    <section
        title="Samba / smbspool / smbutil / mount_smbfs through a firewall hints">
      rule of thumb: know thy ip's - now you don't have to figure out what
      ports to keep open (destination to you).. ( works best when dealing with
      static ip's )
      <break/>

      <ol>
        <li><b>printing - cups</b><br/>$ <b>smbspool</b> smb://<i>username</i>:<i>password</i>@<i>server</i>/<i>printer</i>

          <break/>

          <tt>ln -s <i>/usr/local</i>/bin/smbspool <i>/usr/local</i>/libexec/cups/backend/smb</tt>

          <break/>

          <tt>(/usr/local)/etc/lmhosts</tt>

          <break/>

          <file xml:space="preserve"><tt><i>ip.ad.dre.ss</i> <i>server</i></tt></file>
        </li>
        <li><b>mounting</b><br/>$ <b>mount_smbfs</b> -I <i>ip.ad.dre.ss</i> //<i>username</i>@<i>server</i>/<i>share</i> /<i>mnt</i>/<i>share</i>
          <tt><i>(/usr/local)</i>/etc/nsmb.conf</tt>

          <break/>

          <file xml:space="preserve">[<i>server</i>:<i>username</i>:<i>share</i>]
<font color="#a020f0">password</font>=<i><font color="#ff00ff">password</font></i></file>

          <tt><i>(/usr/local)</i>/etc/rc.d/samba_mount.sh</tt>

          <break/>

          <file xml:space="preserve"><font color="#0000ff">#!/bin/sh</font> 
<font color="#a52a2a"><b>case</b></font> <font color="#a020f0">$1</font> <font color="#a52a2a"><b>in</b></font>
  start<font color="#a52a2a"><b>)</b></font>
    /sbin/mount | grep -q <font color="#a52a2a"><b>'</b></font><font color="#ff00ff">/mnt/share</font><font color="#a52a2a"><b>'</b></font>
    <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>test</b></font> <font color="#a020f0">$?</font> <font color="#a52a2a"><b>=</b></font> <font color="#ff00ff">0</font> ; <font color="#a52a2a"><b>then</b></font>
      <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff">alrady mounted</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>else</b></font>
      /usr/sbin/mount_smbfs <font color="#a52a2a"><b>-I</b></font> 192.168.1.2 //username@server/share /mnt/share
    <font color="#a52a2a"><b>fi</b></font>
    <font color="#a52a2a"><b>;;</b></font>
  stop<font color="#a52a2a"><b>)</b></font>
    /sbin/mount | grep -q <font color="#a52a2a"><b>'</b></font><font color="#ff00ff">/mnt/share</font><font color="#a52a2a"><b>'</b></font>
    <font color="#a52a2a"><b>if</b></font> <font color="#a52a2a"><b>test</b></font> <font color="#a020f0">$?</font> <font color="#a52a2a"><b>=</b></font> <font color="#ff00ff">0</font> ; <font color="#a52a2a"><b>then</b></font>
      /sbin/umount /mnt/share
    <font color="#a52a2a"><b>else</b></font>
      <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff">already unmounted</font><font color="#a52a2a"><b>&quot;</b></font>
    <font color="#a52a2a"><b>fi</b></font>
    <font color="#a52a2a"><b>;;</b></font>
  *<font color="#a52a2a"><b>)</b></font>
    <font color="#a52a2a"><b>echo</b></font><font color="#ff00ff"> </font><font color="#a52a2a"><b>&quot;</b></font><font color="#ff00ff">Useage: </font><font color="#6a5acd">`basename </font><font color="#a020f0">$0</font><font color="#6a5acd">`</font><font color="#ff00ff"> (start|stop)</font><font color="#a52a2a"><b>&quot;</b></font>
<font color="#a52a2a"><b>esac</b></font></file>
        </li>
      </ol>
    </section>
  </chapter>

  <chapter
      title="XML"
      title_size="medium">
    <section title="Client Side XSLT/XML Inernet Explorer &amp; Netscape/Mozilla/Firefox">
      HOW can I get mozzilla and IE to render xml pages with xsl in similar fashions?
      <break/>
      <ol type="1">
        <li><b>XML</b>'s <tt><b>xml:space="preserve"</b></tt> is an attribute
          that will tell a tag to preserve whitespace and linefeeds</li>
        <li><b>XSL</b>'s <tt><b>&lt;xsl:preserve-space
          elements="tag"/&gt;</b></tt> is a xsl tag that will tell the xsl
          processor to preserve whitespace and linefeeds for the specified
          elements (white seperated list)</li>
        <li><b>XML</b>'s second line! <tt><b>&lt;?xml-stylesheet
          type="text/xsl" href="template.xsl" alternate="no"?&gt;</b></tt></li>
        <li><b>XSL</b>'s <tt><b>&lt;xsl:stylesheet ... &gt;</b></tt>
          <ol type="a">
            <li><tt><b>omit-xml-declaration="no"</b></tt> -- keeps the
              <tt>&lt;?xml version="1.0"?&gt;</tt> at the top of the
              output. -- tells IE to respect
              <tt><b>xml:space="preserve"</b></tt> among other things.</li>
            <li><tt><b>indent="no"</b></tt> -- prevents IE from getting
              confuzed with whitespace if you have <tt>white-space: pre</tt> CSS
              usage being processed on the outputted HTML.</li>
            <li><tt><b>method="html"</b></tt> -- tells mozilla to process this
              output like html (obviously it doesn't do anything intelligent with
              <tt>media-type</tt>, <tt>doctype-public</tt>, or
              <tt>doctype-system</tt> ... they're just output ... not
              instructions like <tt>method</tt></li>
            <li><tt><b>media-type="text/xml"</b></tt> -- tells IE to use this
              document like an XML document... so that it will respect the
              <tt>xml:space="preserve"</tt>'s</li>
            <li><tt><b>doctype-public="-//W3C//DTD HTML 4.01
              Transitional//EN"</b></tt> -- we can't use xhtml because
              <tt>method="html"</tt> doesn't make self ending tags like
              <tt>&lt;br/&gt;</tt></li>
            <li><tt><b>doctype-system="http://www.w3.org/TR/html4/loose.dtd"</b></tt>
              -- we can't use xhtml because <tt>method="html"</tt> doesn't make
              self ending tags like <tt>&lt;br/&gt;</tt></li>
          </ol>
        </li>
      </ol>
      <break/>
      <a href="/index.xml">To see this page as XML processed against XSL on the
        fly with both IE and MOZ ... clicky ... clicky ...</a>
    </section>
    <section title="XSL-FO and FOP and white space (converting XML to PDF)">
      I never realized what an issue white space was until I started using, xml, xsl, and fo.
      <break/>
      If you want the same effect as the HTML &lt;pre&gt; tag in FO then in your...
      <ol type="1">
        <li><b>XML</b> make use of the <tt><b>xml:space="preserve"</b></tt> attribute</li>
        <li><b>XSL</b> make use of <tt><b>&lt;xsl:preserve-space
          elements="tag"/&gt;</b></tt> instruction.</li>
        <li><b>FO</b>
          <ol type="a">
            <li><b><a href="http://xml.apache.org/fop/">FOP</a></b> make use of the <tt><b>white-space-collapse="false"</b></tt> and <tt><b>linefeed-treatment="preserve"</b></tt> attributes ( <i><a href="http://xml.apache.org/fop/fo.html#N10113">warning: Due to a bug in current versions of FOP, setting white-space-collapse="false" will also preserve line breaks in the text. Do not rely on this behavior, as it is non-conformant and will be changed.</a></i> ) - meaning.. always set <tt><b>linefeed-treatment</b></tt> ... don't make assumptions</li>
            <li><b>Other FO engine</b> consider FOP's primary way of preserving whitespace and maybe try out the <tt><b>white-space-treatment="preserve"</b></tt> attribute</li>
          </ol>
        </li>
      </ol>
      <break/>
      Remember... WHEN IN DOUBT - W3C!! <a href="http://www.w3.org/TR/xsl/">( XSL-FO )</a>&#160;<a href="http://www.w3.org/TR/xslt">( XSLT )</a>&#160;<a href="http://www.w3.org/XML/">( XML )</a>
      <break/>
      <a href="/fop/index.pdf">To see this page as REALLY ROUGH BETA PDF OUTPUT (proccessed by FOP) ... clicky ... clicky ...</a> ( and please remember ... if this output is ugly, its my fault ... not FOP's )
    </section>
  </chapter>
  <chapter title="Contact" title_size="medium">
     <section title="Me: Adam Kasper">
       If you <b>REALLY</b> feel that its necessary to contact me...
       <form method="post" action="toadam.php">
         <p>
           <span style="font-size:9pt">Your email Address<br/></span>
           <input type="text" name="CONTACT_YOU"/>
         </p>
         <p>
           <span style="font-size:9pt">Subject<br/></span>
           <input type="text" name="CONTACT_HEADING"/>
         </p>
         <p>
           <span style="font-size:9pt">Message<br/></span>
           <textarea wrap="off" cols="50" rows="4" name="CONTACT_MESSAGE"></textarea>
         </p>
         <input type="submit" value="Contact Me"/>
       </form>
     </section>
  </chapter>
</blog>
