<?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/"
	>

<channel>
	<title>Gember Design</title>
	<atom:link href="http://www.gemberdesign.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gemberdesign.com</link>
	<description>The Digital Home of Aaron Gember</description>
	<pubDate>Thu, 04 Mar 2010 00:06:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing Phidgets in Fedora</title>
		<link>http://www.gemberdesign.com/2010/01/26/installing-phidgets-in-fedora/</link>
		<comments>http://www.gemberdesign.com/2010/01/26/installing-phidgets-in-fedora/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 02:44:31 +0000</pubDate>
		<dc:creator>agember</dc:creator>
		
		<category><![CDATA[Christmas Lights]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[fedora 10]]></category>

		<category><![CDATA[fedora 11]]></category>

		<category><![CDATA[fedora 12]]></category>

		<category><![CDATA[phidgets]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.gemberdesign.com/?p=367</guid>
		<description><![CDATA[<br/>Phidgets are boards for sensing and control projects that are managed via a USB connection to a computer.  I use the Phidget Interface Kit 0/0/4 for my Christmas light controllers.  To control the boards from a Linux workstation, it is necessary to install the Phidgets driver.  To allow connectivity to Phidgets from [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Phidgets are boards for sensing and control projects that are managed via a USB connection to a computer.  I use the <a href="http://www.phidgets.com/products.php?category=9&#038;product_id=1014">Phidget Interface Kit 0/0/4</a> for my Christmas light controllers.  To control the boards from a Linux workstation, it is necessary to install the Phidgets driver.  To allow connectivity to Phidgets from Fedora 12 (or Fedora 10 or 11):</p>
<ol>
<li>Download the Phidget source: <a href="http://www.phidgets.com/drivers.php">http://www.phidgets.com/drivers.php</a></li>
<li>Untar the contents and change to the <code>phidget21</code> directory.</li>
<li>Run <code>make</code>, then <code>sudo make install</code>.</li>
<li>Copy the udev configuration file to the appropriate location.
<pre>sudo cp udev/99-phidgets.rules /etc/udev/rules.d/</pre>
</li>
<li>Restart udev.
<pre>sudo /etc/init.d/udev-post reload</pre>
</li>
<li>Connect (or unplug and reconnect) the Phidget board to an available USB port.</li>
</ol>
<p>I typically control the Phidget board using Python.  To install the necessary Python modules:</p>
<ol>
<li>Download the Python module source: <a href="http://www.phidgets.com/programming_resources.php">http://www.phidgets.com/programming_resources.php</a></li>
<li>Unzip the module.</li>
<li>Move the Phidgets directory to the standard location for Python modules.
<pre>sudo mv Phidgets/ /usr/lib64/python2.6/</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.gemberdesign.com/2010/01/26/installing-phidgets-in-fedora/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Monitor Network Usage with MRTG and DD-WRT</title>
		<link>http://www.gemberdesign.com/2010/01/26/monitor-network-usage-with-mrtg-and-dd-wrt/</link>
		<comments>http://www.gemberdesign.com/2010/01/26/monitor-network-usage-with-mrtg-and-dd-wrt/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 05:26:26 +0000</pubDate>
		<dc:creator>agember</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[dd-wrt]]></category>

		<category><![CDATA[fedora 10]]></category>

		<category><![CDATA[fedora 11]]></category>

		<category><![CDATA[fedora 12]]></category>

		<category><![CDATA[mrtg]]></category>

		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://www.gemberdesign.com/?p=356</guid>
		<description><![CDATA[<br/>I currently run DD-WRT on a Linksys WRT54GL.  One of the great features of DD-WRT is its Simple Network Management Protocol (SNMP) functionality.  You can setup a desktop to gather SNMP data from the router and provide it in nice graphical form.
First, you need to configure the router running DD-WRT:

Login to the DD-WRT [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I currently run DD-WRT on a Linksys WRT54GL.  One of the great features of DD-WRT is its Simple Network Management Protocol (SNMP) functionality.  You can setup a desktop to gather SNMP data from the router and provide it in nice graphical form.</p>
<p>First, you need to configure the router running DD-WRT:</p>
<ol>
<li>Login to the DD-WRT web interface by entering the router&#8217;s IP address in your browser.</li>
<li>Select the <i>Services</i> tab.</li>
<li>Click the <i>Enable</i> radio button under SNMP.</li>
<li>Enter a description for the location (such as &#8220;Home&#8221;), a name for the contact (such as &#8220;Aaron Gember&#8221;), and a name for the router (its hostname is a good choice).</li>
<li>Click the <i>Apply Settings</i> button.</li>
</ol>
<p>After DD-WRT is configured, MRTG needs to be configured.  All the commands below are run as root.  A few may be Fedora specific, but the commands are easily adaptable for other Linux distributions.</p>
<ol>
<li>Install MRTG
<pre>yum install mrtg</pre>
</li>
<li>Create a configuration file for MRTG
<pre>cfgmaker --global WorkDir:/var/www/mrtg \
         --global 'Options[_]: bits,growright' \
         --output /etc/mrtg/mrtg.conf \
         public@routername</pre>
<p>The working directory is automatically created when MRTG is installed.  The <i>growright</i> option causes graphs to display new data on the right as time progresses. The output file is the default location.  Lastly, replace <i>routername</i> with the hostname or IP address of the router.</li>
<li>Configure the index page to make a nice one stop interface for viewing the graphs produced by MRTG
<pre>indexmaker --output=/var/www/mrtg/index.html \
           --title=routername --show=day --section=descr \
           /etc/mrtg/mrtg.cfg</pre>
<p>The <i>title</i> is the text at the top of the index page.  The daily graphs are show on the index page, per <i>&#8211;show=day</i>; you can alternatively show week, month, or year graphs on the index page.  The section headers have the graph description per <i>&#8211;section=descr</i>.  Lastly, the configuration file created earlier is specified.</li>
<li>If the Apache web server is not already running, you&#8217;ll need to start it:
<pre>service httpd restart</pre>
<p>You will also want to configure the web server to start whenever the computer starts:</p>
<pre>chkconfig httpd on</pre>
<p>(There are security risks associated with running a web server, which I do not address here.  For the most protection, configure the firewall on the computer to block all incoming HTTP traffic, limiting the viewing of logs to only the computer on which MRTG is running.)</li>
<li>Lastly, run MRTG once:
<pre>env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg</pre>
</li>
</ol>
<p>Lastly, you should setup a cron job to update the graphs every 5 minutes.  As root, add a cron job to be run by root</p>
<pre>crontab -e</pre>
<p>and put in the MRTG command (on one line)</p>
<pre>0,5,10,15,20,25,30,35,40,45,50,55 * * * * env LANG=C /usr/bin/mrtg
/etc/mrtg/mrtg.cfg --logging /var/log/mrtg.log &#038;> /dev/null</pre>
<p>piping the output to <code>/dev/null</code> so you don&#8217;t get an email with the command output every 5 minutes.</p>
<p>To view the graphs, point your browser to <code>http://localhost/mrtg</code>.  If you control multiple routers, you can setup MRTG to aggregate the data from all routers into a single web page, but that&#8217;s beyond the scope of this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gemberdesign.com/2010/01/26/monitor-network-usage-with-mrtg-and-dd-wrt/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Revert Commit in Subversion</title>
		<link>http://www.gemberdesign.com/2010/01/21/revert-commit-in-subversion/</link>
		<comments>http://www.gemberdesign.com/2010/01/21/revert-commit-in-subversion/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 05:44:28 +0000</pubDate>
		<dc:creator>agember</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.gemberdesign.com/?p=348</guid>
		<description><![CDATA[<br/>svn merge -r HEAD:[revision number before bad commit] .
svn commit
]]></description>
			<content:encoded><![CDATA[<br/><pre>svn merge -r HEAD:[revision number before bad commit] .
svn commit</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.gemberdesign.com/2010/01/21/revert-commit-in-subversion/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing Flash in 64-bit Fedora</title>
		<link>http://www.gemberdesign.com/2010/01/12/installing-flash-in-64-bit-fedora/</link>
		<comments>http://www.gemberdesign.com/2010/01/12/installing-flash-in-64-bit-fedora/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 05:56:18 +0000</pubDate>
		<dc:creator>agember</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[fedora 10]]></category>

		<category><![CDATA[fedora 11]]></category>

		<category><![CDATA[fedora 12]]></category>

		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.gemberdesign.com/?p=343</guid>
		<description><![CDATA[<br/>Every time I install 64-bit Fedora, I have issues with flash.  The instructions for the 32-bit wrapped version provided on the Fedora Project wiki always work wonderfully: http://fedoraproject.org/wiki/Flash#32_bit_wrapped_version.
]]></description>
			<content:encoded><![CDATA[<br/><p>Every time I install 64-bit Fedora, I have issues with flash.  The instructions for the 32-bit wrapped version provided on the Fedora Project wiki always work wonderfully: <a href="http://fedoraproject.org/wiki/Flash#32_bit_wrapped_version">http://fedoraproject.org/wiki/Flash#32_bit_wrapped_version</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gemberdesign.com/2010/01/12/installing-flash-in-64-bit-fedora/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing Proprietary Nvidia Drivers in Fedora 12</title>
		<link>http://www.gemberdesign.com/2010/01/12/installing-proprietary-nvidia-drivers-in-fedora-12/</link>
		<comments>http://www.gemberdesign.com/2010/01/12/installing-proprietary-nvidia-drivers-in-fedora-12/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 05:50:22 +0000</pubDate>
		<dc:creator>agember</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[fedora 12]]></category>

		<category><![CDATA[nvidia]]></category>

		<guid isPermaLink="false">http://www.gemberdesign.com/?p=334</guid>
		<description><![CDATA[<br/>I just upgraded to Fedora 12.  When I tried to install the proprietary Nvidia driver (version 190.53 for AMD64), the installation failed.  Some research turned up a partial solution to the issue: Fedora 12 Nvidia Driver Installation.  However, things still were not working as expected.  Linux reported that it could not [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I just upgraded to Fedora 12.  When I tried to install the proprietary Nvidia driver (version 190.53 for AMD64), the installation failed.  Some research turned up a partial solution to the issue: <a href="http://mariuszczyz.wordpress.com/2009/11/21/fedora-12-nvidia-driver-installation/">Fedora 12 Nvidia Driver Installation</a>.  However, things still were not working as expected.  Linux reported that it could not find the nvidia.ko kernel module for my kernel.  After further research, I determined it was necessary to pass the current kernel version to the Nvidia installer.  Below are the steps I followed to install the proprietary Nvidia drivers in Fedora 12:</p>
<ol>
<li>Add the RPM Fusion repositories
<pre>rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm</pre>
</li>
<li>Install the Nvidia driver from the RPM Fusion repositories
<pre>yum install kmod-nvidia</pre>
</li>
<li>Append to the kernel line in <code>/etc/grub.conf</code>
<pre>nouveau.modeset=0 vga=0×318</pre>
</li>
<li>Reboot</li>
<li>Download the proprietary Nvidia driver from <a href="http://www.nvidia.com/object/unix.html">http://www.nvidia.com/object/unix.html</a></li>
<li>Install the propriety Nvidia driver, including the kernel version with the <code>-k</code> option
<pre>./NVIDIA-Linux-x86_64-190.53-pkg2.run -k $(uname -r)</pre>
</li>
<li>Follow through the steps of the proprietary driver installation</li>
<li>Reboot</li>
<li>Configure your graphics as necessary using <code>nvidia-settings</code></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.gemberdesign.com/2010/01/12/installing-proprietary-nvidia-drivers-in-fedora-12/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Preventing Auto-Padding in C Structures</title>
		<link>http://www.gemberdesign.com/2010/01/05/preventing-auto-padding-in-c-structures/</link>
		<comments>http://www.gemberdesign.com/2010/01/05/preventing-auto-padding-in-c-structures/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 06:12:53 +0000</pubDate>
		<dc:creator>agember</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[c]]></category>

		<guid isPermaLink="false">http://www.gemberdesign.com/?p=329</guid>
		<description><![CDATA[<br/>Most networking applications written in C use structures to easily access the data in a packet header.  If all the pieces are appropriately word aligned (i.e. one or more sequential parts of the header total 4-bytes in length), then a regular C structure works just fine.  The standard IP, TCP, and UDP headers [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Most networking applications written in C use structures to easily access the data in a packet header.  If all the pieces are appropriately word aligned (i.e. one or more sequential parts of the header total 4-bytes in length), then a regular C structure works just fine.  The standard IP, TCP, and UDP headers are all word aligned.  </p>
<p>However, the custom packet header I was using for a project was not word aligned.  Using a regular structure without any special notation, caused the GNU C compiler (gcc) to automatically add padding to the structure to force one or more sequential variables to be 4-byte aligned.  But, the packet should not contain this extra padding.  The parts of the header need to be &#8220;packed.&#8221;</p>
<p>To force an entire structure to be packed, add
<pre>__attribute__((packed))</pre>
<p> at the end of the structure definition.  For example:</p>
<pre>struct mine {
short a;
int b;
}__attribute__((packed));</pre>
<p>It is important to note that not all architectures will allow &#8220;packed&#8221; structures.  Most RISC architectures require that variables be word-aligned, and generate a fault when memory is read across two words.  The x86 and x86_64 architectures allow non-word-aligned variables for backwards compatibility to earlier processor versions.  Wikipedia has more details on <a href="http://en.wikipedia.org/wiki/Data_structure_alignment">data structure alignment</a>.</p>
<p><i>(The original source of this solution is: <a href="http://tuxsudh.blogspot.com/2005/05/structure-packing-in-gcc.html">http://tuxsudh.blogspot.com/2005/05/structure-packing-in-gcc.html</a>)</i></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gemberdesign.com/2010/01/05/preventing-auto-padding-in-c-structures/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Christmas Extravaganza 2009</title>
		<link>http://www.gemberdesign.com/2010/01/04/christmas-extravaganza-2009/</link>
		<comments>http://www.gemberdesign.com/2010/01/04/christmas-extravaganza-2009/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 23:45:46 +0000</pubDate>
		<dc:creator>agember</dc:creator>
		
		<category><![CDATA[Christmas Lights]]></category>

		<guid isPermaLink="false">http://www.gemberdesign.com/?p=318</guid>
		<description><![CDATA[<br/>For the third year in a row, I created a &#8220;Christmas Extravaganza&#8221; in my apartment with Christmas lights synchronized to music.  This year included the addition of another light controller, giving me a total of 12 separate channels of lights.  The primary new song addition this year was one of my favorites, Sleighride, [...]]]></description>
			<content:encoded><![CDATA[<br/><p>For the third year in a row, I created a &#8220;Christmas Extravaganza&#8221; in my apartment with Christmas lights synchronized to music.  This year included the addition of another light controller, giving me a total of 12 separate channels of lights.  The primary new song addition this year was one of my favorites, <i>Sleighride</i>, written by Leroy Anderson and performed by Arthur Fielder and the Boston Pops.  As usual, the lights received rave reviews from friends and family who visited during the holiday season.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gemberdesign.com/2010/01/04/christmas-extravaganza-2009/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Run Commands on Startup in Fedora</title>
		<link>http://www.gemberdesign.com/2009/12/13/run-commands-on-startup-in-fedora/</link>
		<comments>http://www.gemberdesign.com/2009/12/13/run-commands-on-startup-in-fedora/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 04:57:32 +0000</pubDate>
		<dc:creator>agember</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[fedora 10]]></category>

		<guid isPermaLink="false">http://www.gemberdesign.com/?p=311</guid>
		<description><![CDATA[<br/>To have commands run at the end of the startup process, add the commands to the /etc/rc.local file.
]]></description>
			<content:encoded><![CDATA[<br/><p>To have commands run at the end of the startup process, add the commands to the <code>/etc/rc.local</code> file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gemberdesign.com/2009/12/13/run-commands-on-startup-in-fedora/feed/</wfw:commentRss>
		</item>
		<item>
		<title>LaTeX and BibTeX Search Path</title>
		<link>http://www.gemberdesign.com/2009/10/22/latex-and-bibtex-search-path/</link>
		<comments>http://www.gemberdesign.com/2009/10/22/latex-and-bibtex-search-path/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 20:04:26 +0000</pubDate>
		<dc:creator>agember</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[bash]]></category>

		<category><![CDATA[bibtex]]></category>

		<category><![CDATA[latex]]></category>

		<guid isPermaLink="false">http://www.gemberdesign.com/?p=291</guid>
		<description><![CDATA[<br/>I often write papers in LaTeX that use the ACM SIG Proceedings Template.  Previously, I would put a copy of the LaTeX style file (.sty) in every directory where I had a LaTeX document that used it.  Then I discovered I could set an environment variable to automatically have LaTeX search a path [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I often write papers in LaTeX that use the <a href="http://www.acm.org/sigs/publications/proceedings-templates">ACM SIG Proceedings Template</a>.  Previously, I would put a copy of the LaTeX style file (<i>.sty</i>) in every directory where I had a LaTeX document that used it.  Then I discovered I could set an environment variable to automatically have LaTeX search a path for a style file.</p>
<p>The <code>TEXINPUTS</code> environment variable works similar to the <code>PATH</code> environment variable: it is a list of paths where LaTeX should search for necessary class and style dependencies.  I created a folder in my home directory where I keep the ACM SIG Proceedings Template LaTeX style file.  I set the <code>TEXINPUTS</code> variable in my <code>.bashrc</code>.</p>
<p>There is also a <code>BIBINPUTS</code> environment variable to search for BibTeX files.  I have started putting all the references I use in a single file, to avoid having small BibTeX files all over the place.  I put my central BibTeX file in the same location as the LaTeX style file and set the <code>BIBINPUTS</code> variable in my <code>.bashrc</code>.</p>
<p>The following few lines in my <code>.bashrc</code> set the two environment variables:</p>
<pre>
# Include shared LaTeX classes and BibTeX files in path, if LaTeX folder exists
if [ -d "~/latex" ]; then
    export TEXINPUTS=".:~/latex/:"
    export BIBINPUTS=".:~/latex/:"
fi
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.gemberdesign.com/2009/10/22/latex-and-bibtex-search-path/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Permanently Change Hostname in Fedora</title>
		<link>http://www.gemberdesign.com/2009/10/20/permanently-change-hostname-in-fedora/</link>
		<comments>http://www.gemberdesign.com/2009/10/20/permanently-change-hostname-in-fedora/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 04:09:44 +0000</pubDate>
		<dc:creator>agember</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[fedora 10]]></category>

		<category><![CDATA[fedora 11]]></category>

		<guid isPermaLink="false">http://www.gemberdesign.com/?p=289</guid>
		<description><![CDATA[<br/>To permanently to change the hostname of a Fedora box, edit the file /etc/sysconfig/network.  (You need to be root to change this file.)  Modify the HOSTNAME line.
]]></description>
			<content:encoded><![CDATA[<br/><p>To permanently to change the hostname of a Fedora box, edit the file <code>/etc/sysconfig/network</code>.  (You need to be root to change this file.)  Modify the <code>HOSTNAME</code> line.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gemberdesign.com/2009/10/20/permanently-change-hostname-in-fedora/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
