<?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>compbrain.net &#187; Hacking</title>
	<atom:link href="http://compbrain.net/archives/category/hacking/feed" rel="self" type="application/rss+xml" />
	<link>http://compbrain.net</link>
	<description>A collection of occasional thoughts</description>
	<lastBuildDate>Sun, 14 Mar 2010 02:27:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>IPv6</title>
		<link>http://compbrain.net/archives/84</link>
		<comments>http://compbrain.net/archives/84#comments</comments>
		<pubDate>Thu, 11 Mar 2010 18:46:30 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[school]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://compbrain.net/?p=84</guid>
		<description><![CDATA[The past few weeks have been jam packed with academics and post-grad job hunting, so I&#8217;ve had little time to play around with technology. This week, in a few hours of time, I deployed IPv6 in my school research lab, the research lab webcam, and my colocated server (this blog). My domain name, compbrain.net, now [...]]]></description>
			<content:encoded><![CDATA[<p>The past few weeks have been jam packed with academics and post-grad job hunting, so I&#8217;ve had little time to play around with technology. This week, in a few hours of time, I deployed IPv6 in <a href="http://ipv6.crew.ccs.neu.edu/">my school research lab</a>, the <a href="http://ipv6.pitcam.ccs.neu.edu/">research lab webcam</a>, and my colocated server (<a href="http://ipv6.compbrain.net/">this blog</a>). My domain name, compbrain.net, now has both an A record and an AAAA record. I&#8217;ve noticed that machines with 6to4 IPv6 addresses tend to pick the IPv4 A record over the IPv6 alternative when both records are available.</p>
<p>Thanks to <a href="http://www.he.net">Hurricane Electric&#8217;s</a> <a href="http://tunnelbroker.net">IPv6 Tunnel Broker</a>, setting up these IPv6 networks was fairly painless. The only real exception here was in my dorm room, as our residential network filters inbound ICMP (inbound anything from the public net really) and prevents Hurricane Electric from allowing a tunnel to be created. To work around that, i&#8217;m using 6to4 on my <a href="http://www.dd-wrt.com/">DD-WRT</a> powered <a href="http://www.linksysbycisco.com/US/en/products/WRT310N">WRT310N</a>. The DD-WRT docs have a decent writeup on 6to4 available <a href="http://www.dd-wrt.com/wiki/index.php/IPv6#6to4_Setup">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://compbrain.net/archives/84/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fireplace Temperature Sensing</title>
		<link>http://compbrain.net/archives/78</link>
		<comments>http://compbrain.net/archives/78#comments</comments>
		<pubDate>Sat, 09 Jan 2010 19:47:35 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[onewire]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://compbrain.net/?p=78</guid>
		<description><![CDATA[Currently it is quite cold in New England, Google says about 28F in my home town. Our house has a wood burning stove in the basement that we like to keep burning so the room is about 70F. With the help of some python from Mikal Still, and some left over one-wire serial experiments, I [...]]]></description>
			<content:encoded><![CDATA[<p>Currently it is quite cold in New England, Google says about 28F in my home town. Our house has a wood burning stove in the basement that we like to keep burning so the room is about 70F. With the help of some python from <a href="http://www.stillhq.com/arduino/000004.html">Mikal Still</a>, and some left over one-wire serial experiments, I have a working prototype to keep an eye on the fireplace performance.</p>
<p><!--img src="http://fetchthat.appspot.com/tempgraph/" alt="Google Charts Temperature Graph" /--></p>
<p>A bit of Python polls <a href="http://owfs.org/index.php?page=owserver">owserver</a> using a SWIG module and  commits the read temperature value to a MySQL database. I munged some of Mikal&#8217;s <a href="http://www.stillhq.com/svn/trunk/homeautomation/server.py">graph server code</a> to simply post the chartserver URL to appengine so it could be hosted for the world to see. </p>
]]></content:encoded>
			<wfw:commentRss>http://compbrain.net/archives/78/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>qmmp</title>
		<link>http://compbrain.net/archives/51</link>
		<comments>http://compbrain.net/archives/51#comments</comments>
		<pubDate>Sun, 06 Dec 2009 17:58:56 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[qmmp]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[winamp]]></category>

		<guid isPermaLink="false">http://compbrain.net/?p=51</guid>
		<description><![CDATA[I&#8217;ve gotten to rather like qmmp. It offers a nice balance of simplicity and functionality, and has the added benefit of being modeled visually after my favourite windows based media player, winamp. To make this style more complete, i&#8217;ve added the official Winamp base skin.
The classic skin came from here. Just download the .zip and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve gotten to rather like <a href="http://code.google.com/p/qmmp/">qmmp</a>. It offers a nice balance of simplicity and functionality, and has the added benefit of being modeled visually after my favourite windows based media player, winamp. To make this style more complete, i&#8217;ve added the official Winamp base skin.<br />
<div id="attachment_52" class="wp-caption aligncenter" style="width: 310px"><img src="http://compbrain.net/wp-content/uploads/2009/12/Screenshot-300x160.png" alt="QMMP with Winamp base skin" title="QMMP Winamp Skin" width="300" height="160" class="size-medium wp-image-52" /><p class="wp-caption-text">QMMP with Winamp base skin</p></div></p>
<p>The classic skin came from <a href="http://wiki.skinconsortium.com/index.php?title=Winamp_Classic_Skins">here</a>. Just download the .zip and place it in ~/.qmmp/skins, open up the settings, make the switch, and you&#8217;re good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://compbrain.net/archives/51/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UPDATE: Cups class physical destination</title>
		<link>http://compbrain.net/archives/72</link>
		<comments>http://compbrain.net/archives/72#comments</comments>
		<pubDate>Sun, 06 Dec 2009 02:55:12 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[cups]]></category>

		<guid isPermaLink="false">http://compbrain.net/?p=72</guid>
		<description><![CDATA[Not that long ago I was searching for a way to find the printer a job sent to a CUPS class printed to. After poking around on the cups.org forums, Michael Sweet responded with information about the &#8220;job-actual-printer-uri&#8221; IPP attribute. 
The code is something like:

self.cups = cups.Connection()
def getActualPrinter(self, jobid):
  job_attributes = self.cups.getJobAttributes(jobid)
  return [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/archives/49">Not that long ago</a> I was searching for a way to find the printer a job sent to a CUPS class printed to. After poking around on the cups.org forums, Michael Sweet <a href="http://cups.org/newsgroups.php?s1+gcups.general+v17+T0+Qdestination">responded</a> with information about the &#8220;job-actual-printer-uri&#8221; IPP attribute. </p>
<p>The code is something like:<br />
<code><br />
self.cups = cups.Connection()</p>
<p>def getActualPrinter(self, jobid):<br />
  job_attributes = self.cups.getJobAttributes(jobid)<br />
  return job_attributes['job-actual-printer-uri']<br />
</code></p>
<p>Now with the added code, I&#8217;ve added physical destination to the CCIS print queue viewer. We have several queues that all point to the same printer (name-simplex, name-duplex, etc all point to name). The same code for identifying destination on print classes also works for these cases. </p>
<div id="attachment_74" class="wp-caption aligncenter" style="width: 310px"><a href="http://compbrain.net/wp-content/uploads/2009/12/Screenshot1.png"><img src="http://compbrain.net/wp-content/uploads/2009/12/Screenshot1-300x62.png" alt="Print Queue Viewer" title="Queue Viewer" width="300" height="62" class="size-medium wp-image-74" /></a><p class="wp-caption-text">CCIS Print Queue Viewer</p></div>
]]></content:encoded>
			<wfw:commentRss>http://compbrain.net/archives/72/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cups class physical destination</title>
		<link>http://compbrain.net/archives/49</link>
		<comments>http://compbrain.net/archives/49#comments</comments>
		<pubDate>Thu, 29 Oct 2009 02:24:22 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[printing]]></category>
		<category><![CDATA[school]]></category>

		<guid isPermaLink="false">http://compbrain.net/?p=49</guid>
		<description><![CDATA[Dear Lazyweb,
If one creates a print class in CUPS, is it possible to query for the destination printer within that class that a job was actually sent to? There seems to be very little documentation on this sort of thing&#8230;
]]></description>
			<content:encoded><![CDATA[<p>Dear Lazyweb,</p>
<p>If one creates a print class in CUPS, is it possible to query for the destination printer within that class that a job was actually sent to? There seems to be very little documentation on this sort of thing&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://compbrain.net/archives/49/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sharp LC32DA5U 720p with Intel Graphics</title>
		<link>http://compbrain.net/archives/44</link>
		<comments>http://compbrain.net/archives/44#comments</comments>
		<pubDate>Mon, 05 Oct 2009 16:22:07 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xbmc]]></category>
		<category><![CDATA[xrandr]]></category>

		<guid isPermaLink="false">http://compbrain.net/?p=44</guid>
		<description><![CDATA[We&#8217;ve got a Sharp LC32DA5U in our dorm connected to a homebuilt PC from Frys. Recently we upgraded to Ubuntu Karmic and the latest SVN releases of XBMC. In order to get a reasonable resolution out of the TV/PC combination we needed this little xrandr script to set the resolution before xbmc starts up. The [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve got a Sharp LC32DA5U in our dorm connected to a homebuilt PC from Frys. Recently we upgraded to Ubuntu Karmic and the latest SVN releases of XBMC. In order to get a reasonable resolution out of the TV/PC combination we needed this little xrandr script to set the resolution before xbmc starts up. The modelines for this TV are not easy to track down, so here they are in script form for future reference.<br />
<code><br />
#!/bin/bash<br />
# This one leaves a vertical stripe on the left<br />
#MODELINE="74.250 1280 1320 1376 1650 720 722 728 750 +HSync +VSync"<br />
# This one seems to actually work<br />
MODELINE="74.250 1280 1390 1430 1650 720 725 730 750 +HSync +VSync"<br />
xrandr --newmode 1280x720 $MODELINE<br />
xrandr --addmode DVI1 1280x720<br />
xrandr --output DVI1 --mode 1280x720<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://compbrain.net/archives/44/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gflags for Ubuntu</title>
		<link>http://compbrain.net/archives/28</link>
		<comments>http://compbrain.net/archives/28#comments</comments>
		<pubDate>Wed, 26 Aug 2009 06:09:42 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://compbrain.net/?p=28</guid>
		<description><![CDATA[If you are looking for the excellent Google gflags python module as an Ubuntu package, look no farther. It is available from my PPA: https://launchpad.net/~compbrain/+archive/ppa
A quick how-to install is included below.

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5C2D9CD
$ sudo sh -c 'echo "deb http://ppa.launchpad.net/compbrain/ppa/ubuntu jaunty main" > /etc/apt/sources.list.d/compbrainppa.list'
$ sudo apt-get update &#038;&#038; sudo apt-get install [...]]]></description>
			<content:encoded><![CDATA[<p>If you are looking for the excellent <a href="http://code.google.com/p/google-gflags/">Google gflags</a> python module as an Ubuntu package, look no farther. It is available from my PPA: <a href="https://launchpad.net/~compbrain/+archive/ppa">https://launchpad.net/~compbrain/+archive/ppa</a></p>
<p>A quick how-to install is included below.</p>
<pre>
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5C2D9CD
$ sudo sh -c 'echo "deb http://ppa.launchpad.net/compbrain/ppa/ubuntu jaunty main" > /etc/apt/sources.list.d/compbrainppa.list'
$ sudo apt-get update &#038;&#038; sudo apt-get install python-gflags
</pre>
]]></content:encoded>
			<wfw:commentRss>http://compbrain.net/archives/28/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx PHP5 Fastcgi</title>
		<link>http://compbrain.net/archives/24</link>
		<comments>http://compbrain.net/archives/24#comments</comments>
		<pubDate>Fri, 31 Jul 2009 03:45:45 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://compbrain.net/?p=24</guid>
		<description><![CDATA[Quick note for myself and anyone else looking to replace lighttpd or apache2 with nginx for serving php (ala wordpress):
http://frankkumro.com/2009/01/03/ubuntu-nginx-and-php5/
]]></description>
			<content:encoded><![CDATA[<p>Quick note for myself and anyone else looking to replace lighttpd or apache2 with nginx for serving php (ala wordpress):<br />
<a href="http://frankkumro.com/2009/01/03/ubuntu-nginx-and-php5/">http://frankkumro.com/2009/01/03/ubuntu-nginx-and-php5/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://compbrain.net/archives/24/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix a Broken AVI Seek Table/Index</title>
		<link>http://compbrain.net/archives/18</link>
		<comments>http://compbrain.net/archives/18#comments</comments>
		<pubDate>Wed, 29 Jul 2009 16:21:42 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[avi]]></category>
		<category><![CDATA[fixit]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://compbrain.net/?p=18</guid>
		<description><![CDATA[Recently I was given a video by a friend in AVI format that caused trouble when playing it on my Neuros OSD. When I watched the video on my laptop with mplayer, everything was fine, but when you tried to seek with the Neuros it reported a video 16 minutes in length instead of the [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was given a video by a friend in AVI format that caused trouble when playing it on my <a title="Neuros OSD" href="http://www.neurostechnology.com/osd">Neuros OSD</a>. When I watched the video on my laptop with mplayer, everything was fine, but when you tried to seek with the Neuros it reported a video 16 minutes in length instead of the full hour it should have been. Poking around the internet I found the following solution: Use mencoder to rebuild the AVI index, and write it out to a new copy of the video.</p>
<p><code><br />
$ mencoder -forceidx input.avi -o output.avi -oac copy -ovc copy<br />
$ mv output.avi input.avi<br />
</code></p>
<p>After that, the new input.avi should be playable, and seeking should work properly again.</p>
]]></content:encoded>
			<wfw:commentRss>http://compbrain.net/archives/18/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nginx redirector</title>
		<link>http://compbrain.net/archives/8</link>
		<comments>http://compbrain.net/archives/8#comments</comments>
		<pubDate>Wed, 29 Jul 2009 02:16:57 +0000</pubDate>
		<dc:creator>Will</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[school]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://compbrain.net/?p=8</guid>
		<description><![CDATA[Today at school we finally fixed a nit that had been bothering me since about the time I arrived. For historical reasons our college mail server holds the A record for the college domain name. For that reason, attempts to access http://ccs.neu.edu instead of http://www.ccs.neu.edu ended up displaying an error page.
Since the primary purpose of [...]]]></description>
			<content:encoded><![CDATA[<p>Today at school we finally fixed a nit that had been bothering me since about the time I arrived. For historical reasons our college mail server holds the A record for the college domain name. For that reason, attempts to access http://ccs.neu.edu instead of http://www.ccs.neu.edu ended up displaying an error page.</p>
<p>Since the primary purpose of the server in question is to handle e-mail, no webserver was installed. After stumbling upon<a href="http://aleksandarsavic.com/nginx-redirect-wwwexamplecom-requests-to-examplecom-or-vice-versa/"> http://aleksandarsavic.com/nginx-redirect-wwwexamplecom-requests-to-examplecom-or-vice-versa/</a> I whipped up a 6 line config for <a href="http://www.nginx.org">nginx</a>, and deployed it on the machine. nginx is lightweight enough to be installed specifically for this purpose without making a drastic impact on the machines other tasks.</p>
<p>Here is our config:<code><br />
## Redirector for ccs.neu.edu<br />
server {<br />
listen   80;<br />
server_name  ccs.neu.edu;<br />
access_log  /var/log/nginx/access.log;<br />
rewrite ^(.*) http://www.ccs.neu.edu$1 permanent;<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://compbrain.net/archives/8/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
