<?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; web</title>
	<atom:link href="http://joemaller.com/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://joemaller.com</link>
	<description>.com</description>
	<lastBuildDate>Fri, 27 Jan 2012 06:04:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>IE6, IE7 and IE8 Compatibility testing with Microsoft Virtual PCs</title>
		<link>http://joemaller.com/2896/ie6-ie7-and-ie8-compatibility-testing-with-microsoft-virtual-pcs/</link>
		<comments>http://joemaller.com/2896/ie6-ie7-and-ie8-compatibility-testing-with-microsoft-virtual-pcs/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 15:15:10 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[misc.]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Parallels]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://joemaller.com/?p=2896</guid>
		<description><![CDATA[Or: How to covert Microsoft&#8217;s Internet Explorer Application Compatibility Virtual PC images for testing on a Mac with Parallels Desktop or VMware Fusion. (but that&#8217;s kind of a mouthful) To help with web development and testing, Microsoft provides several compatibility environments for past versions of Internet Explorer. These are time-limited, pre-configured Virtual PC disk images, [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Or: How to covert Microsoft&#8217;s Internet Explorer Application Compatibility Virtual PC images for testing on a Mac with Parallels Desktop or VMware Fusion. (but that&#8217;s kind of a mouthful)</p></blockquote>
<p>To help with web development and testing, Microsoft provides several compatibility environments for past versions of Internet Explorer. These are time-limited, pre-configured Virtual PC disk images, intended for use with <a href="http://www.microsoft.com/windows/virtual-pc/default.aspx">Windows Virtual PC</a>.</p>
<p><img class="alignright size-full wp-image-2897" title="ie6-ie7-ie8" src="http://joemaller.com/wordpress/wp-content/uploads/2011/03/ie6-ie7-ie8.png" alt="" width="252" height="350" />That&#8217;s great, except Virtual PC doesn&#8217;t really run inside another virtual environment like <a title="VMware Fusion: Run Windows on Mac for Desktop Virtualization" href="http://www.vmware.com/products/fusion/">VMware Fusion</a> or <a title="Parallels Desktop 6 for Mac" href="http://www.parallels.com/products/desktop/">Parallels Desktop</a>. Since so much web development is done on Macs these days, this makes testing difficult. But, the VPC images are just virtual hard drives, so they can be easily converted to the native format of either Parallels or VMware.</p>
<p>Below are instructions for converting Microsoft&#8217;s .VHD files to native Parallels Desktop or VMware Fusion virtual machines. The goal is to do everything without using another Windows machine or digging out your old WinXP CD.</p>
<h3>Get the IE Compatibility VMs</h3>
<p>Download one or all of the <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&amp;displaylang=en">Internet Explorer Application Compatibility VPC Images</a>. Self-extracting EXEs can be decompressed on a Mac with <a href="http://wakaba.c3.cx/s/apps/unarchiver.html">The Unarchiver</a>. The VHD is all that&#8217;s needed, one or all of these:</p>
<ul>
<li>IE6Compat.vhd</li>
<li>IE7Compat.vhd</li>
<li>IE8Compat.vhd</li>
<li>Vista Business with IE7.vhd</li>
<li>Vista SP1 x86 with IE8 2009-Apr.vhd</li>
</ul>
<h3>Convert the VHD image to Parallels&#8217; or VMware&#8217;s native virtual disk format</h3>
<p>Currently, Parallels Desktop 6 can&#8217;t convert VHDs through it&#8217;s GUI, but it does include a <a title="Parallels 6: No import of VMs anymore? - Parallels Forums" href="http://forum.parallels.com/showthread.php?p=422940#7">hidden command-line utility</a> which works perfectly. Create a new Parallels VPC in the default location (<code>~/Documents/Parallels</code>) with this command:</p>
<pre><code>$ /Library/Parallels/Parallels\ Service.app/Contents/PlugIns/Parallels\ VM\ Converter.app/Contents/MacOS/prl_convert IE7Compat.vhd </code></pre>
<p>For VMware Fusion, use one of the components in <a title="Q - [kju:]" href="http://www.kju-app.org/">Q</a> (qemu-img, <a href="http://blog.mozmonkey.com/2008/vpc-ie6-ie7-ie8-on-mac-os-x/#comment-110349">details</a>) to convert the .VHD files to VMware&#8217;s .vmdk format.</p>
<pre><code>$ /Applications/Q.app/Contents/MacOS/qemu-img convert -O vmdk -f vpc IE7Compat.vhd IE7Compat.vmdk </code></pre>
<p>Create a new Virtual Machine using the vmdk as the disk. I could not get Vista to work dependably with VMware.</p>
<h3>XP: Fix Windows Drivers</h3>
<p>On first boot, the VM will attempt to re-activate Windows. This will fail because the networking drivers haven&#8217;t been installed yet.</p>
<p>Next the VPC_EULA will open and the first of many &#8220;Files Needed&#8221; dialogs and &#8220;Found New Hardware&#8221; wizards will appear. Close and cancel everything until you&#8217;re back at the Windows XP desktop.</p>
<p>If you&#8217;re running Parallels Desktop, it will take over and install its tools. If you&#8217;re using VMware, choose <strong>Install VMware Tools</strong> from the Virtual Machine menu. VMware also asks for a handful of drivers during tools installation, cancel these, they&#8217;ll be fixed later. The VM will reboot when the tools and drivers finish installing.</p>
<p>After the initial reboot, Windows requires WGA activation. Since this is a Microsoft-provided license, the VM will pass WGA and Windows will be activated. There&#8217;s no point in registering, so skip that. Everything from here forward is cleanup.</p>
<p>The easiest way to fix a bunch of drivers is to install XP Service Pack 3. Download the ISO from Microsoft here: <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2FCDE6CE-B5FB-4488-8C50-FE22559D164E">Windows XP Service Pack 3 &#8211; ISO-9660 CD Image File</a></p>
<p>Any lingering driver issues can be resolved in Device Manager (Control Panel &gt; System &gt; Hardware tab &gt; Device manager). The problem items should either have their drivers updated or, if that doesn&#8217;t work, disabled altogether. VMware&#8217;s audio driver failed to load initially but updated successfully. Mystery USB devices were a problem in both, but can be disabled.</p>
<p>Ironically, I had much more trouble getting these VMs running natively under Virtual PCs on a Windows box. Many of these steps are necessary there too.</p>
<p>Other stuff I install:</p>
<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyid=2F465BE0-94FD-4569-B3C4-DFFDF19CCD99&amp;displaylang=en">Microsoft Script Debugger</a></li>
<li><a href="http://support.apple.com/kb/dl999">Bonjour for Windows</a></li>
</ul>
<h3>VMware or Parallels?</h3>
<p>For years I&#8217;ve been bouncing back and forth between the two. It seems that with each major release, one leapfrogs the other. After testing VMs in both, I&#8217;ve decided to switch back to Parallels. At the moment, it just seems more full-featured and seamless. According to a recent <a title="MacTech Labs: Virtualization Benchmarks | MacTech" href="http://www.mactech.com/2011/01/05/virtualization-benchmarks">MacTech virtualization comparison test</a>, Parallels is also faster.</p>
<h3>Disclaimer</h3>
<p>The above process may violate the second paragraph of the &#8220;Installation and Use Rights&#8221; section of Microsoft&#8217;s XP EULA:</p>
<blockquote><p>You may install and use one copy of the software on your device of which you are running a validly licensed copy of Microsoft Virtual PC or Microsoft Virtual Server. <strong>You may not change or convert the virtual hard disk image from the VHD format. </strong></p></blockquote>
<p>However, no such clause appears in the Vista EULA which seems to contradict the above and fully supports virtualization:</p>
<blockquote><p>You may install and use one copy of the software on your device of which you are running <strong>any virtualization software</strong> able to run Virtual Hard Disk (VHD) formats, including Microsoft Virtual PC or Microsoft Virtual Server.</p></blockquote>
<p>Anyway, I assume no responsibility for what anyone does with this information.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/2896/ie6-ie7-and-ie8-compatibility-testing-with-microsoft-virtual-pcs/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Faster and easier Gitweb installation</title>
		<link>http://joemaller.com/1596/faster-easier-gitweb-installation/</link>
		<comments>http://joemaller.com/1596/faster-easier-gitweb-installation/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 22:47:20 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[misc.]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[gitweb]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://joemaller.com/?p=1596</guid>
		<description><![CDATA[The idea of using make to build Gitweb isn&#8217;t just excessively complex, it&#8217;s also mostly unnecessary. Building gitweb.cgi from gitweb.perl only changes 19 of the source file&#8217;s 6734 lines (0.2%). Fact is, to get Gitweb working only one line needs changing. After the following edit, all local configuration values can be loaded from a simple [...]]]></description>
			<content:encoded><![CDATA[<p>The idea of using make to build <a href="http://git.or.cz/gitwiki/Gitweb">Gitweb</a> isn&#8217;t just excessively complex, it&#8217;s also mostly unnecessary. Building <strong>gitweb.cgi</strong> from <strong>gitweb.perl</strong> only changes 19 of the source file&#8217;s 6734 lines (0.2%).</p>
<p>Fact is, to get Gitweb working only <em>one</em> line needs changing. After the following edit, all local configuration values can be loaded from a simple config file.</p>
<p>On line 546, insert the name of your config file:</p>
<pre><code><span style="color: red">-our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";</span>
+our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "<strong>gitweb_config.perl</strong>";</code></pre>
<p>A set of fully-documented configuration files is available in the <a href="http://github.com/joemaller/Simple-Gitweb-Config">Simple Gitweb Config</a> project on Github, to help get things up and running quickly.</p>
<p><span id="more-1596"></span></p>
<h3>Full instructions</h3>
<p>Here are all the steps necessary to get Gitweb running on a webserver. In most cases, the configuration will work without modification, installation shouldn&#8217;t take more than five minutes start to finish.</p>
<ol>
<li>Create temporary source directory:</li>
<pre><code>mkdir ~/src &amp;&amp; cd ~/src</code></pre>
<li>Download and extract Git source and Simple Gitweb Config tarballs:</li>
<pre><code>curl -LO http://kernel.org/pub/software/scm/git/git-1.6.6.tar.gz
curl -LO http://github.com/joemaller/Simple-Gitweb-Config/tarball/master
tar -xvzf git-1.6.6.tar.gz
tar -xzvf master</code></pre>
<li>Copy Git&#8217;s gitweb subdirectory to a web accessible location, then copy the gitweb config files into the live gitweb directory:</li>
<pre><code>cp -r git-1.6.6/gitweb ~/www/
cp joemaller-Simple-Gitweb-Config*/* ~/www/gitweb/</code></pre>
<li>Replace <code>++GITWEB_CONFIG++</code> with <code>gitweb_config.perl</code> and make the resulting CGI executable:</li>
<pre><code>sed -re's/\++GITWEB_CONFIG\++/gitweb_config.perl/g' gitweb.perl  &gt; gitweb.cgi
chmod a+x gitweb.cgi</code></pre>
<li>Gitweb should be working now, but if necessary, edit <strong>projects_list.txt</strong>, <strong>gitweb_config.perl</strong> and customize the three html files for your environment. </li>
</ol>
<p>One last note, since it wasn&#8217;t immediately obvious to me. To change the default repository description, <em>&#8220;Unnamed repository; edit this file to name it for gitweb.&#8221;</em> edit the configuration file inside the .git folder. Descriptions are per-repository and do not update or transfer with pushes, pulls or clones.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/1596/faster-easier-gitweb-installation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NYTimes search bubbles begone!</title>
		<link>http://joemaller.com/1395/nytimes-search-bubbles-begone/</link>
		<comments>http://joemaller.com/1395/nytimes-search-bubbles-begone/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 04:32:15 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[misc.]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[New York Times]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://joemaller.com/?p=1395</guid>
		<description><![CDATA[Those little search bubbles that popup on the New York Times website whenever you select text really annoy me. Clicking this bookmarklet on any NYTimes page will prevent them from appearing: NYTfix This is a 2-minute solution, there&#8217;s no domain checking or anything, all it does is remove existing bubbles then cancel the document&#8217;s mouseup [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://joemaller.com/wordpress/wp-content/uploads/2009/06/nytimes-search-balloons-1.png" alt="nytimes-search-balloons-1" title="nytimes-search-balloons-1" width="462" height="101" class="alignnone size-full wp-image-1397" /></p>
<p>Those little search bubbles that popup on the New York Times website whenever you select text really annoy me. Clicking this bookmarklet on any NYTimes page will prevent them from appearing:</p>
<p><a href="javascript:(function(){d=document;e=d.getElementById('nytd_selection_button');if(e){e.remove()};d.stopObserving('mouseup')})()">NYTfix</a></p>
<p>This is a 2-minute solution, there&#8217;s no domain checking or anything, all it does is remove existing bubbles then cancel the document&#8217;s mouseup observer, which the NYTimes site uses to trigger the search balloons.  The bookmarklet was very quickly checked in Safari, Firefox and IE8, NYTimes text selection doesn&#8217;t work at all for me in IE6 or IE7.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/1395/nytimes-search-bubbles-begone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Where to watch the Inauguration online</title>
		<link>http://joemaller.com/1240/where-to-watch-the-inauguration-online/</link>
		<comments>http://joemaller.com/1240/where-to-watch-the-inauguration-online/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 20:24:08 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[misc.]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[inauguration]]></category>
		<category><![CDATA[Obama]]></category>
		<category><![CDATA[POTUS]]></category>
		<category><![CDATA[President]]></category>
		<category><![CDATA[United States]]></category>
		<category><![CDATA[USA]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://joemaller.com/?p=1240</guid>
		<description><![CDATA[On Tuesday I&#8217;ll be working in an office without TV, so I gathered up list of sites where the inauguration can be watched online. Information and schedules: District of Columbia Inauguration Day 2009 Presidential Inaugural Committee The official schedule has the swearing in ceremony as starting at 11:30 am. I only found one source listing [...]]]></description>
			<content:encoded><![CDATA[<p>On Tuesday I&#8217;ll be working in an office without TV, so I gathered up list of sites where the inauguration can be watched online.</p>
<h3>Information and schedules:<br />
</h3>
<ul>
<li><a href="http://inauguration.dc.gov" target="_blank">District of Columbia Inauguration Day 2009</a></li>
<li><a href="http://pic2009.org" target="_blank">Presidential Inaugural Committee</a>
</li>
</ul>
<p>The official schedule has the swearing in ceremony as starting at 11:30 am. I only found <a href="http://www.delawareonline.com/article/20090118/NEWS02/901180346" target="_blank">one source</a> listing the Vice-President&#8217;s swearing in at 11:45 and President&#8217;s at noon. </p>
<h3>Live video streams</h3>
<p>The following sites have announced live streaming coverage of the inauguration.</p>
<p><em>Video sites: </em></p>
<ul>
<li><a href="http://www.hulu.com/inauguration" target="_blank">Hulu</a></li>
<li><a href="http://www.joost.com/Obama_Inauguration_Live" target="_blank">Joost</a></li>
<li><a href="http://www.ustream.tv/channel/barack-obama-inauguration-day-live" target="_blank">UStream</a> (supposedly iPhone compatible)</li>
<li><a href="http://www.youtube.com/inauguration">YouTube</a> (maybe)</li>
</ul>
<p><em>News:<br />
</em>
<ul>
<li><a href="http://abcnews.go.com/Politics/Inauguration/" target="_blank">ABC News</a></li>
<li><a href="http://www.cbsnews.com/stories/2009/01/08/national/inauguration09/main4707733.shtml" target="_blank">CBS News</a>
</li>
<li><a href="http://www.cnn.com/live/" target="_blank">CNN</a> (partnered with Facebook)
</li>
<li><a href="http://www.msnbc.msn.com/id/27721638/" target="_blank">MSNBC</a>
</li>
<li><a href="http://voices.washingtonpost.com/inauguration-central/" target="_blank">Washington Post</a>
</li>
<li><a href="http://projects.nytimes.com/44th_president/inauguration" target="_blank">New York Times</a></li>
</ul>
<p><em>Governmental sites: </em></p>
<ul>
<li><a href="http://www.c-span.org/" target="_blank">C-SPAN</a>
</li>
<li><a href="http://pic2009.org" target="_blank">Presidential Inaugural Committee</a>
</li>
<li><a href="http://inaugural.senate.gov/index.cfm" target="_blank">US Congress</a></li>
</ul>
<h3>Other &#8220;where to watch&#8221; articles:<br />
</h3>
<p><a href="http://www.cnn.com/2009/tech/01/16/inauguration.online/ " target="_blank">CNN</a>, <a href="http://news.cnet.com/8301-13578_3-10144072-38.html " target="_blank">CNet</a>, <a href="http://www.pcworld.com/article/157062/obama_inauguration_be_there_without_being_there.html" target="_blank">PC World</a>, <a href="http://www.webtvhub.com/watch-obama-inauguration-acceptance-speech/" target="_blank">WebTVhub</a>, <a href="http://www.techcrunch.com/2009/01/18/the-techcrunch-guide-to-the-inauguration/" target="_blank">TechCrunch</a></p>
<p>I won&#8217;t be at all surprised if the Internet melts on Tuesday, just before noon EST. But I hope it doesn&#8217;t.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/1240/where-to-watch-the-inauguration-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A web-focused Git workflow</title>
		<link>http://joemaller.com/990/a-web-focused-git-workflow/</link>
		<comments>http://joemaller.com/990/a-web-focused-git-workflow/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 17:04:30 +0000</pubDate>
		<dc:creator>Joe Maller</dc:creator>
				<category><![CDATA[misc.]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://joemaller.com/?p=990</guid>
		<description><![CDATA[After months of looking, struggling through Git-SVN glitches and letting things roll around in my head, I&#8217;ve finally arrived at a web-focused Git workflow that&#8217;s simple, flexible and easy to use. Some key advantages: Pushing remote changes automatically updates the live site Server-based site edits won&#8217;t break history Simple, no special commit rules or requirements [...]]]></description>
			<content:encoded><![CDATA[<p>After months of looking, struggling through Git-SVN glitches and letting things roll around in my head, I&#8217;ve finally arrived at a web-focused Git workflow that&#8217;s simple, flexible and easy to use.</p>
<p>Some key advantages:</p>
<ul>
<li>Pushing remote changes automatically updates the live site</li>
<li>Server-based site edits won&#8217;t break history</li>
<li>Simple, no special commit rules or requirements</li>
<li>Works with existing sites, no need to redeploy or move files</li>
</ul>
<h3>Overview</h3>
<p>The key idea in this system is that the web site exists on the server as a pair of repositories; a bare repository alongside a conventional repository containing the live site. Two simple Git hooks link the pair, automatically pushing and pulling changes between them.</p>
<p><img src="http://joemaller.com/wordpress/wp-content/uploads/2008/11/hub-prime2.jpg" alt="" title="hub, prime, clones" width="500" height="247" /></p>
<p>The two repositories:</p>
<ul>
<li><strong>Hub</strong> is a bare repository. All other repositories will be cloned from this.</li>
<li><strong>Prime</strong> is a standard repository, the live web site is served from its working directory.</li>
</ul>
<p>Using the pair of repositories is simple and flexible. Remote clones with ssh-access can update the live site with a simple <strong>git push </strong>to Hub. Any files edited directly on the server are instantly mirrored into Hub upon commit. The whole thing pretty much just works &#8212; whichever way it&#8217;s used.</p>
<p><strong>Getting ready</strong></p>
<p>Obviously <a href="http://git.or.cz/">Git</a> is required on the server and any local machines. My shared web host doesn&#8217;t offer Git, but it&#8217;s easy enough to <a href="http://joemaller.com/2008/08/13/how-to-install-git-on-a-shared-host/">install Git yourself</a>.</p>
<p>If this is the first time running Git on your webserver, remember to <a href="http://rails.wincent.com/wiki/Git_quickstart ">setup your global configuration info</a>. I set a different Git user.name to help distinguish server-based changes in project history.</p>
<pre><code>$ git config --global user.name "Joe, working on the server"</code></pre>
<h3>Getting started</h3>
<p>The first step is to initialize a new Git repository in the live web site directory on the server, then to add and commit all the site&#8217;s files. This is the <strong>Prime</strong> repository and working copy. Even if history exists in other places, the contents of the live site will be the baseline onto which all other work is merged.</p>
<pre><code>$ cd ~/www
$ git init
$ git add .
$ git commit -m"initial import of pre-existing web files"</code></pre>
<p>Initializing in place also means there is no downtime or need to re-deploy the site, Git just builds a repository around everything that&#8217;s  already there.</p>
<p>With the live site now safely in Git, create a bare repository outside the web directory, this is <strong>Hub</strong>.</p>
<pre><code>$ cd; mkdir site_hub.git; cd site_hub.git
$ git --bare init
<span class="response">Initialized empty Git repository in /home/joe/site_hub.git</span></code></pre>
<p>Then, from inside Prime&#8217;s working directory, add Hub as a remote and push Prime&#8217;s master branch:</p>
<pre><code>$ cd ~/www
$ git remote add hub ~/site_hub.git
$ git remote show hub
<span class="response">* remote hub
  URL: /home/joe/site_hub.git</span>
$ git push hub master</code></pre>
<h3>Hooks</h3>
<p>Two simple Git hooks scripts keep Hub and Prime linked together.</p>
<p>An oft-repeated rule of Git is to <a href="http://git.or.cz/gitwiki/GitFaq#head-b96f48bc9c925074be9f95c0fce69bcece5f6e73">never push into a repository that has a work tree attached to it</a>. I tried it, and things do get weird fast. The hub repository exists for this reason. Instead of pushing changes to Prime from Hub, which wouldn&#8217;t affect the working copy anyway, Hub uses a hook script which tells Prime to pull changes from Hub.</p>
<h4>post-update &#8211; Hub repository</h4>
<p>This hook is called when Hub receives an update. The script changes directories to the Prime repository working copy then runs a pull from Prime. Pushing changes doesn&#8217;t update a repository&#8217;s working copy, so it&#8217;s necessary to execute this from inside the working copy itself.</p>
<pre><code>#!/bin/sh

echo
echo "**** Pulling changes into Prime [Hub's post-update hook]"
echo

cd $HOME/www || exit
unset GIT_DIR
git pull hub master

exec git-update-server-info</code></pre>
<h4>post-commit &#8211; Prime repository</h4>
<p>This hook is called after every commit to send the newly commited changes back up to Hub. Ideally, it&#8217;s not common to make changes live on the server, but automating this makes sure site history won&#8217;t diverge and create conflicts.</p>
<pre><code>#!/bin/sh

echo
echo "**** pushing changes to Hub [Prime's post-commit hook]"
echo

git push hub</code></pre>
<p>With this hook in place, all changes made to Prime&#8217;s master branch are immediately available from Hub. Other branches will also be cloned, but won&#8217;t affect the site. Because all remote repository access is via SSH urls, only users with shell access to the web server will be able to push and trigger a site update.</p>
<h3>Conflicts</h3>
<p>This repository-hook arrangement makes it very difficult to accidentally break the live site. Since every commit to Prime is automatically pushed to Hub, all conflicts will be immediately visible to the clones when pushing an update. </p>
<p>However there are a few situations where Prime can diverge from Hub which will require additional steps to fix. If an uncommitted edit leaves Prime in a dirty state, Hub&#8217;s post-update pull will fail with an &#8220;Entry &#8216;foo&#8217; not uptodate. Cannot merge.&#8221; warning. Committing changes will clean up Prime&#8217;s working directory, and the post-update hook will then merge the un-pulled changes. </p>
<p>If a conflict occurs where changes to Prime can&#8217;t be merged with Hub, I&#8217;ve found the best solution is to push the current state of Prime to a new branch on Hub. The following command, issued from inside Prime, will create a remote &#8220;fixme&#8221; branch based on the current contents of Prime:</p>
<pre><code>$ git push hub master:refs/heads/fixme</code></pre>
<p>Once that&#8217;s in Hub, any remote clone can pull down the new branch and resolve the merge. Trying to resolve a conflict on the server would almost certainly break the site due to Git&#8217;s conflict markers.</p>
<h3>Housekeeping</h3>
<p>Prime&#8217;s .git folder is at the root level of the web site, and is probably publicly accessible. To protect the folder and prevent unwanted clones of the repository, add the following to your top-level .htaccess file to forbid web access:</p>
<pre><code># deny access to the top-level git repository:
RewriteEngine On
RewriteRule \.git - [F,L]</code></pre>
<h3>Troubleshooting</h3>
<p>If you&#8217;re seeing this error when trying to push to a server repository:
<pre><code><span class="response nocode">git-receive-pack: command not found
fatal: The remote end hung up unexpectedly</span></code></pre>
<p>Add <code>export PATH=${PATH}:~/bin</code> to your .bashrc file on the server. Thanks to Robert for <a href="http://www.bluestatic.org/blog/2007/08/01/git-public-push-ing/">finding and posting the fix</a>.</p>
<h3>Links</h3>
<p>These didn&#8217;t fit in anywhere else:</p>
<ul>
<li>Toolman Tim has a very good introductory walkthrough of <a href="http://toolmantim.com/article/2007/12/5/setting_up_a_new_remote_git_repository">setting up a new remote git repository</a>.
</li>
<li>This ended up being somewhat similar to the <a href="http://ikiwiki.info/rcs/git/"> update mechanism in Ikiwiki</a>, wish I&#8217;d found that page earlier.</li>
<li><a href="http://www.linuxworld.com/community/?q=node/3057"> Getting a static web site organized with git </a> came up with a different solution, but calling <code>git reset --hard</code> from a hook on the server could cause a lot of trouble when committing server-side changes.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/990/a-web-focused-git-workflow/feed/</wfw:commentRss>
		<slash:comments>82</slash:comments>
		</item>
		<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. As with my previous Subversion on shared hosting post, this will be a barebones install. The purpose of this installation is to be able to push changes from remote repositories into the [...]]]></description>
			<content:encoded><![CDATA[<p><em>(regularly updated)<br />
</em></p>
<p>Installing Git on a shared hosting account is simple, the installation is fast and like most things Git, it just works. </p>
<p>As with my previous <a href="http://joemaller.com/2008/01/29/how-to-install-subversion-on-a-shared-host/">Subversion on shared hosting</a> post, this will be a barebones install. The purpose of this installation is to be able to push changes from remote repositories into the hosted repo, where the hosted repository may also serve as the source directory of the live website. <a href="http://joemaller.com/2008/11/25/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 <code>/usr/bin/gcc: Permission denied</code> you don&#8217;t have access to the GCC compiler and won&#8217;t 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/opt/bin:$PATH</code></pre>
<p>Be sure &#8216;~/opt/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/opt/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/opt/bin:/usr/local/bin:/bin:/usr/bin</span></code></pre>
<p>Note: Installing into the ~/opt directory keeps the home folder cleaner and is where add-on applications are customarily installed on Unix systems.</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 current source tarballs from the <a href="http://git-scm.com/">Git site</a>. At the time this post was last updated, the most recent version was v1.7.6: </p>
<pre>
<code>$ curl -LO http://kernel.org/pub/software/scm/git/git-1.7.6.tar.bz2</code></pre>
<p>Untar the archive and cd into the new directory:</p>
<pre><code>$ tar -xjvf git-1.7.6.tar.bz2
$ cd git-1.7.6</code></pre>
<p>This next step is the only one that really seems to matter with regards to shared hosting. The Configure script needs to be told where to install, and because we&#8217;re on a shared host, Git&#8217;s files should be put somewhere in our home directory:</p>
<pre>
<code>$ ./configure --prefix=$HOME/opt
<span class="response">[words...]</span></code></pre>
</pre>
<p>Lastly, make and install:</p>
<pre><code>$ make &amp;&amp; make install
<span class="response">[lots of words...]</span></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.6</span></code></pre>
<p>It's now safe to delete the src folder which contained the download and source files. </p>
<p>Note that these instructions do not install Git's documentation man pages. Also, these instructions appear to work exactly the same on Mac OS X, though the <a href="http://code.google.com/p/git-osx-installer/downloads/list?q=label:Featured">installer package</a> is way easier and includes documentation.</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>31</slash:comments>
		</item>
		<item>
		<title>iTransmogrify update</title>
		<link>http://joemaller.com/879/itransmogrify-update/</link>
		<comments>http://joemaller.com/879/itransmogrify-update/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 21:17:27 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[itransmogrify]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://joemaller.com/2008/01/23/itransmogrify-update/</guid>
		<description><![CDATA[The main iTransmogrify! script has been updated with a bunch of new functionality: YouTube.com pages are now supported (see notes) Daily Motion videos are supported for new-style urls (see notes) Kink.fm player and listings page are now supported Sideload.com play links are now supported WordPress Blogs using Viper Video QuickTags are supported for YouTube All [...]]]></description>
			<content:encoded><![CDATA[<p>The main <a href="http://itransmogrify.googlecode.com">iTransmogrify!</a> script has been updated with a bunch of new functionality:</p>
<ul>
<li>YouTube.com pages are now supported (see <a href="#notes">notes</a>)</li>
<li>Daily Motion videos are supported for new-style urls (see <a href="#notes">notes</a>)</li>
<li><a href="http://www.kink.fm">Kink.fm</a> player and listings page are now supported</li>
<li><a href="http://www.sideload.com">Sideload.com</a> play links are now supported</li>
<li>WordPress Blogs using <a href="http://wordpress.org/extend/plugins/vipers-video-quicktags">Viper Video QuickTags</a> are supported for YouTube</li>
<li>All media links now open into new windows, so you won&#8217;t have to re-transmogrify a page with several media files after playing one. Note that this is dependent on the iPhone, sometimes it will blank other windows)</li>
<li>Some content in iframes will now be converted.</li>
<li>MotionBox, Viddler and Vimeo embedded videos, while not supporting iPod/iPhone alternate content, now link to their respective detail pages.</li>
</ul>
<p>The main bookmarklet code was updated. This was necessary to workaround a <a href="http://joemaller.com/2008/01/22/itransmogrify-update-ready-but/">frustrating oversight with Google Code hosting</a>. Everyone will need to update their bookmarklet, in the future all updates will be automatic.</p>
<p>This has turned out to be far bigger than I ever imagined. Thank you to everyone for the links, feedback, compliments and ideas.</p>
<h3 id="known_issues">Known issues</h3>
<p>LiveJournal pages redefine a bunch of core JavaScript functionality, breaking all kinds of stuff including jQuery. Additionally, they&#8217;re serving media in an iframe from a different domain, meaning JavaScript couldn&#8217;t access the frame even if they hadn&#8217;t broken it.</p>
<h3 id="notes">Notes</h3>
<p><strong>YouTube Internal pages </strong ><br />
Because of a strange iPhone quirk, these links all need to go through the Google redirector, otherwise they bounce back to uk.youtube.com instead of playing.</p>
<p><strong>DailyMotion</strong><br />
DailyMotion videos using new-style urls, which are usually about six digits long, work correctly. Videos using the old-style alphanumeric ID do not work yet. I&#8217;m probably just going to resort to building a simple web-service to grab those. Additionally, there is no way to programatically access the mp4 alternate content url, so I just linked to their iPhone pages. I&#8217;d prefer embedding QuickTime directly, but it&#8217;s just not possible yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/879/itransmogrify-update/feed/</wfw:commentRss>
		<slash:comments>87</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Database Caching 1/28 queries in 0.030 seconds using disk: basic
Object Caching 566/635 objects using disk: basic

Served from: joemaller.com @ 2012-02-07 09:53:43 -->

<!-- W3 Total Cache: Page cache debug info:
Engine:             disk: enhanced
Cache key:          tag/web/feed/_index.xml_gzip
Caching:            enabled
Status:             not cached
Creation Time:      0.626s
Header info:
Set-Cookie:         bb2_screener_=1328626423+38.107.179.220+38.107.179.220; path=/
X-Pingback:         http://joemaller.com/wordpress/xmlrpc.php
Content-Type:       text/xml; charset=UTF-8
Last-Modified:      Tue, 07 Feb 2012 14:53:43 GMT
Vary:               Accept-Encoding, Cookie
Expires:            Tue, 07 Feb 2012 15:53:43 GMT
Pragma:             public
Cache-Control:      public, must-revalidate, proxy-revalidate
Etag:               b9ad51c000cd826bedf43e55a73f28a2
X-Powered-By:       W3 Total Cache/0.9.2.4
Content-Encoding:   gzip
-->
