<?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>cole.mickens</title>
	<atom:link href="http://cole.mickens.us/feed/" rel="self" type="application/rss+xml" />
	<link>http://cole.mickens.us</link>
	<description></description>
	<lastBuildDate>Sun, 29 Aug 2010 07:13:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Xbox 360 Modification</title>
		<link>http://cole.mickens.us/2010/08/29/xbox-360-modification/</link>
		<comments>http://cole.mickens.us/2010/08/29/xbox-360-modification/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 07:13:19 +0000</pubDate>
		<dc:creator>Cole Mickens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cole.mickens.us/?p=129</guid>
		<description><![CDATA[Well Droid, you take crummy pictures. Sadly, you&#8217;re all I have.]]></description>
			<content:encoded><![CDATA[
<a href='http://cole.mickens.us/2010/08/29/xbox-360-modification/img_20100829_011046/' title='Jtag/SMC Trigger'><img width="150" height="112" src="http://cole.mickens.us/wp-content/uploads/2010/08/IMG_20100829_011046.jpg" class="attachment-thumbnail" alt="Jtag/SMC Trigger" title="Jtag/SMC Trigger" /></a>
<a href='http://cole.mickens.us/2010/08/29/xbox-360-modification/img_20100829_011134/' title='JTAG Solder Points'><img width="150" height="112" src="http://cole.mickens.us/wp-content/uploads/2010/08/IMG_20100829_011134.jpg" class="attachment-thumbnail" alt="JTAG Solder Points" title="JTAG Solder Points" /></a>
<a href='http://cole.mickens.us/2010/08/29/xbox-360-modification/img_20100829_011142/' title='More JTAG Solder Points'><img width="150" height="112" src="http://cole.mickens.us/wp-content/uploads/2010/08/IMG_20100829_011142.jpg" class="attachment-thumbnail" alt="More JTAG Solder Points" title="More JTAG Solder Points" /></a>
<a href='http://cole.mickens.us/2010/08/29/xbox-360-modification/img_20100829_011200/' title='Overview of Soldering'><img width="150" height="112" src="http://cole.mickens.us/wp-content/uploads/2010/08/IMG_20100829_011200.jpg" class="attachment-thumbnail" alt="Overview of Soldering" title="Overview of Soldering" /></a>
<a href='http://cole.mickens.us/2010/08/29/xbox-360-modification/img_20100829_011223/' title='The LPT end!'><img width="150" height="112" src="http://cole.mickens.us/wp-content/uploads/2010/08/IMG_20100829_011223.jpg" class="attachment-thumbnail" alt="The LPT end!" title="The LPT end!" /></a>

<p>Well Droid, you take crummy pictures. Sadly, you&#8217;re all I have.</p>
]]></content:encoded>
			<wfw:commentRss>http://cole.mickens.us/2010/08/29/xbox-360-modification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manual Data Recovery with Ecryptfs and Ubuntu</title>
		<link>http://cole.mickens.us/2010/08/09/manual-data-recovery-with-ecryptfs-and-ubuntu/</link>
		<comments>http://cole.mickens.us/2010/08/09/manual-data-recovery-with-ecryptfs-and-ubuntu/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 03:32:10 +0000</pubDate>
		<dc:creator>Cole Mickens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cole.mickens.us/?p=110</guid>
		<description><![CDATA[Why Ubuntu finds it okay to ship ecryptfs support as a easily user accessible feature without clear manual data recovery instructions is beyond me. If you can&#8217;t boot the drive and login and let ecryptfs unwrap its passphrase, you can&#160;&#8230; <a href="http://cole.mickens.us/2010/08/09/manual-data-recovery-with-ecryptfs-and-ubuntu/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Why Ubuntu finds it okay to ship ecryptfs support as a easily user accessible feature without clear manual data recovery instructions is beyond me. If you can&#8217;t boot the drive and login and let ecryptfs unwrap its passphrase, you can either spend an hour or two on it like I did or give up.</p>
<p>Fortunately, I&#8217;m giving you a third option. Easy to follow instructions.</p>
<p><strong>Required Packages</strong></p>
<ul>
<li>ecryptfs-utils</li>
<li>libecryptfs0</li>
</ul>
<p><strong>Assumptions</strong></p>
<p>I assume that you have a working ubuntu system and a hard drive mounted at <strong>/media/hd</strong> with an encrypted user folder then being at <strong>/media/hd/home/user</strong> (relative to the current, working system).</p>
<p>In the example below, I&#8217;m mounting the decrypted files at <strong>/media/myfiles</strong>, though you can obviously change this out. Additionally, if your home partition is separate from the root partition, the paths would need to be changed accordingly. Hopefully it&#8217;s obvious where those changes would need to be.</p>
<p>All of these commands need to be executed as root. I encourage a <strong>sudo -s</strong> session to work in.</p>
<p><strong>Recover the Mount Passphrase</strong></p>
<p>Your login password is not the passphrase to the encrypted data. To get the actual mount passphrase we must &#8220;unwrap&#8221; it.</p>
<ol>
<li>
<pre>ecryptfs-unwrap-passphrase /media/hd/home/.ecryptfs/user/.ecryptfs/wrapped-passphrase</pre>
</li>
<li>[enter your login password]</li>
<li>A &#8220;passphrase&#8221; will be printed to the screen.<br/><strong>This is your mount passphrase.</strong></li>
</ol>
<p><strong>Recover Filename Encryption Key (FNEK)</strong></p>
<ol>
<li>
<pre>ecryptfs-add-passphrase --fnek</pre>
</li>
<li><em>[enter your mount passphrase]</em></li>
<li>Two lines will print out. You want the signature from the second line. <br/><strong>This is your FNEK signature.</strong></li>
</ol>
<p><strong>Mount the Encrypted Files</strong></p>
<ol>
<li>
<pre>mount -t ecryptfs /media/hd/home/.ecryptfs/user/.Private /media/myfiles</pre>
</li>
<li>Passphrase: <strong><em>(paste your mount passphrase from above)</em></strong></li>
<li>Selection [aes]: <strong>1</strong> (or whatever the <strong>aes</strong> option is)</li>
<li>Selection [16]: <strong>1</strong> (or whatever the <strong>16</strong> option is)</li>
<li>Enable plaintext passthrough (y/n) [n]: <strong>n</strong></li>
<li>Enable filename encryption (y/n) [n]: <strong>y</strong></li>
<li>Filename Encryption Key (FNEK) Signature []: <strong><em>(paste the your FNEK signature from above)</em></strong></li>
<li>Ignore the error message and handle the signature logging however you like.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://cole.mickens.us/2010/08/09/manual-data-recovery-with-ecryptfs-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excessive? Pfft. What does that mean?</title>
		<link>http://cole.mickens.us/2010/07/26/excessive-pfft-what-does-that-mean/</link>
		<comments>http://cole.mickens.us/2010/07/26/excessive-pfft-what-does-that-mean/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 03:06:06 +0000</pubDate>
		<dc:creator>Cole Mickens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cole.mickens.us/?p=105</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://cole.mickens.us/wp-content/uploads/2010/07/tripleboot.png"><img src="http://cole.mickens.us/wp-content/uploads/2010/07/tripleboot.png" alt="" title="tripleboot" width="720" height="422" class="aligncenter size-full wp-image-106" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://cole.mickens.us/2010/07/26/excessive-pfft-what-does-that-mean/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retail Mac OS X 10.6 Snow Leopard in VirtualBox</title>
		<link>http://cole.mickens.us/2010/07/26/retail-mac-os-x-10-6-snow-leopard-in-virtualbox/</link>
		<comments>http://cole.mickens.us/2010/07/26/retail-mac-os-x-10-6-snow-leopard-in-virtualbox/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 01:12:56 +0000</pubDate>
		<dc:creator>Cole Mickens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cole.mickens.us/?p=96</guid>
		<description><![CDATA[Installing retail out-of-the-box OS X 10.6 is actually much easier than Google results may have you thinking. Needed: VirtualBox &#8211; free Empire EFI &#8211; free Retail Mac OS X 10.6 &#8211; $30 Total Cost: $30 Steps: Create a new Virtual&#160;&#8230; <a href="http://cole.mickens.us/2010/07/26/retail-mac-os-x-10-6-snow-leopard-in-virtualbox/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Installing retail out-of-the-box OS X 10.6 is actually much easier than Google results may have you thinking.</p>
<p>Needed:</p>
<ul>
<li><a href="http://www.virtualbox.org/wiki/Downloads">VirtualBox</a> &#8211; free</li>
<li><a href="http://prasys.info/osx86hackint0sh/">Empire EFI</a> &#8211; free</li>
<li><a href="http://store.apple.com/us/product/MC573Z/A">Retail Mac OS X 10.6</a> &#8211; $30</li>
</ul>
<p>Total Cost: <strong>$30</strong></p>
<p>Steps:</p>
<ol>
<li>Create a new Virtual Machine.<br/>Mac OS X Server 64 bit<br/>20GB at least</li>
<li>Specify one of the Empire EFI images as your CD image.<br/>Boot from it.</li>
<li>Wait till you see the Empire EFI screen.<br/>Wait 20 seconds.</li>
<li>Switch to your Snow Leopard disc.</li>
<li>Wait 20 seconds. Press F5.<br/>Hit enter to boot the Snow Leopard entry.</li>
<li>Install.<br/>You may need to format your disk first with Disk Utility.</li>
<li>Continue to use the EmpireEFI disc to boot your virtual machine.</li>
</ol>
<p>Enjoy. Wasn&#8217;t that simple?</p>
]]></content:encoded>
			<wfw:commentRss>http://cole.mickens.us/2010/07/26/retail-mac-os-x-10-6-snow-leopard-in-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Calendar API &#8211; Making Calendars public with Zend_Gdata</title>
		<link>http://cole.mickens.us/2010/02/14/google-calendar-api-making-calendars-public-with-zend_gdata/</link>
		<comments>http://cole.mickens.us/2010/02/14/google-calendar-api-making-calendars-public-with-zend_gdata/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 01:52:41 +0000</pubDate>
		<dc:creator>Cole Mickens</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://cole.mickens.us/?p=48</guid>
		<description><![CDATA[I recently assisted a friend with part of a project involving the Google Calendar Data API. The application manages intramural sporting events at the University of Nebraska-Lincoln and was pragmatically building calendars for different teams. They wanted to set their&#160;&#8230; <a href="http://cole.mickens.us/2010/02/14/google-calendar-api-making-calendars-public-with-zend_gdata/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently assisted a friend with part of a project involving the Google Calendar Data API. The application manages intramural sporting events at the University of Nebraska-Lincoln and was pragmatically building calendars for different teams. They wanted to set their created calendars to be publicly accessible, despite the fact that the Zend_Gdata PHP framework has no easy way of doing so.</p>
<p>A quick look at the Google Calendar API documentation makes it obvious that the PHP examples solely use the <a href="http://framework.zend.com/manual/en/zend.gdata.html">Zend_Gdata</a> library and provide no examples of making manual queries outside of the convenience functions provided by <a href="http://framework.zend.com/manual/en/zend.gdata.calendar.html">Zend_Gdata_Calendar</a>. Fortunately, Eric was able to find <a href="http://cookingandcoding.wordpress.com/2009/05/17/creating-public-calendars-with-google-calendar-api/">an example of the XML necessary to make a calendar public through the API</a>.</p>
<p>Ultimately, there were three problems that we ran into when attempting to get Google Calendar to accept our delicious XML.</p>
<p>First, a misconception about Zend&#8217;s Gdata classes. The code began with a simple call to <code>Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);</code> which returns a <a href="http://framework.zend.com/apidoc/core/Zend_Gdata/Gdata/Zend_Gdata_HttpClient.html">Zend_Gdata_HttpClient</a> (authenticated through <a href="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html">ClientLogin</a>) object which is a descendant of <a href="http://framework.zend.com/apidoc/core/Zend_Http/Client/Zend_Http_Client.html">Zend_HttpClient</a>.</p>
<p>I assumed that the Zend_Gdata_HttpClient would have an easy method for POSTing or GETing to/from the Calendar Data API, but alas Zend has not blessed the PHP-using world with such ease.</p>
<p>Second, I assumed that the creation of Zend_Gdata_HttpClient would at least allow us to send a request with the authentication details added automatically. After repeatedly getting authentication errors, it became clear that this was not the case (and later, upon inspection of the code in the Gdata classes that call the request() function of Zend_HttpClient, it was apparent that they were adding the auth details for each request).</p>
<p>Third, I made the silly assumption that receiving 302 responses indicated that we still had a problem. As it turns out, simply <a href="http://code.google.com/apis/calendar/data/2.0/developers_guide_protocol.html">reading the documentation</a> would have revealed that that is not the case:</p>
<blockquote><p>Just like in the previous example, Calendar may return an HTTP 302 redirect; if so, then the redirect URL has a new parameter, gsessionid, appended to it. If you received the redirect, then send the same POST request again, with the same Authorization header and the same content, but with the gsessionid parameter appended. The response may also include a S cookie, which you should store and send this cookie with future requests as appropriate. Please see the knowledge base for more information on handling sessions with the Calendar Data API. Please note: if a session ID indicated in a cookie header conflicts with the session ID passed as a gsessionid URL parameter, you will get caught in a redirect loop.</p></blockquote>
<p>Ultimately it resulted in a nice wrapper function that I wrote:</p>
<pre><span style="font-family: Georgia, 'Bitstream Charter', serif; color: #444444;"><span style="line-height: 22px;">function gdata_xml_request($client, $request_uri, $xml, $method='POST', $redirs=3) {
  $auth_string = "GoogleLogin auth=" . $client-&gt;getClientLoginToken();
  $client-&gt;setHeaders("Content-Type", "application/atom+xml");
  $client-&gt;setHeaders("Authorization", $auth_string);
  $client-&gt;setUri($request_uri);
  $client-&gt;setRawData($xml);

  $response = $client-&gt;request($method);
  if($response-&gt;isRedirect() &amp;&amp; $response-&gt;getStatus() != '304' &amp;&amp; $redirs-- &gt; 0) {
    $client-&gt;setUri( $response-&gt;getHeader("Location") );
    $response = $client-&gt;request($method);
  }

  return $response;
}</span></span></pre>
<p>For the example of publicizing a calendar (identified by $cal_id), the following code would be used:</p>
<pre style="font-family: Consolas, inconsolata, 'DevjaVu Sans Monospaced', monospaced, serif; color: #444444; line-height: 22px;">
$client = getClient();
$request_uri = "http://www.google.com/calendar/feeds/" . $cal_id . "/acl/full";
$xml = &lt;&lt;&lt;EOF
&lt;entry xmlns='http://www.w3.org/2005/Atom' xmlns:gAcl='http://schemas.google.com/acl/2007'&gt;
  &lt;category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/acl/2007#accessRule'/&gt;
  &lt;gAcl:scope type='default'&gt;&lt;/gAcl:scope&gt;
  &lt;gAcl:role value='http://schemas.google.com/gCal/2005#read'&gt;&lt;/gAcl:role&gt;
&lt;/entry&gt;
EOF;
$response = gdata_xml_request($client, $request_uri, $xml, 'POST', 3);
</pre>
<p>If you like, <a href="http://cole.mickens.us/sandbox/gdata_calendar/index.php">you can see this in action</a> and <a href="http://cole.mickens.us/sandbox/gdata_calendar/index.php?src">the source</a>.<br />
The 409 Version Conflict indicates that there is already an ACL entry that matches the request (aka, the calendar is already public).</p>
<p><span style="font-family: Georgia, 'Bitstream Charter', serif; color: #444444;">Clearly, WordPress is not being very cooperative about this whole &#8220;wanting to post code&#8221; business. Not being able to insert tabs, spaces, or utilize a monospaced font made writing this quite annoying. That and the fact that Ubuntu refuses to disable the touchpad while I&#8217;m typing, so everytime my palm touches this huge annoying &#8230; thing, it selects text in the box and I overwrite it. For example, this sentence and the one before has required 4 Ctrl+Z&#8217;s to undo overwriting mistakes from my palm. >_< Resolving this is my next goal.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://cole.mickens.us/2010/02/14/google-calendar-api-making-calendars-public-with-zend_gdata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
