<?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>Joe Maller &#187; Unix</title>
	<atom:link href="http://joemaller.com/tag/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://joemaller.com</link>
	<description>.com</description>
	<lastBuildDate>Tue, 15 May 2012 03:40:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to install Git on a shared host</title>
		<link>http://joemaller.com/908/how-to-install-git-on-a-shared-host/</link>
		<comments>http://joemaller.com/908/how-to-install-git-on-a-shared-host/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 01:45:00 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[shared host]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://joemaller.com/?p=908</guid>
		<description><![CDATA[(regularly updated) Installing Git on a shared hosting account is simple, the installation is fast and like most things Git, it just works. This is a basic install without documentation. My main goal is to be able to push changes from remote repositories into the hosted repository, which also serves as the source directory of [...]]]></description>
			<content:encoded><![CDATA[<p><em>(regularly updated)</em></p>
<p>Installing <a href="http://git-scm.com">Git</a> on a shared hosting account is simple, the installation is fast and like most things Git, it just works.</p>
<p>This is a basic install without documentation. My main goal is to be able to push changes from remote repositories into the hosted repository, which also serves as the source directory of the live website. <a href="http://joemaller.com/990/a-web-focused-git-workflow/">Like this</a>.</p>
<h3>Prerequisites</h3>
<p>The only two things you absolutely must have are shell access to the account and permission to use GCC on the server. Check both with the following command:</p>
<pre><code>$ ssh joe@webserver 'gcc --version'
<span class="output">gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
[...]</span></code></pre>
<p>If GCC replies with a version number, you should be able to install Git. SSH into your server and let&#8217;s get started!</p>
<p>If you see something like <em>/usr/bin/gcc: Permission denied</em> you don&#8217;t have access to the GCC compiler and <strong>will not</strong> be able to build the Git binaries from source. <a href="#hosting">Find another hosting company</a>.</p>
<h3>Update your $PATH</h3>
<p>None of this will work if you don&#8217;t update the $PATH environment variable. In most cases, this is set in <strong>.bashrc</strong>. Using <strong>.bashrc</strong> instead of <strong>.bash_profile</strong> updates $PATH for interactive and non-interactive sessions&#8211;which is necessary for remote Git commands. Edit <strong>.bashrc</strong> and add the following line:</p>
<pre><code>export PATH=$HOME/bin:$PATH</code></pre>
<p>Be sure &#8216;~/bin&#8217; is at the beginning since $PATH is searched from left to right; to execute local binaries first, their location has to appear first. Depending on your server&#8217;s configuration there could be a lot of other stuff in there, including duplicates.</p>
<p>Double-check this by sourcing the file and echoing $PATH:</p>
<pre><code>$ source ~/.bashrc
$ echo $PATH
<span class="output">/home/joe/bin:/usr/local/bin:/bin:/usr/bin</span></code></pre>
<p>Verify that the remote path was updated by sending a remote command like this (from another connection):</p>
<pre><code>$ ssh joe@webserver 'echo $PATH'
<span class="output">/home/joe/bin:/usr/local/bin:/bin:/usr/bin</span></code></pre>
<p>Note: Previous iterations of this page installed into the ~/opt directory. Following current Git conventions, I&#8217;m now installing into the default <code>~/bin</code>.</p>
<h3>Installing Git</h3>
<p>SSH into your webserver. I created a source directory to hold the files and make cleanup easier:</p>
<pre><code>$ cd
$ mkdir src
$ cd src</code></pre>
<p>Grab the most recent source tarball from <a href="https://github.com/git/git/tags/">Github</a>. When this post was updated, the current Git release was version 1.7.10.1:</p>
<pre><code>$ curl -LO https://github.com/git/git/tarball/v1.7.10.1</code></pre>
<p>Untar the archive and cd into the new directory:</p>
<pre><code>$ tar -xzvf v1.7.10.1
$ cd git-git-9dfad1a</code></pre>
<p>By default, Git installs into <code>~/bin</code> which is perfect for shared hosting. Earlier versions required adding a prefix to the configure script (<a href="http://joemaller.com/881/how-to-install-subversion-on-a-shared-host/">like this</a>), but none of that is necessary anymore. If you do need to change the install location of Git, just specify a prefix to the Make command as described in Git&#8217;s INSTALL file.</p>
<p>With all that taken care of, installation is simple:</p>
<pre><code>$ make
$ make install
<span class="response">[lots of words...]</span></code></pre>
<p></code></pre>
<p>That should be it, check your installed version like this:</p>
<pre><code>$ git --version
<span class="response">git version 1.7.10.1</span></code></pre>
<p>It's now safe to delete the src folder containing the downloaded tarball and source files.</p>
<p><a name="hosting"></a>My preferred shared hosting providers are <a href="http://www.a2hosting.com/1482.html">A2 Hosting</a> and <a href="http://www.webfaction.com/signup?affiliate=joemaller">WebFaction</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/908/how-to-install-git-on-a-shared-host/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Fixing a Palm duplicate disaster</title>
		<link>http://joemaller.com/888/fixing-a-palm-duplicate-disaster/</link>
		<comments>http://joemaller.com/888/fixing-a-palm-duplicate-disaster/#comments</comments>
		<pubDate>Sun, 17 Feb 2008 07:17:05 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[misc.]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Palm]]></category>
		<category><![CDATA[Palm Desktop]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[vcard]]></category>

		<guid isPermaLink="false">http://joemaller.com/2008/02/17/fixing-a-palm-duplicate-disaster/</guid>
		<description><![CDATA[I recently came across an absolute disaster of a Palm Desktop data file while helping someone setup a new iPhone. It had 13,572 contacts, mostly duplicates. Judging from the number of obvious duplicate entries, my guess is the actual number will be somewhere around 2500 (it was). Here is the process I used to automatically [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across an absolute disaster of a Palm Desktop data file while helping someone setup a new iPhone. It had 13,572 contacts, mostly duplicates. Judging from the number of obvious duplicate entries, my guess is the actual number will be somewhere around 2500 (it was).</p>
<p>Here is the process I used to automatically remove a lot of those duplicates and import the remainder into the Mac&#8217;s Address Book. </p>
<p>The first step is to get out of Palm Desktop as soon as possible. Select all contacts and export to a group VCard. This one was 3.4 MB.</p>
<p>Most of this will happen in Terminal, but a quick stop in BBEdit or <a href="http://www.barebones.com/products/textwrangler/">TextWrangler</a> will save a few steps later on. (TextMate tends to choke on big, non-UTF files.) The Palm export file is encoded in MacRoman. It&#8217;s 2008, pretty much any text that isn&#8217;t Unicode should be. I used TextWrangler to convert the encoding to UTF-8 no BOM (byte order marker).</p>
<p>VCards require Windows style CRLF line endings. While we could deal with those in Sed, we might as well just switch the file to Unix style LF endings in TextWrangler too. The TextWrangler bottom bar should switch from this:  </p>
<p><img src='http://joemaller.com/wordpress/wp-content/uploads/2008/02/macroman_crlf.png' alt='MacRoman CRLF' /></p>
<p>To this:</p>
<p><img src='http://joemaller.com/wordpress/wp-content/uploads/2008/02/utf8_lf.png' alt='utf8 LF' /></p>
<p>Now comes the <a href="http://sed.sourceforge.net/sed1line.txt">magic</a>.</p>
<p>While this could be done as an impossible-to-read one-line sed command, it&#8217;s easier to digest and debug as separate command files.</p>
<p>Here are the steps:</p>
<ol>
<li>Use Sed to join each individual VCard into a single line using a token to replace line feeds, output to intermediate file</li>
<li>Sort and Uniq the result to remove obvious duplicates.
<li>Replace the tokens with line feeds</li>
</ol>
<p>Below are the two sed command files I used. I ran these individually but they could easily be piped together into a one-line command.</p>
<p><em>vcard_oneline.sed:</em></p>
<pre><code># define the range we'll be working with
/BEGIN:VCARD/,/END:VCARD/ {

# define the loopback
:loop

# add the next line to the pattern buffer
N

# if pattern is not found, loopback and add more lines
/\nEND:VCARD$/! b loop

# replace newlines in multi-line pattern
s/\n/   %%%     /g
}</code></pre>
<p>Run that like this:  </p>
<pre><code>sed -f vcard_oneline.sed palm_dump.vcf &gt; vcards_oneline.txt</code></pre>
<p>Then run that file through sort and uniq: </p>
<pre><code>sort vcards_oneline.txt | uniq &gt; vcards_clean.txt </code></pre>
<p><em>vcard_restore.sed:</em></p>
<pre><code># replace tokens with DOS style CRLF line endings
s/      %%%     /^M\
/g

# add the &lt;CR&gt; before the LF at the end of the line
s/$/^M/</code></pre>
<p>Run that with something like this:  </p>
<pre><code>sed -f vcard_restore.sed vcards_clean.txt &gt; vcards_clean.vcf</code></pre>
<p>After that last step, you should be able to drag the vcards_clean.vcf file into Address Book to import your vcards.</p>
<p>Suggestions for improvement are always welcomed.</p>
<h3>Notes:</h3>
<p>In VIM, type the tab character as control-v-i (hold control while pressing v then i), type the <CR> line break by typing control-v-enter.</p>
<p><code>iconv</code> could be used to convert from MacRoman to UTF-8. TextWrangler just seemed easier at the time.</p>
<p>Palm Desktop appears to dump group VCards in input order, so duplicate entries were not grouped together. Running the output through <code>sort</code> visually reveals a ton of duplicates and makes it possible to use <code>uniq</code> to remove consecutive duplicates.</p>
<p>I had to quit and re-open Address Book once or twice before it would import the files.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/888/fixing-a-palm-duplicate-disaster/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to install Subversion on a shared host</title>
		<link>http://joemaller.com/881/how-to-install-subversion-on-a-shared-host/</link>
		<comments>http://joemaller.com/881/how-to-install-subversion-on-a-shared-host/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 04:04:43 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[64 bit]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[liquidweb]]></category>
		<category><![CDATA[shared hosting]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://joemaller.com/2008/01/29/how-to-install-subversion-on-a-shared-host/</guid>
		<description><![CDATA[I&#8217;ve hosted this site and several others LiquidWeb&#8217;s shared servers for probably eight years. They are without question, the most dependable host I&#8217;ve ever used. [see update] But LiquidWeb doesn&#8217;t offer Subversion. And I will no longer do web work without it. For some time I&#8217;d been considering leaving LiquidWeb because the lack of svn [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve hosted this site and several others <a href="http://www.liquidweb.com/">LiquidWeb&#8217;s shared servers</a> for probably eight years. They are without question, the most dependable host I&#8217;ve ever used. <em>[<a href="http://joemaller.com/881/how-to-install-subversion-on-a-shared-host/#lwupdate">see update</a>]</em></p>
<p>But LiquidWeb doesn&#8217;t offer <a href="http://subversion.tigris.org/">Subversion</a>. And I will no longer do web work without it.</p>
<p>For some time I&#8217;d been considering leaving LiquidWeb because the lack of svn was now hindering work on my own sites. For the same reason, I&#8217;ve had to pass them over several times when clients asked for hosting recommendations. Then the other night, I stumbled across a discussion about installing Subversion on a shared host. Why didn&#8217;t I  try that years ago? </p>
<p><span id="more-881"></span></p>
<h3>Installation Instructions</h3>
<p>These instructions assume basic proficiency with the Unix command line. Note that the goal is to install the SVN client, plan on hosting your repositories somewhere else.</p>
<p>Connect to  your account with ssh and create a working directory, mine&#8217;s called _src:</p>
<pre><code>cd
mkdir _src
cd _src</code></pre>
<p>Next, use <a href="http://linux.die.net/man/1/wget">wget</a> to pull down the subversion sources. You could also use curl, but wget does the same with less typing. Choose a version from this <a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&#038;expandFolder=74">list of Subversion sources</a>. The parallel &#8220;subversion-deps&#8221; download includes all dependent sources required to build Subversion.</p>
<pre><code>wget http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.4.6.tar.gz</code></pre>
<p>Next, untar the sources and dive into the directory:</p>
<pre><code>tar -xzvf subversion-1.4.6.tar.gz
tar -xzvf subversion-deps-1.4.6.tar.gz
cd subversion-1.4.6</code></pre>
<h3>One step, maybe (32-bit?)</h3>
<p>At this point, depending on your server configuration, you might be able to install with the following two commands:</p>
<pre><code>./configure --prefix=$HOME --without-berkeley-db \
     --with-ssl --with-editor=/usr/bin/vim \
     --without-apxs --without-apache
make &amp;&amp; make install</code></pre>
<p>That worked on some servers but not others, I spent many hours clumsily trying to figure out why. I found that the build process was linking to external libraries instead of the ones in subversion-deps, despite the configure directives.</p>
<p>On the 64-bit server (x86_64) this was a big problem, even though everything worked normally on two 32-bit (i686/i386) servers.  Check server architecture with either <code>arch</code>, <code>uname -a</code> or <code>cat /proc/cpuinfo</code>. The solution for 64-bit machines is to build the three main components beforehand and then tell Subversion where to find them.</p>
<h3>Build them, use them  (64-bit?)</h3>
<p>The following commands systematically build each of the three shared libraries from the Subversion-deps sources. This should guarantee that the files Subversion links to will be compatible. In each step, we explicitly enable compilation of shared libraries and prefix the files into our home directory. This looks worse than it is.</p>
<p>Build <a href="http://apr.apache.org/">apr</a>, apr-util and <a href="http://www.webdav.org/neon/">neon</a>, in that order:</p>
<pre><code>cd apr
./configure --enable-shared --prefix=$HOME
make &amp;&amp; make install

cd ../apr-util
./configure --enable-shared --prefix=$HOME \
     --with-expat=builtin --with-apr=$HOME \
     --without-berkeley-db
make &amp;&amp; make install

cd ../neon
./configure --enable-shared --prefix=$HOME \
     --with-libs=$HOME --with-ssl
make &amp;&amp; make install</code></pre>
<p>With those out of the way, we can now configure and build Subversion. According to the notes in Subversion&#8217;s configure file, the <code>--with-ssl</code> flag is not necessary since it&#8217;s just passed to neon and we already built neon.  <code>--without-apxs</code> and <code>--without-apache</code> prevent Subversion from trying to install its Apache modules. Remember to point to the libraries we just built (in $HOME): (note: you may need to add the <code>--without-serf</code> flag as well, <a href="#comment-50835">see this comment</a>)</p>
<pre><code>cd ../
./configure --prefix=$HOME --without-berkeley-db \
     --with-editor=/usr/bin/vim --with-apr=$HOME \
     --with-apr-util=$HOME --with-neon=$HOME \
     --without-apxs --without-apache
make &amp;&amp; make install</code></pre>
<p>Subversion should now be installed! It&#8217;s likely you already have <code>:~/bin</code> in your user $PATH, if so, you can try it out right away:</p>
<pre><code>svn --version

   svn, version 1.4.6 (r28521)
      compiled Jan 29 2008, 11:05:47</code></pre>
<p>So far, I&#8217;ve run this against two LiquidWeb shared accounts, one LiquidWeb CPanel container on a VPS and a <a href="http://www.hostmatters.com/">HostingMatters</a> shared account running JailShell. After some limited testing accessing different repositories with https and svn+ssh, everything seems to be working.</p>
<p>Now I just need to figure out where to put my repositories, here are some free Subversion hosts I&#8217;ve used or are considering:</p>
<ul>
<li><a href="http://www.beanstalkapp.com/pricing.html">Beanstalk</a> 20 MB free</li>
<li><a href="http://www.assembla.com">Assembla</a> 500 MB free?! really?</li>
<li><a href='http://unfuddle.com/home'>Unfuddle</a> 15 MB free</li>
<li><a href="http://code.google.com/hosting/">Google Code</a> 100 MB free, must be open source</li>
</ul>
<p>Two other sites which aren&#8217;t free, but I&#8217;m keeping in mind for the future: <a href="http://wush.net/">Wush</a> and  <a href="http://www.projectlocker.com/scenario/startup">Project Locker</a>.</p>
<h3>The getting there was the hardest part</h3>
<p>While I was finally able to streamline this down to a fairly simple process, it was not easy to get there.  I don&#8217;t do much compiling from source, so I&#8217;m very clumsy about troubleshooting. If any of these steps can be simplified, please leave a note.</p>
<pre><code>Here are some of the errors I saw along the way:
/usr/lib/libexpat.so: could not read symbols: File in wrong format
/usr/lib/libexpat.so: could not read symbols: Invalid operation
/home/joe/_src/subversion-1.4.6/neon/src/.libs/libneon.a: could not read symbols: Bad value </code></pre>
<p>The first two errors indicate that the build had grabbed the 32-bit libexpat from /usr/lib instead of the 64-bit version from /usr/lib64. However, redirecting to the 64-bit libraries introduced other problems such as the libneon.a bad value error. As mentioned above, what I needed to do was pull libraries from the subverson-deps code. To use those, I needed to compile each one first. </p>
<h3>Resources:</h3>
<ul>
<li><a href="http://svn.collab.net/repos/svn/trunk/INSTALL">Subversion&#8217;s INSTALL file</a></li>
<li>./configure -help</li>
<li><a href="http://pastie.caboo.se/99618">These commands</a>, from <a href="http://forum.activereload.net/forums/8/topics/241#post_934">this original post</a> almost worked.</li>
<li><a href='http://www.apdz.com/phpbb/viewtopic.php?t=369&#038;;sid=cbd15a9447f96cf9eb5000c4efb1b167'>Installing Mephisto and Subversion on a Shared Host</a>, first inkling this was possible</li>
<li>similar problem with with <a href="http://svn.haxx.se/users/archive-2005-05/0284.shtml">/usr/lib instead of /usr/lib64.</a></li>
<li><a href="http://www.linuxquestions.org/questions/showthread.php?t=563541">GATTAGA&#8217;s post</a> was the first clue about working around the libexpat problem.</li>
<li><a href="http://www.svnforum.org/2017/viewtopic.php?t=1940&#038;;sid=1d48a79776ec72bfbb719b91beb274ba">SVNforum: libneon.a: could not read symbols: Bad value</a> This was the post that gave me the final bit of information I needed</li>
</ul>
<p><strong>Related:</strong> <a href="http://joemaller.com/2008/08/13/how-to-install-git-on-a-shared-host/">How to install Git on a shared host</a></p>
<p><strong id="lwupdate">Update, November 2010:</strong> Sometime this year Liquid Web disallowed compiler access.  I now host my sites at <a href="http://www.webfaction.com/signup?affiliate=joemaller">WebFaction</a> and <a href="http://www.a2hosting.com/1482.html">A2 Hosting</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/881/how-to-install-subversion-on-a-shared-host/feed/</wfw:commentRss>
		<slash:comments>58</slash:comments>
		</item>
		<item>
		<title>Quick note about sed&#8217;s edit in place option</title>
		<link>http://joemaller.com/823/quick-note-about-seds-edit-in-place-option/</link>
		<comments>http://joemaller.com/823/quick-note-about-seds-edit-in-place-option/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 17:11:33 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[misc.]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://joemaller.com/2007/09/16/quick-note-about-seds-edit-in-place-option/</guid>
		<description><![CDATA[From the sed manpage: -i extension Edit files in-place, saving backups with the specified extension. If a zero-length extension is given, no backup will be saved. It is not recommended to give a zero-length extension when in-place editing files, as you risk corruption or partial content in situ- ations where disk space is exhausted, etc. [...]]]></description>
			<content:encoded><![CDATA[<p>From the sed manpage:</p>
<pre><code>-i extension
   Edit files in-place, saving backups with the specified extension.
   If a zero-length extension is given, no backup will be saved.  It
   is not recommended to give a zero-length extension when in-place
   editing files, as you risk corruption or partial content in situ-
   ations where disk space is exhausted, etc.</code></pre>
<p>This doesn&#8217;t work:</p>
<p><code>sed -i -e's/apples/oranges/' file.txt</code></p>
<p>The key thing here is that the extension after the <code>-i</code> flag is not optional. If you leave it off, sed assumes you&#8217;ll be entering it via stdin, which isn&#8217;t allowed and yields this error:</p>
<p><code>sed: -i may not be used with stdin</code></p>
<p>The solution is to send a zero-length extension like this:</p>
<p><code>sed -i '' -e's/apples/oranges/' file.txt</code></p>
<p>Careful with this, it could be <strong>really</strong> dangerous with poorly crafted commands.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/823/quick-note-about-seds-edit-in-place-option/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>SSH Key Pair troubleshooting</title>
		<link>http://joemaller.com/812/ssh-key-pair-troubleshooting/</link>
		<comments>http://joemaller.com/812/ssh-key-pair-troubleshooting/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 03:40:11 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://joemaller.com/2007/09/05/ssh-key-pair-troubleshooting/</guid>
		<description><![CDATA[For some reason I&#8217;ve put off setting up SSH key pairs, probably having something to do with how arcane most of the setup instructions appear. Tonight however, I&#8217;m unexpectedly preparing to transfer a client to a new hosting account on Media Temple and enjoying key-pair access to their new repository. Media Temple doesn&#8217;t yet support [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason I&#8217;ve put off setting up SSH key pairs, probably having something to do with how arcane most of the setup instructions appear. Tonight however, I&#8217;m unexpectedly preparing to transfer a client to a new hosting account on Media Temple and enjoying key-pair access to their new repository.</p>
<p>Media Temple doesn&#8217;t yet support <code>svn://</code> access to Subversion repositories, only <code>svn+ssh://</code>. So, having been pushed, I finally decided to make my life easier with SSH key pairs.</p>
<p>The best tutorial I found was Allan Odgaard&#8217;s: <a href='http://macromates.com/blog/2005/subversion-support-and-ssh-key-pairs/'>Subversion support and ssh key pairs</a>. Without ssh key pairs, all the fantastic Subversion integration in TextMate won&#8217;t work with svn+ssh:// repositories.</p>
<p>However there&#8217;s one crucial piece of information missing from that: <em>Permissions</em>.</p>
<p>If access to the SSH configuration files is not properly assigned, the ssh pair won&#8217;t work. No meaningful errors at connect time, just silent, infuriating failure.</p>
<p>The ~/.ssh directory permissions need to be set to <strong>0700</strong> and the authorized_keys file needs to be set to <strong>0600</strong>:</p>
<p><code>chmod 0600 ~/.ssh/authorized_keys<br />
chmod 0700 ~/.ssh</code></p>
<p>If group or world have write access to authorized_keys, key pair authentication will fail.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/812/ssh-key-pair-troubleshooting/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Calendar Server</title>
		<link>http://joemaller.com/763/calendar-server/</link>
		<comments>http://joemaller.com/763/calendar-server/#comments</comments>
		<pubDate>Thu, 14 Jun 2007 01:16:49 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://joemaller.com/2007/06/13/calendar-server/</guid>
		<description><![CDATA[The CalDav project Calendar Server is looking to be very, very good. It&#8217;s an open source server supporting full read-write calendars, availability blocking, delegations, notifications, directory integration and more. I&#8217;m going to be setting up a few of these once we start migrating to Leopard.]]></description>
			<content:encoded><![CDATA[<p>The CalDav project <a href="http://trac.macosforge.org/projects/calendarserver">Calendar Server</a> is looking to be very, very good.</p>
<p>It&#8217;s an open source server supporting full read-write calendars, availability blocking, delegations, notifications, directory integration and more. I&#8217;m going to be setting up a few of these once we start migrating to Leopard.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/763/calendar-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zen UNIX</title>
		<link>http://joemaller.com/733/zen-unix/</link>
		<comments>http://joemaller.com/733/zen-unix/#comments</comments>
		<pubDate>Sun, 04 Mar 2007 21:56:43 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[misc.]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://joemaller.com/2007/03/04/zen-unix/</guid>
		<description><![CDATA[A great quote I recently stumbled across but I need to keep reminding myself of: &#8220;Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.&#8221; &#8211;Brian Kernighan Another fantastic quote attributed to [...]]]></description>
			<content:encoded><![CDATA[<p>A great quote I recently stumbled across but I need to keep reminding myself of:</p>
<blockquote><p>&#8220;Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.&#8221;</p>
<p>&#8211;<a href="http://en.wikipedia.org/wiki/Brian_Kernighan">Brian Kernighan</a></p></blockquote>
<p>Another fantastic quote attributed to Mr. Kernighan that applies to making most anything:</p>
<blockquote><p>&#8220;Controlling complexity is the essence of computer programming.&#8221;</p></blockquote>
<p>Many other useful insights here: <a href="http://www.faqs.org/docs/artu/ch01s06.html">Basics of the Unix Philosophy</a> Scroll down to the rules and extend these beyond just Unix or programming.</p>
<p>Since this was all rooted in Unix, here&#8217;s a document I wish I&#8217;d read before first wading into the OS X terminal way back when: <a href="http://freeengineer.org/learnUNIXin10minutes.html">Learn UNIX in 10 minutes.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/733/zen-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing one file&#8217;s contents from another file</title>
		<link>http://joemaller.com/724/removing-one-files-contents-from-another-file/</link>
		<comments>http://joemaller.com/724/removing-one-files-contents-from-another-file/#comments</comments>
		<pubDate>Fri, 19 Jan 2007 07:22:00 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[misc.]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://joemaller.com/2007/01/19/removing-one-files-contents-from-another-file/</guid>
		<description><![CDATA[A friend called in the middle of a promotional email disaster. Due to a screwup by their mailing service, messages only went out to a random portion of their list. It was a disaster because all he had left to work with were two text files, the masterlist and a log of what had already [...]]]></description>
			<content:encoded><![CDATA[<p>A friend called in the middle of a promotional email disaster. Due to a screwup by their mailing service, messages only went out to a random portion of their list. It was a disaster because all he had left to work with were two text files, the masterlist and a log of what had already been sent.</p>
<p>So we basically needed to delete the contents of a small file, &#8220;deleteme.txt&#8221; from the contents of larger file, &#8220;masterlist.txt&#8221;. The lines to remove were not contiguous and some lines in the smaller file might have already been removed from the larger file.</p>
<p>Here is the piped unix command I used to do this:</p>
<pre><code>cat deleteme.txt deleteme.txt masterlist.txt | sort | uniq -u &gt; newmasterlist.txt</code></pre>
<p>The <a href="http://www.gsp.com/cgi-bin/man.cgi?section=1&#038;topic=uniq">uniq</a> command&#8217;s -u flag outputs only lines which appear once, omitting every duplicate line. I used cat to join the deleteme.txt file twice to guarantee the interim file would contain at least two copies of every line to remove. If the lines already appeared in masterlist.txt, then there would be three to remove, but forcing duplicates made sure I wouldn&#8217;t end up with the already deleted lines being added back in (an <a href="http://en.wikipedia.org/wiki/XOR">XOR</a>).</p>
<p>As I wrote this out, it started to seem more and more simple, almost to the point of silly. Writing this post took far longer than fixing the files. But the solution didn&#8217;t occur to me right away and this post is now exactly what I was googling around for.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/724/removing-one-files-contents-from-another-file/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 1/40 queries in 0.032 seconds using disk: basic
Object Caching 583/670 objects using disk: basic

Served from: joemaller.com @ 2012-05-24 01:47:45 -->
