<?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>nerd.cx</title>
	<atom:link href="http://nerd.cx/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://nerd.cx</link>
	<description></description>
	<lastBuildDate>Mon, 17 May 2010 15:25:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Facebook and Privacy</title>
		<link>http://nerd.cx/index.php/2010/05/17/facebook-and-privacy/</link>
		<comments>http://nerd.cx/index.php/2010/05/17/facebook-and-privacy/#comments</comments>
		<pubDate>Mon, 17 May 2010 15:25:54 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/?p=171</guid>
		<description><![CDATA[I recently deleted my Facebook profile. I think I updated my status twice in three years, and made little or no effort to solicit friends, but I did read the front page, and sent an occasional message. The overt service was moderately neat, and I liked being able to see what others where doing, if [...]]]></description>
			<content:encoded><![CDATA[<p>I recently deleted my Facebook profile.  I think I updated my status twice in three years, and made little or no effort to solicit friends, but I did read the front page, and sent an occasional message.  The overt service was moderately neat, and I liked being able to see what others where doing, if they decided to post.  That said, the continued erosion of privacy settings, and the ultimate fact that I was Facebook&#8217;s product &#8211; me and my relationships are what they are selling &#8211; was finally enough to me to get out.</p>
<p>Dana Boyd&#8217;s recent <a href="http://www.zephoria.org/thoughts/archives/2010/05/14/facebook-and-radical-transparency-a-rant.html">post</a> brings up a few good points, but one that particularly resonates is that Facebook&#8217;s interface did not make it clear what you are giving away by using the site.</p>
<p>I think that they way to address this is to have a tabbed screen preview of your profile and activities, where each tab is a sharing constellation &#8211; 3rd party API users, friends, friends-of-friends, everyone &#8211; and you could tune your profile by excluding classes of information to those constellations, and see who comprises those groups at the same time.  You could click on the friends-of-friends tab and see, perhaps to your horror, what you are sharing with your mom&#8217;s coworkers, and who they are in a neat, sortable list.</p>
<p>I would still be a Facebook user if I could click on the API tab and turn it off, click on the Everyone tab and turn off everything but my name and profile picture, etc.  But I can&#8217;t and because I can&#8217;t see what I&#8217;m sharing, Facebook seems to think I don&#8217;t care, and they&#8217;re wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2010/05/17/facebook-and-privacy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logitech Marble Mouse &#8211; Update #4</title>
		<link>http://nerd.cx/index.php/2010/05/13/logitech-marble-mouse-update-4/</link>
		<comments>http://nerd.cx/index.php/2010/05/13/logitech-marble-mouse-update-4/#comments</comments>
		<pubDate>Fri, 14 May 2010 03:25:56 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/?p=164</guid>
		<description><![CDATA[Well, something in the behaviour of X changed again after an update, and now in response to the previous code, xinput set-int-prop '"Logitech USB Trackball"' 'Evdev Wheel Emulation Button' 8 8, I get this error: unable to find device "Logitech USB Trackball". So I go a-hunting in man xinput and find that, if the name [...]]]></description>
			<content:encoded><![CDATA[<p>Well, something in the behaviour of X changed again after an update, and now in response to the previous code, <code>xinput set-int-prop '"Logitech USB Trackball"' 'Evdev Wheel Emulation Button' 8 8</code>, I get this error: <code>unable to find device "Logitech USB Trackball"</code>.</p>
<p>So I go a-hunting in <code>man xinput</code> and find that, if the name of the device has changed, I will find it by using <code>xinput list</code>, which give me this:</p>
<pre>
? Virtual core pointer                    	id=2	[master pointer  (3)]
?   ? Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
?   ? Logitech USB Trackball                  	id=8	[slave  pointer  (2)]
?   ? Macintosh mouse button emulation        	id=10	[slave  pointer  (2)]
? Virtual core keyboard                   	id=3	[master keyboard (2)]
    ? Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ? Power Button                            	id=6	[slave  keyboard (3)]
    ? Power Button                            	id=7	[slave  keyboard (3)]
    ? AT Translated Set 2 keyboard            	id=9	[slave  keyboard (3)]
</pre>
<p>It looks to me like it&#8217;s still called a &#8220;Logitech USB Trackball&#8221;.  Long story short, I now have to identify this by <code>id</code> code, or drop the extra quotes.  For posterity, here are the commands that work:</p>
<p><code>xinput set-int-prop 8 'Evdev Wheel Emulation Button' 8 8</code><br />
<code>xinput set-int-prop 8 'Evdev Wheel Emulation' 8 1</code></p>
<p>or</p>
<p><code>xinput set-int-prop 'Logitech USB Trackball' 'Evdev Wheel Emulation Button' 8 8</code><br />
<code>xinput set-int-prop 'Logitech USB Trackball' 'Evdev Wheel Emulation Button' 8 1</code></p>
<p>Yes, these changes are a pain in the ass.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2010/05/13/logitech-marble-mouse-update-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logitech Marble Mouse &#8211; Updated (Again)</title>
		<link>http://nerd.cx/index.php/2010/02/11/logitech-marble-mouse-updated-again/</link>
		<comments>http://nerd.cx/index.php/2010/02/11/logitech-marble-mouse-updated-again/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 18:28:51 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/?p=157</guid>
		<description><![CDATA[As near as I can tell, some update or tweak in the way X works has invalidated the configuration of my mouse via hal. This is definitely getting tiring. I have had to work around it by putting this in my .xinitrc: xinput set-int-prop '"Logitech USB Trackball"' 'Evdev Wheel Emulation Button' 8 8 xinput set-int-prop [...]]]></description>
			<content:encoded><![CDATA[<p>As near as I can tell, some update or tweak in the way X works has invalidated the configuration of my mouse via <code>hal</code>.  This is definitely getting tiring.  I have had to work around it by putting this in my <code>.xinitrc</code>:<br />
<code><br />
xinput set-int-prop '"Logitech USB Trackball"' 'Evdev Wheel Emulation Button' 8 8<br />
xinput set-int-prop '"Logitech USB Trackball"' 'Evdev Wheel Emulation' 8 1<br />
</code><br />
If it starts to work differently, I&#8217;ll update, again.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2010/02/11/logitech-marble-mouse-updated-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logitech Marble Mouse &#8211; Update</title>
		<link>http://nerd.cx/index.php/2009/09/17/logitech-marble-mouse-update/</link>
		<comments>http://nerd.cx/index.php/2009/09/17/logitech-marble-mouse-update/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 23:35:58 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/?p=147</guid>
		<description><![CDATA[A recent update of the xerver-xorg package (1:7.4+1) changed the way X configures input devices &#8211; they are now handled by hal or evdev, and their sections of the xorg.conf are ignored. I filed a bug report, and was informed that it&#8217;s not a bug. I disagree, in that if you break things in an [...]]]></description>
			<content:encoded><![CDATA[<p>A recent update of the xerver-xorg package (1:7.4+1) changed the way X configures input devices &#8211; they are now handled by <code>hal</code> or <code>evdev</code>, and their sections of the xorg.conf are ignored.</p>
<p>I filed a bug report, and was informed that it&#8217;s not a bug.  I disagree, in that if you break things in an upgrade, it is a bug.</p>
<p>Never-the-less, I had to figure out how to get my EmulateWheel behaviour back since the upgrade.</p>
<p>The <code>evdev</code> man page is nigh on useless, but <a href="http://mvogt.wordpress.com/2008/08/15/xorg-evdev-and-emulatewheel/">this blog entry</a> helped a lot.  It has lead to the following as my <code>/etc/hal/fdi/policy/marble_mouse.fdi</code>:</p>
<pre>
&lt;match key="info.product" string="Logitech USB Trackball"&gt;
 &lt;merge key="input.x11_options.EmulateWheel" type="string"&gt;true&lt;/merge&gt;
 &lt;merge key="input.x11_options.EmulateWheelButton" type="string"&gt;8&lt;/merge&gt;
 &lt;merge key="input.x11_options.ZAxsisMapping" type="string"&gt;4 5&lt;/merge&gt;
&lt;/match&gt;
</pre>
<p>I got the info.product part by looking at /dev/input/by-id/, and<br />
guessing.  I logged out, and restarted hal for good measure.  One or the<br />
other may not be necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2009/09/17/logitech-marble-mouse-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MATLAB on Headless Linux</title>
		<link>http://nerd.cx/index.php/2009/05/13/matlab-on-headless-linux/</link>
		<comments>http://nerd.cx/index.php/2009/05/13/matlab-on-headless-linux/#comments</comments>
		<pubDate>Wed, 13 May 2009 19:33:47 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/?p=119</guid>
		<description><![CDATA[I am trying to install MATLAB on a headless Linux server at work, and it is ridiculously miserable. I can&#8217;t believe that this is the industry standard. It is no wonder that people are switching to Python, Octave and Maxima. Between free, gratis systems and expensive with horrible installation, there is little to recommend MATLAB.]]></description>
			<content:encoded><![CDATA[<p>I am trying to install MATLAB on a headless Linux server at work, and it is ridiculously miserable.  I can&#8217;t believe that this is the industry standard.  It is no wonder that people are switching to <a href="http://python.org">Python</a>, <a href="http://www.gnu.org/software/octave/">Octave</a> and <a href="http://maxima.sourceforge.net/">Maxima</a>.  Between free, gratis systems and expensive with horrible installation, there is little to recommend MATLAB.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2009/05/13/matlab-on-headless-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Logitech Marble Mouse</title>
		<link>http://nerd.cx/index.php/2009/01/13/logitech-marble-mouse/</link>
		<comments>http://nerd.cx/index.php/2009/01/13/logitech-marble-mouse/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 22:09:51 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/?p=108</guid>
		<description><![CDATA[I wanted to use the scroll buttons on my Logitech Marble Mouse. After a bit of poking, I got it to work as I wished. Here&#8217;s my xorg.conf file: # /etc/X11/xorg.conf (xorg X Window System server configuration file) # # This file was generated by dexconf, the Debian X Configuration tool, using # values from [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to use the scroll buttons on my Logitech Marble Mouse.  After a bit of poking, I got it to work as I wished.  Here&#8217;s my xorg.conf file:</p>
<pre>
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
  FontPath  "unix/:7101"
  FontPath  "/usr/share/fonts/truetype"
  FontPath  "/usr/share/fonts/X11/misc"
  FontPath  "/usr/X11R6/lib/X11/fonts/misc"
  FontPath  "/usr/share/fonts/X11/cyrillic"
  FontPath  "/usr/X11R6/lib/X11/fonts/cyrillic"
  FontPath  "/usr/share/fonts/X11/100dpi/:unscaled"
  FontPath  "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
  FontPath  "/usr/share/fonts/X11/75dpi/:unscaled"
  FontPath  "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
  FontPath  "/usr/share/fonts/X11/Type1"
  FontPath  "/usr/X11R6/lib/X11/fonts/Type1"
  FontPath  "/usr/share/fonts/X11/100dpi"
  FontPath  "/usr/X11R6/lib/X11/fonts/100dpi"
  FontPath  "/usr/share/fonts/X11/75dpi"
  FontPath  "/usr/X11R6/lib/X11/fonts/75dpi"
  # path to defoma fonts
  FontPath  "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
  Load  "i2c"
  Load  "bitmap"
  Load  "ddc"
  #Load "dri"
  Load  "extmod"
  Load  "freetype"
  Load  "glx"
  Load  "int10"
  Load  "vbe"
EndSection

Section "InputDevice"
  Identifier  "Generic Keyboard"
  Driver    "kbd"
  Option    "CoreKeyboard"
  Option    "XkbRules"  "xorg"
  Option    "XkbModel"  "pc104"
  Option    "XkbLayout" "us"
EndSection

Section "InputDevice"
  Identifier  "Configured Mouse"
  Driver    "mouse"
  Option    "CorePointer"
  Option    "Device"    "/dev/input/mice"
  Option    "Protocol"    "Auto"
  Option    "Buttons" "4"
  Option    "EmulateWheel" "true"
  Option    "EmulateWheelButton" "8"  #Option   "Emulate3Buttons" "true"
EndSection

Section "Device"
  Identifier  "nVidia Corporation C51 [GeForce 6150 LE]"
  Driver "nvidia"
  #Driver   "nv"
  BusID   "PCI:0:5:0"
  Option "SWcursor"
EndSection

Section "Monitor"
  Identifier  "Generic Monitor"
  Option    "DPMS"
  HorizSync 28-84
  VertRefresh 43-60
EndSection

Section "Screen"
  Identifier  "Default Screen"
  Device    "nVidia Corporation C51 [GeForce 6150 LE]"
  Monitor   "Generic Monitor"
  DefaultDepth  24
  SubSection "Display"
    Depth   1
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth   4
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth   8
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth   15
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth   16
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth   24
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
EndSection

Section "ServerLayout"
  Identifier  "Default Layout"
  Screen    "Default Screen"
  InputDevice "Generic Keyboard"
  InputDevice "Configured Mouse"
EndSection

Section "DRI"
  Mode  0666
EndSection
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2009/01/13/logitech-marble-mouse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New TrueType fonts in Debian</title>
		<link>http://nerd.cx/index.php/2008/04/28/new-truetype-fonts-in-debian/</link>
		<comments>http://nerd.cx/index.php/2008/04/28/new-truetype-fonts-in-debian/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 20:57:06 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/?p=78</guid>
		<description><![CDATA[I had a font I needed to install to make some graphics for a web project. It was easy enough to buy the font &#8211; I just chose the option for the TrueType file (TTF) and I knew I&#8217;d be fine. I had a little trouble getting the font to show up though, so I [...]]]></description>
			<content:encoded><![CDATA[<p>I had a font I needed to install to make some graphics for a web project.  It was easy enough to buy the font &#8211; I just chose the option for the TrueType file (TTF) and I knew I&#8217;d be fine.  I had a little trouble getting the font to show up though, so I record my efforts here.</p>
<ol>
<li>Put the TTF files (there&#8217;s usually three) in their own subdirectory of <code>/usr/share/fonts/truetype</code>.</li>
<li>As root, run these two commands in the new subdirectory: <code>mkfontscale</code> and <code>mkfontdir</code></li>
<li>Check to see if the font is installed: run <code>xlsfonts</code> and see if your font is there</li>
<li>If you don&#8217;t see your font, start Googling, but perhaps start <a href="http://tldp.org/HOWTO/TT-Debian-3.html#ss3.2">here</a>.
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2008/04/28/new-truetype-fonts-in-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloning your Debian Install</title>
		<link>http://nerd.cx/index.php/2008/04/11/cloning-your-debian-install/</link>
		<comments>http://nerd.cx/index.php/2008/04/11/cloning-your-debian-install/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 20:00:22 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/?p=77</guid>
		<description><![CDATA[Sometimes you need to reinstall a Debian system. Maybe your hard drive is going pear-shaped, maybe you got a new computer, maybe you are replicating a system, maybe you are building a lab. In any case, if you want all the packages that are installed on system 1 on your new/other system 2, here&#8217;s an [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need to reinstall a Debian system.  Maybe your hard drive is going pear-shaped, maybe you got a new computer, maybe you are replicating a system, maybe you are building a lab.  In any case, if you want all the packages that are installed on system 1 on your new/other system 2, here&#8217;s an easy way:</p>
<ol>
<li>On system 1, make a file with your installed/removed packages: <code>dpkg --get-selections > packages.txt</code></li>
<li>Get a base install done on system 2, and set <code>/etc/apt/sources.list</code> to be the same as on system 1</li>
<li>Get <code>packages.txt</code> onto system 2</li>
<li>Run <code>dpkg --set-selections < packages.txt</code> on system 2</code></li>
<li>Run <code>dselect install</code> on system 2</li>
<li>Optional: Dance</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2008/04/11/cloning-your-debian-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>screen Sulks</title>
		<link>http://nerd.cx/index.php/2008/04/10/screen-sulks/</link>
		<comments>http://nerd.cx/index.php/2008/04/10/screen-sulks/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 18:04:14 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/?p=76</guid>
		<description><![CDATA[Occasionally I put my screen session into a state that I call sulking &#8211; it refuses to take new input. This happens in two ways &#8211; one, my screen session gets fired into the background, and I left with the message [1]+ Stopped screen; the other seems to lock the screen from showing me any [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally I put my <code>screen</code> session into a state that I call sulking &#8211; it refuses to take new input.  This happens in two ways &#8211; one, my <code>screen</code> session gets fired into the background, and I left with the message <code>[1]+  Stopped                 screen</code>; the other seems to lock the screen from showing me any input.  In the second state I can navigate among <code>screen</code> sessions, and create new instances, but not type.</p>
<p>After much thrashing about, I learned that when I hit C-a z (Control a, z) I put the session in the background, and it can be returned with the command <code>fg</code>.  Similarly, if I hit C-a s I have locked the session to input, and to return it I need to hit C-a q.  Good things to know.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2008/04/10/screen-sulks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Padding Numbers in Filenames</title>
		<link>http://nerd.cx/index.php/2008/04/08/padding-numbers-in-filenames/</link>
		<comments>http://nerd.cx/index.php/2008/04/08/padding-numbers-in-filenames/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 20:59:22 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://nerd.cx/?p=75</guid>
		<description><![CDATA[I sometimes find myself with scads of files in a directory that, due to the vagaries of sort() do not show up in the &#8220;right&#8221; order. For example, 1.png, 2.png, &#8230; 751.png. I was poking around with rename, but I wasn&#8217;t finding a good way to do this. Thankfully, a poster on TLUG showed me [...]]]></description>
			<content:encoded><![CDATA[<p>I sometimes find myself with scads of files in a directory that, due to the vagaries of <code>sort()</code> do not show up in the &#8220;right&#8221; order.  For example, 1.png, 2.png, &#8230; 751.png.</p>
<p>I was poking around with <code>rename</code>, but I wasn&#8217;t finding a good way to do this.  Thankfully, a poster on <a href="http://tlug.ss.org/wiki/Main_Page">TLUG</a> showed me how to use <code>sprintf</code> to get the results I wanted, like so:</p>
<p><code>rename -n 's/(\d+)/sprintf("%04d", $1)/e' *.png</code></p>
<p>Very neat.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2008/04/08/padding-numbers-in-filenames/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Go to Date WordPress Widget</title>
		<link>http://nerd.cx/index.php/2008/04/05/go-to-date-wordpress-widget/</link>
		<comments>http://nerd.cx/index.php/2008/04/05/go-to-date-wordpress-widget/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 19:14:52 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://nerd.cx/index.php/2008/04/05/go-to-date-wordpress-widget/</guid>
		<description><![CDATA[This is the widget code to have a Go to Date widget in WordPress. It requires the correct permalink structure, but it is easy to paste into a text widget and it works nicely. &#60;script type="text/javascript"&#62; function gotodate() { var baseurl = "http://example.com/index.php/" var y = document.getElementById("year").value; var m = document.getElementById("month").value; var d = document.getElementById("day").value; [...]]]></description>
			<content:encoded><![CDATA[<p>This is the widget code to have a Go to Date widget in WordPress.  It requires the correct permalink structure, but it is easy to paste into a text widget and it works nicely.</p>
<pre>
&lt;script type="text/javascript"&gt;

function gotodate() {
  var baseurl = "http://example.com/index.php/"

  var y = document.getElementById("year").value;
  var m = document.getElementById("month").value;
  var d = document.getElementById("day").value;
  //debug alert(y + m + d);

  var newloc = baseurl + y + "/" + m + "/" + d
  window.location = newloc
}

&lt;form&gt;
  &lt;table&gt;
    &lt;tr&gt;
      &lt;td&gt;Year:&lt;/td&gt;
      &lt;td&gt;Month:&lt;/td&gt;
      &lt;td&gt;Day:&lt;/td&gt;
      &lt;td&gt;&nbsp;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;input type="text" id="year" size="4" maxlength="4" /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" id="month" size="2" maxlength="2" /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" id="day" size="2" maxlength="2" /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type="button" value="Go" onclick="javascript:gotodate();" /&gt;&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2008/04/05/go-to-date-wordpress-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Not dead, just parenting&#8230;</title>
		<link>http://nerd.cx/index.php/2008/04/04/not-dead-just-partening/</link>
		<comments>http://nerd.cx/index.php/2008/04/04/not-dead-just-partening/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 17:18:57 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/index.php/2008/04/04/not-dead-just-partening/</guid>
		<description><![CDATA[I&#8217;ve been meaning to write here for a while, but between a crazed toddler and a new job and very, very occasional sleep, I haven&#8217;t gotten around to it. However, this post suggests that that might be changing :-) We will have to see.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been meaning to write here for a while, but between a crazed toddler and a new job and very, very occasional sleep, I haven&#8217;t gotten around to it.  However, this post suggests that that might be changing :-)  We will have to see.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2008/04/04/not-dead-just-partening/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brain Dumping</title>
		<link>http://nerd.cx/index.php/2007/02/16/brain-dumping/</link>
		<comments>http://nerd.cx/index.php/2007/02/16/brain-dumping/#comments</comments>
		<pubDate>Fri, 16 Feb 2007 16:10:28 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/02/16/brain-dumping/</guid>
		<description><![CDATA[I am taking a leave from work starting today, but for the last month I have been dumping everything I know into other people so that they can approximate my job while I&#8217;m off. The problem is that much of my job is about fighting fires and doing tiny, technical things, and I have no [...]]]></description>
			<content:encoded><![CDATA[<p>I am taking a leave from work starting today, but for the last month I have been dumping everything I know into other people so that they can approximate my job while I&#8217;m off.  The problem is that much of my job is about fighting fires and doing tiny, technical things, and I have no idea how efficiently I have dumped my brain, or how much I have totally failed to relate.</p>
<p>There is no good way to know what you know &#8211; there is no feasible method to list your mind&#8217;s contents, and, knowing even obliquely the nature of the mind, it could easily spool off infinitely.  The best you can do is to hope that others are able to figure out the easy drudgery of your job and be hopelessly in your debt for the interesting things that you do, so you are appreciated without having to be buried in minutia when you return.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2007/02/16/brain-dumping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Procmail Tweaks</title>
		<link>http://nerd.cx/index.php/2007/02/14/procmail-tweaks/</link>
		<comments>http://nerd.cx/index.php/2007/02/14/procmail-tweaks/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 21:24:10 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/02/14/procmail-tweaks/</guid>
		<description><![CDATA[One of the lists to which I subscribe has chosen to put the list as the secondary element and the individual posters as the primary. That&#8217;s fine, but the side effect of this is that when I reply to a message, it goes to the poster, and not to the list. I don&#8217;t like the [...]]]></description>
			<content:encoded><![CDATA[<p>One of the lists to which I subscribe has chosen to put the list as the secondary element and the individual posters as the primary.  That&#8217;s fine, but the side effect of this is that when I reply to a message, it goes to the poster, and not to the list.  I don&#8217;t like the behaviour, but the list admins are plainly happy with it.  I resigned myself to replying-to-all for the purposes of that list, until I saw this <code><a href="http://www.procmail.org/">procmail</a></code> recipe:</p>
<pre>
:0:
* ^(From|To|Cc).*\@listdomain.eg
  {
    :0hf
    | /usr/bin/formail -A "Reply-To: listaddress@listdomain.eg"
    :0
    folderforlistmail
  }
</pre>
<p>I much prefer to hack the client-side then try to change policy on the server-side.  I am almost universally less resistant to change than any organization.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2007/02/14/procmail-tweaks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>256 colours in screen</title>
		<link>http://nerd.cx/index.php/2007/02/10/256-colours-in-screen/</link>
		<comments>http://nerd.cx/index.php/2007/02/10/256-colours-in-screen/#comments</comments>
		<pubDate>Sat, 10 Feb 2007 23:00:59 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/02/10/256-colours-in-screen/</guid>
		<description><![CDATA[I noticed that, within screen, I was not getting the full syntax highlighting in vim that I was expecting. Something had to be up, and it wasn&#8217;t long before I found this tip on getting full colour support for vim in screen. After so poking about, I only used a subset of those instructions. I [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed that, within <code><a href="http://www.gnu.org/software/screen/">screen</a></code>, I was not getting the full syntax highlighting in <code><a href="http://www.vim.org">vim</a></code> that I was expecting.  Something had to be up, and it wasn&#8217;t long before I found <a href="http://www.vim.org/tips/tip.php?tip_id=1312">this tip</a> on getting full colour support for <code>vim</code> in <code>screen</code>.</p>
<p>After so poking about, I only used a subset of those instructions.  I added this to my <code>.screenrc</code>:</p>
<pre>
attrcolor b ".I"
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
defbce "on"
</pre>
<p>My <code>.vimrc</code> got updated with this:</p>
<pre>
set t_Co=256
</pre>
<p>It did a great job, and now everything looks as it should.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2007/02/10/256-colours-in-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trouble with AdBlock</title>
		<link>http://nerd.cx/index.php/2007/02/08/trouble-with-adblock/</link>
		<comments>http://nerd.cx/index.php/2007/02/08/trouble-with-adblock/#comments</comments>
		<pubDate>Thu, 08 Feb 2007 16:16:42 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/02/08/trouble-with-adblock/</guid>
		<description><![CDATA[I discovered an interesting new tactic in the website ad game. Like most people using Firefox, I use the AdBlock Plus extension. A short while ago, I found that Flickr stopped working very well &#8211; it was obvious to me that the CSS stylesheet wasn&#8217;t loading. After investigating, I found the reason. Some time ago, [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered an interesting new tactic in the website ad game.  Like most people using <a href="http://getfirefox.net">Firefox</a>, I use the <a href="http://adblockplus.org/en/">AdBlock Plus</a> extension.  A short while ago, I found that <a href="http://flickr.com">Flickr</a> stopped working very well &#8211; it was obvious to me that the CSS stylesheet wasn&#8217;t loading.  After investigating, I found the reason.  Some time ago, tired of Yahoo!-based banner ads, I blocked the domain yimg.com.  Well, since Yahoo! bought Flickr, they have decided, ingeniously, to host the stylesheet for Flickr on yimg.com.  So now, I have to unblock that domain or face an ugly Flickr.  On many sites I&#8217;d be happy to deal with the ugly, but on an AJAX-intensive photo site, ugly doesn&#8217;t cut the mustard.  It&#8217;s an interesting tactic, and I wonder if other companies will start to use it.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2007/02/08/trouble-with-adblock/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More on screen</title>
		<link>http://nerd.cx/index.php/2007/02/07/more-on-screen/</link>
		<comments>http://nerd.cx/index.php/2007/02/07/more-on-screen/#comments</comments>
		<pubDate>Wed, 07 Feb 2007 04:35:13 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/02/07/more-on-screen/</guid>
		<description><![CDATA[While I don&#8217;t have a screen for a graphical user environment (like X), I do have screen for the terminal, and it rocks. Here&#8217;s how I use it; I have four primary email accounts, each with their own .muttrc. I open a screen session for each account, plus one session as a scratch pad, for [...]]]></description>
			<content:encoded><![CDATA[<p>While I don&#8217;t have a <code><a href="http://www.gnu.org/software/screen/">screen</a></code> for a graphical user environment (like X), I do have <code>screen</code> for the terminal, and it rocks.</p>
<p>Here&#8217;s how I use it; I have four primary email accounts, each with their own <code><a href="http://mutt.org">.muttrc</a></code>.  I open a <code>screen</code> session for each account, plus one session as a scratch pad, for the variety of non-mail activities that I do each day.  (If you&#8217;re thinking that one session for all non-mail activities is too few, you&#8217;d be right most of the time, but I have a solution for that too.)  I start all of these sessions by calling <code>screen</code> with a special config file, which I call <code>.myscreenrc</code>, to separate it from the regular <code>.screenrc</code>.  It looks like this:</p>
<pre>
autodetach on
shell -$SHELL
screen -t scratch
screen -t uoft u
screen -t nerd n
screen -t witteman w
screen -t woolgathering wg
</pre>
<p>The <code>-t</code> option givens me a title for each session within <code>screen</code> &#8211; which helps me keep everything straight.  I call this with a line in my <code>.xinitrc</code>, like so:</p>
<pre>
sleep 1 &#038;&#038; urxvt -geometry 80x56+0+0 -e screen -c .myscreenrc &#038;
</pre>
<p>The delay helps it come up after my backdrop is drawn, so I don&#8217;t have a blank behind my transparent terminal.</p>
<p>All of this is now nicely set up, and I am in <code>mutt</code> (the last email account).  I hop between instances in three ways: <code>Ctrl-a "</code> for a list of sessions to scroll through, <code>Ctrl-a '</code> and the number of the session I want to be in or <code>Ctrl-a n</code> or <code>Ctrl-a p</code> for the next and previous session.  If I need a fresh session, it&#8217;s as easy as <code>Ctrl-a c</code>.</p>
<p>There are a couple of problems with this setup.  The <code>mutt</code> sessions only lasts as long as <code>mutt</code> is open, so if my fingers, from long training, close <code>mutt</code>, then I lose that session as well, and I have to start it afresh.  The solution, rather than training my fingers, was to prevent <code>mutt</code> from closing.  I remapped <code>q</code> in the browser and index modes to be the equivalent of <code>c?</code>, which means that I can only close <code>mutt</code> from the pager by hitting <code>x</code>.  Fine by me, and it lets me have long-lived sessions.</p>
<p>Now, whether I am sitting at my machine or ssh-ing in from work, I have all the same things at my disposal, and I can comfortably leave aspects of my work open when changing locations.  If I have left my sessions running at home, I simply call <code>screen -x</code> when at work, and I am in my familiar environment.  If I have detached at home then <code>screen -r</code> is the right call.</p>
<p>However, if I have detached at home and stopped my X session, I run into the other problem.  When I started <code>screen</code> via my <code>.xinitrc</code> I also set the <code>$DISPLAY</code> variable in each session.  As such, when I am logged in remotely without X running, certain programs throw errors because I am not able to reach the X session.  The sidestep for this is to <code>unset DISPLAY</code> if I am going to be using programs that care about that variable, most notably <code><a href="http://www.vim.org">vim</a></code>.</p>
<p>It sounds like work, but it is actually extremely sweet, and really easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2007/02/07/more-on-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>screen for Windowing Environments</title>
		<link>http://nerd.cx/index.php/2007/01/29/screen-for-windowing-environments/</link>
		<comments>http://nerd.cx/index.php/2007/01/29/screen-for-windowing-environments/#comments</comments>
		<pubDate>Mon, 29 Jan 2007 16:52:49 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/01/29/screen-for-windowing-environments/</guid>
		<description><![CDATA[Anyone who regularly uses screen knows how useful it can be to have long-lived sessions that you can detach from and come back to later. It is great to be able to start an email in mutt via an SSH terminal, detach from that session, log off, shut the machine down and go home, and [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone who regularly uses <code><a href="http://www.gnu.org/software/screen/">screen</a></code> knows how useful it can be to have long-lived sessions that you can detach from and come back to later.  It is great to be able to start an email in <code><a href="http://mutt.org">mutt</a></code> via an SSH terminal, detach from that session, log off, shut the machine down and go home, and when I reattach to the session everything is as I left it.  It is also nice to be able to start a long-running process, detach from it and open a new session, and just pop over to the other session occasionally to check on it.</p>
<p>What&#8217;s troublesome is that there is no equivalent in windowing environments.  It would be hugely useful to be able to detach from an X session &#8211; even if it was just locally &#8211; so someone else could log in and use the machine without me having to close everything down.  The Microsoft Remote Desktop makes some attempt to do this, but it is clunky and does not behave consistently.  Ideally, when you start the machine it should launch a server process which in turn launches a login screen (or prompt) as a virtual machine or client instance, and whenever you wanted you could detach that instance from your display and input hardware, and then launch another instance.  The standard should be a thin-client system, so you can do more with the same machine.  This would be especially useful in the home, where one machine could have several heads, and anyone could use &#8220;their&#8221; computer from any head.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2007/01/29/screen-for-windowing-environments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress</title>
		<link>http://nerd.cx/index.php/2007/01/18/wordpress/</link>
		<comments>http://nerd.cx/index.php/2007/01/18/wordpress/#comments</comments>
		<pubDate>Thu, 18 Jan 2007 15:36:06 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/01/18/wordpress/</guid>
		<description><![CDATA[I got tired of maintaining (or failing to maintain, as was more often the case) my custom CMS/blogging tool that was the previous core of nerd.cx, and so I switched to WordPress. It seems pretty good, I can hack on it if I need to, and I&#8217;m generally happy with the ability to pull my [...]]]></description>
			<content:encoded><![CDATA[<p>I got tired of maintaining (or failing to maintain, as was more often the case) my custom CMS/blogging tool that was the previous core of <a href="http://nerd.cx">nerd.cx</a>, and so I switched to <a href="http://wordpress.org">WordPress</a>.  It seems pretty good, I can hack on it if I need to, and I&#8217;m generally happy with the ability to pull my content back out.  The community is also quite active, so there is less chance of getting stuck with something stagnant, which is always important.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2007/01/18/wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Down with Caps Lock!</title>
		<link>http://nerd.cx/index.php/2006/12/19/down-with-caps-lock/</link>
		<comments>http://nerd.cx/index.php/2006/12/19/down-with-caps-lock/#comments</comments>
		<pubDate>Tue, 19 Dec 2006 21:43:26 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2006/12/19/down-with-caps-lock/</guid>
		<description><![CDATA[The Caps Lock key does me no good at all, but I use Esc constantly as a vim user. So, I set about making the Caps Lock key a second Esc. On Linux, I used the xmodmap command (because I spend all my time in X &#8211; the console is not necessary) in my .xinitrc [...]]]></description>
			<content:encoded><![CDATA[<p>The Caps Lock key does me no good at all, but I use Esc constantly as a <a href="http://www.vim.org">vim</a> user.  So, I set about making the Caps Lock key a second Esc.</p>
<p>On Linux, I used the <code>xmodmap</code> command (because I spend all my time in X &#8211; the console is not necessary) in my <code>.xinitrc</code> file like so:</p>
<pre>
xmodmap -e "remove lock = Caps_Lock"
xmodmap -e "keycode 66 = Escape"
</pre>
<p>
Because I am shackled to a Windows box day after day, I also wanted to make this work in that environment, and luckily, I can.  It just took a brave bit of registry editing, like so:</p>
<pre>
REGEDIT4
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00,00,00,00,00
</pre>
<p>
It makes a huge difference to not have to reach for the Esc key all the time, but it makes it so easy that I keep shifting into command mode while typing in Word.  A small price, especially since I realize I&#8217;m happiest writing in <a href="http://www.vim.org">vim</a> anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2006/12/19/down-with-caps-lock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vimrc</title>
		<link>http://nerd.cx/index.php/2006/07/25/vimrc-3/</link>
		<comments>http://nerd.cx/index.php/2006/07/25/vimrc-3/#comments</comments>
		<pubDate>Tue, 25 Jul 2006 21:40:54 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2006/07/25/vimrc-3/</guid>
		<description><![CDATA[" Set settings set autoindent set title "set notitle set ruler set nocompatible set showcmd set ts=2 set shiftwidth=2 set expandtab set shiftround set smarttab set tw=72 set backspace=indent,eol,start set incsearch set showmatch set pastetoggle=&#60;F11> filetype plugin on syntax on colors ron let mapleader="," " Remember where I last edited a file set viminfo='10,"100,:20,%,n~/.viminfo au [...]]]></description>
			<content:encoded><![CDATA[<pre>" Set settings
set autoindent
set title
"set notitle
set ruler
set nocompatible
set showcmd
set ts=2
set shiftwidth=2
set expandtab
set shiftround
set smarttab
set tw=72
set backspace=indent,eol,start
set incsearch
set showmatch
set pastetoggle=&lt;F11>
filetype plugin on
syntax on
colors ron
let mapleader=","

" Remember where I last edited a file
set viminfo='10,"100,:20,%,n~/.viminfo
    au BufReadPost * if line("'"") > 0|if line("'"") &lt;= line("$")|exe("norm '"")|else|exe "norm $"|endif|endif

if &#038;term =~ "xterm-debian" || &#038;term =~ "xterm-xfree86" || &#038;term =~ "Eterm"
  set t_Co=16
  set t_Sf=^[[3%dm
  set t_Sb=^[[4%dm
endif
" Settings set

" Map mappings
:inoremap ( ()&lt;ESC>i
:inoremap [ []&lt;ESC>i
:inoremap " ""&lt;ESC>i
:inoremap { {}&lt;ESC>i
:inoremap &lt; &lt;>&lt;ESC>i

"map W :!aspell -c -x % " old - vim7 has spellcheck now
map F gqap

" http://vim.sourceforge.net/tips/tip.php?tip_id=465
" make an element out of anything you type with a CR in the middle
inoremap ,,, &lt;esc>diwi&lt;&lt;esc>pa>&lt;cr>&lt;/&lt;esc>pa>&lt;esc>kA

" Fix common typos
iab teh the
iab hte the
iab adn and
iab nad and
iab taht that
iab htat that
iab fo of
iab ot to
iab wiht with

set pastetoggle=&lt;F10&gt;

" SmartTab wrapper
function! SmartTab()
  let col = col('.') - 1
  if !col || getline('.')[col - 1] !~ 'k'
    return "&lt;tab>"
  else
    return "&lt;c-p>"
  endif
endfunction

" turn on SmartTabs
inoremap &lt;tab> &lt;c-r>=SmartTab()&lt;cr>

" Turn on the spellcheck
setlocal spell spelllang=en_us
set spellfile=~/.vimspell.utf8.add

" Mappings mapped

" Language-specific skeleton files
" Perl
autocmd BufNewFile *.pl 0r ~/.vim/skel/skel.pl
" HTML
autocmd BufNewFile *.html 0r ~/.vim/skel/skel.html
" Python
autocmd BufNewFile *.py 0r ~/.vim/skel/skel.py
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2006/07/25/vimrc-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seven Habits of Effective Text Editing</title>
		<link>http://nerd.cx/index.php/2006/05/10/seven-habits-of-effective-text-editing/</link>
		<comments>http://nerd.cx/index.php/2006/05/10/seven-habits-of-effective-text-editing/#comments</comments>
		<pubDate>Wed, 10 May 2006 21:39:51 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2006/05/10/seven-habits-of-effective-text-editing/</guid>
		<description><![CDATA[Like so many of the tips and tricks and hither-to unknown commands that I find in vim, I wish I have known about this years ago. There are a ton of little tricks in this short piece that are hugely useful. One trick that I think is just the bee&#8217;s knees is *. If you [...]]]></description>
			<content:encoded><![CDATA[<p>Like so many of the tips and tricks and hither-to unknown commands that I find in <a href="http://www.vim.org">vim</a>, I wish I have known about this years ago.  There are a ton of little tricks in this short piece that are hugely useful.</p>
<p>One trick that I think is just the bee&#8217;s knees is <code>*</code>.  If you are on a word in command mode, hit <code>*</code> and you will search for that word.  Even better though, is the <code>gd</code> trick.  When the cursor is on a variable name, typing <code>gd</code> will take you to the declaration of that variable.</p>
<p>The last thing that I think is awesome is &quot;repeat the last change&quot;.  If I am doing something repetitive, like creating an associative array of static values, I can type the first declaration and then start hitting <code>.</code> in command mode until I have enough declarations for the whole array.  Very sweet.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2006/05/10/seven-habits-of-effective-text-editing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vimrc on Windoze</title>
		<link>http://nerd.cx/index.php/2006/05/10/vimrc-on-windoze/</link>
		<comments>http://nerd.cx/index.php/2006/05/10/vimrc-on-windoze/#comments</comments>
		<pubDate>Wed, 10 May 2006 21:35:45 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2006/05/10/vimrc-on-windoze/</guid>
		<description><![CDATA[" This is for vim 7.0 - which has several great improvements. set nocompatible "source $VIMRUNTIME/vimrc_example.vim "source $VIMRUNTIME/mswin.vim "behave mswin set diffexpr=MyDiff() function MyDiff() let opt = '-a --binary ' if &#038;diffopt =~ 'icase' &#124; let opt = opt . '-i ' &#124; endif if &#038;diffopt =~ 'iwhite' &#124; let opt = opt . '-b [...]]]></description>
			<content:encoded><![CDATA[<pre>
" This is for vim 7.0 - which has several great improvements.

set nocompatible
"source $VIMRUNTIME/vimrc_example.vim
"source $VIMRUNTIME/mswin.vim
"behave mswin

set diffexpr=MyDiff()
function MyDiff()
  let opt = '-a --binary '
  if &#038;diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &#038;diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  let arg2 = v:fname_new
  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  let arg3 = v:fname_out
  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  let eq = ''
  if $VIMRUNTIME =~ ' '
    if &#038;sh =~ '&lt;cmd'
      let cmd = '""' . $VIMRUNTIME . 'diff"'
      let eq = '"'
    else
      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . 'diff"'
    endif
  else
    let cmd = $VIMRUNTIME . 'diff'
  endif
  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction

" It takes a lot of doing to get vim (which is really gvim)
" to behave properly on Windoze, but I've got something that
" works a bit.  I have to turn auto-indenting off because it
" constantly screws up, but it's better than notepad.

colors pablo
set guifont=Lucida_Console:h10:cANSI
set nocompatible
set backspace=indent,eol,start
set ruler
set nocompatible
set showcmd
set ts=2
set shiftwidth=2
set expandtab
set shiftround
set smarttab
set tw=72
set hlsearch
set lines=56
set autoindent

set incsearch
filetype plugin on
syntax on

:inoremap ( ()&lt;Esc>i
:inoremap [ []&lt;Esc>i
:inoremap " ""&lt;Esc>i
:inoremap { {}&lt;Esc>i
:inoremap &lt; &lt;>&lt;Esc>i

:abbr teh the
:abbr hte the
:abbr adn and
:abbr nad and
:abbr taht that
:abbr htat that
:abbr fo of
:abbr ot to

" SmartTab wrapper
function! SmartTab()
  let col = col('.') - 1
  if !col || getline('.')[col - 1] !~ 'k'
    return "&lt;tab>"
  else
    return "&lt;c-p>"
  endif
endfunction

" turn on SmartTabs
inoremap &lt;tab> &lt;c-r>=SmartTab()&lt;cr>

" Turn on the spellcheck
setlocal spell spelllang=en_us
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2006/05/10/vimrc-on-windoze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X.org Config with Wacom Tablet</title>
		<link>http://nerd.cx/index.php/2006/02/24/xorg-config-with-wacom-tablet/</link>
		<comments>http://nerd.cx/index.php/2006/02/24/xorg-config-with-wacom-tablet/#comments</comments>
		<pubDate>Fri, 24 Feb 2006 21:33:13 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2006/02/24/xorg-config-with-wacom-tablet/</guid>
		<description><![CDATA[# # This is my X.org config for a Matrox G450 dual head with only one monitor # attached, configured to use a Wacom tablet # Section "ServerLayout" Identifier "Matrox PowerDesk configured." Screen 0 "Display 1" #RightOf "Display 2" #Screen "Display 2" 0 0 InputDevice "Keyboard0" "CoreKeyboard" InputDevice "PS/2 Mouse" "CorePointer" # InputDevice "cursor" "AlwaysCore" [...]]]></description>
			<content:encoded><![CDATA[<pre>#
# This is my X.org config for a Matrox G450 dual head with only one monitor
# attached, configured to use a Wacom tablet
#

Section "ServerLayout"
    Identifier     "Matrox PowerDesk configured."
    Screen      0  "Display 1" #RightOf "Display 2"
    #Screen         "Display 2" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "PS/2 Mouse" "CorePointer"
    #
    InputDevice     "cursor"     "AlwaysCore"
    InputDevice     "stylus"     "AlwaysCore"
    InputDevice     "eraser"     "AlwaysCore"
    #
EndSection

Section "Files"
    RgbPath     "/usr/X11R6/lib/X11/rgb"
    ModulePath  "/usr/X11R6/lib/modules"
    FontPath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    FontPath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
    FontPath    "/usr/local/fonts/unicode"
    FontPath    "unix/:7100"
    FontPath    "/usr/X11R6/lib/X11/fonts/misc"
EndSection

Section "Module"
    Load  "ddc"
    Load  "GLcore"
    Load  "dbe"
    Load  "extmod"
    Load  "glx"
    Load  "bitmap"
    Load  "speedo"
    Load  "type1"
    Load  "freetype"
    Load  "record"
#    Load  "wacom"
EndSection

Section "ServerFlags"
    Option "AllowMouseOpenFail" "true"
    Option "Xinerama"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "keyboard"
    Option      "CoreKeyboard"
    Option      "XkbRules" "xfree86"
    Option      "XkbModel" "pc105"
    Option      "XkbLayout" "us"
    #Option      "XkbLayout" "us_intl"
EndSection

Section "InputDevice"
    Identifier  "PS/2 Mouse"
    Driver      "mouse"
    Option      "Protocol" "PS/2"
    Option      "ZAxisMapping" "4 5"
    Option      "Device" "/dev/psaux"
    Option      "Emulate3Buttons" "true"
    Option      "Emulate3Timeout" "70"
    Option      "SendCoreEvents" "true"
EndSection

Section "InputDevice"
        Identifier "cursor"
        Driver "wacom"
        Option "Device" "/dev/input/event2"
        Option "Type" "cursor"
        Option "USB" "on"
EndSection

Section "InputDevice"
        Identifier "stylus"
        Driver "wacom"
        Option "Device" "/dev/input/event2"
        Option "Type" "stylus"
        Option "USB" "on"
EndSection

Section "InputDevice"
        Identifier "eraser"
        Driver "wacom"
        Option "Device" "/dev/input/event2"
        Option "Type" "eraser"
        Option "USB" "on"
EndSection

#Section "Monitor"
#   Identifier   "Display 1"
#   VendorName   "CPQ"
#   ModelName    "CPQ1330"
#   HorizSync    30.0 - 85.0
#   VertRefresh  50.0 - 150.0
#   Option       "DPMS" "true"
#EndSection

Section "Monitor"
    Identifier   "Display 1"
    VendorName   "CPQ"
    ModelName    "CPQ1330"
    HorizSync    30.0 - 50.0
    VertRefresh  50.0 - 90.0
EndSection

Section "Device"
    Identifier  "MATROX CARD 1"
    Driver      "mga"
    VendorName  "All"
    BoardName   "All"
    BusID       "PCI:1:0:0"
EndSection

#Section "Device"
#   Identifier  "MATROX CARD 2"
#   Driver      "mga"
#   VendorName  "All"
#   BoardName   "All"
#   BusID       "PCI:1:0:0"
#   Screen      1
#EndSection

Section "Screen"
    Identifier "Display 1"
    Device     "MATROX CARD 1"
    Monitor    "Display 1"
    DefaultDepth     24
    SubSection "Display"
        Depth     24
        Modes    "1024x768" "1024x768" "1024x768" "1024x768" "1024x768"
    EndSubSection
EndSection

#Section "Screen"
#   Identifier "Display 2"
#   Device     "MATROX CARD 2"
#   Monitor    "Display 2"
#   DefaultDepth     24
#   SubSection "Display"
#       Depth     24
#       Modes    "1024x768"
#   EndSubSection
#EndSection

Section "DRI"
    Mode         0666
EndSection
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2006/02/24/xorg-config-with-wacom-tablet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>httrack</title>
		<link>http://nerd.cx/index.php/2006/02/24/httrack/</link>
		<comments>http://nerd.cx/index.php/2006/02/24/httrack/#comments</comments>
		<pubDate>Fri, 24 Feb 2006 21:32:20 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2006/02/24/httrack/</guid>
		<description><![CDATA[I&#8217;ve been looking for an enhancement for wget for a while now, and I think I&#8217;ve finally found it. httrack seems to do a nice job of pulling down a site to a local repository so that it can be viewed as expected off the filesystem. Additionally, it purportedly (testing is ongoing) also does updates, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking for an enhancement for <code>wget</code> for a while now, and I think I&#8217;ve finally found it.  <a href="http://www.httrack.com/">httrack</a> seems to do a nice job of pulling down a site to a local repository so that it can be viewed as expected off the filesystem.  Additionally, it purportedly (testing is ongoing) also does updates, which should help as well.  The main problem with <code>wget</code> was that stylesheets called using the <code>@import convention</code> were not downloaded, and image references within stylesheets were also not fetched, which leads to unstyled pages in local repositories, which I didn&#8217;t like.  There&#8217;s more testing to do, but so far the system looks good.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2006/02/24/httrack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CMOS Battery for ThinkPad 600X</title>
		<link>http://nerd.cx/index.php/2005/08/23/cmos-battery-for-thinkpad-600x/</link>
		<comments>http://nerd.cx/index.php/2005/08/23/cmos-battery-for-thinkpad-600x/#comments</comments>
		<pubDate>Tue, 23 Aug 2005 21:30:40 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/08/23/cmos-battery-for-thinkpad-600x/</guid>
		<description><![CDATA[When the CMOS battery in my ThinkPad died, the machine became unusable. It would not boot because it could not remember the time. I think that this is a bad way to design a BIOS, but I don&#8217;t get to choose which BIOS I use (yet, keep your eyes peeled for OpenBIOS as it matures). [...]]]></description>
			<content:encoded><![CDATA[<p>When the CMOS battery in my ThinkPad died, the machine became unusable.  It would not boot because it could not remember the time.  I think that this is a bad way to design a BIOS, but I don&#8217;t get to choose which BIOS I use (yet, keep your eyes peeled for <a href="http://www.openbios.info/">OpenBIOS</a> as it matures).  I knew I needed to replace the CMOS battery, because the rest of the machine works very nicely.</p>
<p>
What I discovered is that no one is willing to do this without at least a hundred bucks, which is idiotic.  I learned from my research that the CMOS battery is encased in packaging, is difficult to remove on many ThinkPad models, and must be purchased as a specialty item via eBay or IBM.  The technicians I spoke to where not able to order it until they had the laptop in their hands, because apparently there are different batteries for different 600X machines.  I now believe that this is bullshit, and that they are simply too eager for my money to actually provide advice.
</p>
<p>
Rather than submit to the whims of the extortionists, I started removing screws and panels from my ThinkPad in search of the mythical battery.  I found it in the RAM access hatch (I only needed to remove one screw) which is above (below?) the removable drive chassis (CDROM, DVDROM, etc.).  It connects to the motherboard via two leads going into a specialty plug, and those leads connect to the battery via simple paddles.  The battery and the paddles are held together by a short length of heat-shrink tubing.  This sounds way more complicated than it is.  The battery cover has the battery type printed on it, CR2025, which is a standard lithium battery I replaced at Blacks for $6.  I detached the leads from the old battery, attached them to the new battery (being careful to replicate the polarity of the old one) with a length of electrical tape.  I plugged it into the wee slot, replaced the panel, booted the machine and set the clock.  It was essentially effortless, if you don&#8217;t count the visits to laptop repair shops and the subsequent anxiety.</p>
<p>
Simple repairs can, in fact, be simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/08/23/cmos-battery-for-thinkpad-600x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian Common Core</title>
		<link>http://nerd.cx/index.php/2005/08/16/debian-common-core/</link>
		<comments>http://nerd.cx/index.php/2005/08/16/debian-common-core/#comments</comments>
		<pubDate>Tue, 16 Aug 2005 20:26:30 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/08/16/debian-common-core/</guid>
		<description><![CDATA[This interview with Bruce Perens is pretty interesting, and many good points were made. I know that I would love it if all of the Linux distributions did things the same way at the lowest levels. Of course, I&#8217;d also like the kernel developers to take security as seriously as the developers at OpenBSD, but [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://madpenguin.org/cms/html/62/4921.html">This interview</a> with Bruce Perens is pretty interesting, and many good points were made.  I know that I would love it if all of the Linux distributions did things the same way at the lowest levels.  Of course, I&#8217;d also like the kernel developers to take security as seriously as the developers at <a href="http://openbsd.org">OpenBSD</a>, but first things first.</p>
<p>
An interesting quote from the interview is this: &quot;It used to be that there were lots of nuts with ideas in the world, but they were isolated nuts. In this day and age, there are no isolated nuts. You can always find in the world of the Internet 50 nuts just like you, and what do you call 50 nuts like you? A start-up company!&quot;</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/08/16/debian-common-core/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Support Myth</title>
		<link>http://nerd.cx/index.php/2005/06/23/the-support-myth/</link>
		<comments>http://nerd.cx/index.php/2005/06/23/the-support-myth/#comments</comments>
		<pubDate>Thu, 23 Jun 2005 17:59:25 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/06/23/the-support-myth/</guid>
		<description><![CDATA[The principle differentiator between open and closed source software these days is supposedly support. The quality gap between the two camps has either closed or Open Source is widely recognized to be superior. The primary reason today for not adopting an open source solution (where there is a business case for doing so) is that [...]]]></description>
			<content:encoded><![CDATA[<p>The principle differentiator between open and closed source software these days is supposedly support.  The quality gap between the two camps has either closed or Open Source is widely recognized to be superior.  The primary reason today for not adopting an open source solution (where there is a business case for doing so) is that there may not be any support for the software.  This is certainly a big part of the FUD campaign pursued by Microsoft against Open Source and Linux.  I suggest that &#8220;the support myth&#8221; is just that &#8211; mythical.
</p>
<p>
If you use Windows, are you free to contact Microsoft and ask for help?  No, not really &#8211; you maintain a busy in-house staff to take care of this for you, and to reinstall the operating system or reboot the workstation or server (!) as your primary troubleshooting methods.  If there is a glitch in Word, can you do anything about it?  No, you can&#8217;t.  You can complain and whine, but you cannot fix it or get it fixed.  Once a new version of Word is out, you can take your chances and buy a new license, and then hope that your problem got fixed, and that any new features don&#8217;t break your workflow, render your old documents unreadable or require a new training course.  Most closed source software &#8220;support&#8221; is not supportive, and can only help you in narrow ways when the software is broken, but never when it&#8217;s wrong.
</p>
<p>
A common complaint of those confronted with the Open Source model is the claim that while you are permitted to change the source of your software, you lack the expertise to do so, which makes it a non-advantage.  The counter to this is that, if you need a feature or a bug fix, you can simply sponsor a hack-a-thon to get it implemented, supporting the community and getting your needed fix far faster and more cheaply than hiring a consultant or having fully customized software written.  There are a lot of changes required in the way that people think of software development in an Open Source world, but those changes will be easier to make once you shed your belief in the outmoded &#8220;support myth&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/06/23/the-support-myth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vimrc</title>
		<link>http://nerd.cx/index.php/2005/06/07/vimrc-2/</link>
		<comments>http://nerd.cx/index.php/2005/06/07/vimrc-2/#comments</comments>
		<pubDate>Tue, 07 Jun 2005 17:56:53 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/06/07/vimrc-2/</guid>
		<description><![CDATA[" It takes a lot of doing to get vim (which is really gvim) " to behave properly on Windoze, but I've got something that " works a bit. I have to turn auto-indenting off because it " constantly screws up, but it's better than notepad. colors darkblue set guifont=Lucida_Console:h10:cANSI set nocompatible "source $VIMRUNTIME/vimrc_example.vim "source [...]]]></description>
			<content:encoded><![CDATA[<pre>" It takes a lot of doing to get vim (which is really gvim)
" to behave properly on Windoze, but I've got something that
" works a bit.  I have to turn auto-indenting off because it
" constantly screws up, but it's better than notepad.

colors darkblue
set guifont=Lucida_Console:h10:cANSI
set nocompatible
"source $VIMRUNTIME/vimrc_example.vim
"source $VIMRUNTIME/mswin.vim
"behave mswin
set backspace=indent,eol,start
set ruler
set nocompatible
set showcmd
set ts=4
set shiftwidth=4
set expandtab
set shiftround
set smarttab
set tw=72

set incsearch
filetype plugin on
syntax on

:inoremap ( ()&lt;ESC>i
:inoremap [ []&lt;ESC>i
:inoremap " ""&lt;ESC>i
:inoremap { {}&lt;ESC>i
:inoremap &lt; &lt;><esc>i

iab teh the
iab hte the
iab adn and
iab nad and
iab taht that
iab htat that
iab fo of
iab ot to
</esc></pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/06/07/vimrc-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple Migrates to Intel</title>
		<link>http://nerd.cx/index.php/2005/06/07/apple-migrates-to-intel/</link>
		<comments>http://nerd.cx/index.php/2005/06/07/apple-migrates-to-intel/#comments</comments>
		<pubDate>Tue, 07 Jun 2005 17:53:07 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/06/07/apple-migrates-to-intel/</guid>
		<description><![CDATA[The big news in consumer computing this week seems to be the announcement of Apple switching processors to Intel chips from IBM&#8217;s PowerPC. I come to this news with quite a bit of scorn and derision, but partly that is because I started out with bitterness towards Apple. I spent the years between 1986 and [...]]]></description>
			<content:encoded><![CDATA[<p>The big news in consumer computing this week seems to be the<br />
announcement of Apple switching processors to Intel chips from IBM&#8217;s<br />
PowerPC.  I come to this news with quite a bit of scorn and derision,<br />
but partly that is because I started out with bitterness towards Apple.<br />
I spent the years between 1986 and 1996 using Macs, and in that time I<br />
became an application user &#8211; not a computer user.  I could invent<br />
nothing, develop nothing, and there was no hint that there were creative<br />
properties to computing devices in those years.  I am not the only one<br />
who found the Mac to be too confining &#8211; Neal Stephenson wrote <a href="http://www.cryptonomicon.com/beginning.html">an essay</a> on the<br />
subject.  I frequently wish that I had spent those years learning and<br />
using Unix, which would have given me a much broader set of skills than<br />
the ability to double-click.  So I did not come to this news with an<br />
open mind, and further thought on the subject has led me to the opinion<br />
that Apple has, once again, made a massively bone-headed move.
</p>
<p>
I am not suggesting that Apple should have stuck to the PPC chips &#8211; they<br />
have not been advancing and are not providing an advantage to the<br />
company.  You can be as big a fan as you like of the architecture, but<br />
if no one can make it speed up, and no one can make it&#8217;s<br />
&quot;better&quot; features actually perform better, then it is time to<br />
move on.  That said, going to Intel is idiotic.  Intel has been getting<br />
it&#8217;s butt kicked by AMD for a few years now, and they are <em>still</em><br />
providing us with 1970&#8242;s technology today.  Most importantly, by going<br />
to a commodity chipset, Apple has paved the way to having their precious<br />
software work on cheap, generic machines, which will radically undercut<br />
their hardware sales.  Apple is a company that needs to focus &#8211; either<br />
make hardware or software, but stop trying to do both as a seamless<br />
&quot;experience&quot;.  Some suggest that assuming Apple doesn&#8217;t sell<br />
OS X for generic hardware, it will get ported to generic hardware and<br />
widely pirated.  I think that this is true, and it will hurt both Apple<br />
and Microsoft, because neither one will make money from it.  Some<br />
suggest that the lack of support will dissuade people from this, but<br />
that is not th case for the home user at all (though it is a major<br />
deterrent for business).  How much support is provided by Apple or<br />
Microsoft now?  Sure, there&#8217;s someone you can call, but I&#8217;ll tell you to<br />
reboot for free, and I can ignore you just as well as a big company.<br />
User-level support is practically non-existent for any OS &#8211; you need a<br />
community or a third-party service vendor to get any real help.
</p>
<p>
Perhaps the most important issue is control &#8211; with both Windows and OS X<br />
you get very little control over the system you use, and if you exert what<br />
little control you have, you frequently find that you have voided your<br />
support contract.  On Windows you have control over your hardware, but<br />
if you change too much you&#8217;ll have to re-register your copy of Windows.<br />
Also, if you want to change a behaviour or fix a bug you have to wait,<br />
and to buy a new product sight-unseen in hope of fixing it.  I am no<br />
longer willing to do that.  I no longer up proprietary software because<br />
it denies me that ability to control my computer for no benefit.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/06/07/apple-migrates-to-intel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XF86Config-4 &#8211; Dual-Head</title>
		<link>http://nerd.cx/index.php/2005/05/27/xf86config-4-dual-head/</link>
		<comments>http://nerd.cx/index.php/2005/05/27/xf86config-4-dual-head/#comments</comments>
		<pubDate>Fri, 27 May 2005 17:51:08 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/05/27/xf86config-4-dual-head/</guid>
		<description><![CDATA[Section "ServerLayout" Identifier "Matrox PowerDesk configured." Screen 0 "Display 1" RightOf "Display 2" Screen "Display 2" 0 0 InputDevice "Keyboard0" "CoreKeyboard" InputDevice "PS/2 Mouse" "CorePointer" EndSection Section "Files" RgbPath "/usr/X11R6/lib/X11/rgb" ModulePath "/usr/X11R6/lib/modules" FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID" FontPath "/usr/local/fonts/unicode" # FontPath "unix/:7101" FontPath "unix/:7100" FontPath "/usr/X11R6/lib/X11/fonts/misc" # FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled" # FontPath "/usr/X11R6/lib/X11/fonts/misc" # FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled" # [...]]]></description>
			<content:encoded><![CDATA[<pre>Section "ServerLayout"
    Identifier     "Matrox PowerDesk configured."
    Screen      0  "Display 1" RightOf "Display 2"
    Screen         "Display 2" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "PS/2 Mouse" "CorePointer"
EndSection

Section "Files"
    RgbPath     "/usr/X11R6/lib/X11/rgb"
    ModulePath  "/usr/X11R6/lib/modules"
    FontPath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
    FontPath    "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
    FontPath    "/usr/local/fonts/unicode"
#   FontPath     "unix/:7101"
    FontPath    "unix/:7100"
    FontPath    "/usr/X11R6/lib/X11/fonts/misc"
#   FontPath     "/usr/X11R6/lib/X11/fonts/misc:unscaled"
#   FontPath     "/usr/X11R6/lib/X11/fonts/misc"
#   FontPath     "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
#   FontPath     "/usr/X11R6/lib/X11/fonts/75dpi"
#   FontPath     "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
#   FontPath     "/usr/X11R6/lib/X11/fonts/100dpi"
#   FontPath     "/usr/X11R6/lib/X11/fonts/Speedo"
#   FontPath     "/usr/X11R6/lib/X11/fonts/PEX"
#   FontPath     "/usr/X11R6/lib/X11/fonts/cyrillic"
#   FontPath     "/usr/X11R6/lib/X11/fonts/Type1"
#   FontPath     "/usr/share/fonts/ttf/western"
#   FontPath     "/usr/share/fonts/ttf/decoratives"
#   FontPath     "/usr/share/fonts/truetype"
#   FontPath     "/usr/share/fonts/truetype/openoffice"
#   FontPath     "/usr/share/fonts/truetype/ttf-bitstream-vera"
#   FontPath     "/usr/share/fonts/latex-ttf-fonts"
#   FontPath     "/usr/X11R6/lib/X11/fonts/defoma/CID"
#   FontPath     "/usr/X11R6/lib/X11/fonts/defoma/TrueType"
EndSection

Section "Module"
    Load  "ddc"
    Load  "GLcore"
    Load  "dbe"
    Load  "extmod"
    Load  "glx"
    Load  "bitmap"
    Load  "speedo"
    Load  "type1"
    Load  "freetype"
    Load  "record"
EndSection

Section "ServerFlags"
    Option "AllowMouseOpenFail" "true"
    Option "Xinerama"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "keyboard"
    Option      "CoreKeyboard"
    Option      "XkbRules" "xfree86"
    Option      "XkbModel" "pc105"
    Option      "XkbLayout" "us"
    #Option      "XkbLayout" "us_intl"
EndSection

Section "InputDevice"
    Identifier  "PS/2 Mouse"
    Driver      "mouse"
    Option      "Protocol" "PS/2"
    Option      "ZAxisMapping" "4 5"
    Option      "Device" "/dev/psaux"
    Option      "Emulate3Buttons" "true"
    Option      "Emulate3Timeout" "70"
    Option      "SendCoreEvents" "true"
EndSection

Section "Monitor"
    Identifier   "Display 1"
    VendorName   "CPQ"

    ModelName    "CPQ1330"
    HorizSync    30.0 - 85.0
    VertRefresh  50.0 - 150.0
    Option       "DPMS" "true"
EndSection

Section "Monitor"
    Identifier   "Display 2"
    VendorName   "CPQ"
    ModelName    "CPQ1330"
    HorizSync    30.0 - 50.0
    VertRefresh  50.0 - 90.0
EndSection

Section "Device"
    Identifier  "MATROX CARD 1"
    Driver      "mga"
    VendorName  "All"
    BoardName   "All"
    BusID       "PCI:1:0:0"
EndSection

Section "Device"
    Identifier  "MATROX CARD 2"
    Driver      "mga"
    VendorName  "All"
    BoardName   "All"
    BusID       "PCI:1:0:0"
    Screen      1
EndSection

Section "Screen"
    Identifier "Display 1"
    Device     "MATROX CARD 1"
    Monitor    "Display 1"
    DefaultDepth     24
    SubSection "Display"
        Depth     24
        Modes    "1024x768" "1024x768" "1024x768" "1024x768" "1024x768"
    EndSubSection
EndSection

Section "Screen"
    Identifier "Display 2"
    Device     "MATROX CARD 2"
    Monitor    "Display 2"
    DefaultDepth     24
    SubSection "Display"
        Depth     24
        Modes    "1024x768"
    EndSubSection
EndSection

Section "DRI"
    Mode         0666
EndSection
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/05/27/xf86config-4-dual-head/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backdrop in Python</title>
		<link>http://nerd.cx/index.php/2005/05/16/backdrop-in-python/</link>
		<comments>http://nerd.cx/index.php/2005/05/16/backdrop-in-python/#comments</comments>
		<pubDate>Mon, 16 May 2005 17:17:06 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/05/16/backdrop-in-python/</guid>
		<description><![CDATA[#!/usr/bin/python import os, sys, random, imghdr # This is a little program I call via cron to change my desktop every # few minutes. With no arguments it goes to my directory of backdrop # images and picks a valid image at random. If I specify a path and a # file the program will [...]]]></description>
			<content:encoded><![CDATA[<pre>#!/usr/bin/python

import os, sys, random, imghdr

# This is a little program I call via cron to change my desktop every
# few minutes.  With no arguments it goes to my directory of backdrop
# images and picks a valid image at random.  If I specify a path and a
# file the program will put it up as the display.

# I don't want to fill up my inbox with emails from cron telling me that
# X isn't running, so I check first.
xisrunning = os.popen("pidof /usr/bin/X11/X").read()

def changebackdrop():
    # The below command works for transparent Eterm or Urxvt terminals,
    # populating their backgrounds with the image they occlude.  xli or
    # xsetroot can be called, but they don't work as desired for
    # transparent terminals.
    command = "/usr/bin/Esetroot"
    # If I was logging into X remotely, this would change.
    commandargs = " -display :0.0 "

    # This is where my backdrops live
    picdir = "/home/willyyam/misc/bmps/"

    if sys.argv[1:]:
        doit = command + commandargs + sys.argv[1]
        os.popen(doit, 'r')
    else:
        files = os.listdir(picdir)
        os.chdir(picdir)
        pics = []
        for file in files:
            # This is a test for valid images - it includes rgb files,
            # which are not supported by my image software, but the
            # error thrown is not terrible - it knows what it can and
            # cannot run.
            if imghdr.what(file):
                pics.append(file)

        randpic = random.choice(pics)
        doit = command + commandargs + picdir + randpic
        os.popen(doit, 'r')

if xisrunning:
    changebackdrop()
else:
    exit

# Copyright 2005 William Witteman
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/05/16/backdrop-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>oglerc</title>
		<link>http://nerd.cx/index.php/2005/05/08/oglerc/</link>
		<comments>http://nerd.cx/index.php/2005/05/08/oglerc/#comments</comments>
		<pubDate>Sun, 08 May 2005 22:05:36 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/05/08/oglerc/</guid>
		<description><![CDATA[&#60;!-- I left the RC file almost totally alone, but I run two monitors on a Matrox G400, and so I had to do the following: --&#62; &#60;geometry&#62; &#60;width&#62;400&#60;/width&#62; &#60;height&#62;300&#60;/height&#62; &#60;/geometry&#62; &#60;geometry_src&#62;user&#60;/geometry_src&#62; &#60;resolution_src&#62;Xinerama&#60;/resolution_src&#62;]]></description>
			<content:encoded><![CDATA[<pre>&lt;!-- I left the RC file almost totally alone, but I run two monitors on a Matrox G400, and so I had to do the following: --&gt;
&lt;geometry&gt;
    &lt;width&gt;400&lt;/width&gt;
    &lt;height&gt;300&lt;/height&gt;
&lt;/geometry&gt;
&lt;geometry_src&gt;user&lt;/geometry_src&gt;
&lt;resolution_src&gt;Xinerama&lt;/resolution_src&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/05/08/oglerc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unicode</title>
		<link>http://nerd.cx/index.php/2005/05/08/unicode/</link>
		<comments>http://nerd.cx/index.php/2005/05/08/unicode/#comments</comments>
		<pubDate>Sun, 08 May 2005 17:49:58 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/05/08/unicode/</guid>
		<description><![CDATA[I decided that I wanted to see accented characters, other character sets, and basically move out of the 70s on my terminal screens. So, I went hunting for the settings to make my system think in Unicode. I started here and it seemed to go okay, but I still couldn&#8217;t see most of the characters [...]]]></description>
			<content:encoded><![CDATA[<p>I decided that I wanted to see accented characters, other character sets, and basically move out of the 70s on my terminal screens.  So, I went hunting for the settings to make my system think in <a href="http://www.unicode.org/">Unicode</a>.  I started <a href="http://melkor.dnp.fmph.uniba.sk/~garabik/debian-utf8/HOWTO/howto.html">here</a> and it seemed to go okay, but I still couldn&#8217;t see most of the characters in <a href="http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt">this</a>.  After much tearing of hair and gnashing of teeth, it turns out that Eterm, which I understood to be Unicode compatible, isn&#8217;t.  At least, mine isn&#8217;t.  So, I decided to use <a href="http://software.schmorp.de/#rxvt-unicode">Urxvt</a>, which is <a href="http://www.rxvt.org/">Rxvt</a> with Unicode support.</p>
<p>
The funny thing is, once I decided to use urxvt I ended up spending more time configuring it than I ever did getting Unicode (specifically UTF-8) set as my default character set.  I&#8217;m pretty happy with it now though &#8211; you can check out my config file over in the configs section.  The only problem left is that I don&#8217;t know how to <em>type</em> accented characters, but I figure I&#8217;ll figure it out eventually.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/05/08/unicode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Wireless at U of T</title>
		<link>http://nerd.cx/index.php/2005/04/28/linux-wireless-at-u-of-t/</link>
		<comments>http://nerd.cx/index.php/2005/04/28/linux-wireless-at-u-of-t/#comments</comments>
		<pubDate>Thu, 28 Apr 2005 17:49:57 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/01/16/linux-wireless-at-u-of-t/</guid>
		<description><![CDATA[U of T is moving towards ubiquitous wireless access on the downtown campus. That means you want access, but the University doesn&#8217;t want iSquatters&#8482;. To that end they are using WEP and MAC address authentication. I want access via Linux, but the myopic twits are afraid to support anything for fear that it won&#8217;t work. [...]]]></description>
			<content:encoded><![CDATA[<p>U of T is moving towards ubiquitous wireless access on the downtown campus.  That means you want access, but the University doesn&#8217;t want iSquatters&trade;.  To that end they are using WEP and MAC address authentication.  I want access via Linux, but the myopic twits are afraid to support anything for fear that it won&#8217;t work.  Better to inconvenience everyone rather than risk having one unhappy student with a screwball setup.  So, in the interest of promoting wireless access at U of T, I wrote up these instructions for accessing the Campus Wireless Network under Linux.</p>
<p>
1.  Make sure your wireless card is supported in your running kernel.<br />
    Contrary to the documentation provided by the Campus Wireless network,<br />
any card supported by Linux and capable of WEP and 802.11b will work.</p>
<p>If your kernel does not support your wireless card, but it is supported<br />
under Linux, you will need to recompile your kernel.  This is beyond the<br />
scope of these instructions, so get on the Internet and get some advice.</p>
<p>2.  Note the output of <code>iwconfig</code>.  It may look something like this:</p>
<pre>
lo        no wireless extensions.

eth0      IEEE 802.11-DS  ESSID:"UTORwin"  Nickname:"Prism  I"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:01:F4:6B:0E:CC
          Bit Rate:11 Mb/s   Tx-Power=15 dBm   Sensitivity:1/3
          Retry min limit:8   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=46/92  Signal level=-78 dBm  Noise level=-149 dBm
          Rx invalid nwid:0  Rx invalid crypt:15  Rx invalid frag:2
          Tx excessive retries:2  Invalid misc:0   Missed beacon:0
</pre>
<p>
The key fields are ESSID, Access Point, and Link Quality and the name of<br />
the interface (eth0, eth1, etc.).  If the Access Point field is<br />
44:44:44:44:44:44 and the Link Quality is reasonably high, then you have<br />
not been authenticated by the Access Point.
</p>
<p>
3.  As root, log onto an access point with the following command:<br />
    <code>iwconfig eth0 essid UTORwin enc s:UToronto1home</code><br />
The only difference will be the interface name.  You may wish to alias<br />
this command to something convenient, or set it as the default for the<br />
interface.
</p>
<p>
4.  Log onto a web browser, and any page you receive will redirect you<br />
    to the Campus Wireless Network, where you will have to register the<br />
MAC address of your wireless card and then authenticate yourself based<br />
on your UTORID.
</p>
<p>
Getting a UTORID I leave as an exersize for the reader.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/04/28/linux-wireless-at-u-of-t/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bashrc</title>
		<link>http://nerd.cx/index.php/2005/04/26/bashrc-2/</link>
		<comments>http://nerd.cx/index.php/2005/04/26/bashrc-2/#comments</comments>
		<pubDate>Tue, 26 Apr 2005 22:01:01 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/04/26/bashrc-2/</guid>
		<description><![CDATA[# ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples export LANG="en_CA.UTF-8" # If running interactively, then: if [ "$PS1" ]; then # don't put duplicate lines in the history. See bash(1) for more options # export HISTCONTROL=ignoredups # enable color support of ls and also add [...]]]></description>
			<content:encoded><![CDATA[<pre># ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

export LANG="en_CA.UTF-8"

# If running interactively, then:
if [ "$PS1" ]; then

    # don't put duplicate lines in the history. See bash(1) for more options
    # export HISTCONTROL=ignoredups

    # enable color support of ls and also add handy aliases
    eval `dircolors -b`
    alias ls='ls --color=auto'
    alias ll='ls -hl'
    alias la='ls -Ah'
    alias x='startx > /var/log/x.log 2>&#038;1'
    alias clear='clear;fortune -ae'
    alias nstll='sudo apt-get install '
    alias upgrade='apt-get update &#038;&#038; apt-get dist-upgrade'
    alias rmv='sudo apt-get remove '
    alias apt-get='sudo apt-get'
    alias dpkg='sudo dpkg'
    alias vi='vim'
    alias vii='sudo vim '
    alias reboot='sudo reboot'
    alias halt='sudo halt -p'
    alias card="mount /dev/sda1;ls /mnt/card"
    alias uncard="umount /mnt/card"
    alias key="mount /dev/sda;ls /mnt/key"
    alias unkey="umount /mnt/key"
    alias dos2unix="flip -uv "
    alias unix2dos="flip -mv "
    alias spmlearn='sa-learn --mbox --spam /home/willyyam/Mail/spam;rm /home/willyyam/Mail/spam;touch /home/willyyam/Mail/spam'
    alias pal="pal -r 5"
    alias xconsole="Eterm -t xconsole &#038;"
    alias flug="ssh ohiggins@flug.fis.utoronto.ca"
    alias frozen-bubble="frozen-bubble -ns"

    # set a fancy prompt
    PS1='\[\033[0;32m\]\t \[\033[1;31m\]\w \[\033[0;32m\]]\[\033[0m\] '
  #PS1='\[\033[1;33m\]\t \[\033[1;34m\]\w \[\033[1;33m\]]\[\033[0m\] '

    case $TERM in
    Eterm*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
        ;;
    urxvt*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
        ;;
    xterm*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
        ;;
    xfce4-terminal*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
        ;;
    rxvt*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
        ;;
    *)
    esac

    # enable programmable completion features (you don't need to enable
    # this, if it's already enabled in /etc/bash.bashrc).
    #if [ -f /etc/bash_completion ]; then
    #  . /etc/bash_completion
    #fi
fi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/04/26/bashrc-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SD Cards</title>
		<link>http://nerd.cx/index.php/2005/04/26/sd-cards/</link>
		<comments>http://nerd.cx/index.php/2005/04/26/sd-cards/#comments</comments>
		<pubDate>Tue, 26 Apr 2005 21:59:32 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/04/26/sd-cards/</guid>
		<description><![CDATA[I a similar vein, I&#8217;ve been looking around for a portable storage solution and an MP3 player, and I found a great combination in the RCA Lyra and SD Cards. I got the 64Mb model Lyra, because it was very cheap, and I put a 1Gb SD card in it, which is similarly cheap. I [...]]]></description>
			<content:encoded><![CDATA[<p>I a similar vein, I&#8217;ve been looking around for a portable storage solution and an MP3 player, and I found a great combination in the <a href="http://www.rcaaudiovideo.com/Cultures/en-US/ModelDetail.html?PCI=Lyra+Flash+Players&#038;ProductID=RD1028">RCA Lyra</a> and <a href="http://www.sdcard.org/">SD Cards</a>.  I got the 64Mb model Lyra, because it was very cheap, and I put a 1Gb SD card in it, which is similarly cheap.  I get 200 tracks on the card, leaving 350-odd Mbs free for files.</p>
<p>
I did have a little trouble getting it working on Linux, but once I determined that the card was being mounted as <code>/dev/sda1</code> (hurray for <code>tail -f /var/log/messages</code>) it was pretty easy.  One other wrinkle was that the card is formatted as FAT16, which has an allocation-block limit of something silly, like 512 blocks in the root of the drive.  I tried to fill the card with music, and got stopped at 90-odd files, about half-full, and I couldn&#8217;t figure it out.  Eventually <a href="http://tlug.ss.org">TLUG</a> came to my rescue, and I learned that FAT16 breaks long filenames into blocks of a set size, so the 90-something files with long names became 512 full blocks.  I created a directory on the card, dumped all the songs into it, and was able to fill the card.  It seems that the limit is only for the root of the device.  I&#8217;d love to use a better format, but I want it to work on any system I encounter &#8211; including the MP3 player, so I&#8217;m stuck for now.  There is a 4Gb limit to FAT16 too, but I don&#8217;t think that&#8217;ll be a problem in the next year or two.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/04/26/sd-cards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Randomized Backdrops 2.0</title>
		<link>http://nerd.cx/index.php/2005/04/25/randomized-backdrops-20/</link>
		<comments>http://nerd.cx/index.php/2005/04/25/randomized-backdrops-20/#comments</comments>
		<pubDate>Mon, 25 Apr 2005 21:56:59 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/04/25/randomized-backdrops-20/</guid>
		<description><![CDATA[#!/usr/bin/perl -w # This little program sets my background image # randomly in blackbox (and now openbox). # It's called when I startx. $isxrunning = `ps -C startx &#124; grep &#34;startx&#34;`; if ($isxrunning =~ &#34;startx&#34;) { changebackdrop(); } else { exit; } sub changebackdrop { if (!defined $ARGV[0]) { $backdrop_directory = &#34;/home/willyyam/misc/bmps/&#34;; # Set this [...]]]></description>
			<content:encoded><![CDATA[<pre>
#!/usr/bin/perl -w

# This little program sets my background image
# randomly in blackbox (and now openbox).
# It's called when I startx.

$isxrunning = `ps -C startx | grep &quot;startx&quot;`;

if ($isxrunning =~ &quot;startx&quot;) {
    changebackdrop();
} else {
    exit;
}

sub changebackdrop {
    if (!defined $ARGV[0]) {
        $backdrop_directory = &quot;/home/willyyam/misc/bmps/&quot;;
        # Set this to your backdrop files directory.

        opendir(BD, &quot;$backdrop_directory&quot;) or die;
        # Normally we'd report errors, but since we will be
        # running this via script and discarding the STDOUT
        # that it generates, that would be a waste of time.

        @backdrops = readdir(BD);
        # Grab the contents of the backdrop directory.

        @spordkcab = reverse(@backdrops);
        pop(@spordkcab);
        pop(@spordkcab);
        # The first two entries readdir() finds are
        # . and  ..  We don't want to hand these
        # entries to bsetbg, so I reverse the array
        # and do away with them.  There is a smooth,
        # tidy way to do this.  I don't care :-)

        $randpic = $spordkcab[ rand @spordkcab];
        $randpic = $backdrop_directory . $randpic;
        `/usr/bin/Esetroot -display :0.0 $randpic`;
        #`/usr/bin/X11/xli -display :0.0 -onroot $randpic &gt; /dev/null &amp;`;

        exit;
    } else {
        # If backdrop is called with an argument, use the argument
        # as the backdrop.
        `/usr/bin/Esetroot -display :0.0 $ARGV[0]`;
        #`/usr/bin/X11/xli -display :0.0 -onroot $ARGV[0] &gt; /dev/null &amp;`;
        exit;
    }
}

# William O'Higgins yam@nerd.cx
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/04/25/randomized-backdrops-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resolved: 2.6.8 and USB</title>
		<link>http://nerd.cx/index.php/2005/04/25/resolved-268-and-usb-2/</link>
		<comments>http://nerd.cx/index.php/2005/04/25/resolved-268-and-usb-2/#comments</comments>
		<pubDate>Mon, 25 Apr 2005 21:51:15 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/04/25/resolved-268-and-usb-2/</guid>
		<description><![CDATA[Well, I got things sorted. I got them sorted quite a while ago, but I have just emerged from the cave of my Masters and I resolve to begin catching up on my blogging &#8211; I haven&#8217;t been hibernating, I just haven&#8217;t done any reporting on my activities. Okay, back to the kernel &#8211; I [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I got things sorted.  I got them sorted quite a while ago, but I have just emerged from the cave of my Masters and I resolve to begin catching up on my blogging &#8211; I haven&#8217;t been hibernating, I just haven&#8217;t done any reporting on my activities.</p>
<p>
Okay, back to the kernel &#8211; I went through the process again, and I still had USB issues, but everything else worked.  I got a bit of help from <a href="http://tlug.ss.org/">TLUG</a> and discovered that my problems went away if I typed <code>sudo modprobe ehci_hcd</code> and <code>sudo modprobe uhci_hcd</code>, which are the modules for USB 2.0 and USB 1.1 respectively.  After a bit more looking, I found that the reason I had some old, unused modules loading was that they were in <code>/etc/modules</code>.  So, I extrapolated, put the USB modules in and commented the obsoleted ones out, and Bob&#8217;s your uncle, everything works.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/04/25/resolved-268-and-usb-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with the 2.6.8 Kernel and ALSA</title>
		<link>http://nerd.cx/index.php/2005/04/25/resolved-268-and-usb/</link>
		<comments>http://nerd.cx/index.php/2005/04/25/resolved-268-and-usb/#comments</comments>
		<pubDate>Mon, 25 Apr 2005 21:46:00 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2005/04/25/resolved-268-and-usb/</guid>
		<description><![CDATA[I figured it was high time I updated my desktop machine to a modern kernel. And, as usual there were some hiccoughs, but it seemed to go reasonably well with the following procedure: cd /usr/src tar xjfv linux.[version].tar.bz2 rm linux (assuming it is a link to your old kernel) ln -s /usr/src/linux.[version] linux cd /usr/src/linux [...]]]></description>
			<content:encoded><![CDATA[<p>I figured it was high time I updated my desktop machine to a modern kernel.  And, as usual there were some hiccoughs, but it seemed to go reasonably well with the following procedure:</p>
<pre>
cd /usr/src

tar xjfv linux.[version].tar.bz2

rm linux (assuming it is a link to your old kernel)

ln -s /usr/src/linux.[version] linux

cd /usr/src/linux

cp /usr/src/[oldkernel-source-directory]/.config .config

make oldconfig

make menuconfig

cd /usr/src/linux

make-kpkg clean

make-kpkg --append-to-version=.[a_unique_and_clever_name] kernel_image modules_image

cd /usr/src

dpkg -i kernel-image-[version].[a_unique_and_clever_name]_10.00.Custom386.deb

vi /etc/lilo.conf

lilo
</pre>
<p>What gave me troubles was using ALSA instead of OSS as the sound architecture.  It worked, after following instructions to install a few things, if I was root.  I don&#8217;t always want to be root though, and nothing I tried seemed to work.  Finally, I used the brute force approach.  I went into <code>/dev</code> and went to town, <code>chmod</code>ing everything in sight, including mixer, sequencer, dsp, music and the snd directory, as well as the entire contents of <code>/dev/snd</code>.  It works now though, so that&#8217;s something.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2005/04/25/resolved-268-and-usb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weird Kernel Problems</title>
		<link>http://nerd.cx/index.php/2004/11/10/weird-kernel-problems/</link>
		<comments>http://nerd.cx/index.php/2004/11/10/weird-kernel-problems/#comments</comments>
		<pubDate>Wed, 10 Nov 2004 21:52:18 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/11/10/weird-kernel-problems/</guid>
		<description><![CDATA[Well, things didn&#8217;t go as well as I thought they did. I noticed that when I was loading the modules on my new kernel that the computer threw a number of FATAL errors, which I took to be a bad thing. More importantly, however, was that I could no longer mount my USB key &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Well, things didn&#8217;t go as well as I thought they did.  I noticed that when I was loading the modules on my new kernel that the computer threw a number of FATAL errors, which I took to be a bad thing.  More importantly, however, was that I could no longer mount my USB key &#8211; I got errors about <code>/dev/sda</code> not being a valid block device.  Well that won&#8217;t do, so I compiled another kernel and booted into that.  Then I had more problems &#8211; the USB key still didn&#8217;t work, sound software began whining about permissions-related issues and then, for no reason, my mouse stopped working.  So I booted back into the previous kernel, and the mouse still didn&#8217;t work.  I&#8217;ve had to go all the way back to my 2.4.18 kernel to get the mouse working again.  Very annoying.  I am not the only person around, I suspect, who thinks that you should be able to upgrade and have everything still work.  Yes, the new kernel is very different, but you should not have to worry about the baby in the bathwater when you upgrade, you just shouldn&#8217;t.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/11/10/weird-kernel-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>eterm theme</title>
		<link>http://nerd.cx/index.php/2004/10/13/eterm-theme/</link>
		<comments>http://nerd.cx/index.php/2004/10/13/eterm-theme/#comments</comments>
		<pubDate>Wed, 13 Oct 2004 21:43:46 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/10/13/eterm-theme/</guid>
		<description><![CDATA[&#60;Eterm-0.9.2&#62; begin color foreground white background black cursor #ffff00 cursor_text #880000 pointer white video normal end color begin attributes geometry 80x56 end attributes begin imageclasses path "/usr/share/Eterm/pix/" begin image type background mode trans allow trans auto state normal cmod image 100 end image end imageclasses begin toggles map_alert on visual_bell on login_shell true scrollbar off [...]]]></description>
			<content:encoded><![CDATA[<pre>&lt;Eterm-0.9.2&gt;
begin color
    foreground white
    background black
    cursor #ffff00
    cursor_text #880000
    pointer white
    video normal
end color

begin attributes
    geometry 80x56
end attributes

begin imageclasses
    path "/usr/share/Eterm/pix/"
    begin image
        type background
        mode trans allow trans auto
        state normal
        cmod image 100
    end image
end imageclasses

begin toggles
    map_alert on
    visual_bell on
    login_shell true
    scrollbar off
    utmp_logging on
    iconic false
    home_on_output 1
    home_on_input 1
    scrollbar_right true
    scrollbar_floating false
    borderless false
end toggles

begin keyboard
    smallfont_key LessThan
    bigfont_key GreaterThan
end keyboard

begin misc
    save_lines 1024
    cut_chars "t\\`\\"'&#038;() *,;< =>?@[]{|}"
    border_width 0
end misc
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/10/13/eterm-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eterm</title>
		<link>http://nerd.cx/index.php/2004/10/13/eterm/</link>
		<comments>http://nerd.cx/index.php/2004/10/13/eterm/#comments</comments>
		<pubDate>Wed, 13 Oct 2004 21:41:30 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/10/13/eterm/</guid>
		<description><![CDATA[Shaded, transparent terminal emulators are pretty. While this is well known by the asthetes who use KDE, and other high-zoot, high-function desktops, I think that it is still true of those who like things a little simpler. I find it quicker to kick the tires of a unicycle. Still, I was looking to see if [...]]]></description>
			<content:encoded><![CDATA[<p>Shaded, transparent terminal emulators are pretty.  While this is well known by the asthetes who use KDE, and other high-zoot, high-function desktops, I think that it is still true of those who like things a little simpler.  I find it quicker to kick the tires of a unicycle.  Still, I was looking to see if I could find a terminal emulator that was as fast as rxvt (which I switched to after debian-testing bungled the colours in the standard xterm) but allowed pretty shaded transparency.</p>
<p>I tried aterm, because it had little in the way of dependent libraries, but it didn&#8217;t refresh when the backdrop image did, which I found annoying.  So, I tried eterm (pronounced, inexplicably, Eterm) and kicked it around for a while.  I think I like it, based on this theme:</p>
<pre>
&lt;Eterm-0.9.2&gt;
begin color
    foreground white
    background black
    cursor #ffff00
    cursor_text #880000
    pointer white
    video normal
end color

begin attributes
    geometry 80x56
end attributes

begin imageclasses
    path "/usr/share/Eterm/pix/"
    begin image
        type background
        mode trans allow trans auto
        state normal
        cmod image 100
    end image
end imageclasses

begin toggles
    map_alert on
    visual_bell on
    login_shell true
    scrollbar off
    utmp_logging on
    iconic false
    home_on_output 1
    home_on_input 1
    scrollbar_right true
    scrollbar_floating false
    borderless false
end toggles

begin keyboard
    smallfont_key LessThan
    bigfont_key GreaterThan
end keyboard

begin misc
    save_lines 1024
    cut_chars "t`"'&amp;() *,;&lt;=&gt;?@[]{|}"
    border_width 0
end misc
</pre>
<p>
It is really simple, but lets me see my pretty backdrop images even when the window is cluttered with terminals.  I had to go into my .muttrc to change the &#8220;black&#8221; to &#8220;default&#8221;, but that was no hardship.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/10/13/eterm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Block Editing in Vim</title>
		<link>http://nerd.cx/index.php/2004/10/05/block-editing-in-vim/</link>
		<comments>http://nerd.cx/index.php/2004/10/05/block-editing-in-vim/#comments</comments>
		<pubDate>Tue, 05 Oct 2004 17:26:47 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/01/15/block-editing-in-vim/</guid>
		<description><![CDATA[I have been lax in adding to this site for some time, but I am hoping to rectify that in the coming weeks. Luckily I have a backlog of things that I have done that will make up the next few entries. For instance, I have come to love Visual Block editing in vim. When [...]]]></description>
			<content:encoded><![CDATA[<p>I have been lax in adding to this site for some time, but I am hoping to rectify that in the coming weeks.  Luckily I have a backlog of things that I have done that will make up the next few entries.  For instance, I have come to love Visual Block editing in <a href="http://www.vim.org">vim</a>.</p>
<p>When I&#8217;m debugging code it is just magic to be able to comment out a block at a time to test various aspects of a program.  For a long time now I&#8217;ve been referring to a copy-and-pasted section of the vim manual in a loose file, because I don&#8217;t use the features so often that it sticks in my mind yet.  To avoid collecting these loose files, I&#8217;ll put the relevant section here, so I can find it.</p>
<p><span style="display:block;">Visual-block Insert </span><span style="text-align:right;">*v_b_I*</span> With a blockwise selection, <code>I{string}<esc></esc></code> will insert <code>{string}</code> at the start of block  in every line of the block, provided that the line extends into the block.  Thus lines that are short will remain unmodified.  TABs are split to retain visual columns.</p>
<p><span style="display:block;">Visual-block Append</span><span style="text-align:right;">*v_b_A*</span> With a blockwise<br />
selection, <code>A{string}<esc></esc></code> will append <code>{string}</code> to the end of block on every line of the<br />
block. There is some differing behavior where the block RHS is not straight, due to different line lengths:</p>
<p>1. Block was created with <code><c -v>$</c></code> In this case the string is appended to the end of each line.  2. Block was created with <code><c -v>{move-around}</c></code> In this case the string is appended to the end of the block on each line, and whitespace is inserted to pad to the end-of-block column.</p>
<p>Note: &#8220;I&#8221; and &#8220;A&#8221; behave differently for lines that don&#8217;t extend into the selected block.  This was done intentionally, so that you can do it the way you want.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/10/05/block-editing-in-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>postfix</title>
		<link>http://nerd.cx/index.php/2004/06/10/postfix/</link>
		<comments>http://nerd.cx/index.php/2004/06/10/postfix/#comments</comments>
		<pubDate>Thu, 10 Jun 2004 17:19:50 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/06/10/postfix/</guid>
		<description><![CDATA[# This is main.cf, the only file I need to noodle with. # Do not change these directory settings - they are critical to Postfix # operation. command_directory = /usr/sbin daemon_directory = /usr/lib/postfix program_directory = /usr/lib/postfix setgid_group = postdrop # appending .domain is the MUA's job. append_dot_mydomain = no smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) [...]]]></description>
			<content:encoded><![CDATA[<pre># This is main.cf, the only file I need to noodle with.

# Do not change these directory settings - they are critical to Postfix
# operation.
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix
setgid_group = postdrop

# appending .domain is the MUA's job.
append_dot_mydomain = no

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# Uncomment the next line to generate delayed mail warnings
#delay_warning_time = 4h

# This is useful - a catchall to which all mail goes if there appears
# to be no recipient.
luser_relay = local@email-address

myhostname = local_hostname
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = local_hostname, localhost
relayhost = smtp_address_of_isp
mynetworks = 127.0.0.0/8
mailbox_command = /usr/bin/procmail
mailbox_size_limit = 0
recipient_delimiter = +
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/06/10/postfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>muttrc</title>
		<link>http://nerd.cx/index.php/2004/05/04/muttrc/</link>
		<comments>http://nerd.cx/index.php/2004/05/04/muttrc/#comments</comments>
		<pubDate>Tue, 04 May 2004 17:06:41 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/05/04/muttrc/</guid>
		<description><![CDATA[reset all source ~/Mail/.alias set alias_file =~/Mail/.alias source ~/Mail/.common # ~/Mail/.common contains: # This is the stuff common to all of my .muttrc files set reverse_name set nouse_domain set reply_to set envelope_from set move="yes" set help set read_inc = 10 set mail_check = 600 set menu_scroll = yes set help = yes set tmpdir = [...]]]></description>
			<content:encoded><![CDATA[<pre>reset all

source ~/Mail/.alias
set alias_file =~/Mail/.alias

source ~/Mail/.common

# ~/Mail/.common contains:
# This is the stuff common to all of my .muttrc files

set reverse_name
set nouse_domain
set reply_to
set envelope_from
set move="yes"
set help
set read_inc = 10
set mail_check = 600
set menu_scroll = yes
set help = yes
set tmpdir = /tmp
set ispell = "/usr/bin/aspell -c"
set wrap_search = yes
set strict_threads = no
set sort = threads
set sort_aux = date
set mark_old = no
set pager_context = 1
set pager_index_lines = 10
set editor = "vim -c 'set tw=72'"
set indent_string = >
set sort_browser = reverse-date
set record = ~/Mail/sent
set mbox = ~/Mail/inbox
set mbox_type = mbox
set folder = ~/Mail
set autoedit = yes
set reverse_alias = yes
set implicit_autoview = yes
set score = no
mailboxes ~/Mail/inbox ~/Mail/tortech ~/Mail/mutt ~/Mail/tlug ~/Mail/Holly ~/Mail/mis-trivia ~/Mail/spam ~/Mail/tall

# Colours
color header brightyellow black Subject:
color header brightcyan black .
color quoted green black
color signature brightblue black
color attachment yellow black
color tree red black
color indicator black cyan
color status brightyellow blue
color tilde blue black
color normal brightwhite black

# Save-Hooks, Folder-Hooks
fcc-save-hook hollyemailaddressescaped +Holly

fcc-save-hook tall +tall
folder-hook tall+ "my_hdr From: William O'Higgins &lt;emailaddress>"
folder-hook tall+ "my_hdr Reply-To: William O'Higgins &lt;emailaddress>"
folder-hook tall+ 'set signature=~/Mail/.nerd.sig'

fcc-save-hook mutt +mutt
folder-hook mutt+ "my_hdr From: William O'Higgins &lt;emailaddress>"
folder-hook mutt+ "my_hdr Reply-To: William O'Higgins &lt;emailaddress>"
folder-hook mutt+ 'set signature=~/Mail/.nerd.sig'

fcc-save-hook tlug +tlug
folder-hook tlug+ "my_hdr From: William O'Higgins &lt;emailaddress>"
folder-hook tlug+ "my_hdr Reply-To: William O'Higgins &lt;emailaddress>"
folder-hook tlug+ 'set signature=~/Mail/.blandsig'

# Save attachments in a common place
macro attach s &lt;save -entry&gt;&lt;bol>/home/willyyam/Mail/attachments/&lt;eol>&lt;enter>

# Handy Macro
macro compose y "&lt;ispell>&lt;send -message&gt;" 'Spellcheck and send'"

# If I don't remember (common) or am in the wrong email account (also
# common) I can get the right headers, signature, POP info, etc
macro   index   &lt;f5> ":source ~/Mail/.uoft.muttrc" "U of T"
macro   index   &lt;f6> ":source ~/Mail/.nerd.muttrc" "Nerd"
macro   index   &lt;f7> ":source ~/Mail/.pilcrow.muttrc" "Pilcrow"
macro   index   &lt;f8> ":source ~/Mail/.muttrc" "Woolgathering"

# Keep the highlighted line in the centre of my viewing pane
macro index &lt;up> "&lt;previous -undeleted>&lt;current -middle>"
macro index &lt;down> "&lt;next -undeleted>&lt;current -middle>"

# Save two keystrokes
macro index c "&lt;change -folder>?"
macro pager c "&lt;change -folder>?"
macro browser c "&lt;tab>"

# I teach spamassassin what spam is based on what is in the spam folder,
# and I want to put stuff in there quickish
macro index S "s=spam&lt;enter>&lt;enter>"
macro pager S "s=spam&lt;enter>&lt;enter>"

# If I get through writing an email, but it is using the wrong email
# account, I can sort it out
macro compose &lt;f5> ":set editor='header_edit_uoft'n&lt;edit -headers>:set editor='vim'&lt;enter>"
macro compose &lt;f6> ":set editor='header_edit_nerd'n&lt;edit -headers>:set editor='vim'&lt;enter>"
macro compose &lt;f7> ":set editor='header_edit_pilcrow'n&lt;edit -headers>:set editor='vim'&lt;enter>"
macro compose &lt;f8> ":set editor='header_edit_woolgathering'n&lt;edit -headers>:set editor='vim'&lt;enter>"

# Tidy up the headers, just showing those I care for - if I want more I
# can just hit "h"
ignore *
unignore x-spam-status
unignore from:
unignore to:
unignore subject:
unignore date:

# End of ~/Mail/.common

set realname = "William O'Higgins"
set from = myemailaddress
set signature = ~/Mail/.uoft.sig
set pop_user = poplogin
set pop_pass = poppassword
set pop_delete = yes
set pop_host = pophost

# GnuPG Stuff

set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0xC9C40C31 -- -r %r -- %f"
set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0xC9C40C31 -- -r %r -- %f"
set pgp_import_command="gpg --no-verbose --import -v %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r"
set pgp_autosign=yes
set pgp_sign_as=ECFE293F
set pgp_replyencrypt=yes
set pgp_timeout=36000
set pgp_good_sign="^gpg: Good signature from"

# Set hooks on the inbox
folder-hook inbox+ "my_hdr From: William O'Higgins &lt;emailaddress>"
folder-hook inbox+ "my_hdr Reply-To: William O'Higgins &lt;emailaddress>"
folder-hook inbox+ 'set signature=~/Mail/.uoft.sig'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/05/04/muttrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Randomized Backdrops</title>
		<link>http://nerd.cx/index.php/2004/04/29/randomized-backdrops/</link>
		<comments>http://nerd.cx/index.php/2004/04/29/randomized-backdrops/#comments</comments>
		<pubDate>Thu, 29 Apr 2004 17:04:16 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/04/29/randomized-backdrops/</guid>
		<description><![CDATA[#!/usr/bin/perl -w # This little program sets my background image # randomly in blackbox (and now openbox). # It's called when I startx. $backdrop_directory = "/home/willyyam/crap/backdrop/"; # Set this to your backdrop files directory. opendir(BD, "$backdrop_directory") or die; # Normally we'd report errors, but since we will be # running this via script and discarding [...]]]></description>
			<content:encoded><![CDATA[<pre>
#!/usr/bin/perl -w

# This little program sets my background image
# randomly in blackbox (and now openbox).
# It's called when I startx.

$backdrop_directory = "/home/willyyam/crap/backdrop/";
# Set this to your backdrop files directory.

opendir(BD, "$backdrop_directory") or die;
# Normally we'd report errors, but since we will be
# running this via script and discarding the STDOUT
# that it generates, that would be a waste of time.

@backdrops = readdir(BD);
# Grab the contents of the backdrop directory.

@spordkcab = reverse(@backdrops);
pop(@spordkcab);
pop(@spordkcab);
# The first two entries readdir() finds are
# . and  ..  We don't want to hand these
# entries to bsetbg, so I reverse the array
# and do away with them.  There is a smooth,
# tidy way to do this.  I don't care :-)

$pic_o_the_moment = $spordkcab[ rand @spordkcab];
$pic_o_the_moment = $backdrop_directory . $pic_o_the_moment;
`/home/willyyam/bin/bsetbg $pic_o_the_moment &#038;`;

# This the program call to bbsetbg, written by
# tmk@lordzork.com, is what does all the work --
# I just call it.

exit;

# William O'Higgins yam@nerd.cx
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/04/29/randomized-backdrops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xinitrc</title>
		<link>http://nerd.cx/index.php/2004/04/29/xinitrc/</link>
		<comments>http://nerd.cx/index.php/2004/04/29/xinitrc/#comments</comments>
		<pubDate>Thu, 29 Apr 2004 16:53:07 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/04/29/xinitrc/</guid>
		<description><![CDATA[numlockx wmusic -r -t -u -a -l&#038; xterm -fg white -bg black -vb -geometry 80x55 &#038; bbbg.pl &#038; exec openbox]]></description>
			<content:encoded><![CDATA[<pre>numlockx
wmusic -r -t -u -a -l&#038;
xterm -fg white -bg black -vb  -geometry 80x55 &#038;
bbbg.pl &#038;
exec openbox
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/04/29/xinitrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vimrc</title>
		<link>http://nerd.cx/index.php/2004/04/26/vimrc/</link>
		<comments>http://nerd.cx/index.php/2004/04/26/vimrc/#comments</comments>
		<pubDate>Mon, 26 Apr 2004 02:37:55 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/04/26/vimrc/</guid>
		<description><![CDATA[" Set settings set autoindent set title set ruler set nocompatible set showcmd set ts=4 set tw=72 set backspace=indent,eol,start set incsearch syntax on " Remember where I last edited a file set viminfo='10,"100,:20,%,n~/.viminfo au BufReadPost * if line("'"") > 0&#124;if line("'"") < = line("$")&#124;exe("norm '"")&#124;else&#124;exe "norm $"&#124;endif&#124;endif if &#038;term =~ "xterm-debian" &#124;&#124; &#038;term =~ "xterm-xfree86" [...]]]></description>
			<content:encoded><![CDATA[<pre>" Set settings
set autoindent
set title
set ruler
set nocompatible
set showcmd
set ts=4
set tw=72
set backspace=indent,eol,start
set incsearch
syntax on

" Remember where I last edited a file
set viminfo='10,"100,:20,%,n~/.viminfo
au BufReadPost * if line("'"") > 0|if line("'"") < = line("$")|exe("norm '"")|else|exe "norm $"|endif|endif

if &#038;term =~ "xterm-debian" || &#038;term =~ "xterm-xfree86"
set t_Co=16
set t_Sf=^[[3%dm
set t_Sb=^[[4%dm
endif
" Settings set

" Map mappings
:inoremap ( ()i
:inoremap [ []i
:inoremap " ""i
:inoremap { {}i
:inoremap < <>i

map W :!aspell -c -x %
map F gqap

" http://vim.sourceforge.net/tips/tip.php?tip_id=465
" make an element out of anything you type with a CR in the middle
imap ,,, bdwa<!--<esc-->pakA

" Fix common typos
iab teh the
iab hte the
iab adn and
iab taht that
iab htat that
iab fo of
iab ot to
" Mapping mapped

if has("autocmd")
" Enabled file type detection
" Use the default filetype settings. If you also want to load indent files
" to automatically do language-dependent indenting add 'indent' as well.
filetype plugin on
endif " has ("autocmd")</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/04/26/vimrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LaTeX</title>
		<link>http://nerd.cx/index.php/2004/04/26/latex/</link>
		<comments>http://nerd.cx/index.php/2004/04/26/latex/#comments</comments>
		<pubDate>Mon, 26 Apr 2004 02:32:14 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/04/26/latex/</guid>
		<description><![CDATA[A while back I was using CVS to synchronize and version my school work, and I was looking for a method of writing papers so the working files were text instead of binary allowing diffs to be generated via CVS. That lead me to LaTeX, and it worked out all right. I found that I [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I was using <a href="http://www.cvshome.org/">CVS</a> to synchronize and version my school work, and I was looking for a method of writing papers so the working files were text instead of binary allowing <code>diff</code>s to be generated via CVS.  That lead me to <a href="http://www.latex-project.org/">LaTeX</a>, and it worked out all right.  I found that I was quite happily able to generate my text in <a href="http://www.vim.org/">vim</a>, version it with CVS and generate a final PDF, the only binary format in the whole process.</p>
<p>Now, well after I really could have used it, <a href="http://www.macdevcenter.com/pub/a/mac/2004/03/05/latex.html">this</a> article pops up.  It is a useful primer, but it doesn&#8217;t really touch on the one things that will probably bite a lot of users in the ass &#8211; there are zillions of versions of LaTeX and its packages, and so you&#8217;ll have to experiment to find out what works on your system.  Still, it&#8217;s a good document preparation system, and I&#8217;m glad to know something about how it works.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/04/26/latex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xdefaults</title>
		<link>http://nerd.cx/index.php/2004/04/25/xdefaults/</link>
		<comments>http://nerd.cx/index.php/2004/04/25/xdefaults/#comments</comments>
		<pubDate>Sun, 25 Apr 2004 21:57:59 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/04/25/xdefaults/</guid>
		<description><![CDATA[! default settings for some X-Windows programs ! rxvt-unicode urxvt.geometry: 80x56 urxvt.background: black urxvt.foreground: white urxvt.saveLines: 1000 urxvt.scrollBar: false urxvt.inheritPixmap: true urxvt.fading: 50 urxvt.tintColor: green3 urxvt.shading: 40 urxvt.visualBell: true urxvt.font: fixed]]></description>
			<content:encoded><![CDATA[<pre>! default settings for some X-Windows programs
! rxvt-unicode
urxvt.geometry: 80x56
urxvt.background: black
urxvt.foreground: white
urxvt.saveLines: 1000
urxvt.scrollBar: false
urxvt.inheritPixmap: true
urxvt.fading: 50
urxvt.tintColor: green3
urxvt.shading: 40
urxvt.visualBell: true
urxvt.font: fixed
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/04/25/xdefaults/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bashrc</title>
		<link>http://nerd.cx/index.php/2004/04/20/bashrc/</link>
		<comments>http://nerd.cx/index.php/2004/04/20/bashrc/#comments</comments>
		<pubDate>Tue, 20 Apr 2004 02:25:47 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/04/20/bashrc/</guid>
		<description><![CDATA[if [ "$PS1" ]; then # enable color support of ls and also add handy aliases eval `dircolors -b` alias ls='ls --color=auto' alias ll='ls -hl' alias la='ls -Ah' alias x='startx' alias clear='clear;fortune -ae' alias nstll='sudo apt-get install ' alias vi='vim' alias halt='sudo halt -p' alias vii='sudo vim ' alias key="mount /dev/sda;ls /mnt/key" alias unkey="umount /mnt/key" [...]]]></description>
			<content:encoded><![CDATA[<pre>if [ "$PS1" ]; then
# enable color support of ls and also add handy aliases
eval `dircolors -b`
alias ls='ls --color=auto'
alias ll='ls -hl'
alias la='ls -Ah'
alias x='startx'
alias clear='clear;fortune -ae'
alias nstll='sudo apt-get install '
alias vi='vim'
alias halt='sudo halt -p'
alias vii='sudo vim '
alias key="mount /dev/sda;ls /mnt/key"
alias unkey="umount /mnt/key"
alias dos2unix="flip -uv "
alias unix2dos="flip -mv "
alias spmlearn='sa-learn --mbox --spam /home/willyyam/Mail/spam;
rm /home/willyyam/Mail/spam;
touch /home/willyyam/Mail/spam'

# set a fancy prompt
PS1='[</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/04/20/bashrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fetchmailrc</title>
		<link>http://nerd.cx/index.php/2004/04/19/fetchmailrc/</link>
		<comments>http://nerd.cx/index.php/2004/04/19/fetchmailrc/#comments</comments>
		<pubDate>Mon, 19 Apr 2004 02:34:49 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/04/19/fetchmailrc/</guid>
		<description><![CDATA[# After some consideration, I've decided to run this sucker via # cron, 'cause I don't *really* need extra services running # fetchmailconf is a stupid-head set postmaster "$username" set bouncemail # Do this for each account to fetch poll $accountname via $mailserver user '$remote_login' there with password '$remote_pass' is '$username' here]]></description>
			<content:encoded><![CDATA[<pre># After some consideration, I've decided to run this sucker via
# cron, 'cause I don't *really* need extra services running

# fetchmailconf is a stupid-head

set postmaster "$username"
set bouncemail

# Do this for each account to fetch

poll $accountname via $mailserver

user '$remote_login' there with password '$remote_pass' is '$username' here</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/04/19/fetchmailrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>USB Keys</title>
		<link>http://nerd.cx/index.php/2004/04/19/usb-keys/</link>
		<comments>http://nerd.cx/index.php/2004/04/19/usb-keys/#comments</comments>
		<pubDate>Mon, 19 Apr 2004 02:22:55 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/04/19/usb-keys/</guid>
		<description><![CDATA[I had a store credit to use up before Christmas, and so I bought a couple of USB key storage devices, one for the lady and one for me. I was quite please at how easy the were to set up, just adding a line to /etc/fstab and mounting the device. For the longest time [...]]]></description>
			<content:encoded><![CDATA[<p>I had a store credit to use up before Christmas, and so I bought a couple of USB key storage devices, one for the lady and one for me.  I was quite please at how easy the were to set up, just adding a line to <code>/etc/fstab</code> and mounting the device.  For the longest time though, I could only perform operations on it as root, which is tiresome.  Luckily, <a href="http://emmajane.net">Emma</a> pointed me at some good <a href="http://www.ibiblio.org/mdw/HOWTO/Flash-Memory-HOWTO/index.html">documentation</a> and so I was able to get everything working sweetly.  Here&#8217;s what I&#8217;ve got working:</p>
<pre># A directory called /mnt/key
# These lines in /etc/fstab
none        /proc/bus/usb usbfs defaults            0   0
/dev/sda    /mnt/key    vfat    rw,user,noauto      0   0
# And these lines in my .bashrc
alias key="mount /dev/sda;ls /mnt/key"
alias unkey="umount /mnt/key"</pre>
<p>It works pretty sweetly, and these storage devices are awesome.  I&#8217;ve never gotten close to filling it up yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/04/19/usb-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating to subversion</title>
		<link>http://nerd.cx/index.php/2004/04/18/migrating-to-subversion/</link>
		<comments>http://nerd.cx/index.php/2004/04/18/migrating-to-subversion/#comments</comments>
		<pubDate>Sun, 18 Apr 2004 02:21:14 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/04/18/migrating-to-subversion/</guid>
		<description><![CDATA[I used CVS for a while for keeping my desktop and laptop in sync, as well as for versioning all of my school stuff and programming web projects. While it worked fine, I did find that it wasn&#8217;t great for binary data (because of its basis on RCS) and the fuss involved in copying, moving [...]]]></description>
			<content:encoded><![CDATA[<p>I used CVS for a while for keeping my desktop and laptop in sync, as well as for versioning all of my school stuff and programming web projects.  While it worked fine, I did find that it wasn&#8217;t great for binary data (because of its basis on RCS) and the fuss involved in copying, moving and deleting was tiresome.</p>
<p>After reading <a href="http://www.onlamp.com/pub/a/onlamp/2004/01/29/scm_overview.html">this</a> I decided to give <a href="http://subversion.tigris.org/">subversion</a> a try.  It was pretty easy to set up, and it works insanely well with binary data, because it uses binary differencing on all files, making the distinction moot.</p>
<p>Before I got started with subversion though, I wanted to clear out all of the CVS administrative directories so I wasn&#8217;t versioning those as well.  Well, since there is a CVS directory in every directory in the tree, I didn&#8217;t want to remove them all manually.  Luckily, <a href="http://tlug.linux.ca/">TLUG</a> came to the rescue with this: <code>find . -type d -name CVS | xargs rm -Rf</code>.  Very nice, and useful in a lot of ways.  I&#8217;ll have to spend some time with <code>man xargs</code> though, because I think that I&#8217;ll be glad to know it better.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/04/18/migrating-to-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>procmailrc</title>
		<link>http://nerd.cx/index.php/2004/04/17/procmailrc/</link>
		<comments>http://nerd.cx/index.php/2004/04/17/procmailrc/#comments</comments>
		<pubDate>Sat, 17 Apr 2004 02:36:29 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/04/17/procmailrc/</guid>
		<description><![CDATA[PATH=/bin:/usr/bin:/usr/bin MAILDIR=$HOME/Mail LOGFILE=$MAILDIR/.procmail.log #:0: #* ^From:.*someonewhoneedsautoresponse #&#124; /home/willyyam/bin/auto :0 Wc &#124; razor-check :0 Waf &#124; formail -A "X-Razor2-Warning: SPAM." :0fw &#124; /usr/bin/spamassassin :0: * ^X-Spam-Level: ******** /dev/null :0: * ^X-Spam-Status: Yes spam :0 Wc &#124; razor-check :0 Wa spam :0: * ^(From&#124;To&#124;Cc).*tlug tlug :0: * ^(From&#124;To&#124;Cc).*mutt mutt :0: * ^(From&#124;To&#124;Cc).*tortech tortech :0: * ^(From&#124;To&#124;Cc).*tall tall [...]]]></description>
			<content:encoded><![CDATA[<pre>PATH=/bin:/usr/bin:/usr/bin
MAILDIR=$HOME/Mail
LOGFILE=$MAILDIR/.procmail.log

#:0:
#* ^From:.*someonewhoneedsautoresponse
#| /home/willyyam/bin/auto

:0 Wc
| razor-check
:0 Waf
| formail -A "X-Razor2-Warning: SPAM."

:0fw
| /usr/bin/spamassassin

:0:
* ^X-Spam-Level: ********
/dev/null

:0:
* ^X-Spam-Status: Yes
spam

:0 Wc
| razor-check
:0 Wa
spam

:0:
* ^(From|To|Cc).*tlug
tlug

:0:
* ^(From|To|Cc).*mutt
mutt

:0:
* ^(From|To|Cc).*tortech
tortech

:0:
* ^(From|To|Cc).*tall
tall

:0:
* ^(To).*T-LAWLIB-L
tall

:0:
*
inbox</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/04/17/procmailrc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Downtime, again&#8230;</title>
		<link>http://nerd.cx/index.php/2004/04/17/downtime-again/</link>
		<comments>http://nerd.cx/index.php/2004/04/17/downtime-again/#comments</comments>
		<pubDate>Sat, 17 Apr 2004 02:18:04 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/04/17/downtime-again/</guid>
		<description><![CDATA[I changed hosts at the beginning of April, and it turned into an unmitigated disaster. The old host deleted my database before I had a chance to dump it, so I lost more than half my content. I wouldn&#8217;t even have that much if it wasn&#8217;t for Google&#8217;s cache. I&#8217;ll try to re-create it, but [...]]]></description>
			<content:encoded><![CDATA[<p>I changed hosts at the beginning of April, and it turned into an unmitigated disaster.  The old host deleted my database before I had a chance to dump it, so I lost more than half my content.  I wouldn&#8217;t even have that much if it wasn&#8217;t for <a href="http://google.com">Google&#8217;s</a> cache.  I&#8217;ll try to re-create it, but it may take some time.  Also, partly because of massive ineptitude and partly because of thick-headed stupidity, it took more than two weeks to start receiving mail again, let alone putting the site back up.</p>
<p>I&#8217;ve got the site somewhat in place, but I am still working out bugs.  Hopefully I&#8217;ll get that all sorted this weekend.  If you see something wonky, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/04/17/downtime-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mutt-users</title>
		<link>http://nerd.cx/index.php/2004/03/27/mutt-users/</link>
		<comments>http://nerd.cx/index.php/2004/03/27/mutt-users/#comments</comments>
		<pubDate>Sat, 27 Mar 2004 18:57:21 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/03/27/mutt-users/</guid>
		<description><![CDATA[As is so often the case, I subscribed to the mutt-users list to fix a specific problem, and I have stayed on and asked questions and greatly improved and complicated the way that I use mutt. For the last four days I have heard not a peep from the list, and it was beginning to [...]]]></description>
			<content:encoded><![CDATA[<p>As is so often the case, I subscribed to the <a href="http://marc.theaimsgroup.com/?l=mutt-users&#038;r=1&#038;w=2">mutt-users</a> list to fix a specific problem, and I have stayed on and asked questions and greatly improved and complicated the way that I use <a href="http://mutt.org">mutt</a>.  For the last four days I have heard not a peep from the list, and it was beginning to bug me.  I am accustomed to reading or skimming the list every day, and so it is quite a disorienting experience.  Finally, early this afternoon, I got my first message for a long time, and by the looks of the archiving groups, it is the first they have received as well.  I hope the list comes back to full strength, because there are some great resources there.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/03/27/mutt-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kernel compile = blam!</title>
		<link>http://nerd.cx/index.php/2004/03/24/kernel-compile-blam/</link>
		<comments>http://nerd.cx/index.php/2004/03/24/kernel-compile-blam/#comments</comments>
		<pubDate>Wed, 24 Mar 2004 19:00:04 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/03/24/kernel-compile-blam/</guid>
		<description><![CDATA[I just went through a fairly major ordeal with my desktop. I was trying to recompile a kernel the Debian way. &#8220;The Debian way&#8221; is apparently catastrophic failure. Upon reboot I discovered that my Master Boot Record was so damaged that I was unable to boot to any kernel, and unable to reinstall without formatting [...]]]></description>
			<content:encoded><![CDATA[<p>I just went through a fairly major ordeal with my desktop.  I was trying to recompile a kernel <a href="http://myrddin.org/howto/debian-kernel-recompile.html">the Debian way</a>.  &#8220;The Debian way&#8221; is apparently catastrophic failure.  Upon reboot I discovered that my Master Boot Record was so damaged that I was unable to boot to any kernel, and unable to reinstall without formatting the partition flat.  Very upsetting. I made several attempts to fix the problem, but nothing worked. I also tried to reinstall onto my secondary hard drive, but ran into similar problems, and my aged motherboard, already flaky, started throwing Drive Errors on boot.</p>
<p>I finally got Debian reinstalled, but with the flaky motherboard I needed something else.  What I found was a new motherboard, processor, RAM and case for the same money as a lesser processor.  It was significantly faster than what I was used to, though I will still have to look further into CPU-detection, because <code>dmesg</code> is not reporting its full clock speed, but the BIOS, I think, is.</p>
<p>The upshot is that I didn&#8217;t use <code>tasksel</code> and I didn&#8217;t use <code>dselect</code> to install non-basic packages, so my system is pretty lean.  I am always pleased to not have printing daemons installed when I don&#8217;t need them.  Now of course I want to export my installed packages to a file to keep safe, so I can do one fat <code>apt-get</code> at the beginning of any installation.</p>
<p>There is always lots to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/03/24/kernel-compile-blam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apt and dpkg</title>
		<link>http://nerd.cx/index.php/2004/03/23/apt-and-dpkg/</link>
		<comments>http://nerd.cx/index.php/2004/03/23/apt-and-dpkg/#comments</comments>
		<pubDate>Tue, 23 Mar 2004 19:01:58 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/03/23/apt-and-dpkg/</guid>
		<description><![CDATA[I&#8217;ve been needlessly lax in my work here on nerd.cx, as is my wont. I&#8217;m much prefer to be active here, adding all of my wee discoveries and tribulations, so I have a better record of them. Perhaps when school calms down. Anyway, after some recent computer troubles, I was chatting with emma and she [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been needlessly lax in my work here on <a href="http://nerd.cx"><em>nerd.cx</em></a>, as is my wont.  I&#8217;m much <em>prefer</em> to be active here, adding all of my wee discoveries and tribulations, so I have a better record of them.  Perhaps when school calms down.</p>
<p>Anyway, after some recent computer troubles, I was chatting with <a href="http://xtrinsic.com/geek/">emma</a> and she mentioned that she uses some command to list her installed packages, and from there can reinstall her system in one big chunk.  To me, with two computers, this is a fabulous idea, because if I need to reinstall one of them, I can do it from the installed software image of the other.  Very pleasing.</p>
<p>After some poking about I found these two commands, which I think are going to make my life a bunch easier: <code>dpkg --list</code> and <code>apt-show-versions -u</code>.  The first is the one that tells me what all I&#8217;ve installed &#8211; not as easy a thing to remember, even on a stripped-down system, and it is likely to be more than you think.  The second is quite handy if, like me, you don&#8217;t want to run <code>apt-get upgrade</code> blind.  It should be good.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/03/23/apt-and-dpkg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving /usr</title>
		<link>http://nerd.cx/index.php/2004/01/23/16/</link>
		<comments>http://nerd.cx/index.php/2004/01/23/16/#comments</comments>
		<pubDate>Fri, 23 Jan 2004 21:41:57 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/01/23/16/</guid>
		<description><![CDATA[When I set up my hard drive to take Debian, I didn&#8217;t take into account the vast range of software that I was going to find immediately indispensible. So, /usr was on the same partition as /, and it was taking up 1.1 Gb of a 2 Gb partition. That was unsupportable, of course, so [...]]]></description>
			<content:encoded><![CDATA[<p>When I set up my hard drive to take Debian, I didn&#8217;t take into account the vast range of software that I was going to find immediately indispensible.  So, <code>/usr</code> was on the same partition as <code>/</code>, and it was taking up 1.1 Gb of a 2 Gb partition.  That was unsupportable, of course, so I had to move  <code>/usr</code> to it&#8217;s own wee data fiefdom.</p>
<p>I&#8217;ve moved <code>/home</code> a few times, and I have a procedure for that, but I wasn&#8217;t sure you could do the same thing with <code>/usr</code>.  I asked Arthur, and he pointed out something very important &#8211; the editiors are on <code>/usr</code>, and so I had to edit <code>/etc/fstab</code> <em>before</em> renaming <code>/usr</code>.  Once I had the order worked out though, it went perfectly.  Here is the procedure:</p>
<pre># Set up a partition table on the new hard drive
cfdisk /dev/hdb

# Get a filesystem on the partition
# you're going to use
mkfs.ext2 /dev/hdb1

# Mount the soon-to-/usr partition
mount /dev/hdb1 /mnt/tmp/

# Edit the filesystem table
vi /etc/fstab
# Add the new /usr to the table
/dev/hdb1   /usr    ext2    defaults   1   2

# Get into /usr and prepare to copy
cd /usr

# Single-user mode
# a bare root for low-level maintenance
init 1

# Copy everything into the new /usr
cp -ax * /mnt/tmp/

# Rename /usr so that you can mount
# the new /usr in the right place
mv /usr /usr.old

# Set up the mount point
mkdir /usr

# Cross your fingers
reboot</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/01/23/16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Openbox</title>
		<link>http://nerd.cx/index.php/2004/01/11/openbox/</link>
		<comments>http://nerd.cx/index.php/2004/01/11/openbox/#comments</comments>
		<pubDate>Sun, 11 Jan 2004 21:36:07 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/01/11/openbox/</guid>
		<description><![CDATA[Emma suggested that I try Openbox, and so far I am very pleased. Unlike Blackbox, there are people still working on Openbox, and they are doing a fine job. So far it is not feature-perfect, but it is function-perfect as far as I can tell, and that is really something. I was pretty happy with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://emmajane.net">Emma</a> suggested that I try <a href="http://openbox.org">Openbox</a>, and so far I am very pleased.  Unlike Blackbox, there are people still working on Openbox, and they are doing a fine job.  So far it is not feature-perfect, but it is function-perfect as far as I can tell, and that is really something.</p>
<p>I was pretty happy with Blackbox, but I didn&#8217;t like some of the ways that things were configured, especially the fact that I had to elevate my priviledge to edit my menu or style file.  Openbox uses locally specified XML files for configuration, and I am very pleased with how that system works.  It is especially nice (though it would be good if it were clearly documented) that if you screw up your local settings you will get the default &#8212; but fully functional &#8212; settings and menu.</p>
<p>My wishlist for Openbox is for better documentation (so I&#8217;ve started to write it) and better management of where windows appear.  I run two monitors, and the windows will spawn on the left edge of the right screen, which is not where I want them.  I&#8217;d also like them to appear in columns rather than rows if I so choose.  Still, it&#8217;s a nice window manager with active participation, and I&#8217;m glad to use it.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/01/11/openbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian</title>
		<link>http://nerd.cx/index.php/2004/01/02/debian/</link>
		<comments>http://nerd.cx/index.php/2004/01/02/debian/#comments</comments>
		<pubDate>Fri, 02 Jan 2004 02:12:41 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2004/01/02/debian/</guid>
		<description><![CDATA[I am slowly but surely, getting Debian installed on my home machine. I am heavily endebted to emma for her help, suggestions, enthusiasm, humour and dotfiles, but I have beaten my head against these particular walls often enough that it is starting to feel good. Most of the process works as expected, requires minimal kicking [...]]]></description>
			<content:encoded><![CDATA[<p>I am slowly but surely, getting Debian installed on my home machine.  I am heavily endebted to <a href="http://emmajane.net">emma</a> for her help, suggestions, enthusiasm, humour and dotfiles, but I have beaten my head against these particular walls often enough that it is starting to feel good.</p>
<p>Most of the process works as expected, requires minimal kicking and has been pretty satisfying on the whole.  Getting X working, is, as always, the thorniest challenge, but with known hardware I can now almost casually sacrifice the correct chickens and scatter the right entrails to get where I need to be.</p>
<p>The real bastard was getting my mail system set up &#8211; I wrestled with <a href="http://www.exim.org">exim</a> for a long while &#8211; Debian stable is ludicrously conservative, and I was for a long time worried about both exim and <a href="http://mutt.org">mutt</a> being too many versions behind my config files and knowledge.  After much gnashing of teeth, the installation of <a href="http://www.postfix.org">postfix</a> and an upgrade of mutt (to 1.54) I still couldn&#8217;t get the MTA to honour my setting of a From: address.  Finally, I looked at /etc/Muttrc (which I had looked for earlier in the process but didn&#8217;t find because I was expecting a directory and lower case) and found this little gem:</p>
<pre># don't generate a From header
unset use_from</pre>
<p>Once I commented that out things worked just fine.  I&#8217;m really pleased to have sorted that out, but I am also really peeved at the Debian dork who set that as off by default.  All MUAs may suck, but every one I&#8217;ve ever seen sets From: correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2004/01/02/debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Computers of the Future</title>
		<link>http://nerd.cx/index.php/2003/10/27/computers-of-the-future/</link>
		<comments>http://nerd.cx/index.php/2003/10/27/computers-of-the-future/#comments</comments>
		<pubDate>Mon, 27 Oct 2003 02:19:28 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2003/10/27/computers-of-the-future/</guid>
		<description><![CDATA[In all of the speculative fiction I&#8217;ve ever read in which there are computers, there are very few times when anyone guesses that, at this stage of the game, it is not hardware manufacturers who differentiate between computers, but operating systems. When someone asks about your computer, that is usually what they mean. It is [...]]]></description>
			<content:encoded><![CDATA[<p>In all of the <span style="text-decoration: line-through">speculative</span> fiction I&#8217;ve ever read in which there are computers, there are very few times when anyone guesses that, at this stage of the game, it is not hardware manufacturers who differentiate between computers, but operating systems. When someone asks about your computer, that is usually what they mean. It is a strange state of affairs, that&#8217;s for darn sure &#8211; to be concerned with the software run at the lowest level on your hardware, rather than the hardware itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2003/10/27/computers-of-the-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Downtime</title>
		<link>http://nerd.cx/index.php/2003/10/20/downtime/</link>
		<comments>http://nerd.cx/index.php/2003/10/20/downtime/#comments</comments>
		<pubDate>Mon, 20 Oct 2003 19:19:34 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/01/08/downtime/</guid>
		<description><![CDATA[The last couple of days of the website being down are aparently due to a PHP upgrade. The new version does not include by default the PEAR database abstraction library installed, and so several aspects of this site which use them borked. Little things like database connection. That has been fixed and the server rebooted, [...]]]></description>
			<content:encoded><![CDATA[<p>The last couple of days of the website being down are aparently due to a <a href="http://php.net">PHP</a> upgrade.  The new version does not include by default the PEAR database abstraction library installed, and so several aspects of this site which use them borked.  Little things like database connection.  That has been fixed and the server rebooted, but it definitely means that I should re-code to avoid depenence on modules on whose presence I cannot count.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2003/10/20/downtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL and mSQL</title>
		<link>http://nerd.cx/index.php/2003/10/10/mysql-and-msql/</link>
		<comments>http://nerd.cx/index.php/2003/10/10/mysql-and-msql/#comments</comments>
		<pubDate>Fri, 10 Oct 2003 21:33:36 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[book]]></category>

		<guid isPermaLink="false">http://nerd.cx/2003/10/10/mysql-and-msql/</guid>
		<description><![CDATA[If you&#8217;ve never used a UNIX-like system before, or a programming language, you will have some trouble with this book. If you are somewhat familiar with one modern programming language and know at least the rudiments of the UNIX filesystem, this book is a great introduction to databases and these two popular database tools. The [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve never used a UNIX-like system before, or a programming language, you will have some trouble with <a href="http://www.oreilly.com/catalog/msql/">this book</a>. If you are somewhat familiar with one modern programming language and know at least the rudiments of the UNIX filesystem, this book is a great introduction to databases and these two popular database tools.</p>
<p>The opening chapters outline the basic concepts really clearly, and walk you through the short course in database design. If you are creating a small database with one of these tools (<a href="http://www.mysql.com" target="_blank">MySQL</a> or <a href="http://www.hughes.com.au" target="_blank">mSQL</a>) this book will get you started in fine style. The chapter on installing the tools is comprehensive and very well laid out. The basic style of the prose is easy to read and very comforting if you are new to the topic.</p>
<p>The big problem with the book is that it is organized with the information about the two tools explained in parallel. This is quite simple to understand and easy to read, but once you start trying to flip back through the book you realize that you get hopelessly snarled by the subtle differences between the two software packages. MySQL and mSQL are so close in function, and implement SQL so similarly, that it is easy to get confused by the tiny differences in syntax and structure that that these two systems demand.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2003/10/10/mysql-and-msql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMTP with telnet</title>
		<link>http://nerd.cx/index.php/2003/10/10/smtp-with-telnet/</link>
		<comments>http://nerd.cx/index.php/2003/10/10/smtp-with-telnet/#comments</comments>
		<pubDate>Fri, 10 Oct 2003 21:30:53 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2003/10/10/smtp-with-telnet/</guid>
		<description><![CDATA[One of the things I like best about the TCP/IP from a technical standpoint is that almost all of it happens in ASCII. This means that when your mail is getting refused or your web site isn&#8217;t working you can just fire up telnet, hit the right port and start poking around. Alarmingly often I [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I like best about the TCP/IP from a technical standpoint is that almost all of it happens in ASCII.  This means that when your mail is getting refused or your web site isn&#8217;t working you can just fire up telnet, hit the right port and start poking around.</p>
<p>Alarmingly often I find that I can confirm and sometimes diagnose a problem with my ISP&#8217;s mailserver before they can.  I also find it terribly handy for sorting out wonky behavior on my web server, though I just use an <a href="http://oreilly.com">O&#8217;Reilly</a> book for that (<a href="http://safari.oreilly.com/?XmlId=1-56592-862-8">HTTP Pocket Reference</a>).</p>
<p>I think it would be pretty useful if everything could be in <a href="http://unicode.org/">Unicode</a>, from OSes to networking protocols, but that seems rather a long way off.  Just the ability to hack in telnet in your own language would be pretty neat.  As it is, you&#8217;ve got to do things by rote or learn English.  I&#8217;m glad I don&#8217;t have to do that again.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2003/10/10/smtp-with-telnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>picindex.pl</title>
		<link>http://nerd.cx/index.php/2003/10/10/picindexpl/</link>
		<comments>http://nerd.cx/index.php/2003/10/10/picindexpl/#comments</comments>
		<pubDate>Fri, 10 Oct 2003 19:16:05 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/01/08/picindexpl/</guid>
		<description><![CDATA[#!/usr/bin/perl -w # This little program takes a directory as its argument and # builds an html frame page with all of the image names in one # frame and a target frame for image viewing. It leaves the # three html pages in the argument directory. print &#34;Enter the directory with the images -- [...]]]></description>
			<content:encoded><![CDATA[<pre>#!/usr/bin/perl -w

# This little program takes a directory as its argument and
# builds an html frame page with all of the image names in one
# frame and a target frame for image viewing.  It leaves the
# three html pages in the argument directory.

print &quot;Enter the directory with the images -- n
make sure it is an absolute path (include a trailing slash):n&quot;;
$target_dir = &lt;STDIN&gt;;
chomp $target_dir;

@jpgs = glob(&quot;$target_dir*.jpg&quot;);
@gifs = glob(&quot;$target_dir*.gif&quot;);
@both = (@jpgs,@gifs);
@pics = sort(@both);

foreach $pic_name (@pics) {
    $pic_name =~ s/^$target_dir//;
}

open(MAIN, &quot;&gt;$target_dir&quot;.&quot;index.html&quot;) or die &quot;Can\'t create index.html: $!n&quot;;
open(LEFT, &quot;&gt;$target_dir&quot;.&quot;left.html&quot;) or die &quot;Can\'t create left.html: $!n&quot;;
open(RIGHT, &quot;&gt;$target_dir&quot;.&quot;rght.html&quot;) or die &quot;Can\'t create rght.html: $!n&quot;;

$index_html = &quot;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Frameset//EN&quot;&quot;DTD/xhtml1-frameset.dtd&quot;&gt;n&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;n&lt;head&gt;n&lt;title&gt;Image Index&lt;/title&gt;n&lt;/head&gt;n&lt;frameset cols=&quot;20%,80%&quot; frameborder=&quot;1&quot; border=&quot;1&quot;&gt;n&lt;frame src=&quot;left.html&quot; name=&quot;left&quot;&gt;n&lt;frame src=&quot;rght.html&quot; name=&quot;right&quot;&gt;n&lt;/frameset&gt;n&lt;/html&gt;n&quot;;

$right_html = &quot;&lt;!DOCTYPE html public &quot;-//W3C//dtD XHTML 1.0 Transitional//EN&quot;&quot;DTD/xhtml1-transitional.dtd&quot;&gt;n&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;n&lt;head&gt;n&lt;title&gt;Right&lt;/title&gt;n&lt;/head&gt;n&lt;body&gt;&lt;/body&gt;n&lt;/html&gt;n&quot;;

$left_top = &quot;&lt;!DOCTYPE html public &quot;-//W3C//dtD XHTML 1.0 Transitional//EN&quot;&quot;DTD/xhtml1-transitional.dtd&quot;&gt;n&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;n&lt;head&gt;n&lt;title&gt;Left&lt;/title&gt;n&lt;/head&gt;n&lt;body&gt;n&lt;dl&gt;nn&quot;;

foreach $pic_name (@pics) {
    $pic_name = &quot;&lt;dt&gt;&lt;a href = &quot;$pic_name&quot; target = &quot;right&quot;&gt;&quot; . $pic_name . &quot;&lt;/a&gt;&lt;/dt&gt;n&quot;;
}

$list = &quot;@pics&quot;;

$left_bottom = &quot;nn&lt;/dl&gt;n&lt;/head&gt;n&lt;body&gt;n&quot;;

$left_html = $left_top . $list . $left_bottom;

print MAIN $index_html;
print RIGHT $right_html;
print LEFT $left_html;

close(MAIN) or die &quot;Can\'t close index.html: $!n&quot;;
close(LEFT) or die &quot;Can\'t close left.html: $!n&quot;;
close(RIGHT) or die &quot;Can\'t close rght.html: $!n&quot;;</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2003/10/10/picindexpl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search and Replace with Perl</title>
		<link>http://nerd.cx/index.php/2003/09/30/search-and-replace-with-perl/</link>
		<comments>http://nerd.cx/index.php/2003/09/30/search-and-replace-with-perl/#comments</comments>
		<pubDate>Tue, 30 Sep 2003 19:18:15 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://nerd.cx/2007/01/08/search-and-replace-with-perl/</guid>
		<description><![CDATA[# Sometimes you need to change something in a bunch of files at once. # These are some command-line ways of doing that. # For universal replacement (in all files down from the current directory): find ./ -type f -exec perl -pi -e \'s/stringtofind/stringtoreplacewith/g\' {} ; # To do all ".php"s, for example: find ./ [...]]]></description>
			<content:encoded><![CDATA[<pre># Sometimes you need to change something in a bunch of files at once.
# These are some command-line ways of doing that.

# For universal replacement (in all files down from the current directory):
find ./ -type f -exec perl -pi -e \'s/stringtofind/stringtoreplacewith/g\' {} ;

# To do all ".php"s, for example:
find ./ -type f -name *.php -exec perl -pi -e \'s/stringtofind/stringtoreplacewith/g\' {} ;

# To find/replace in just the present directory:
perl -pi -e \'s/stringtofind/stringtoreplacewith/g\</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2003/09/30/search-and-replace-with-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ftp with perl</title>
		<link>http://nerd.cx/index.php/2003/09/11/ftp-with-perl/</link>
		<comments>http://nerd.cx/index.php/2003/09/11/ftp-with-perl/#comments</comments>
		<pubDate>Thu, 11 Sep 2003 19:12:00 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://nerd.cx/2003/09/11/ftp-with-perl/</guid>
		<description><![CDATA[#!/usr/bin/perl -w # Yet another time when dependence on libraries bit me, I had to see if # I could manage an ftp script using the core perl libraries, so I wasn\'t # dependent on Net::FTP being present in the same form on the system. # This is just my proof of concept, developed with [...]]]></description>
			<content:encoded><![CDATA[<pre>#!/usr/bin/perl -w

# Yet another time when dependence on libraries bit me, I had to see if
# I could manage an ftp script using the core perl libraries, so I wasn\'t
# dependent on Net::FTP being present in the same form on the system.
# This is just my proof of concept, developed with telnet and the perl
# cookbook.

use IO::Socket;

$remote_host = "remotehost";
$remote_port = 21;
$user = "username";
$pass = "password";

$socket = IO::Socket::INET->new(PeerAddr => $remote_host,
                                PeerPort => $remote_port,
                                Proto    => "tcp",
                                Type     => SOCK_STREAM)
    or die "Couldn\'t connect to $remote_host:$remote_port : $@n";

# AUTHENTICATION

$answer = < $socket>;
print "$answer";

print $socket "user $usern";
$answer = < $socket>;
print "$answer";

print $socket "pass $passn";
$answer = < $socket>;
print "$answer";

# DIRECTORY NAVIGATION

print $socket "pwdn";
$answer = < $socket>;
print "$answer";

# QUIT

print $socket "quitn";
$answer = < $socket>;
print "$answer";

# and terminate the connection when we\'re done
close($socket);</pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2003/09/11/ftp-with-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reader Prodding and Booting Linux</title>
		<link>http://nerd.cx/index.php/2003/08/11/reader-prodding-and-booting-linux/</link>
		<comments>http://nerd.cx/index.php/2003/08/11/reader-prodding-and-booting-linux/#comments</comments>
		<pubDate>Mon, 11 Aug 2003 19:22:11 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[blog]]></category>

		<guid isPermaLink="false">http://nerd.cx/2003/08/11/reader-prodding-and-booting-linux/</guid>
		<description><![CDATA[Luke has, quite rightly, pointed out that I have been lax in my updating of this site. after my last flurry of activity adding pieces of the back-end I completely forgot to note them here. I&#8217;ve been adding capabilities like entry editing tools and per-article permalinks and stylesheet switching, but other than that my time [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://zopenewbies.net">Luke</a> has, quite rightly, pointed out that I have been lax in my updating of this site.  after my last flurry of activity adding pieces of the back-end I completely forgot to note them here.  I&#8217;ve been adding capabilities like entry editing tools and per-article permalinks and stylesheet switching, but other than that my time has been severely limited by huge wodges of work for school. That, sadly, won&#8217;t calm down again before the end of the term.  The real problem is that I want to blog lots of articles, but I don&#8217;t have Internet access in class, which is where I can multitask and write things for this site in parallel with class notes.  I&#8217;ve been meaning to download sites into the cache, but I keep forgetting.  We&#8217;ll see if I get that done soon.</p>
<p>A while back I read <a href="http://www-106.ibm.com/developerworks/linux/library/l-boot.html">this</a> article, which I find fascinating.  It is a very intriguing idea for the laptop, since it boots up so much more often than the desktop.  I haven&#8217;t had the time to look into it more, but I&#8217;d sure like to.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2003/08/11/reader-prodding-and-booting-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>smtp.pl</title>
		<link>http://nerd.cx/index.php/2003/03/10/smtppl/</link>
		<comments>http://nerd.cx/index.php/2003/03/10/smtppl/#comments</comments>
		<pubDate>Mon, 10 Mar 2003 19:06:23 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://nerd.cx/2003/03/10/smtppl/</guid>
		<description><![CDATA[#!/usr/bin/perl -w use Mail::Mailer; $smtp = Mail::Mailer->new("smtp","Server","smtp.server"); print "To: "; $to = ; chomp($to); print "Subject: "; $subject = ; chomp($subject); print "Body:n"; while ($line = ) { last if $line eq ".n"; $body .= $line; } chomp($body); print "Opening SMTP connection...n"; $smtp->open({ "From" => "hmm@woolgathering.cx", "To" => $to, "Subject" => $subject }); print $smtp [...]]]></description>
			<content:encoded><![CDATA[<pre>#!/usr/bin/perl -w

use Mail::Mailer;

$smtp = Mail::Mailer->new("smtp","Server","smtp.server");

print "To:       ";
$to = <stdin>;
chomp($to);
print "Subject:  ";
$subject = </stdin><stdin>;
chomp($subject);
print "Body:n";

while ($line = </stdin><stdin>) {
    last if $line eq ".n";
    $body .= $line;
}

chomp($body);

print "Opening SMTP connection...n";
$smtp->open({
    "From" => "hmm@woolgathering.cx",
    "To" => $to,
    "Subject" => $subject
        });
print $smtp $body;
print "Sending email...n";
$smtp->close() or die "Can\'t close mailer: $!";
print "Mail sent.\n";</stdin></pre>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2003/03/10/smtppl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cascading Style Sheets</title>
		<link>http://nerd.cx/index.php/2003/01/10/cascading-style-sheets/</link>
		<comments>http://nerd.cx/index.php/2003/01/10/cascading-style-sheets/#comments</comments>
		<pubDate>Fri, 10 Jan 2003 21:38:32 +0000</pubDate>
		<dc:creator>yam</dc:creator>
				<category><![CDATA[book]]></category>

		<guid isPermaLink="false">http://nerd.cx/2003/01/10/cascading-style-sheets/</guid>
		<description><![CDATA[CSS is a remarkable technology that will undoubtedly change the way that documents are presented through large swathes of the Internet, especially the Web. Any web author or designer who reads this book is going to salivate to the point of embarrassment over the nascent possibilities in the spec. They are also going to run [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.w3.org/Style/CSS/" target="_blank">CSS</a> is a remarkable technology that will undoubtedly change the way that documents are presented through large swathes of the Internet, especially the Web. Any web author or designer who reads this book is going to salivate to the point of embarrassment over the nascent possibilities in the spec. They are also going to run screaming to the <a href="http://www.webstandards.org/" target="_blank">Web Standards Project</a> to beg them to force the browser makers to support the spec to the letter so that they can write cross-browser-compatible code quickly and easily. Tantalizing us with possibilities isn&#8217;t what this book is about, though. This book truly strives to be &quot;The Definitive Guide&quot;, delimiting what works right now, and how.</p>
<p>The book is essentially a &quot;State of the Union&quot; document that shows you what is implemented in the browsers, how it works, where the bugs are and what, if any, are the workarounds. In this capacity it is hugely useful, but it isn&#8217;t always easy to use as a reference. The layout of the book, into chapters based on the effects you wish to use, such as Fonts, Boxes and Borders, and Colors and Backgrounds(sic) is very helpful on the surface, but because the properties, selectors and elements are spread through the text there is no easy way to flip directly to the section you want. The appendix of CSS1 Properties is alphabetical only, so if you don&#8217;t know precisely what you&#8217;re looking for you&#8217;ll have to skim the relevant chapter.</p>
<p>The chapters themselves are often very long, with some examples having related code and some merely described, so it is quite tricky to figure out how to replicate an effect that you find in one of the many figures. In some cases the idealized behaviour is laboriously discussed, and the browser implementation is mentioned only briefly, making for a frustrating read. The prose itself is fairly transparent, and Meyer has peppered his examples with whimsy which eases the read considerably.</p>
<p>There are certain chapters of this book that are &quot;must-read&quot;, and others that can safely be mined for tips and samples without being gone over in detail. Chapter 2, Selectors and Structure, and Chapter 3, Units and Values, are <em>essential</em> reading for anyone wishing to use CSS now, or in the future. These chapters are specific, focussed and full of priceless pearls that must have been discovered after hours or days of hair pulling and frustration. Similarly, Chapter 8, Visual Formatting, on the surface an academic interpretation of the CSS1 Specification, is the perfect background for understanding big chunks of CSS of both levels. The last Chapter, CSS in Action, is a good place to start if you are already somewhat familiar with CSS.</p>
<p>One thing the quickly becomes clear when reading this book is that Netscape is the ugly step-child when it comes to CSS. The winner of most of the early battles in the Browser Wars, Netscape is now relegated to flirting with the nurses and giving away half of every pair of shoes. Netscape&#8217;s support for even the rudiments of CSS1 are intermittent and riddled with bugs, requiring elaborate workarounds and even the abandonment of useful effects. There is hope that Netscape 6 will come to the rescue, but as feature is added to bug-eaten and crash-prone feature that hope dims. The fact that the smart money in the Netscape 6 release-date pool is on dates in the second half of 2001 is not encouraging.</p>
<p>Ultimately, Cascading Style Sheets: The Definitive Guide, is a good book to have read, especially if you intend to stay at the bleeding edge of web publication, but it is not a great book to have on the shelf. A more useable CSS reference can be found in <a href="http://www.oreilly.com/catalog/wdnut/" target="_blank">Web Design in a Nutshell</a>, by Jennifer Niederst or in <a href="http://www.oreilly.com/catalog/dhtmlref/" target="_blank">Dynamic HTML: The Definitive Reference</a> by Danny Goodman.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerd.cx/index.php/2003/01/10/cascading-style-sheets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

