<?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>sixohthree.com &#187; Computers</title>
	<atom:link href="http://sixohthree.com/category/computers/feed" rel="self" type="application/rss+xml" />
	<link>http://sixohthree.com</link>
	<description>The Weblog of Adam Backstrom</description>
	<lastBuildDate>Wed, 16 May 2012 15:01:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Google on the iPhone</title>
		<link>http://sixohthree.com/2003/google-on-the-iphone</link>
		<comments>http://sixohthree.com/2003/google-on-the-iphone#comments</comments>
		<pubDate>Fri, 13 Apr 2012 02:46:07 +0000</pubDate>
		<dc:creator>Adam Backstrom</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iPhone 4S]]></category>
		<category><![CDATA[palm pre]]></category>
		<category><![CDATA[webOS]]></category>

		<guid isPermaLink="false">http://mu.sixohthree.com/sixohthree/?p=2003</guid>
		<description><![CDATA[In which I explore things which were taken for granted.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally replaced my aging Palm Pre (released June 2009) with an iPhone 4S. I wasn&#8217;t looking forward to the move, but only by using the iPhone full-time do I finally realize what I&#8217;m missing. Most frustrating is the poor support for Google services, which have been my central repository thus far.</p>
<ul>
<li>No built-in GTalk, so far no compelling third-party options</li>
<li>Contacts not supported by built-in &#8220;Gmail&#8221; account option</li>
<li>Contacts supported using Exchange (Google Sync) account type for Google Apps, but email labels are not supported (Home, Work, etc.)</li>
</ul>
<p>As a guy who doesn&#8217;t use any of the built-in Mac OS X applications, I&#8217;m not feeling a lot of the standard integration points. My stuff&#8217;s in the cloud, which is seemingly incompatible with the iCloud.</p>
]]></content:encoded>
			<wfw:commentRss>http://sixohthree.com/2003/google-on-the-iphone/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Experiment: Digital Permanence and Ownership</title>
		<link>http://sixohthree.com/1993/experiment-digital-permanence-and-ownership</link>
		<comments>http://sixohthree.com/1993/experiment-digital-permanence-and-ownership#comments</comments>
		<pubDate>Mon, 02 Apr 2012 01:32:55 +0000</pubDate>
		<dc:creator>Adam Backstrom</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Freedom]]></category>
		<category><![CDATA[drm]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[kindle]]></category>

		<guid isPermaLink="false">http://mu.sixohthree.com/sixohthree/?p=1993</guid>
		<description><![CDATA[When it comes to digital goods, I&#8217;m hesitant where I throw my money. Value is subjective and situational. I&#8217;m not a huge movie buff and I rarely rewatch, so $8.99/monthly for Netflix isn&#8217;t bad. On the other hand, I loathe the idea of subscription-based music: if I wanted to listen to it once, I will want [...]]]></description>
			<content:encoded><![CDATA[<p>When it comes to digital goods, I&#8217;m hesitant where I throw my money. Value is subjective and situational. I&#8217;m not a huge movie buff and I rarely rewatch, so $8.99/monthly for Netflix isn&#8217;t bad. On the other hand, I loathe the idea of subscription-based music: if I wanted to listen to it once, I <em>will</em> want to listen again in the future, and I don&#8217;t want to be at the mercy of someone else&#8217;s uptime and pricing scheme.</p>
<p>I&#8217;ve bought a handful of technical books from O&#8217;Reilly, but never any fiction. So, an experiment: I&#8217;ve purchased Suzanne Collins <em><a href="http://www.amazon.com/gp/product/B002MQYOFW/ref=kinw_myk_ro_title">The Hunger Games</a></em> from the Amazon Kindle store for $5.00. This book is DRM-locked, and can only be read using a compatible application. I&#8217;ll use this post to track the lifespan of this purchase. At least if I remember to.</p>
<p>Hm, I should also buy the paperback for a true comparison of digital vs. analog.</p>
<h2>Predictions</h2>
<p>Amazon appears to be a stable company with a long future, though the eBook market as a whole lacks cohesion and predictability. If the Kindle (or at least the Kindle book market) survives, I expect modern platforms to always have a working Kindle reader. Older platforms may fall into disrepair, and fringe platforms may lack compatibility. I will always be able to download the book from the Kindle store.</p>
<p>I expect to be able to read this eBook indefinitely, though other &#8220;richer&#8221; forms of media may try to entice me to buy a more modern version with more featuers.</p>
<h2>March 2012</h2>
<p>I purchased the eBook the last day of March, 2012. I was able to read it on my HP TouchPad (a discontinued device) using the Amazon Kindle Beta application for webOS. I also have the ability to read this book through a web browser or the Kindle for Mac application.</p>
]]></content:encoded>
			<wfw:commentRss>http://sixohthree.com/1993/experiment-digital-permanence-and-ownership/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Subtree Merges, Orphaned Branches, and GitHub</title>
		<link>http://sixohthree.com/1955/git-subtree-merges-orphaned-branches-and-github</link>
		<comments>http://sixohthree.com/1955/git-subtree-merges-orphaned-branches-and-github#comments</comments>
		<pubDate>Tue, 06 Mar 2012 14:27:54 +0000</pubDate>
		<dc:creator>Adam Backstrom</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[DVCS]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://mu.sixohthree.com/sixohthree/?p=1955</guid>
		<description><![CDATA[Git supports a merge strategy called the subtree merge which brings a branch into a subdirectory of another branch. How are these created, what if the dependency isn't a Git project, and how does GitHub display unrelated branches?]]></description>
			<content:encoded><![CDATA[<p>Git supports a merge strategy called the <a href="http://progit.org/book/ch6-7.html">subtree merge</a> which brings a branch into a subdirectory of another branch. This can be used as an alternative to submodules: add a remote, create a remote tracking branch, and use <code>git read-tree</code> to import that branch into a subdirectory of your main project. The remote tracking branch mirrors the external project in your own repository, and shares no ancestors with your main branch.</p>
<p>If it&#8217;s not possible to track the dependency as a git repository, you can manually <a href="http://book.git-scm.com/5_creating_new_empty_branches.html">create an orphaned branch</a> that shares no ancestors with your main project:</p>
<pre><code>git symbolic-ref HEAD refs/heads/newbranch
rm .git/index
git clean -fdx
&lt;do work&gt;
git add your files
git commit -m 'Initial commit'
</code></pre>
<h2>Orphan Branches in GitHub</h2>
<p>So, what does GitHub think of these orphaned branches? Here&#8217;s a project that has two unrelated branches:</p>
<p><img src="http://sixohthree.com/files/2012/03/orphan-network-1.png" alt="Network Diagram 1" /></p>
<p>If we fork the project and make commits to these branches, we can see the game of hopscotch that ensues. Adding to master:</p>
<p><img src="http://sixohthree.com/files/2012/03/orphan-network-2.png" alt="Network Diagram 2" /></p>
<p>Adding to the orphan branch:</p>
<p><img src="http://sixohthree.com/files/2012/03/orphan-network-3.png" alt="Network Diagram 3" /></p>
<p>This is a bit cluttered, so let&#8217;s look at that last one again without the labels:</p>
<p><img src="http://sixohthree.com/files/2012/03/orphan-network-4.png" alt="Network Diagram 4" /></p>
<p>Additional commits in the original repository work as expected, but I imagine the network graph gets pretty confusing after a while:</p>
<p><img src="http://sixohthree.com/files/2012/03/orphan-network-5.png" alt="Network Diagram 5" /></p>
]]></content:encoded>
			<wfw:commentRss>http://sixohthree.com/1955/git-subtree-merges-orphaned-branches-and-github/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Locked Files in Mac OS X</title>
		<link>http://sixohthree.com/1807/locked-files-in-mac-os-x</link>
		<comments>http://sixohthree.com/1807/locked-files-in-mac-os-x#comments</comments>
		<pubDate>Thu, 08 Dec 2011 14:27:22 +0000</pubDate>
		<dc:creator>Adam Backstrom</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[chown]]></category>
		<category><![CDATA[Terminal]]></category>

		<guid isPermaLink="false">http://mu.sixohthree.com/sixohthree/?p=1807</guid>
		<description><![CDATA[You may observe files with the correct ownership (chown) and permissions (chmod u+rw) that are write-locked. In my experience, the files were editable with sudo, and modification via the Finder would prompt for an administrator password. In these situations, you may be dealing with additional file attributes.]]></description>
			<content:encoded><![CDATA[<p>I spend a lot of my time in the Mac OS X terminal (well, <a href="http://www.iterm2.com/">iTerm 2</a>), and I&#8217;m at home with many of the command-line Unixy conventions. With that comfort also comes a high expectation that <a href="http://en.wikipedia.org/wiki/Principle_of_least_astonishment">things will work in a specific way</a>. This past week I&#8217;ve been manually restoring files from a Time Machine backup. Surprises ensued.</p>
<p>You may observe files with the correct ownership (<code>chown</code>) and permissions (<code>chmod u+rw</code>) that are write-locked. In my experience, the files were editable with <code>sudo</code>, and modification via the Finder would prompt for an administrator password. In these situations, you may be dealing with additional file attributes.</p>
<h2>Access Control Lists (ACLs)</h2>
<p>Your file may have an ACL that prevents writing by the current user. To view ACLs for a file, issue <code>ls -le</code>. Use <code>chmod</code> to modify ACLs. Run <code>chmod -N</code> to <a href="http://backdrift.org/fixing-mac-osx-file-permissions-and-acls-from-the-command-line">remove the ACL</a>.</p>
<h2>File Flags</h2>
<p>Running &#8220;Get Info…&#8221; on a file and checking &#8220;Locked&#8221; is functionally equivalent to running <code>chflags uchg [file]</code>. Show flags in directory listings using <code>ls -lO</code>. See also: <code>SetFile</code>.</p>
<h2>Extended Attributes (metadata)</h2>
<p>For good measure, we should also mention <a href="http://en.wikipedia.org/wiki/Extended_file_attributes#Mac_OS_X">extended attributes</a>. <code>xattr</code> modifies attributes (<code>xattr -r -c</code> to recursively remove), and <code>ls -l@</code> will display attributes.</p>
<p>I don&#8217;t know of any specific metadata that would prevent file modification.</p>
<h2>All Together, Now</h2>
<pre><code>adam@fsck:~:0$ mkdir /tmp/foo &amp;&amp; cd /tmp/foo &amp;&amp; touch bar
adam@fsck:/tmp/foo:0$ xattr -w com.sixohthree.test "o hai" bar
adam@fsck:/tmp/foo:0$ chmod +a 'everyone deny write,append,delete' bar
adam@fsck:/tmp/foo:0$ chflags uchg bar
adam@fsck:/tmp/foo:0$ ls -le@O
total 0
-rw-r--r--@ 1 adam  wheel  uchg 0 Dec  8 09:18 bar
        com.sixohthree.test     5
 0: group:everyone deny write,delete,append
</code></pre>
<p>The <code>uchg</code> flag will prevent all file modifications, including changing ACLs and extended attributes.</p>
<pre><code>adam@fsck:/tmp/foo:0$ date &gt;&gt; bar
-bash: bar: Operation not permitted
adam@fsck:/tmp/foo:1$ chflags nouchg bar
adam@fsck:/tmp/foo:0$ date &gt;&gt; bar
-bash: bar: Operation not permitted
adam@fsck:/tmp/foo:1$ chmod -N bar
adam@fsck:/tmp/foo:0$ date &gt;&gt; bar
adam@fsck:/tmp/foo:0$
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://sixohthree.com/1807/locked-files-in-mac-os-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>webOS 3.0.2 Changes</title>
		<link>http://sixohthree.com/1552/webos-3-0-2-changes</link>
		<comments>http://sixohthree.com/1552/webos-3-0-2-changes#comments</comments>
		<pubDate>Tue, 02 Aug 2011 01:53:51 +0000</pubDate>
		<dc:creator>Adam Backstrom</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Hp]]></category>
		<category><![CDATA[Palm]]></category>
		<category><![CDATA[tablet]]></category>
		<category><![CDATA[touchpad]]></category>
		<category><![CDATA[webOS]]></category>

		<guid isPermaLink="false">http://sixohthree.com/1552/webos-3-0-2-changes</guid>
		<description><![CDATA[Observed changes from the webOS 3.0.2 update.]]></description>
			<content:encoded><![CDATA[<p>The first webOS 3 update for the HP TouchPad was released today. In addition to the <a href="http://www.precentral.net/webos-3-0-2-68-update-now-available-hp-touchpad">official list of changes</a>, I&#8217;ve noticed following:</p>
<p>Calendar</p>
<ul>
<li>All-day events are always shown, rather than being part of the scrolling midnight-to-midnight view.</li>
<li>Much more responsive.</li>
</ul>
<p>Clock</p>
<ul>
<li>The Clock now supports alarms.</li>
</ul>
<p>Photos &amp; Video</p>
<ul>
<li>Thumbnails are now larger, showing 3 photos and growing to 4 photos when the pane is maximized, rather than always showing four thumbnails and increasing whitespace when maximizing.</li>
</ul>
<p>Maps</p>
<ul>
<li>Maps is now driven by Google Maps. Haha, kidding, it&#8217;s still Bing.</li>
</ul>
<p>Some miscellaneous things I&#8217;m hoping are now fixed:</p>
<ul>
<li>Messaging app would occasionally refuse to go online. Required reboot.</li>
<li>Email app would sometimes show blank message bodies. Required relaunching app.</li>
<li>Photos &amp; Video was unable to play large video files. Initial test is not promising.</li>
</ul>
<p>Only time will tell on some of those.</p>
<p>Oh, old and new user-agent string:</p>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><p>Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.72 Safari/534.6 TouchPad/1.0<br />
Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.2; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.40.1 Safari/534.6 TouchPad/1.0</p></blockquote>
<p>Anyway, three cheers to HP for pushing an update one month after the tablet&#8217;s release! Let&#8217;s keep the momentum going.</p>
]]></content:encoded>
			<wfw:commentRss>http://sixohthree.com/1552/webos-3-0-2-changes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 8.04 on Linode: Cloning and Upgrading to 10.04</title>
		<link>http://sixohthree.com/1329/ubuntu-8-04-on-linode-cloning-and-upgrading-to-10-04</link>
		<comments>http://sixohthree.com/1329/ubuntu-8-04-on-linode-cloning-and-upgrading-to-10-04#comments</comments>
		<pubDate>Tue, 02 Nov 2010 09:06:52 +0000</pubDate>
		<dc:creator>Adam Backstrom</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linode]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://sixohthree.com/?p=1329</guid>
		<description><![CDATA[Here are some jumbled notes from my Linode VPS&#8217;s upgrade from Ubuntu &#8220;Hardy Heron&#8221; 8.04 to &#8220;Lucid Lynx&#8221; 10.04. I wanted to do a test run before such a huge upgrade, and I did so by cloning my VPS to a  VMware Fusion virtual machine. Note that I also used Linode&#8217;s backup feature before the [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some jumbled notes from my <a href="http://www.linode.com/?r=3b19dabb9ed30b096be4bfc83724d4e7f4c89c15">Linode</a> VPS&#8217;s upgrade from Ubuntu &#8220;Hardy Heron&#8221; 8.04 to &#8220;Lucid Lynx&#8221; 10.04. I wanted to do a test run before such a huge upgrade, and I did so by cloning my VPS to a  <a href="http://www.vmware.com/products/fusion/">VMware Fusion</a> virtual machine. Note that I also used Linode&#8217;s backup feature before the real upgrade, just to be on the safe side.</p>
<h2>Before the Storm: Finnix</h2>
<p>I had no experience with <a href="http://www.finnix.org/">Finnix</a> before this upgrade, but it was exactly what I needed throughout the process. It&#8217;s <a href="http://library.linode.com/troubleshooting/finnix-recovery">built into the Linode dashboard</a> so you can use it as a recovery console if things go wrong. I also used it as my boot disk while cloning the Linode hard disk to my VM.</p>
<h2>The Backup</h2>
<p><code>rsync</code> is my weapon of choice, since it allows for transport over SSH and incremental backups. I used <a href="http://wiki.archlinux.org/index.php/Full_System_Backup_with_rsync">this article</a> to get started with some suggested <code>rsync</code> flags. I ran this several times throughout the process:</p>
<pre>rsync -avzPH --numeric-ids --delete --delete-excluded --exclude-from=backup.lst root@server.example.com:/ /mnt/sda1/</pre>
<p>Here&#8217;s my <code>backup.lst</code> exclusion file:</p>
<pre>+ /dev/console
+ /dev/initctl
+ /dev/null
+ /dev/zero
- /dev/*
- /proc/*
- /sys/*
- /tmp/*
- *lost+found</pre>
<p>After <code>rsync</code>, <code>chroot</code> to the cloned filesystem:</p>
<pre>mount -R /proc /mnt/sda1/proc
mount -R /dev /mnt/sda1/dev
chroot /mnt/sda1 /bin/bash
vi /etc/fstab # update mountpoints. change xvda to sda1, xvdb to sda2</pre>
<p>Install a bootloader. The Linode VPS is in Xen and doesn&#8217;t normally boot its own kernel. (I know next to nothing about Xen, but this is what I&#8217;ve gleaned.)</p>
<pre>apt-get install grub
mkdir -p /boot/grub
cp -r /usr/lib/grub/i386-pc/{stage1,stage2,e2fs_stage1_5} /boot/grub
apt-get install linux
echo defoptions=vga=791 &gt;&gt;/boot/grub/menu.lst
update-grub</pre>
<p>Reboot. Make sure you kill your cron jobs while the VM is on, as many are probably inappropriate for a backup server.</p>
<pre>sudo service cron stop</pre>
<p>I recommend taking a snapshot of your backup, here. It may actually be faster to just <code>rsync</code> again, but it&#8217;s nice to have a complete backup at the ready.</p>
<p>I used a couple commands to update IP addresses on my backup so I could more accurately test services post-upgrade:</p>
<pre>sudo ~/bin/ack --follow -al '207\.192\.74\.235' /etc | sudo xargs sed -i.bak 's/207\.192\.74\.235/172.16.226.130/g'
sudo ~/bin/ack --follow -al '69\.164\.216\.5' /etc | sudo xargs sed -i.bak 's/69\.164\.216\.5/172.16.226.131/g'</pre>
<h2>The Upgrade</h2>
<p>The following notes were taking during my test upgrade, and referenced during the real upgrade. I referenced the Ubuntu Community Documentation project&#8217;s &#8220;<a href="https://help.ubuntu.com/community/LucidUpgrades">Upgrading to Ubuntu 10.04 LTS</a>&#8221; page. There is also a Linode article on <a href="http://library.linode.com/troubleshooting/upgrade-ubuntu-10.04">upgrading to Ubuntu 10.04</a>.</p>
<p>On the first pass, <code>python-setuptools</code> killed my install. This was fixed by manually reinstalling before upgrade:</p>
<pre>sudo dpkg -r python-setuptools &amp;&amp; apt-get install python-setuptools</pre>
<p>Ensure the update manager is installed, and issue the upgrade command:</p>
<pre>sudo apt-get install update-manager-core
sudo do-release-upgrade</pre>
<p>I encountered conflicts in the following packages, where I had modified local files. Also included is my resolution, which may or may not be helpful to anyone else.</p>
<ul>
<li><code>/etc/securetty</code> &#8212; keep currently installed version; package adds some unneeded ones, and removes tty0 (but does include the Xen ones added by Linode)</li>
<li><code>/etc/sysctl.conf</code> &#8212; use new; uncomment &#8220;<code>kernel.prink = 4 4 1 7</code>&#8221; and add &#8220;<code>fs.inotify.max_user_watches = 524288</code>&#8220;</li>
<li><code>/etc/mysql/my.cnf</code> &#8212; kept my version</li>
<li><code>/etc/dhcp3/dhclient.conf</code> &#8212; kept Linode version: &#8220;<code>request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name, ntp-servers;</code>&#8220;</li>
<li><code>/etc/dbconfig-common/config</code> &#8212; nothing meaningful in the diff; use new</li>
<li><code>/etc/dovecot/dovecot.conf</code> &#8212; kept mine</li>
<li><code>/etc/default/openvpn</code> &#8212; was missing; installed package version</li>
<li><code>/etc/snmp/snmpd.conf</code> &#8212; kept mine</li>
<li><code>/etc/apache2/apache2.conf</code> &#8212; kept mine, as well as other apache2 files (but I did use the new <code>mime.types</code> file)</li>
<li><code>/etc/stunnel/stunnel.conf</code> &#8212; kept mine</li>
<li><code>/etc/default/stunnel4</code> &#8212; kept mine</li>
<li><code>/etc/udev/rules.d/75-persistent-net-generator.rules</code> &#8212; kept installed, looked like the <code>GOTO="persistent_net_generator_end"</code> at the start was intentional</li>
</ul>
<p>Got a warning about vulnerable SSL keys generated by older versions of Ubuntu; solution is to regenerate your keys. The dialog recommended using <code>openssl-vulnkey</code> and <code>openvpn-vulnkey</code> to test.</p>
<p>Other than having to resolve the file conflicts, the upgrade was very smooth. I found some notes about <a href="http://www.linode.com/forums/viewtopic.php?p=29330#29330">fixing the Xen serial console</a>, and <a href="http://www.linode.com/forums/viewtopic.php?p=31756#31756">syslog breaking in 10.04</a>. I also upgraded to a newer paravirt kernel in the Linode dashboard.</p>
<h3>python-setuptools error</h3>
<p>More about that error with <code>python-setuptools</code>: <a href="http://ubuntuforums.org/showthread.php?t=292830">this thread</a> was helpful. From <code>/var/log/apt/term.log</code>:</p>
<pre>Log started: 2010-10-06  08:35:15
Setting up python-setuptools (0.6c9-0ubuntu1) ...
pycentral: pycentral pkginstall: not overwriting local files
pycentral pkginstall: not overwriting local files
dpkg: error processing python-setuptools (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 python-setuptools
Log ended: 2010-10-06  08:35:15</pre>
<p>Per the article, ran &#8220;apt-get remove python-setuptools&#8221; and &#8220;apt-get install python-setuptools&#8221;</p>
<h2>Post-upgrade Recompiling</h2>
<p>Something required apt-get install <code>libltdl-dev</code>. Useful info for this post, no?</p>
<p>I recompiled all my custom stuff, including <code>nginx</code>, <code>memcached</code>, <code>mod_php</code> and <code>php-fpm</code>, and <code>mysqld</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sixohthree.com/1329/ubuntu-8-04-on-linode-cloning-and-upgrading-to-10-04/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Appify: Wrapping Shell Scripts as Applications in Mac OS X 10.6</title>
		<link>http://sixohthree.com/1314/shell-scripts-as-applications-in-mac-os-x</link>
		<comments>http://sixohthree.com/1314/shell-scripts-as-applications-in-mac-os-x#comments</comments>
		<pubDate>Thu, 23 Sep 2010 16:52:19 +0000</pubDate>
		<dc:creator>Adam Backstrom</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://sixohthree.com/?p=1314</guid>
		<description><![CDATA[Today I'm publishing appify, a shell script that turns any other non-interactive shell script into a double-clickable Mac OS X application bundle.]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m publishing <a href="http://git.abackstrom.com/appify.git">appify</a>, a shell script that turns any other non-interactive shell script into a double-clickable Mac OS X application bundle. The only magic: Mac OS X will not execute the script if it&#8217;s smaller than 28 bytes, so appify will balk if your script needs padding.</p>
<h2>The Background</h2>
<p>For several years now, I have used a series of AppleScripts to automate enabling and disabling of the Mac OS X screen saver password. The scripts were pulled from <a href="http://hintsforums.macworld.com/showthread.php?t=49718">a thread</a> on the MacWorld forums and have worked well, save for one detail: there is quite a lot of overhead in launching a compiled AppleScript just to execute two commands in the shell:</p>
<pre><code>do shell script "defaults -currentHost write com.apple.screensaver askForPassword -int 0"
do shell script "/Users/adam/bin/notif"</code></pre>
<p>Under heavy load (ie. with all my normal apps, plus VMware Fusion running one or more virtual machines) I often wait 30 seconds or more to enable or disable the password.</p>
<p><a href="http://steampowered.com/">Steam</a> was recently ported to Mac OS X, and it has the ability to create application shortcuts on your Desktop. Digging into one of these applications, you see the following hierarchy:</p>
<pre><code><strong>adam@fsck[0]:/Applications:0$</strong> find "Team Fortress 2.app"
Team Fortress 2.app
Team Fortress 2.app/Contents
Team Fortress 2.app/Contents/Info.plist
Team Fortress 2.app/Contents/MacOS
Team Fortress 2.app/Contents/MacOS/run.sh
Team Fortress 2.app/Contents/Resources
Team Fortress 2.app/Contents/Resources/shortcut.icns</code></pre>
<p>Here&#8217;s <tt>Info.plist</tt>:</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;CFBundleExecutable&lt;/key&gt;
    &lt;string&gt;run.sh&lt;/string&gt;
    &lt;key&gt;CFBundleIconFile&lt;/key&gt;
    &lt;string&gt;shortcut.icns&lt;/string&gt;
    &lt;key&gt;CFBundleInfoDictionaryVersion&lt;/key&gt;
    &lt;string&gt;1.0&lt;/string&gt;
    &lt;key&gt;CFBundlePackageType&lt;/key&gt;
    &lt;string&gt;APPL&lt;/string&gt;
    &lt;key&gt;CFBundleSignature&lt;/key&gt;
    &lt;string&gt;????&lt;/string&gt;
    &lt;key&gt;CFBundleVersion&lt;/key&gt;
    &lt;string&gt;1.0&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;
</code></pre>
<p>And the good stuff, <tt>run.sh</tt>:</p>
<pre><code>#!/bin/bash
# autogenerated file - do not edit

open steam://run/440</code></pre>
<p>This was a pretty big &#8220;wow&#8221; moment for me. No AppleScript, no <a href="http://hints.macworld.com/article.php?story=20010827215428108">.command files</a> (which launch Terminal.app), just pure, instant command line gratification. appify was born to quickly convert shell scripts into applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://sixohthree.com/1314/shell-scripts-as-applications-in-mac-os-x/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Upgrading to Snow Leopard</title>
		<link>http://sixohthree.com/1010/upgrading-to-snow-leopard</link>
		<comments>http://sixohthree.com/1010/upgrading-to-snow-leopard#comments</comments>
		<pubDate>Mon, 05 Apr 2010 15:40:25 +0000</pubDate>
		<dc:creator>Adam Backstrom</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[Terminal]]></category>

		<guid isPermaLink="false">http://sixohthree.com/?p=1010</guid>
		<description><![CDATA[I've just upgraded to Mac OS X 10.6 "Snow Leopard," and had one problem along the way.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just upgraded my MacBook Pro to Mac OS X 10.6 &#8220;Snow Leopard.&#8221; A little behind the curve, but I had some application compatibility concerns that caused me to wait. Now I&#8217;m upgraded so I can try the iPad emulator on a few of our websites.</p>
<p>I have one thing of note to log, so of course I&#8217;ll post it here.</p>
<h2>Bash Escape Sequences</h2>
<p>On opening iTerm for the first time, I was greeted with this:</p>
<pre><code>Last login: Mon Apr  5 11:29:31 on ttys001
\e]1;fsckadam@fsck:~:0$</code></pre>
<p>You can see a bit of gibberish after the date, but before my prompt. So, I guess my old escape sequences stopped working in Snow Leopard. I have a set of functions that <a href="http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss4.3">set window titles</a> using escape sequences. Changing <code>\e</code> and <code>\a</code> to their octal equivalents worked for me. So these lines in <code>.bashrc</code>:</p>
<pre><code>function setlabel { echo -ne "\e]1;$1\a"; }
function settitle { echo -ne "\e]2;$1\a"; }</code></pre>
<p>Became this:</p>
<pre><code>function setlabel { echo -ne "\033]1;$1\007"; }
function settitle { echo -ne "\033]2;$1\007"; }</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://sixohthree.com/1010/upgrading-to-snow-leopard/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The iPad is OK… Sometimes</title>
		<link>http://sixohthree.com/1004/the-ipad-is-ok-sometimes</link>
		<comments>http://sixohthree.com/1004/the-ipad-is-ok-sometimes#comments</comments>
		<pubDate>Fri, 02 Apr 2010 21:42:47 +0000</pubDate>
		<dc:creator>Adam Backstrom</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[ipad]]></category>

		<guid isPermaLink="false">http://sixohthree.com/?p=1004</guid>
		<description><![CDATA[The impending release of the Apple iPad has increased the chatter on my Twitter and Google Reader feeds, with some commentary pro-iPad, some con-, and some mocking the rest. It&#8217;s also subject of a lot of discussion here in the office, usually in terms of which model we would like to purchase and why. The device&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sixohthree.com/files/2010/04/ipad_hero.jpg"><img class="alignright size-full wp-image-1005" title="iPad Stock Photo (Launcher View)" src="http://sixohthree.com/files/2010/04/ipad_hero.jpg" alt="" width="200" height="233" /></a>The impending release of the Apple iPad has increased the chatter on my Twitter and Google Reader feeds, with some commentary pro-iPad, some <a href="http://www.boingboing.net/2010/04/02/why-i-wont-buy-an-ipad-and-think-you-shouldnt-either.html">con-</a>, and some <a href="https://twitter.com/hotdogsladies/status/11464302112">mocking the rest</a>. It&#8217;s also subject of a lot of discussion here in the office, usually in terms of which model we would like to purchase and why.</p>
<p>The device&#8217;s controversy speaks to its importance. Apple, maligned and ridiculed for so many years, is now a force. The iPod is ubiquitous, the iPhone is commonplace, and MacBooks are <a href="http://www.theawl.com/2010/03/why-apple-deserves-an-oscar-too">around every corner</a>. Many of the content creators I follow work in an Apple world, so Apple&#8217;s implementation is noticed and does matter.</p>
<p>I like the iPad as a consumer device, in that sense that I would like to consume media on it. It&#8217;s a device that&#8217;s just begging to be touched. I can foresee many hours spent browsing the web, looking at photos, and watching movies with an iPad in my hands. I do all these things on my MacBook Pro, and I see the iPad as a better way to accomplish this subset of tasks.</p>
<p>The iPad is dangerous as a primary computing device, at least for the younger generation. Despite the announced iWork apps, it&#8217;s still a device of consumption, and consumption does not engage the brain the same way creation does. Sure you can <a href="http://wordpress.com/">blog</a>, and there is potential that someone will create video, audio, and other creative apps, but those don&#8217;t exist today. It&#8217;s very important to me that my son has the opportunity to pursue whatever his interests may be, technical or not. The iPad has very little to offer in this regard.</p>
<p>It&#8217;s also a device that makes it easy for you to spend money, with the iBookstore, the App Store, and the iTunes Store in easy reach. Unfortunately, Apple is forced to bargain with content producers, and it&#8217;s usually the consumer that loses out. The ability to &#8220;buy&#8221; many sorts of media is disingenuous: DRM puts an expiration date on your entertainment. Authentication servers get turned off, formats become obsolete, and you have to repurchase relicense something that, at one time, you thought you owned. (Reminds me of the VHS to DVD to HD-DVD to whoops-HD-DVD-lost-to-Blu-ray transition, but that&#8217;s a whole different marketing strategy.)</p>
<p>For me, the iPad is still in &#8220;do want&#8221; territory. I think it will be a great toy around the house, my MacBook will still be there when I need to do some real work, and my <a href="http://www.palm.com/us/products/phones/pre-family.html">Palm Pre</a> will fill in the gaps.</p>
]]></content:encoded>
			<wfw:commentRss>http://sixohthree.com/1004/the-ipad-is-ok-sometimes/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Subversion: Missing Features</title>
		<link>http://sixohthree.com/972/subversion-missing-features</link>
		<comments>http://sixohthree.com/972/subversion-missing-features#comments</comments>
		<pubDate>Mon, 25 Jan 2010 17:31:59 +0000</pubDate>
		<dc:creator>Adam Backstrom</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://sixohthree.com/?p=972</guid>
		<description><![CDATA[I love many things about git, but I use Subversion at my day job. Two git features please me enough that I took the time to build them into my svn workflow: paged diffs and &#8220;commit -v.&#8221; As of 15 September 2011, this script will also diff properties using the command svn propdiff PROPNAME. This [...]]]></description>
			<content:encoded><![CDATA[<p>I love many things about <a href="http://git-scm.com/">git</a>, but I use <a href="http://subversion.tigris.org/">Subversion</a> at my day job. Two git features please me enough that I took the time to build them into my svn workflow: paged diffs and &#8220;commit -v.&#8221; As of 15 September 2011, this script will also diff properties using the command <code>svn propdiff PROPNAME</code>.</p>
<script src='http://gist.github.com/1219371.js?file=svn'></script><noscript><pre>#!/bin/bash

SVN_CI_CMD='vim -c &quot;4,\$y&quot; -c &quot;vnew&quot; -c &quot;put&quot; -c &quot;set syntax=diff buftype=nofile nowrap \
nobackup previewwindow bufhidden=delete&quot; -c &quot;silent execute \&quot;%!cut \
-c-5 --complement | xargs svn diff --no-diff-deleted -x --ignore-eol-style\&quot; | \
redraw&quot; -c &quot;wincmd h&quot; +0'

SVN=/usr/bin/svn

function propdiff {
	BASE=$(mktemp /tmp/propbase.XXXXXXXXX)
	CUR=$(mktemp /tmp/propcur.XXXXXXXXX)

	shift

	if [ -z &quot;$1&quot; ]; then
		echo &quot;svn: No property name specified&quot; 1&gt;&amp;2
		exit 1
	fi

	&quot;$SVN&quot; propget -rBASE &quot;$@&quot; &gt; &quot;$BASE&quot;
	&quot;$SVN&quot; propget &quot;$@&quot; &gt; &quot;$CUR&quot;

	diff -u &quot;$BASE&quot; &quot;$CUR&quot;
	rm -f -- &quot;$BASE&quot; &quot;$CUR&quot;

	exit 0
}

[ &quot;$1&quot; = &quot;less&quot; ] &amp;&amp; shift &amp;&amp; exec &quot;$SVN&quot; diff &quot;$@&quot; | less
[ &quot;$1&quot; = &quot;ci&quot; ] &amp;&amp; SVN_EDITOR=$SVN_CI_CMD exec &quot;$SVN&quot; &quot;$@&quot;
[ &quot;$1&quot; = &quot;propdiff&quot; ] &amp;&amp; propdiff &quot;$@&quot;
exec /usr/bin/svn &quot;$@&quot;
</pre></noscript>
<p>This creates an <tt>svn less</tt> subcommand that runs <tt>svn diff</tt> with any other arguments you provided, paging the result through <tt>less(1)</tt>. It also provides a custom environment variable to <tt>svn ci</tt>, instructing Vim to split screen, set some options suitable for a read-only diff, and run <tt>svn diff</tt> on all files included in the default commit message, i.e. the list of changed files. Finally, it wraps <tt>svn propdiff</tt> to highlight modifications to a property.</p>
<p>Any unrecognized subcommands (update, checkout, etc.) are passed through unchanged. The automatic diff is only applied to the <tt>ci</tt> subcommand, so the <tt>svn commit</tt> variant can be used when a diff is not required.</p>
<h2>Installation</h2>
<p>You can quickly grab this script with curl or wget:</p>
<pre><code>bash$ curl https://raw.github.com/gist/1219371/svn &gt; ~/bin/svn
</code></pre>
<p>Or similar.</p>
]]></content:encoded>
			<wfw:commentRss>http://sixohthree.com/972/subversion-missing-features/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

