<?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>HandsomePlanet</title>
	<atom:link href="http://www.handsomeplanet.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.handsomeplanet.com</link>
	<description>technology and other perplexities</description>
	<lastBuildDate>Tue, 17 Apr 2012 05:03:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Stripping leading whitespace and comments with sed</title>
		<link>http://www.handsomeplanet.com/archives/254</link>
		<comments>http://www.handsomeplanet.com/archives/254#comments</comments>
		<pubDate>Tue, 10 Apr 2012 17:40:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=254</guid>
		<description><![CDATA[In trying to consolidate some bash aliases (found in .bashrc and .bash_aliases), I needed to strip out comments and leading whitespace to sort for unique lines. To strip spaces, I used egrep alias .bashrc &#124; sed 's/^[ ]*//' To remove spaces and tabs in the whitespace (see info on tabs after this example): egrep alias [...]]]></description>
			<content:encoded><![CDATA[<p>In trying to consolidate some bash aliases (found in .bashrc and .bash_aliases), I needed to strip out comments and leading whitespace to sort for unique lines.  </p>
<p>To strip spaces, I used<br />
<code> egrep alias .bashrc | sed 's/^[ ]*//'  </code></p>
<p>To remove spaces and tabs in the whitespace (see info on tabs after this example):<br />
<code> egrep alias .bashrc | sed 's/^[     ]*//'  </code><br />
NOTE: In the expression, <code>sed 's/^[     ]*//'</code> , the expression in the brackets is actually a space followed by a tab.  At the command line, I had to create the tab by typing <code>Control-V</code> and then hitting <code>TAB</code> on the keyboard.  You may need to represent tabs in a different fashion. </p>
<p>To get rid of leading whitespace, comments, and indented comments, I settled on<br />
<code> egrep alias .bashrc | sed 's/^[ ]*//'  | egrep -v '^#' </code></p>
<p>To gather and sort aliases from both .bash and .bash_aliases, then sending to a temporary file:<br />
<code> egrep alias .bash[r_][ca]* | sed 's/^[ ]*//'  | egrep -v '^#' | sort  -u >> tmp</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/254/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting &#8216;Scroll Lock&#8217; to work under Linux</title>
		<link>http://www.handsomeplanet.com/archives/248</link>
		<comments>http://www.handsomeplanet.com/archives/248#comments</comments>
		<pubDate>Mon, 05 Mar 2012 20:38:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=248</guid>
		<description><![CDATA[I&#8217;ve got a couple of keyboards with Scroll Lock keys that are not functional by default under Linux. For my Ubuntu systems, the following procedure worked to fix the problem. After this, the LED for scroll lock lights and the key function as expected. The steps are as follows: Find an unused modifier with xmodmap [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a couple of keyboards with Scroll Lock keys that are not functional by default under Linux.<br />
For my Ubuntu systems, the following procedure worked to fix the problem. After this, the LED for scroll lock lights and the key function as expected.</p>
<p>The steps are as follows:</p>
<ol>
<li>Find an unused modifier with <code>xmodmap -p</code></li>
<li>Use xmodmap to assign Scroll_Lock to this modifier</li>
<li>Make the change persistent by adding it to your .Xmodmap file</li>
</ol>
<p>First, use <code>xmodmap -p</code> to identify an unused mod key.<br />
For example,</p>
<blockquote><p>$ xmodmap -p<br />
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):</p>
<p>shift Shift_L (0&#215;32), Shift_R (0x3e)<br />
lock Caps_Lock (0&#215;42)<br />
control Control_L (0&#215;25), Control_R (0&#215;69)<br />
mod1 Alt_L (0&#215;40), Alt_R (0x6c), Meta_L (0xcd)<br />
mod2 Num_Lock (0x4d)<br />
mod3<br />
mod4 Super_L (0&#215;85), Super_R (0&#215;86), Super_L (0xce), Hyper_L (0xcf)<br />
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)</p></blockquote>
<p><strong>mod3</strong> is the open modifier. So, we&#8217;ll use it with <strong>xmodmap -e</strong> :</p>
<p><code>xmodmap -e "add mod3 =Scroll_Lock"</code></p>
<p>Capitalization is important, so &#8220;Scroll_Lock&#8221; has to be written exactly as printed.<br />
You can have a space, or no space, after the equal sign.</p>
<p>Check that it works, then add the command content to your home directory (file does not have to exist):</p>
<p><code>echo "add mod3 =Scroll_Lock" &gt;&gt; ~/.Xmodmap</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/248/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>send man page to text file</title>
		<link>http://www.handsomeplanet.com/archives/230</link>
		<comments>http://www.handsomeplanet.com/archives/230#comments</comments>
		<pubDate>Mon, 19 Sep 2011 16:22:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=230</guid>
		<description><![CDATA[Printing a manpage to a text file (perhaps more portable for cross-platform or bedtime reading): generic Unix/Linux, using `col`: man rcs &#124; col -b > /tmp/man_rcs.txt These alternatives would require that you reset PAGER or MANPAGER: alternative BSD : export MANPAGER=cat man pf.conf > man_pf.conf.txt alternative BSD : export PAGER=cat man pf.conf > man_pf.conf.txt Ubuntu, [...]]]></description>
			<content:encoded><![CDATA[<p>Printing a manpage to a text file (perhaps more portable for cross-platform or bedtime reading):</p>
<p>generic Unix/Linux, using `col`:<br />
<code>man rcs | col -b > /tmp/man_rcs.txt</code></p>
<p>These alternatives would require that you reset PAGER or MANPAGER:<br />
alternative BSD :<br />
<code>export MANPAGER=cat</code><br />
<code>man pf.conf > man_pf.conf.txt</code></p>
<p>alternative BSD :<br />
<code>export PAGER=cat</code><br />
<code>man pf.conf > man_pf.conf.txt</code></p>
<p>Ubuntu, Debian, Mint, etc. allow all of these alternatives:</p>
<p><code>       -P pager, --pager=pager<br />
              Specify  which  output  pager to use.  By default, man uses pager -s.  This option overrides the $MANPAGER environment variable, which in turn overrides  the  $PAGER environment variable.  It is not used in conjunction with -f or -k.</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/230/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>recovering a complete config from rancid</title>
		<link>http://www.handsomeplanet.com/archives/113</link>
		<comments>http://www.handsomeplanet.com/archives/113#comments</comments>
		<pubDate>Sat, 20 Aug 2011 18:58:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[rancid]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=113</guid>
		<description><![CDATA[From time to time, I need to access a complete config stored by the rancid application under CVS, so I can get a good look (more than just the line diffs) at the configuration. Here are the steps I use to recover an older version of configuration stored by the rancid process in a CVS [...]]]></description>
			<content:encoded><![CDATA[<div class="content">
<p>From time to time, I need to access a complete config stored by the <a href="http://www.shrubbery.net/rancid/" title="rancid (really awesome new config differ)">rancid</a> application under CVS, so I can get a good look (more than just the line diffs) at the configuration.</p>
<p>Here are the steps I use to recover an older version of configuration stored by the rancid process in a CVS structure.</p>
<p><span id="more-38"></span><br />
1) Find the group that contains the config you want, and get the &#8216;CVSROOT&#8217; directory info contained in the Root file.   This should be in a directory that corresponds to the rancid base install directory &#8212; BASEDIR/var/GROUPNAME/configs/CVS/Root.    My install base is /usr/local/rancid, so to get a config from my atlanta-zone5 group, I need to look in <code>/usr/local/rancid/var/atlanta-zone5/configs/CVS/Root. </code></p>
<p>e.g.,<br />
<code> $ cat /usr/local/rancid/var/atlanta-zone5/configs/CVS/Root</code></p>
<p>2) Next, set and export the CVSROOT variable that you found in step 1.</p>
<p>e.g.,<br />
<code>$ export CVSROOT=/usr/local/rancid/var/CVS  </code></p>
<p>3) Find the version of the file (the configuration revision) you want to get back.   This can be done with various CVS front ends, or the command line.   For the command line CVS command, go to the configs directory of the group containing the router/switch config you want, then use the &#8216;cvs log&#8217; command.  For example:<br />
$ <code>cd  /usr/local/rancid/var/CVS/atlanta-zone5/configs/</code></p>
<p>4) Look through the log for the version that corresponds to the date you need:<br />
$ <code>cvs log bgp2-rtr | more</code></p>
<p>5)Go to the directory in which you&#8217;ll expand the old config.<br />
<code>$ cd /tmp </code>    (or some other directory where you won&#8217;t collide with existing files)</p>
<p>6) Check out the version you need using the &#8216;cvs co&#8217; command in this form:</p>
<p><code>$ cvs co -r 1.21 GROUP/configs/YOUR_ROUTER</code><br />
e.g.,<br />
<code>cvs co -r 1.21 atlanta-zone5/configs/bgp2-rtr</code></p>
<p>The group directory will be restored, and you will have to descend into it to find the exact config you need.</p>
<p><code> $ cd </code><code>atlanta-zone5/configs</code><br />
<code> $ more bgp2-rtr</code><code></code></p>
<p>7) Enjoy your recovered config.   Repeat as necessary.</p>
<p><script type="text/javascript">SHARETHIS.addEntry({ title: "rancid CVS tip : complete router config recovery from CVS", url: "http://www.handsomeplanet.com/2007/04/03/rancid-cvs-tip-complete-router-config-recovery-from-cvs/" });</script></p>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/113/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pink noise</title>
		<link>http://www.handsomeplanet.com/archives/37</link>
		<comments>http://www.handsomeplanet.com/archives/37#comments</comments>
		<pubDate>Mon, 01 Aug 2011 17:17:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[noise]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=37</guid>
		<description><![CDATA[Pink noise can be used to mask distracting sounds in the environment around you. It can be useful for providing a neutral sonic background for concentration. The program speaker-test comes in the alsa-utils package, and provides pink noise by default. This is described by its man page as &#8220;perceptually uniform noise&#8221;. There are a number [...]]]></description>
			<content:encoded><![CDATA[<p>Pink noise can be used to mask distracting sounds in the environment around you.   It can be useful for providing a neutral sonic background for concentration. </p>
<p>The program <em>speaker-test</em> comes in the alsa-utils package, and provides pink noise by default.   This is described by its man page as &#8220;perceptually uniform noise&#8221;.  There are a number of other options, but for a quick noise generator, speaker-test is very handy. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/37/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command line fun for linux : included utilities</title>
		<link>http://www.handsomeplanet.com/archives/226</link>
		<comments>http://www.handsomeplanet.com/archives/226#comments</comments>
		<pubDate>Thu, 13 Jan 2011 20:58:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=226</guid>
		<description><![CDATA[obelix@entity:~$ info util-linux-ng]]></description>
			<content:encoded><![CDATA[<p><code> obelix@entity:~$ info util-linux-ng </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/226/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s my ubuntu (or debian) version?</title>
		<link>http://www.handsomeplanet.com/archives/219</link>
		<comments>http://www.handsomeplanet.com/archives/219#comments</comments>
		<pubDate>Tue, 05 Oct 2010 19:41:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=219</guid>
		<description><![CDATA[I have a  number of machines running various OS releases. Sometimes I need to check what flavor or relase I&#8217;m running on the current machine. While uname -a will show the Linux kernel version, there are a few ways to get more information. Here are three possibilities: cat /etc/issue cat /etc/lsb-release and my favorite: lsb_release [...]]]></description>
			<content:encoded><![CDATA[<p>I have a  number of machines running various OS releases.   Sometimes I need to check what flavor or relase I&#8217;m running on the current machine.<br />
While <code>uname -a</code> will show the Linux kernel version, there are a few ways to get more information.<br />
Here are three possibilities:<br />
<code>cat /etc/issue<br />
cat /etc/lsb-release</code><br />
and my favorite:<br />
<code>lsb_release -a</code></p>
<p>Here&#8217;s some sample output from lsb_release:<br />
<code>$ lsb_release -a<br />
LSB Version:	core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch<br />
Distributor ID:	Ubuntu<br />
Description:	Ubuntu 10.04.1 LTS<br />
Release:	10.04<br />
Codename:	lucid</code></p>
<p>The &#8220;lsb&#8221; in these commands refers to the Linux Standard Base.  For more information, see the <a title="The Linux Foundation" href="http://www.linuxfoundation.org/" target="_blank">Linux Foundation</a> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/219/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lucidor</title>
		<link>http://www.handsomeplanet.com/archives/203</link>
		<comments>http://www.handsomeplanet.com/archives/203#comments</comments>
		<pubDate>Sun, 05 Sep 2010 02:25:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=203</guid>
		<description><![CDATA[I&#8217;ve been looking at a number of different ebooks and e-readers lately.  Lucidor is a project which is a little better looking than some of the older apps, but it is still pretty early in development. Here&#8217;s a copy of lucidor 0.9, which was difficult to find due to problems with the lucidor site: lucidor_0.9-1_all.deb [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking at a number of different ebooks and e-readers lately.  Lucidor is a project which is a little better looking than some of the older apps, but it is still pretty early in development.</p>
<p>Here&#8217;s a copy of lucidor 0.9, which was difficult to find due to problems with the lucidor site:</p>
<p><a href="http://www.handsomeplanet.com/wp-content/uploads/2010/09/lucidor_0.9-1_all.deb_.gz">lucidor_0.9-1_all.deb</a></p>
<p>md5sum:  08faa6b60df2dae654e70431aa2e7626  lucidor_0.9-1_all.deb.gz<br />
sha1sum: 0397853f5c4fe013fe36aed71ec0aa219f7f35f2  lucidor_0.9-1_all.deb.gz</p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/203/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>installing the development version of the sphinx documentation tool</title>
		<link>http://www.handsomeplanet.com/archives/178</link>
		<comments>http://www.handsomeplanet.com/archives/178#comments</comments>
		<pubDate>Mon, 12 Jul 2010 15:58:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=178</guid>
		<description><![CDATA[Get the latest version from bitbucket: $ hg clone http://bitbucket.org/birkenfeld/sphinx The remainder of the instructions are based on the README, but details will vary according to what package dependencies need to be met. That is, some additional packages beyond what is described here may need to be installed. Change to the new directory, build, and [...]]]></description>
			<content:encoded><![CDATA[<p>Get the latest version from bitbucket:<br />
<code><br />
$ hg clone http://bitbucket.org/birkenfeld/sphinx<br />
</code><br />
The remainder of the instructions are based on the README, but details will vary according to what package dependencies need to be met.   That is, some additional packages beyond what is described here may need to be installed.<br />
Change to the new directory, build, and install.<br />
<code><br />
cd sphinx<br />
python setup.py build<br />
sudo python setup.py install<br />
</code><br />
Build sphinx&#8217;s documentation with sphinx:<br />
<code><br />
cd doc<br />
sphinx-build . _build/html<br />
</code><br />
And, that should do it.</p>
<p>Also see the bitbucket sphinx <a href="http://bitbucket.org/birkenfeld/sphinx/wiki/Home">wiki</a> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/178/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>installing ntop on Ubuntu : problem with rrd directories</title>
		<link>http://www.handsomeplanet.com/archives/175</link>
		<comments>http://www.handsomeplanet.com/archives/175#comments</comments>
		<pubDate>Wed, 16 Jun 2010 18:40:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[ntop]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.handsomeplanet.com/?p=175</guid>
		<description><![CDATA[The ubuntu install for ntop is broken without some additional steps. &#8216;Ubuntu Bloke&#8217; had the easy fix : "Create the directories that for some reason are not created by the installer sudo mkdir /var/lib/ntop/rrd sudo mkdir /var/lib/ntop/rrd/graphics sudo mkdir /var/lib/ntop/rrd/flows sudo mkdir /var/lib/ntop/rrd/interfaces sudo mkdir /var/lib/ntop/rrd/interfaces/eth0 sudo mkdir /var/lib/ntop/rrd/interfaces/ppp0 sudo chmod -R 775 /var/lib/ntop"]]></description>
			<content:encoded><![CDATA[<p>The ubuntu install for ntop is broken without some additional steps.</p>
<p>&#8216;Ubuntu Bloke&#8217; had <a title="http://tuxnetworks.blogspot.com/2010/04/network-monitoring-with-ntop.html " href="http://tuxnetworks.blogspot.com/2010/04/network-monitoring-with-ntop.html" target="_blank">the easy fix</a> :</p>
<p><code>"Create the directories that for some reason are not created by the installer<br />
sudo mkdir /var/lib/ntop/rrd<br />
sudo mkdir /var/lib/ntop/rrd/graphics<br />
sudo mkdir /var/lib/ntop/rrd/flows<br />
sudo mkdir /var/lib/ntop/rrd/interfaces<br />
sudo mkdir /var/lib/ntop/rrd/interfaces/eth0<br />
sudo mkdir /var/lib/ntop/rrd/interfaces/ppp0<br />
sudo chmod -R 775 /var/lib/ntop"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.handsomeplanet.com/archives/175/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

