<?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>Nothing Fancy</title>
	<atom:link href="http://dhiltonp.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://dhiltonp.com/blog</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sun, 13 Feb 2011 21:41:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Basic ZFS Snapshots</title>
		<link>http://dhiltonp.com/blog/?p=713</link>
		<comments>http://dhiltonp.com/blog/?p=713#comments</comments>
		<pubDate>Wed, 02 Feb 2011 08:53:40 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://dhiltonp.com/blog/?p=713</guid>
		<description><![CDATA[I&#8217;ve recently upgraded my nas, and I&#8217;ve decided to add snapshots to reduce the probability that my stupid mistakes cause data loss. I think that daily snapshots should be good enough for me. I&#8217;m aware of various options that exist &#8230;<p class="read-more"><a href="http://dhiltonp.com/blog/?p=713">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently upgraded my nas, and I&#8217;ve decided to add snapshots to reduce the probability that my stupid mistakes cause data loss.  I think that daily snapshots should be good enough for me.  I&#8217;m aware of various options that exist to create snapshots, but I decided to roll my own.</p>
<p>Here&#8217;s the basic code for creating a snapshot on the pool:<br />
<span id="more-713"></span></p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">subprocess</span>
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">datetime</span> <span style="color: #ff7700;font-weight:bold;">import</span> date
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> take_snapshot<span style="color: black;">&#40;</span>pool, snapshot_name<span style="color: black;">&#41;</span>:
    command = <span style="color: #483d8b;">&quot;zfs snapshot -r %s@%s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>pool, snapshot_name<span style="color: black;">&#41;</span>
    p = <span style="color: #dc143c;">subprocess</span>.<span style="color: black;">Popen</span><span style="color: black;">&#40;</span>command.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">' '</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    p.<span style="color: black;">wait</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> p.<span style="color: black;">returncode</span>:
        <span style="color: #ff7700;font-weight:bold;">raise</span> <span style="color: #008000;">Exception</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Error executing '%s': %d&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>command, p.<span style="color: black;">returncode</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">try</span>:
    snapshot = date.<span style="color: black;">today</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    snapshot_name = <span style="color: #483d8b;">&quot;%d-%02d-%02d&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>snapshot.<span style="color: black;">year</span>, snapshot.<span style="color: black;">month</span>, snapshot.<span style="color: black;">day</span><span style="color: black;">&#41;</span>
    take_snapshot<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;vault2&quot;</span>, snapshot_name<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">except</span>:
    exit<span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span></pre></div></div>

<p>This is coupled with this crontab entry:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">5</span>  <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span>zfs-snap <span style="color: #000000; font-weight: bold;">&amp;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>zfs-snap.output \
 <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>zfs-snap.output <span style="color: #000000; font-weight: bold;">|</span> mailx <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;zfs-snap error&quot;</span> me<span style="color: #000000; font-weight: bold;">@</span>example.com</pre></div></div>

<p>If you want a full-featured solution, you might take a look at <a href="http://mij.oltrelinux.com/devel/zfsbackup/">zfsbackup</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dhiltonp.com/blog/?feed=rss2&#038;p=713</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://dhiltonp.com/blog/?p=1</link>
		<comments>http://dhiltonp.com/blog/?p=1#comments</comments>
		<pubDate>Tue, 26 Oct 2010 00:51:09 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dhiltonp.com/blog/?p=1</guid>
		<description><![CDATA[Just migrated to a self-hosted  site &#8211; waiting for dns propagation&#8230; I also am splitting my blog &#8211; music posts will be at thedavidofmusic.com Export/Import Export was very straightforward &#8211; I just went to Tools-&#62;export on my old site, but &#8230;<p class="read-more"><a href="http://dhiltonp.com/blog/?p=1">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Just migrated to a self-hosted  site &#8211; waiting for dns propagation&#8230;</p>
<p>I also am splitting my blog &#8211; music posts will be at <a href="http://thedavidofmusic.com/blog">thedavidofmusic.com</a></p>
<h3>Export/Import</h3>
<p>Export was very straightforward &#8211; I just went to Tools-&gt;export on my old site, but the import was more complicated.</p>
<p>First, I had to install the import plugin, then when I went to do the import, wordpress complained about permissions.  I set the wp-content/uploads folder to 777 temporarily, at which point the import worked.</p>
<p>I then exported the import, and found a few links that had not been migrated (all of which were links within the regular text in posts), which I manually fixed, then re-imported.</p>
<p>I also went through and modified posts containing code to use WP-Syntax instead of the old code blocks.</p>
]]></content:encoded>
			<wfw:commentRss>http://dhiltonp.com/blog/?feed=rss2&#038;p=1</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Closing our Generation&#039;s Frontier</title>
		<link>http://dhiltonp.com/blog/?p=578</link>
		<comments>http://dhiltonp.com/blog/?p=578#comments</comments>
		<pubDate>Wed, 29 Sep 2010 17:32:04 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://dhiltonp.com/blog/?p=578</guid>
		<description><![CDATA[In 1994 President Clinton passed and signed the Communications Assistance to Law Enforcement Act, requiring telecommunications companies (carriers and providers only) to have the ability to intercept commumications and allow access to this data at the request of the government &#8230;<p class="read-more"><a href="http://dhiltonp.com/blog/?p=578">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>In 1994 President Clinton passed and signed the Communications Assistance to Law Enforcement Act, requiring telecommunications companies (carriers and providers only) to have the ability to intercept commumications and allow access to this data at the request of the government &#8211; in other words, <a href="http://www.pbs.org/newshour/bb/government_programs/july-dec10/wiretap_09-27.html">provide mechanisms for government wiretapping</a>.</p>
<p>
Since then, technologies have advanced and the structure of the internet has progressed.  Many services provide encrypted peer to peer chat, which is inherently resistive to wiretapping.</p>
<p>
<a href="http://www.nytimes.com/2010/09/27/us/27wiretap.html?_r=1">The Obama administration is drafting a bill requiring that all communications services be capable of complying with wiretap orders</a>.  Setting aside privacy implications (especially in the context of the Bush administration&#8217;s warrantless wiretapping), the added burden on communications services will slow innovation and herald an era of unnecessary beaurocratic regulation on what is our generation&#8217;s frontier.</p>
]]></content:encoded>
			<wfw:commentRss>http://dhiltonp.com/blog/?feed=rss2&#038;p=578</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using python&#8217;s imp to dynamically load modules</title>
		<link>http://dhiltonp.com/blog/?p=564</link>
		<comments>http://dhiltonp.com/blog/?p=564#comments</comments>
		<pubDate>Tue, 14 Sep 2010 10:40:54 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://dhiltonp.com/blog/?p=564</guid>
		<description><![CDATA[Python&#8217;s imp module is a bit of a bear, but thanks to the groundwork in this thread, I got it straitened out. Here&#8217;s some lightly tested sample code. import imp # the path variable is optional, but possibly necessary tmp &#8230;<p class="read-more"><a href="http://dhiltonp.com/blog/?p=564">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Python&#8217;s imp module is a bit of a bear, but thanks to the groundwork in <a href="http://mail.python.org/pipermail/python-list/2002-September/164392.html">this thread</a>, I got it straitened out.  Here&#8217;s some lightly tested sample code.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">imp</span>
<span style="color: #808080; font-style: italic;"># the path variable is optional, but possibly necessary</span>
    tmp = <span style="color: #dc143c;">imp</span>.<span style="color: black;">find_module</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;module&quot;</span>, <span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;relative/path&quot;</span>, <span style="color: #483d8b;">&quot;/absolute/path&quot;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">try</span>:
<span style="color: #808080; font-style: italic;"># the names of the two constants do not seem to matter</span>
    module = <span style="color: #dc143c;">imp</span>.<span style="color: black;">load_module</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;name&quot;</span>, tmp<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>, <span style="color: #483d8b;">&quot;path&quot;</span>, tmp<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">finally</span>:
    tmp<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    module.<span style="color: black;">thing</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://dhiltonp.com/blog/?feed=rss2&#038;p=564</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python 2.6+MySQL for CentOS/RedHat/Fedora</title>
		<link>http://dhiltonp.com/blog/?p=512</link>
		<comments>http://dhiltonp.com/blog/?p=512#comments</comments>
		<pubDate>Mon, 26 Apr 2010 22:23:22 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://dhiltonp.com/blog/?p=512</guid>
		<description><![CDATA[This is how I created a tarball that, when extracted, gives a fully functioning install of python 2.6 w/ mysql &#8211; while leaving all of the original binaries in place.  The destination of the tarball must be decided at compile &#8230;<p class="read-more"><a href="http://dhiltonp.com/blog/?p=512">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>This is how I created a tarball that, when extracted, gives a fully functioning install of python 2.6 w/ mysql &#8211; while leaving all of the original binaries in place.  The destination of the tarball must be decided at compile time.  You may need to recreate the tarball if any of the software packages this is based on (the *-devel packages found below) are upgraded.</p>
<p>The creation process will modify the build server, though the resulting tarball will be completely clean (can be untarred into any similar server with identical software versions and file locations without modification).   You may want to wipe your environment after successfully testing deployment.<br />
<span id="more-512"></span><br />
<span style="font-size:12pt;"><strong>Creation</strong></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CDIR</span>=<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>python-<span style="color: #000000;">2.6</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> py-tmp <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> py-tmp
<span style="color: #666666; font-style: italic;"># get needed libraries</span>
<span style="color: #666666; font-style: italic;"># if any of these fail to install for whatever reason, you will need to grab the source for the closest available version to what is running on your system, and install it manually into its standard location (specific examples found below).</span>
yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">wget</span> zlib-devel openssl-devel readline-devel mysql-devel gcc-c++
&nbsp;
<span style="color: #666666; font-style: italic;"># now for Python itself</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.python.org<span style="color: #000000; font-weight: bold;">/</span>ftp<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>get your own updated <span style="color: #c20cb9; font-weight: bold;">link</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #c20cb9; font-weight: bold;">tar</span> xf Python-<span style="color: #000000;">2.6</span>.<span style="color: #000000; font-weight: bold;">*</span>.tgz
<span style="color: #7a0874; font-weight: bold;">cd</span> Python-<span style="color: #000000;">2.6</span>.<span style="color: #000000; font-weight: bold;">*</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #007800;">$CDIR</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
&nbsp;
<span style="color: #666666; font-style: italic;"># install setuptools (easy_install)</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>pypi.python.org<span style="color: #000000; font-weight: bold;">/</span>packages<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">2.6</span><span style="color: #000000; font-weight: bold;">/</span>s<span style="color: #000000; font-weight: bold;">/</span>setuptools<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>get your own <span style="color: #c20cb9; font-weight: bold;">link</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #007800;">PREV_PATH</span>=<span style="color: #007800;">$PATH</span>
<span style="color: #007800;">PATH</span>=<span style="color: #007800;">$CDIR</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PATH</span>
<span style="color: #c20cb9; font-weight: bold;">sh</span> setuptools-<span style="color: #000000; font-weight: bold;">*</span>.egg
<span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PREV_PATH</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># install the coveted mysql-python package</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>downloads.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>project<span style="color: #000000; font-weight: bold;">/</span>mysql-python<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>get your own <span style="color: #c20cb9; font-weight: bold;">link</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #c20cb9; font-weight: bold;">tar</span> xf MySQL-python-<span style="color: #000000; font-weight: bold;">*</span>.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> MySQL-python-<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #007800;">$CDIR</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>python setup.py build
<span style="color: #007800;">$CDIR</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-czf</span> python-<span style="color: #000000;">2.6</span>.tgz <span style="color: #007800;">$CDIR</span></pre></div></div>

<p><span style="font-size:12pt;"><strong>Deployment</strong></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> python-<span style="color: #000000;">2.6</span>.tgz <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>To use this python binary, you can modify your $PATH, adding $CDIR/bin before /usr/bin or wherever your other version is installed.  To make a python script use this version, either specify the full path on the scripts #! line, or run this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$CDIR</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>python script</pre></div></div>

<p><span style="font-size:12pt;"><strong>Issues</strong></span><br />
If any of the libraries fail to install (possibly due to crufty servers), you will need to install them manually to their standard location.  Here are some examples of what I&#8217;ve had to do.  Be sure to grab the same version of the software as is already installed.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.zlib.net<span style="color: #000000; font-weight: bold;">/</span>zlib-1.2.3.tar.bz2
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xjf</span> zlib-1.2.3.tar.bz2
<span style="color: #7a0874; font-weight: bold;">cd</span> zlib-1.2.3
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.openssl.org<span style="color: #000000; font-weight: bold;">/</span>source<span style="color: #000000; font-weight: bold;">/</span>openssl-0.9.7a.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzf</span> openssl-0.9.7a.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> openssl-0.9.7a
.<span style="color: #000000; font-weight: bold;">/</span>config
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..</pre></div></div>

<p>Here is something quite important: if you cannot install mysql-devel, I recommend just grabbing the devel rpm from mysql.com.  Be sure that the mysql version matches as closely as possible to that installed in your system (the version should be spit out when you try to run yum install mysql-devel).  Also, the glibc version must match your system <strong><em>exactly</em></strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>dev.mysql.com<span style="color: #000000; font-weight: bold;">/</span>get<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>MySQL-<span style="color: #000000;">4.1</span><span style="color: #000000; font-weight: bold;">/</span>MySQL-devel-4.1.22-<span style="color: #000000;">0</span>.glibc23.i386.rpm<span style="color: #000000; font-weight: bold;">/</span>from<span style="color: #000000; font-weight: bold;">/</span>http:<span style="color: #000000; font-weight: bold;">//</span>mirror.services.wisc.edu<span style="color: #000000; font-weight: bold;">/</span>mysql<span style="color: #000000; font-weight: bold;">/</span>
yum <span style="color: #c20cb9; font-weight: bold;">install</span> Mysql-devel<span style="color: #000000; font-weight: bold;">*</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://dhiltonp.com/blog/?feed=rss2&#038;p=512</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Clojure: Getting Started in 5 Steps (Intellij+La Clojure)</title>
		<link>http://dhiltonp.com/blog/?p=501</link>
		<comments>http://dhiltonp.com/blog/?p=501#comments</comments>
		<pubDate>Tue, 15 Dec 2009 13:02:16 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[intellij]]></category>
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://dhiltonp.com/blog/?p=501</guid>
		<description><![CDATA[If emacs isn&#8217;t your thing, or you prefer a modern IDE (read: GUI) for development, I recommend IntelliJ IDEA.  An open-source, community edition was just released, and it is definitely worth giving a spin &#8211; I&#8217;ve been a fan since &#8230;<p class="read-more"><a href="http://dhiltonp.com/blog/?p=501">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>If emacs isn&#8217;t your thing, or you prefer a modern IDE (read: GUI) for development, I recommend <a href="http://www.jetbrains.com/idea/index.html">IntelliJ IDEA</a>.  An open-source, community edition was just released, and it is <em>definitely</em> worth giving a spin &#8211; I&#8217;ve been a fan since I <a href="http://dhiltonp.com/blog/?p=9">first tried it</a> a couple of years ago.</p>
<p>Being at a university where the first language taught is Java, but transferring from an institution where C++ was dominant was a bit of a pain.  IntelliJ got me through my Java-based courses.  I tried and managed with <a href="http://www.eclipse.org/">Eclipse</a> and <a href="http://netbeans.org/">NetBeans</a> for the first semester &#8211; but we were given a significant initial framework.</p>
<p>Enough of my praise for IntelliJ.  Let&#8217;s get started!<br />
<span id="more-501"></span></p>
<ul>
<li>1. <a href="http://www.jetbrains.com/idea/download/">Download IntelliJ</a></li>
</ul>
<ul>
<li>2. Install IntelliJ</li>
</ul>
<ul>
<li>3. Let IntelliJ know where the JDK is (Linux only)</li>
</ul>
<p>Assuming that a JDK is already installed, run</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">updatedb</span>; <span style="color: #c20cb9; font-weight: bold;">locate</span> jdk <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> jre$</pre></div></div>

<p>
Do something like the following based on those results</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;export JDK_HOME=<span style="color: #000099; font-weight: bold;">\&quot;</span>/usr/lib/jvm/java-6-openjdk/jre<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bashrc</pre></div></div>

</p>
<ul>
<li>4. Install &#8216;La Clojure&#8217; Plugin</li>
</ul>
<p>Run IntelliJ (linux:bin/idea.sh), open the plugin manager, and search for &#8216;la clojure&#8217;.   Select it for installation, and click OK.</p>
<ul>
<li>5. Create a Clojure Project</li>
</ul>
<p>Click &#8216;Create New Project&#8217;, select &#8216;Create project from scratch&#8217;, give it a descriptive name, and select &#8216;Clojure&#8217; as a desired technology.</p>
<ul>
<li>Start a REPL!</li>
</ul>
<p>Tools -&gt; Clojure REPL Actions -&gt; Add new Clojure REPL</p>
]]></content:encoded>
			<wfw:commentRss>http://dhiltonp.com/blog/?feed=rss2&#038;p=501</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected: A (fairly vivid and surreal) Dream</title>
		<link>http://dhiltonp.com/blog/?p=470</link>
		<comments>http://dhiltonp.com/blog/?p=470#comments</comments>
		<pubDate>Fri, 25 Sep 2009 11:58:22 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dhiltonp.com/blog/?p=470</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://dhiltonp.com/blog/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-470">Password:<br />
<input name="post_password" id="pwbox-470" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://dhiltonp.com/blog/?feed=rss2&#038;p=470</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clojure: Getting Started in 5 Simple Steps (Emacs+Slime)</title>
		<link>http://dhiltonp.com/blog/?p=421</link>
		<comments>http://dhiltonp.com/blog/?p=421#comments</comments>
		<pubDate>Thu, 09 Jul 2009 02:06:07 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[elpa]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://dhiltonp.com/blog/?p=421</guid>
		<description><![CDATA[More than anything, this post succinctly describes how to get up and running with Clojure + Emacs. Virtually no thinking is required if you are working from a default install of Ubuntu, and not much more is required for any &#8230;<p class="read-more"><a href="http://dhiltonp.com/blog/?p=421">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>More than anything, this post succinctly describes how to get up and running with <a href="http://clojure.org/">Clojure</a> + Emacs.  Virtually no thinking is required if you are working from a default install of Ubuntu, and not much more is required for any linux distro &#8211; you just need to know how to use your package manager.</p>
<p>Furthermore, if any of these steps would cause you trouble (deleting .emacs* comes to mind), you probably already know how to handle it.<br />
<span id="more-421"></span></p>
<li>1. Install emacs, git, ant, and a java jdk (distro specific).</li>
<p>Ubuntu:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> emacs git-core ant openjdk-<span style="color: #000000;">6</span>-jdk</pre></div></div>

<li>2. Install <a href="http://tromey.com/elpa/">Emacs Lisp Package Archive (ELPA)</a></li>
<p>- Evaluate the <a href="http://tromey.com/elpa/install.html">install code</a><br />
- OR evaluate at the cli (<strong>warning</strong>: rm -Rf ~/.emacs* might not do what you want)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-Rf</span> ~<span style="color: #000000; font-weight: bold;">/</span>.emacs<span style="color: #000000; font-weight: bold;">*</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> clone <span style="color: #c20cb9; font-weight: bold;">git</span>:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>technomancy<span style="color: #000000; font-weight: bold;">/</span>emacs-starter-kit.git ~<span style="color: #000000; font-weight: bold;">/</span>.emacs.d</pre></div></div>

<li>3. Use ELPA to install clojure-mode</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">emacs</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="emacs" style="font-family:monospace;">M-x package-install</pre></div></div>

<p> (M-x corresponds to ALT-x in emacs)</p>
<li>4. Install clojure (using a handy tool in clojure-mode)</li>

<div class="wp_syntax"><div class="code"><pre class="emacs" style="font-family:monospace;">M-x clojure-install</pre></div></div>

<li>5. Do the following to allow slime to start once clojure-mode is activated</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;(eval-after-load 'clojure-mode '(clojure-slime-config))&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.emacs.d<span style="color: #000000; font-weight: bold;">/</span>user<span style="color: #ff0000;">'name.el</span></pre></div></div>

<li>Run Clojure!</li>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">emacs foo.clj</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="emacs" style="font-family:monospace;">M-x slime</pre></div></div>

<p><strong>Other notes:</strong><br />
- For cli setup, see <a href="http://riddell.us/blog/">Tim Riddell&#8217;s tutorials</a> &#8211; I recommend the bash startup alias, in particular.<br />
- For a longer explanation, see <a href="http://technomancy.us/126">Phil Hagelberg&#8217;s post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dhiltonp.com/blog/?feed=rss2&#038;p=421</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A few new things (to me)</title>
		<link>http://dhiltonp.com/blog/?p=416</link>
		<comments>http://dhiltonp.com/blog/?p=416#comments</comments>
		<pubDate>Wed, 08 Jul 2009 21:10:09 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dhiltonp.com/blog/?p=416</guid>
		<description><![CDATA[Emacs starter kit: improves advanced configuration of emacs OpenDNS: basic web filtering Gizmo: make and receive online calls Google Voice: very nifty phone enhancements (the above two can be combined to give free skype-in/out type service)]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/technomancy/emacs-starter-kit/tree/master">Emacs starter kit</a>:<br />
improves advanced configuration of emacs</p>
<p><a href="http://www.opendns.com/">OpenDNS</a>:<br />
basic web filtering</p>
<p><a href="http://gizmo5.com/pc/">Gizmo</a>:<br />
make and receive online calls</p>
<p><a href="https://www.google.com/voice">Google Voice</a>:<br />
very nifty phone enhancements</p>
<p>(the above two can be combined to give free skype-in/out type service)</p>
]]></content:encoded>
			<wfw:commentRss>http://dhiltonp.com/blog/?feed=rss2&#038;p=416</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wiping Data (or Secure Deletion) from Linux</title>
		<link>http://dhiltonp.com/blog/?p=397</link>
		<comments>http://dhiltonp.com/blog/?p=397#comments</comments>
		<pubDate>Sat, 16 May 2009 02:44:25 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Maintenance]]></category>
		<category><![CDATA[barracuda]]></category>
		<category><![CDATA[seagate]]></category>
		<category><![CDATA[seagate chirping]]></category>
		<category><![CDATA[secure erase]]></category>
		<category><![CDATA[wipe]]></category>

		<guid isPermaLink="false">http://dhiltonp.com/blog/?p=397</guid>
		<description><![CDATA[WARNING: This blog post was posted at approximately 3 AM. As a result, it is not very well defined. Had I been thinking, I would have been more to the point. As it is, I may repost more info about &#8230;<p class="read-more"><a href="http://dhiltonp.com/blog/?p=397">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>WARNING: This blog post was posted at approximately 3 AM.  As a result, it is not very well defined.  Had I been thinking, I would have been more to the point.  As it is, I may repost more info about the Seagate HD when it is successfully RMAd.</p>
<p>One of my hard drives is making sounds that indicate that it could fail at any time; In order to prevent any losses, I ordered a <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822148433">new drive</a>.  I spent a while copying all of my data from one drive to the next (I generally have 2 drives in my computer at a given time; the drive closer to failure contains data that is broadly available online, so losses should be minimal if anything happens, while my personal data is semiannually burned to disc and regularly synced to my brother&#8217;s computer).  At any rate, I finished the migration, and started updating my install on the new drive.</p>
<p>The next morning I got up and found that my computer was making a horribly disturbing sound.  The update process had blocked on a prompt for my acceptance of a license agreement.<span id="more-397"></span>  Gkrellm told me that data was not being transfered, so the sound was simply the spinning of the platters.  I ran &#8220;hdparm -y /dev/olddrive&#8221; and &#8220;hdparm -C /dev/olddrive&#8221; to stop my old drive to make sure it wasn&#8217;t responsible for the sound, and then recorded the sound for documentation purposes.</p>
<p>I have a pretty good recording setup, so <a href="http://www.filedropper.com/seagatechirp">the recording</a> is probably about as good quality as is practical &#8211; or even better.  I heard it as soon as I entered the room, so it was fairly loud &#8211; but my system is also fairly quiet.  The sound at the very end is the sound of me clicking a (fairly loud) mouse from a foot away from the mic &#8211; which is about the same distance as the mic was from the disk.</p>
<p>At any rate, I&#8217;m in the habit of keeping multiple copies of my data around until I trust my drives and I need more space, so I was able to undo a few changes I had made to my older drive to make it usable as the master &#8211; so I should have a marginally useful system until the real replacement is mailed to me.</p>
<p><strong>Wiping the Disk for RMA</strong><br />
As I had put nearly all of my data on the new drive, I want to wipe it before returning it &#8211; but I also want to return the drive asap.  I had always used <a href="http://www.dban.org/">DBAN</a> to wipe drives, but I figured I should be able to do it from my normal install.</p>
<p>I first found <a href="http://linux.about.com/library/cmd/blcmdl1_shred.htm">shred</a>, which seemed like it should be quite effective (and useful for shredding specific files, depending on the file system).  It puts random data over the drive in several passes, and it optionally zeros the drive on the final pass.  Unfortunately, I noticed that it was taking a long time &#8211; it uses data from /dev/urandom, which means that the random number generator was cranking like mad.  To sum it up, the bottleneck was the CPU, not the hard disk.</p>
<p>I next tried dding data from /dev/urandom over the file (this was before I completely understood how shred works).  Not surprisingly, it was CPU bound as well (I&#8217;m guessing that disk throughput was at about 10% of its capacity).</p>
<p>Finally, I found <a href="http://wipe.sourceforge.net/">wipe</a>, which uses special patterns, much like DBAN, as opposed to pseudorandom data like shred.  As a result, the data is probably slightly less securely wiped (although it should also be more consistent in its results), but the bottleneck is now the disk.  I expect that it will take 3-4 hours per pass, as opposed to 30-40 hours per pass.</p>
<p><strong>New Seagate Barracudas (.12)</strong><br />
This reminds me, the new barracudas seem to be getting great throughput, at least &#8211; though I can&#8217;t speak for their reliability.  However, I should mention that the packing job was not as good as it could have been, so my issues should probably not be blamed on Seagate, at least not in their entirety.  I bought the OEM drive from Newegg, but the bubble wrap they used has perforations so it can be torn easily.  Unfortunately, one of the perforated lines lined up perfectly with the edge of the disk &#8211; not a good thing, as the perforations pop the bubbles along the line.</p>
<p>I actually took the bubble wrap and tested it to see how much room for error they had in packing.  As it turns out, they have about 1.25 inches of give on either side before one of the corners will not be protected by the bubble wrap.  It&#8217;s enough allowance so that it&#8217;s not generally a problem, but just the same, it may easily have been a factor in my experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://dhiltonp.com/blog/?feed=rss2&#038;p=397</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

