<?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>Deferred Procrastination</title>
	<atom:link href="http://www.deferredprocrastination.co.uk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.deferredprocrastination.co.uk/blog</link>
	<description>Open Source Engineering</description>
	<lastBuildDate>Wed, 16 May 2012 10:15:06 +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>Cockpit Clearances</title>
		<link>http://www.deferredprocrastination.co.uk/blog/2012/cockpit-clearances/</link>
		<comments>http://www.deferredprocrastination.co.uk/blog/2012/cockpit-clearances/#comments</comments>
		<pubDate>Fri, 11 May 2012 08:07:24 +0000</pubDate>
		<dc:creator>Patrick Fenner</dc:creator>
				<category><![CDATA[Atomic Duck]]></category>
		<category><![CDATA[Cockpit]]></category>
		<category><![CDATA[Ergonomics]]></category>
		<category><![CDATA[Rider]]></category>

		<guid isPermaLink="false">https://www.deferredprocrastination.co.uk/blog/?p=2334</guid>
		<description><![CDATA[Designing a cockpit to accommodate a range of rider sizes is more complex than laying out the controls to fit one rider; especially having a steering wheel control for such a reclined operator instead of underseat/tiller steering or a moveable yoke. To account for different height riders while still keeping the rider&#8217;s eyeline above the [...]]]></description>
			<content:encoded><![CDATA[<p>Designing a cockpit to accommodate a range of rider sizes is more complex than laying out the controls to fit one rider; especially having a steering wheel control for such a reclined operator instead of underseat/tiller steering or a moveable yoke.</p>
<div id="attachment_2338" class="wp-caption aligncenter" style="width: 310px"><a href="/blog/wp-content/uploads/2012/05/Clearances.png" rel="lightbox[post-2334]" title="Rider Clearances.&lt;br /&gt;
&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width:0&quot; src=&quot;http://i.creativecommons.org/l/by-nc/3.0/88x31.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This work is licensed under a &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;Creative Commons Attribution-NonCommercial 3.0 Unported License&lt;/a&gt;."><img src="/blog/wp-content/uploads/2012/05/Clearances-300x212.png" alt="Rider Clearances" title="Rider Clearances" width="300" height="212" class="size-medium wp-image-2338" /></a><p class="wp-caption-text">Rider Clearances</p></div>
<p>To account for different height riders while still keeping the rider&#8217;s eyeline above the height of the bulkhead, the seat back reclines, pivoting near the hip joint. All of the swept area must be clear of any other objects. Below the body swept area is space usable for luggage, except where the chain passes through. </p>
<p>To cycle, there has to be room for the rider&#8217;s legs to move as they pedal, so the swept area of the rider&#8217;s thighs has to be kept clear; the rider&#8217;s legs mustn&#8217;t hit the bulkhead, nor the steering wheel. Position of the steering column is not affected though, as the rider&#8217;s legs will pass either side of it. </p>
<p>Having a steering wheel in the cockpit with the rider in such a reclined position presents a trickier packaging requirement then underseat steering. Not only must the wheel be clear in the straight ahead position, it must also not interfere whilst turning, including the protruding brake levers. </p>
<p>As the body area pivots close to the hip position to accommodate different height riders and the wheel has no variation of position, the best position for the wheel is directly above the rider&#8217;s hips. Height of the steering column must be set so the wheel doesn&#8217;t impact the rider at the bottom and doesn&#8217;t hit the screen (with clearance for the rider&#8217;s hand) at the top. A lack of steering wheel adjustment means that there will be a variation in hand position depending upon rider height. </p>
<p>The low height of the cockpit area also means that full steering lock (&gt;±90⁰) may bring the bottom of the wheel (and brake lever) close to the rider and the top of the wheel will obscure some of the rider&#8217;s forward vision. Though this isn&#8217;t too much of a problem, as full steering lock will only be useful at very low speeds (e.g. for parking or turning round) when the speed of reaction for braking is less critical. All normal riding should need much lower steering wheel angles.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deferredprocrastination.co.uk/blog/2012/cockpit-clearances/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Un-Merge</title>
		<link>http://www.deferredprocrastination.co.uk/blog/2012/git-un-merge/</link>
		<comments>http://www.deferredprocrastination.co.uk/blog/2012/git-un-merge/#comments</comments>
		<pubDate>Fri, 04 May 2012 08:04:50 +0000</pubDate>
		<dc:creator>Patrick Fenner</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">https://www.deferredprocrastination.co.uk/blog/?p=2310</guid>
		<description><![CDATA[When I last merged a development branch of add-rel-lightbox into the master branch and realised that I&#8217;d not finished testing the changes, it was off to the internet to find out how to undo a merge. After a couple of goes at git revert -m 1 refused to do anything, and a little more searching, [...]]]></description>
			<content:encoded><![CDATA[<p>When I last merged a development branch of <a href="/blog/category/def-proc/add-rel-lightbox/">add-rel-lightbox</a> into the master branch and realised that I&#8217;d not finished testing the changes, it was off to the internet to find out how to undo a merge. After a couple of goes at <code>git revert -m 1</code> refused to do anything, and a little more searching, I found out that there are two types of merge: a Commit Merge and a Fast-Forward merge.</p>
<p>Once it was clear what happened during a merge, it was much easier to see how to go about undoing the change.</p>
<h2>Commit Merge</h2>
<div id="attachment_2312" class="wp-caption aligncenter" style="width: 310px"><a href="/blog/wp-content/uploads/2012/05/commit-merge.png"  rel="lightbox[post-2310]" title="If there are changes in both branches since they diverged, git will create a new commit when merging to combine the state with all the changes," rel="lightbox[roadtrip]"><img src="/blog/wp-content/uploads/2012/05/commit-merge-300x212.png" alt="Commit Merge" title="Commit Merge" width="300" height="212" class="size-medium wp-image-2312" /></a><p class="wp-caption-text">Commit Merge</p></div>
<p>When development has taken place on both branches before the merge operation, git has to create a new commit that mixes the changes.</p>
<p>Git will automatically try to make a commit, but using <code>git merge -n (branch_name)</code> or having merge conflicts will leave you to make a manual commit. </p>
<h2>Fast-Forward Merge</h2>
<div id="attachment_2313" class="wp-caption aligncenter" style="width: 310px"><a href="/blog/wp-content/uploads/2012/05/ff-merge.png"  rel="lightbox[post-2310]" title="If git can fast forward a branch, the merge operation will give a shared, single path history, and no new commit will be made." rel="lightbox[roadtrip]"><img src="/blog/wp-content/uploads/2012/05/ff-merge-300x212.png" alt="Fast-Forward Merge" title="Fast-Forward Merge" width="300" height="212" class="size-medium wp-image-2313" /></a><p class="wp-caption-text">Fast-Forward Merge</p></div>
<p>If there&#8217;s only development in one branch, then when you make the merge, git will just update the head position for the receiving branch. The merging branch is then a sub-set of the history if the recipient branch.<br />
<span id="more-2310"></span></p>
<h2>No Fast-Forward Merge</h2>
<div id="attachment_2327" class="wp-caption aligncenter" style="width: 310px"><a href="/blog/wp-content/uploads/2012/05/no-ff-merge.png"  rel="lightbox[post-2310]" title="the &lt;code&gt;-no-ff&lt;/code&gt; flag will force a merge commit if git would normally choose fast-forward. " rel="lightbox[roadtrip]"><img src="/blog/wp-content/uploads/2012/05/no-ff-merge-300x212.png" alt="-no-ff Merge" title="-no-ff Merge" width="300" height="212" class="size-medium wp-image-2327" /></a><p class="wp-caption-text">-no-ff Merge</p></div>
<p>A special form of a commit merge; <code>git commit -no-ff (branch_name)</code> will force a commit merge, even if it is possible to make a fast-forward merge.</p>
<h2>Undoing Merges</h2>
<p>If the merge hasn&#8217;t been pushed remotely yet, then it&#8217;s fairly straight forward to undo, if the merge has already been published remotely, then it&#8217;s best to issue a <code>revert</code>: a new commit that reverts a previous one, so as not to upset the history of any other pulled clones.</p>
<p>For a commit merge that hasn&#8217;t been committed yet, </p>
<p><code class=block>git reset HEAD</code>
<div class=clear></div>
<p>will clear the Staging Area of any changes (Warning: <code>git reset --hard HEAD</code> will also clear the Working Directory of <em>any changes</em> compared to the HEAD commit).</p>
<p>If the merge commit has already been made, you can move the tip of the receiving branch back to it&#8217;s previous position. For the example above:</p>
<p><code class=block>git checkout master<br />
git reset B</code>
<div class=clear></div>
<p>will set the tip of the master branch back to commit &#8220;B&#8221; and the merge commit &#8220;F&#8221; will be ignored and eventually thrown away (use the sha of actual commit as appropriate).</p>
<p>For the Fast-Forward Merge, the process is the same:</p>
<p><code class=block>git checkout master<br />
git reset B</code>
<div class=clear></div>
<p>will move the tip of the master branch back to its original position. </p>
<hr />
<p>Sources:</p>
<p><a href="http://progit.org/2010/03/02/undoing-merges.html">ProGit > Undoing Merges</a></p>
<p><a href="http://book.git-scm.com/3_basic_branching_and_merging.html">Git Community Book > Basic Branching and Merging</a></p>
<p><a href="http://nvie.com/posts/a-successful-git-branching-model/">Nvie > A Successful Git Branching Model</a></p>
<p><a href="http://progit.org/2011/07/11/reset.html">ProGit > Reset Demysified</a></p>
<p><a href="http://stackoverflow.com/questions/2389361/git-undo-a-merge#6217372">StackOverflow > Revert a merge that was already pushed</a></p>
<p><a href="http://schacon.github.com/git/howto/revert-a-faulty-merge.txt">Schacon > Git How-To > Revert a faulty Merge</a> (for more complex situations)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deferredprocrastination.co.uk/blog/2012/git-un-merge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ce n’pas une entrée de blog</title>
		<link>http://www.deferredprocrastination.co.uk/blog/2012/ce-npas-une-entree-de-blog/</link>
		<comments>http://www.deferredprocrastination.co.uk/blog/2012/ce-npas-une-entree-de-blog/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 08:24:04 +0000</pubDate>
		<dc:creator>Patrick Fenner</dc:creator>
				<category><![CDATA[Deferred Procrastination]]></category>

		<guid isPermaLink="false">https://www.deferredprocrastination.co.uk/blog/?p=2303</guid>
		<description><![CDATA[It&#8217;s crunch time for thesis revisions this week, so there&#8217;ll be no blog post. Except this one. Which isn’t one. Back next week. As in: The Treachery of Images]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s crunch time for thesis revisions this week, so there&#8217;ll be no blog post. </p>
<p>Except this one. Which isn’t one.</p>
<p>Back next week.</p>
<hr />
<p><em>As in: <a href="http://en.wikipedia.org/wiki/The_Treachery_of_Images">The Treachery of Images</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deferredprocrastination.co.uk/blog/2012/ce-npas-une-entree-de-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dotsies on your Reader</title>
		<link>http://www.deferredprocrastination.co.uk/blog/2012/dotsies-on-your-reader/</link>
		<comments>http://www.deferredprocrastination.co.uk/blog/2012/dotsies-on-your-reader/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 08:02:25 +0000</pubDate>
		<dc:creator>Patrick Fenner</dc:creator>
				<category><![CDATA[Other Topics]]></category>

		<guid isPermaLink="false">https://www.deferredprocrastination.co.uk/blog/?p=2268</guid>
		<description><![CDATA[Dotsies is probably the Dvorak of fonts — in a good way, of course. It&#8217;s better because it&#8217;s more compact; but they are both difficult to learn, very few people can use them well, and there&#8217;s no incentive to start learning them other than &#8220;they are better&#8221;. Though Dotsies is part of The New Aesthetic, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dotsies.org/">Dotsies</a> is probably the <a href="http://dvorak-keyboard.com/">Dvorak</a> of fonts — in a good way, of course. It&#8217;s <em>better</em> because it&#8217;s more compact; but they are both difficult to learn, very few people can use them well, and there&#8217;s no incentive to start learning them other than &#8220;they are better&#8221;. Though Dotsies is part of The <a href="http://booktwo.org/notebook/sxaesthetic/">New Aesthetic</a>, so it could thrive. [<em>I'm typing this with a <a href="http://colemak.com/">Colmak</a> keyboard layout!</em>]</p>
<p>But, if you&#8217;re going to the trouble of learning a new skill, then you&#8217;ll want a way to use it in practice. Online, there&#8217;s the <a href="http://dotsies.org/reader/">Dotsies reader</a> and <a href="http://dotsies.org/about/">the bookmarklet</a>; but as there are no books published in Dotsies yet, changing the font on some ebooks might be a good start. After all, Dotsies is designed for maximising screen estate. </p>
<p>These instructions are for a Sony PRS-505, though it should work for most Sony Readers, I&#8217;m changing fonts book-by-book, so there&#8217;s nothing scary like firmware flashing. These instructions use Calibre for the conversions, so you&#8217;ll need DRM-free ebooks; I&#8217;ve used the file from &#8220;A Princess of Mars&#8221; that I&#8217;ve <a href="/blog/2012/print-your-own-john-carter/" title="Print your own John Carter">used previously</a>. </p>
<div id="attachment_2298" class="wp-caption aligncenter" style="width: 310px"><a href="/blog/wp-content/uploads/2012/04/PRS-505_Princess-Mars.jpg" rel="lightbox[post-2268]" title="Dotsies on an ebook Reader.&lt;br /&gt;
&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width:0&quot; src=&quot;http://i.creativecommons.org/l/by-nc/3.0/88x31.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This work is licensed under a &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;Creative Commons Attribution-NonCommercial 3.0 Unported License&lt;/a&gt;."><img src="/blog/wp-content/uploads/2012/04/PRS-505_Princess-Mars-300x200.jpg" alt="Dotsies on an ebook Reader" title="Dotsies on an ebook Reader" width="300" height="200" class="size-medium wp-image-2298" /></a><p class="wp-caption-text">Dotsies on an ebook Reader</p></div>
<p><span id="more-2268"></span></p>
<p><em>If you don&#8217;t mind breaching some TOCs, stripping DRM from ebooks is a </em>solved problem<em> (that means a search engine is your friend).</em></p>
<p>First, you&#8217;ll need the fonts. A <a href="http://dotsies.org/Dotsies.ttf">regular</a> and <a href="http://dotsies.org/Dotsies%20Wide.ttf">bold</a> are available for download (there&#8217;s no italic font as the italic shape for Dotsies hasn&#8217;t been decided on yet). </p>
<p>Then place those two fonts into a <code>fonts</code> directory in the internal memory of the Reader (this folder doesn&#8217;t normally exist). </p>
<p>Then it&#8217;s time to convert the ebook in Calibre. I already had this book in my Library, so I imported a new copy and changed the title in Calibre so it would be a new book, and so I&#8217;d know from the title that it was the Dotsied version. </p>
<p>Select the book in Calibre, right click, and select <code>Convert Books » Convert Individually</code>. Then, in <code>Look &#038; Feel</code> paste the following CSS into the <code>Extra CSS</code> box. This will tell the ebook reader to use the Dotsies fonts that were copied across before for the book text. </p>
<pre><code class=block>@font-face {

    font-family: "Dotsies";
    font-weight: normal;
    font-style: normal;
    src: url(res:///Data/fonts/Dotsies.ttf); 

}

@font-face {

    font-family: "Dotsies";
    font-weight: bold;
    font-style: normal;
    src: url(res:///Data/fonts/Dotsies Wide.ttf); 

}

body, div, p {

    font-family: "Dotsies", serif;
    widows: 0;
    orphans: 0; 

}</code></pre>
<div class=clear></div>
<p>If should also display using Dotsies in the Calibre reader if those fonts are installed on your computer. </p>
<p>Finally, copy the new book across to your reader. I didn&#8217;t notice any change in page turn time. </p>
<hr />
<p>See also:<br />
<a href="https://code.google.com/p/prs-plus/wiki/InstallGuide">code.google.com » prs-plus wiki » InstallGuide</a><br />
<a href="http://blog.the-ebook-reader.com/2010/09/22/sony-font-hack-how-to-change-fonts-on-a-sony-reader/">The ebook Reader » Sony Font Hack How to Change Fonts on a Sony Reader</a><br />
<a href="http://www.mobileread.com/forums/showthread.php?t=28447">mobileread forums » *VERY* detailed guide on changing default Reader fonts</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deferredprocrastination.co.uk/blog/2012/dotsies-on-your-reader/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>add-rel-lightbox now using Simple HTML DOM</title>
		<link>http://www.deferredprocrastination.co.uk/blog/2012/add-rel-lightbox-now-using-simple-html-dom/</link>
		<comments>http://www.deferredprocrastination.co.uk/blog/2012/add-rel-lightbox-now-using-simple-html-dom/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 08:09:02 +0000</pubDate>
		<dc:creator>Patrick Fenner</dc:creator>
				<category><![CDATA[add-rel-lightbox]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">https://www.deferredprocrastination.co.uk/blog/?p=2248</guid>
		<description><![CDATA[When I first mashed together add-rel-lightbox, I used regular expressions to control and replace the relevent parts. This was my fault. Regexes were the only tool I had. It was a bad thing. Parsing HTML with regex is wrong. […]using regex to parse HTML has doomed humanity to an eternity of dread torture and security [...]]]></description>
			<content:encoded><![CDATA[<p>When I first mashed together <a href="http://wordpress.org/extend/plugins/add-rel-lightbox/">add-rel-lightbox</a>, I used regular expressions to control and replace the relevent parts. This was my fault. Regexes were the only tool I had. It was a bad thing. Parsing HTML with regex is wrong. </p>
<blockquote><p>[…]using regex to parse HTML has doomed humanity to an eternity of dread torture and security holes <em>using rege</em>x as a tool to process HTML establishes a brea<em>ch between this world</em> and the dread realm of c͒ͪo͛ͫrrupt entities (like SGML entities, but <em>more corrupt) a mere glimp</em>se of the world of reg​<b>ex parsers for HTML will ins</b>​tantly transport a p<em>rogrammer&#8217;s consciousness i</em>nto a w<i>orl</i>d of ceaseless screaming, he comes<strike>, the pestilent sl</strike>ithy regex-infection wil​<b>l devour your HT</b>​ML parser, application and existence for all time like Visual Basic only worse[…]</p></blockquote>
<p>The whole <a href="http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454">StackOverflow answer</a> makes a very <em>sane and reasonable</em> argument for not using regexes to try and parse HTML, so I&#8217;d recommend taking a look. However, if you&#8217;re not <em>totally</em> convinced, perhaps you&#8217;d prefer <a href="http://web.archive.org/web/20071018202901/http://oubliette.alpha-geek.com/2004/01/12/bring_me_your_regexs_i_will_create_html_to_break_them">Bring Me Your Regexes! I Will Create HTML To Break Them!</a>. That did convince me. </p>
<p>PHP does have a <a href="http://uk.php.net/manual/en/book.dom.php">DOM extension</a>, so it&#8217;s possible to use that to operate on XML elements, but it all looked to complex and involved for me to find a way in, but S.C. Chen&#8217;s <a href="http://simplehtmldom.sourceforge.net/">PHP Simple HTML DOM Parser</a> made the whole thing fairly straight forward. </p>
<p>The whole, commented, revised code is up at <a href="https://github.com/DefProc/add-rel-lightbox/blob/DOMcontrolled/add_rel_lightbox.php">Github</a>, but while I have a few regular expression match calls, they&#8217;re all operating now on the returned HTML attributes from the DOM parser, instead of trying to pull put the details from raw HTML.</p>
<p>After including the Simple HTML DOM library, the script:</p>
<ul>
<li>Finds any link wrapped images.</li>
<li>Checks that the link points to an image file and doesn&#8217;t have a &#8220;lightbox&#8221; relation proterty applied. (as a side effect, any link with rel=&#8221;nolightbox&#8221; will also be overlooked)</li>
<li>Adds the popup caption from the database if it&#8217;s a single hosted image, or part of a gallery.</li>
<li>And finally, adds &#8220;lightbox[post-(post_id)]&#8221; to the rel attribute of the link</li>
</ul>
<p>This should be more robust than version 0.3, although I haven&#8217;t seen any problems with that version in practice. However it does also make the code much easier to extend or expand in the future. </p>
<p>While I&#8217;ve been meaning to do this for a while, I&#8217;ve only just got round to coding it up. Everything in the <a href="https://github.com/DefProc/add-rel-lightbox/tree/DOMcontrolled">&#8220;DOMcontrolled&#8221; branch</a> looks good in the initial testing, so the version is currently set at 0.4.RC1, which I&#8217;ll roll out after it&#8217;s survived more prodding.</p>
<hr />
<p><em>See also: <a href="http://www.codinghorror.com/blog/2009/11/parsing-html-the-cthulhu-way.html">Coding Horror > Parsing HTML the Cthulhu Way</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deferredprocrastination.co.uk/blog/2012/add-rel-lightbox-now-using-simple-html-dom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kingsbury K-Drive</title>
		<link>http://www.deferredprocrastination.co.uk/blog/2012/kingsbury-k-drive/</link>
		<comments>http://www.deferredprocrastination.co.uk/blog/2012/kingsbury-k-drive/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 08:14:20 +0000</pubDate>
		<dc:creator>Patrick Fenner</dc:creator>
				<category><![CDATA[Atomic Duck]]></category>
		<category><![CDATA[Open Source Engineering]]></category>
		<category><![CDATA[driveline]]></category>
		<category><![CDATA[linear drive]]></category>

		<guid isPermaLink="false">https://www.deferredprocrastination.co.uk/blog/?p=2215</guid>
		<description><![CDATA[The video below of the Human Power Team&#8216;s elliptical drive system is the first time I&#8217;ve seen a non-circular power system in motion. Functionally identical to the “K-Drive” of the Kingsbury Kingcycle, the mechanism is first described in 1890, so it might be more correct to call it a &#8220;Vietor Elliptical Drive&#8221;, it&#8217;s best known [...]]]></description>
			<content:encoded><![CDATA[<p>The video below of the <a href="http://www.hptdelft.nl/en/">Human Power Team</a>&#8216;s elliptical drive system is the first time I&#8217;ve seen a non-circular power system in motion. </p>
<p><iframe class="aligncenter" src="http://player.vimeo.com/video/32447643?title=0&amp;byline=0&amp;portrait=0" width="601" height="338" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>Functionally identical to the “K-Drive” of the Kingsbury Kingcycle,  the mechanism is first described <a href="http://tilting.org.za/bok/kstory.html">in 1890</a>, so it might be more correct to call it a &#8220;Vietor Elliptical Drive&#8221;, it&#8217;s best known as the &#8220;Kingsbury K-Drive&#8221; from <a href="http://www.kingcycle.co.uk/">Kingcycle&#8217;s</a> successful use of it the early 1990s.<span id="more-2215"></span></p>
<p>The chainring is connected to the primary crank spider as is normal, except that additional clearance is required between the crank and chainring for a secondary chain line.</p>
<div id="attachment_2231" class="wp-caption aligncenter" style="width: 310px"><a href="/blog/wp-content/uploads/2012/04/k-drive-1.png" rel="lightbox[post-2215]" title="K-Drive: Primary Crank, Stator and Chainring.&lt;br /&gt;
&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width:0&quot; src=&quot;http://i.creativecommons.org/l/by-nc/3.0/88x31.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This work is licensed under a &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;Creative Commons Attribution-NonCommercial 3.0 Unported License&lt;/a&gt;."><img src="/blog/wp-content/uploads/2012/04/k-drive-1-300x212.png" alt="K-Drive, showing Primary Crank, Stator and Chainring" title="K-Drive: Primary Crank, Stator and Chainring" width="300" height="212" class="size-medium wp-image-2231" /></a><p class="wp-caption-text">Primary Crank, Stator and Chainring</p></div>
<p>The K-drive additionally has a secondary, shorter, crank that is connected to it&#8217;s own sprocket. The secondary crank sprocket is linked by a fixed length chain back to a stationary sprocket (stator) around the axis of the bottom bracket. </p>
<div id="attachment_2229" class="wp-caption aligncenter" style="width: 310px"><a href="/blog/wp-content/uploads/2012/04/k-drive-2.png" rel="lightbox[post-2215]" title="K-Drive: Secondary Crank.&lt;br /&gt;
&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width:0&quot; src=&quot;http://i.creativecommons.org/l/by-nc/3.0/88x31.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This work is licensed under a &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;Creative Commons Attribution-NonCommercial 3.0 Unported License&lt;/a&gt;."><img src="/blog/wp-content/uploads/2012/04/k-drive-2-300x212.png" alt="K-Drive showing Secondary Crank" title="K-Drive: Secondary Crank" width="300" height="212" class="size-medium wp-image-2229" /></a><p class="wp-caption-text">Secondary Crank</p></div>
<p>Because the secondary crank&#8217;s sprocket is half the size of the stator sprocket, the secondary crank will make two rotations for every one that the primary crank makes, and in the opposite direction. This means that the pedal — at the end of the secondary crank — will follow an elliptical path around the chainring axis. If the primary and secondary cranks are the same length, then the path of the pedals will be linear. </p>
<div id="attachment_2233" class="wp-caption aligncenter" style="width: 310px"><a href="/blog/wp-content/uploads/2012/04/k-drive-3.png" rel="lightbox[post-2215]" title="K-Drive: Pedal Paths.&lt;br /&gt;
&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width:0&quot; src=&quot;http://i.creativecommons.org/l/by-nc/3.0/88x31.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This work is licensed under a &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;Creative Commons Attribution-NonCommercial 3.0 Unported License&lt;/a&gt;."><img src="/blog/wp-content/uploads/2012/04/k-drive-3-300x212.png" alt="K-Drive, showing Pedal Paths" title="K-Drive: Pedal Paths" width="300" height="212" class="size-medium wp-image-2233" /></a><p class="wp-caption-text">Pedal Paths</p></div>
<p>While there <em>may</em> be some power benefits from linear or near-linear drive, it does have one clear benefit for fired vehicles. By reducing the vertical movement of the rider&#8217;s feet, the vertical clearance required for the rider is greatly reduced. This gives greater freedom of design for the nose shell.</p>
<div id="attachment_2243" class="wp-caption aligncenter" style="width: 310px"><a href="/blog/wp-content/uploads/2012/04/k-drive-4.png" rel="lightbox[post-2215]" title="K-Drive: Vertical Clearance.&lt;br &gt;
&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width:0&quot; src=&quot;http://i.creativecommons.org/l/by-nc/3.0/88x31.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This work is licensed under a &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc/3.0/&quot;&gt;Creative Commons Attribution-NonCommercial 3.0 Unported License&lt;/a&gt;."><img src="/blog/wp-content/uploads/2012/04/k-drive-4-300x212.png" alt="K-Drive Vertical Clearance" title="K-Drive: Vertical Clearance" width="300" height="212" class="size-medium wp-image-2243" /></a><p class="wp-caption-text">Vertical Clearance</p></div>
<p>Where a normal crank requires clearance for the rider&#8217;s foot an addition to the diameter of the crank&#8217;s rotation, the K-Drive only requires foot clearance plus the maximum vertical travel of the pedals ellipse. Assuming a total of 30cm foot clearance, a normal drive would need 64cm for clear motion, but with a 5cm high ellipse, an equivalent K-Drive would need only 35cm. That&#8217;s a 45% reduction in height!</p>
<hr />
<p>Other that a few concepts and and some racing bikes, this drive system doesn&#8217;t seem to have been used much, despite it&#8217;s engineering elegance. I particularly like <a href="http://www.lucabike.com/">LucaBike</a>&#8216;s use of toothed belts instead of chains.</p>
<p><strong>Has anyone ever manufactured this type of drive commercially?</strong></p>
<p><strong>How does it fare in use? Is it reliable?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deferredprocrastination.co.uk/blog/2012/kingsbury-k-drive/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Making it Better—Open Source CNC</title>
		<link>http://www.deferredprocrastination.co.uk/blog/2012/making-it-better-open-source-cnc/</link>
		<comments>http://www.deferredprocrastination.co.uk/blog/2012/making-it-better-open-source-cnc/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 08:14:30 +0000</pubDate>
		<dc:creator>Patrick Fenner</dc:creator>
				<category><![CDATA[Deferred Procrastination]]></category>

		<guid isPermaLink="false">https://www.deferredprocrastination.co.uk/blog/?p=2207</guid>
		<description><![CDATA[CNC routers and laser cutters are now common machines. Not ubiquitous, like a hammer, but they are common enough that I can send a pattern for cutting, or visit a lab and operate one myself. However, they still remain expensive, industrial machines. Makerslide took the idea of a standard aluminium extrusion frame system, used for [...]]]></description>
			<content:encoded><![CDATA[<p>CNC routers and laser cutters are now common machines. Not ubiquitous, like a hammer, but they are common enough that I can send a pattern for cutting, or visit a lab and operate one myself. However, they still remain expensive, industrial machines. </p>
<p><a href="http://www.makerslide.com/">Makerslide</a> took the idea of a standard aluminium extrusion frame system, used for building custom frame structures, and added a v-profile to make it usable as an accurate linear bearing system. And created the necessary combining hardware, v-pulley wheels, mounting plates, eccentric adjusters for the pulleys and belt drive attachments to create a linear bearing system that can easily be used for <a href="http://www.youtube.com/watch?v=xt77g-Zzdjs">motor control</a>. </p>
<p>Makerslide is intended to  be a standardised solution to linear drive systems for the home builder. Aluminium extrusions need a certain amount of capital to produce, and since Makerslide successfully raised five times it&#8217;s goal, is now manufacturing and <a href="http://store.makerslide.com/">shipping</a> rails and the other associated parts.</p>
<p>Then, a month after Makerslide&#8217;s <a href="http://www.kickstarter.com/projects/93832939/makerslide-open-source-linear-bearing-system">Kickstarter success</a>, the <a href="http://www.kickstarter.com/projects/edwardrford/project-shapeoko-a-300-complete-cnc-machine">Project Shapeoko&#8217;s $300 CNC machine</a> was funded. And a low-cost CNC machine that is now available as a kit. It uses the Makerslide system as it&#8217;s major structral components to keep costs low, while allowing good accuracy; and this means that it&#8217;s now possible to own a desktop CNC machine for as low as <a href="http://www.shapeoko.com/wiki/index.php/Main_Page">$338</a> (as of time of writing).</p>
<p>So with aluminium extrusions extended to create linear bearings; in turn extended to a complete CNC platform; run with open source <a href="http://www.shapeoko.com/wiki/index.php/Parts#E5">motor controllers</a>, built upon the open source <a href="http://www.arduino.cc/">Arduino</a> board and powered by open source <a href="https://github.com/simen/grbl">CNC controller software</a>: the cost of a CNC machine is falling steadily into the realm of the hobbyist.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deferredprocrastination.co.uk/blog/2012/making-it-better-open-source-cnc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LaTeX-SVG-to-PDF as git submodule</title>
		<link>http://www.deferredprocrastination.co.uk/blog/2012/latex-svg-to-pdf-as-git-submodule/</link>
		<comments>http://www.deferredprocrastination.co.uk/blog/2012/latex-svg-to-pdf-as-git-submodule/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 09:15:31 +0000</pubDate>
		<dc:creator>Patrick Fenner</dc:creator>
				<category><![CDATA[LaTeX-SVG-to-PDF makefile]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[makefile]]></category>

		<guid isPermaLink="false">https://www.deferredprocrastination.co.uk/blog/?p=2191</guid>
		<description><![CDATA[I&#8217;ve mentioned previously that I&#8217;ve got a large project in \(\LaTeX\) and while I was using Dropbox as a pseudo revision control and external backup. However, I&#8217;ve since been persuaded that a proper revision control system with meaningful commit message is a better way of tracking progress and changes. So I&#8217;ve moved the project to [...]]]></description>
			<content:encoded><![CDATA[<p><br />
I&#8217;ve mentioned previously that I&#8217;ve got a large project in \(\LaTeX\) and while I was using <a href="http://db.tt/ff2dF7P1">Dropbox</a> as a pseudo revision control and external backup. However, I&#8217;ve since <a href="http://www.charlietanksley.net/philtex/using-a-version-control-system/">been persuaded</a> that a proper revision control system with meaningful commit message is a better way of tracking progress and changes. </p>
<p>So I&#8217;ve moved the project to git, set up a remote repository for synchronisation and backup and started making commits. Then I realised that my <a href="https://github.com/DefProc/LaTeX-SVG-to-PDF/blob/85e160898116d87e1b72dab091f309dcc4cee159/README.markdown">symlinked makefile</a> was only included as a link in the git repository. This is different to Dropbox, which would synchronise the contents of the linked file.</p>
<p>Instead of just having a <a href="https://en.wikipedia.org/wiki/Symbolic_link">symbolic link</a> to a file that might not exist on another computer, I needed another way of including the file properly. I could just drop the file into the git repository, but then it won&#8217;t update if I make any changes to the <a href="https://github.com/DefProc/LaTeX-SVG-to-PDF">main project files</a>. If I make use a <a href="https://en.wikipedia.org/wiki/Hard_link">hard link</a> then git will include the file contents, but then it&#8217;s possible to make tracked changes in the \(\LaTeX\) project repository by changing the file in its original repository — and that is just a recipe for confusion. </p>
<p>Instead, it&#8217;s probably better to include the makefile repository as a git submodule and then symlink into the sub-repository&#8217;s makefile. That way, the exact commit information is included in the parent-repo, but the sub-repo can be updated, changed and branched as needed.</p>
<p>To do this:</p>
<pre><code class="block">cd ~/LaTeX/project/folder
git submodule add git://github.com/DefProc/LaTeX-SVG-to-PDF.git
rm makefile # if you already have a makefile in the directory
ln -s LaTeX-SVG-to-PDF/makefile makefile
git add .
git commit -m "added LaTeX-SVG-to-PDF as submodule and linked to makefile"</code></pre>
<div class="clear"></div>
<p>There are a couple of complications to this method:</p>
<p>If you clone a new local repository of the parent project then you also have to initiate and update the submodules to add their contents.</p>
<pre><code class="block">git clone my@server:git/project.git
cd project
git submodule update --init</code></pre>
<div class="clear"></div>
<p>And you also need to be careful of including changes to the sub-repos. If you <code>git add . &#038;&#038; git commit</code> to the parent-repo with uncommitted changes to the sub-repo, then you&#8217;ll be telling the parent-repo to use that dirty head on every clone — not good. </p>
<p>If you&#8217;ve made <strong>changes to the sub-repo</strong>, make sure that <strong>these are committed (and pushed) before commiting on the parent-repo</strong>.</p>
<hr />
<p>LaTeX-SVG-to-PDF makefile <a href="https://github.com/DefProc/LaTeX-SVG-to-PDF">project source and download</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deferredprocrastination.co.uk/blog/2012/latex-svg-to-pdf-as-git-submodule/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Print your own John Carter</title>
		<link>http://www.deferredprocrastination.co.uk/blog/2012/print-your-own-john-carter/</link>
		<comments>http://www.deferredprocrastination.co.uk/blog/2012/print-your-own-john-carter/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 09:29:32 +0000</pubDate>
		<dc:creator>Patrick Fenner</dc:creator>
				<category><![CDATA[Other Topics]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Copyright]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Public Domain]]></category>

		<guid isPermaLink="false">https://www.deferredprocrastination.co.uk/blog/?p=2166</guid>
		<description><![CDATA[I&#8217;ve been coming across quite a few references to Edgar Rice Burroughs&#8217; book “A Princess of Mars” over the past couple of months, from being the story behind Disney&#8217;s upcoming film “John Carter of Mars”, to being a classic science fiction text that has inspired many creators. So when it appeared again, as I was [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been coming across quite a few references to Edgar Rice Burroughs&#8217; book “A Princess of Mars” over the past couple of months, from being the story behind Disney&#8217;s upcoming film “<a href="http://www.youtube.com/watch?v=6Rf55GTEZ_E&#038;feature=BFa&#038;list=PLD1F1F1249DE9447E&#038;lf=plpp_video">John Carter of Mars</a>”, to being a classic science fiction text that has inspired many creators. </p>
<p>So when it appeared again, as I was looking at buying Peter Cline&#8217;s book “<a href="http://www.amazon.co.uk/gp/product/1934861286/ref=as_li_ss_tl?ie=UTF8&#038;tag=deferredprocr-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=1934861286">Ex-Heroes</a>” and reading the authors “<a href="http://thoth-amon.blogspot.com/">ranty blog</a>” that became enough repetition for me to bite. And as I was already buying one book on Amazon, I took a look at what dead tree versions were available for “A Princess of Mars”.</p>
<p>A few, it turns out. There&#8217;s a <a href="http://www.amazon.co.uk/gp/product/1423154266/ref=as_li_ss_tl?ie=UTF8&#038;tag=deferredprocr-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=1423154266">Disney Books edition</a> with all the nice typesetting, a <a href="http://www.amazon.co.uk/gp/product/1442423870/ref=as_li_ss_tl?ie=UTF8&#038;tag=deferredprocr-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=1442423870">Simon and Schuster published collection</a> which makes very clear that it&#8217;s not endorsed by the Edgar Rice Burrows estate, an edition <a href="http://www.amazon.co.uk/gp/product/1743338201/ref=as_li_ss_tl?ie=UTF8&#038;tag=deferredprocr-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=1743338201">with a Frank Frazzetta cover</a> and <a href="http://www.amazon.co.uk/gp/product/1435134486/ref=as_li_ss_tl?ie=UTF8&#038;tag=deferredprocr-21&#038;linkCode=as2&#038;camp=1634&#038;creative=19450&#038;creativeASIN=1435134486">more</a>.</p>
<p>And then I realised that the book was written long enough ago that is fallen into the public domain. And that I already had an ebook version from the <a href="http://www.gutenberg.org/">Gutenberg Project</a> that I hadn&#8217;t read. This means I didn&#8217;t even have to wait for delivery, as I already had paper, ink and a printer sitting right next to my desk…</p>
<p>So after converting from ePuB to HTMLZ with <a href="http://calibre-ebook.com">Calibre</a> and running the resulting index.html file through <a href="http://johnmacfarlane.net/pandoc/">pandoc</a>; I ended up with a remarkably clean \(\LaTeX\) file ready for formatting.</p>
<p>Even better, by the power of public domain and a competition based market place, I can offer the resulting, print ready, pdf for you to download and print off at home in a variety of page formats, free of charge. </p>
<p>Or just buy a pre-printed copy from a bookstore. </p>
<p>Or get a copy of the <a href="http://manybooks.net/">free ebook</a>.</p>
<p>For single sided printing on A4 or letter paper:</p>
<p><a href='https://www.deferredprocrastination.co.uk/blog/wp-content/uploads/2012/03/Princess-Mars-a4-single.pdf'>A Princess of Mars (A4 Single Sided)</a></p>
<p><a href='https://www.deferredprocrastination.co.uk/blog/wp-content/uploads/2012/03/Princess-Mars-letter-single.pdf'>A Princess of Mars (letter, single sided)</a></p>
<p>Or double sided if you have a fancier printer:</p>
<p><a href='https://www.deferredprocrastination.co.uk/blog/wp-content/uploads/2012/03/Princess-Mars-a4-double.pdf'>A Princess of Mars (A4 Double Sided)</a></p>
<p><a href='https://www.deferredprocrastination.co.uk/blog/wp-content/uploads/2012/03/Princess-Mars-letter-double.pdf'>A Princess of Mars (letter, double sided)</a></p>
<p>It&#8217;s a big print, &approx;165 pages (85 sheets double sided) so I&#8217;ve bound my copy with binder clips with the levers removed to make a book-like document.</p>
<hr />
<br />
I&#8217;ve left the Gutenberg Project Licence text attached. I could remove it, but it seems a little churlish — after all they did all the hard work, I just formatted it. One of their licence requirements is to give a link to a plain text copy for any compiled formats, so here is the <a href='https://www.deferredprocrastination.co.uk/blog/wp-content/uploads/2012/03/A_Princess_of_Mars.zip'>download link</a> for the single \(\LaTeX\) file and cover image.</p>
<hr />
<p><em>It might be worth reiterating that the copyright on “A Princess of Mars” has now expired, and the work is in the public domain. This means you, I, and Disney can <a href="http://www.everythingisaremix.info/watch-the-series/">copy, transform and combine</a> to our heart&#8217;s content.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deferredprocrastination.co.uk/blog/2012/print-your-own-john-carter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Putting Dotfiles in Git</title>
		<link>http://www.deferredprocrastination.co.uk/blog/2012/putting-dotfiles-in-git/</link>
		<comments>http://www.deferredprocrastination.co.uk/blog/2012/putting-dotfiles-in-git/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 09:05:37 +0000</pubDate>
		<dc:creator>Patrick Fenner</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[dotfiles]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">https://www.deferredprocrastination.co.uk/blog/?p=2155</guid>
		<description><![CDATA[If you&#8217;re a Windows user, then you probably won&#8217;t have come across dotfiles before. For Mac (a form of Unix) and Linux users, dotfiles hold certain environmental settings and customisations, so if you work on more than one computer, you might like a way of sharing your preferences between them. And they&#8217;re called “dotfiles” because [...]]]></description>
			<content:encoded><![CDATA[<p><em>If you&#8217;re a Windows user, then you probably won&#8217;t have come across dotfiles before. For Mac (a form of Unix) and Linux users, dotfiles hold certain environmental settings and customisations, so if you work on more than one computer, you might like a way of sharing your preferences between them.</em></p>
<p><em>And they&#8217;re called “dotfiles” because any filename that begins with a full stop (period) is a hidden file in Unix, Linux, etc.</em></p>
<hr />
<p>Since I started using <a href="https://en.wikipedia.org/wiki/Vim_(text_editor)">vim</a> for text editing and made some <a href="http://vimbits.com/">tweaks</a> to my <code>.vimrc</code> file and added some plugins (<a href="https://github.com/tpope/vim-pathogen">pathogen</a>, <a href="https://github.com/tpope/vim-fugitive">vim-fugitive</a> and <a href="https://github.com/jcf/vim-latex">vim-latex</a>), I quickly realised that I&#8217;d like to be able to take these settings with me, so I started looking at keeping the configuration files in version control.</p>
<p>Now there are any number of dotfile repositories on <a href="https://github.com/search?q=dotfiles&#038;type=Everything&#038;repo=&#038;langOverride=&#038;start_value=1">github</a> and <a href="https://duckduckgo.com/?q=dotfiles+git">many, many guides</a> on setting up your dotfiles with git, but I noticed that there were two main arrangements, but the pros and cons of each arrangement seemed to be spread out around the web.</p>
<ol>
<li>Put your whole home directory into revision control and track only a few files.</li>
<li>Add a dotfiles subfolder in your home directory that is under version control, move in the files that you want to track and symlink them back to the original location.</li>
</ol>
<p><strong>Which one to choose?</strong> I tried both, but I like the second best. </p>
<p><strong>Why?</strong> See below:<span id="more-2155"></span></p>
<h2>Home Directory</h2>
<p>Just creating a git repository of your home directory looks like the simplest solution, but you soon realise that you have to <a href="http://squaremasher.blogspot.com/2009/12/managing-dotfiles-with-git.html">exclude a lot of files from being tracked</a>, or you&#8217;ll be seeing lots of files listed every time you do <code>git status</code>. This isn&#8217;t too difficult though, just <a href="http://book.git-scm.com/4_ignoring_files.html">ignore</a> every file (<code>/*</code>), except dotfiles (<code>!.*</code>), except the dotfiles that you don&#8217;t want to track (e.g. <code>.bash_history</code>). Now any new dotfiles will be automatically added by a <code>git add .</code> unless you choose to ignore them. </p>
<p>Except it&#8217;s not that simple. Adding a file listing to <code>.gitignore</code> will propagate to any other git repositories in you entire home directory. Ah. It&#8217;s not too bad though, you can just use the <code>.git/info/exclude</code> file for <a href="http://www.charlietanksley.net/philtex/dotfiles-and-git-take-2/">repo specific exclusions</a>. Except that the <code>.git/info/exclude</code> doesn&#8217;t propagate to other repositories, so you&#8217;ll have to add the exclusions again for each clone.</p>
<p>Using the home directory gets worse though. If you run a <code>git clean</code> on this repository, you&#8217;ll <a href="http://endot.org/2010/10/16/dfm-a-utility-to-manage-dotfiles/#fn:1">remove any files</a> in the directory that are untracked by git, <em>e.g. every other file</em>. This isn&#8217;t too likely in normal practice, and you&#8217;ll probably have to add <code>-f</code> and either <code>-x</code> or <code>-X</code> to really mess things up, but I don&#8217;t like the idea that a normal cleanup command for a repository now holds the keys to clear out all the contents of my home directory!</p>
<h2>dotfiles Subfolder and Symlinks</h2>
<p>Adding your dotfiles to a subfolder and then symlinking them back to the original location looks like it&#8217;ll be more complicated, but it does keep all of those files nicely separate. All you have to do is add each file to the repository once, and then any other file remains completely unaffected. You can nuke and re-create the directory without going anywhere near you other files. </p>
<p>The main effects of using a subfolder are that: you have to manually select which dotfiles you want to include (where as with a home directory you have to manually exclude them), but this tends to lead to more of a curated repository; and you have to add the symlinks manually for any new clone or new file on every clone. </p>
<p>Symlink control is probably best left to a script though, maybe even in a post-receive hook if you really trust the code. There are examples in <a href="http://mongers.org/dot/Makefile">make</a>, <a href="http://pastie.org/195036">ruby</a>, and this interesting &#8220;dot files management&#8221; (<a href="https://github.com/justone/dotfiles/blob/master/bin/dfm">dfm</a>) program in perl. I think I&#8217;ll have to spend smae time with the <a href="https://github.com/justone/dotfiles/wiki">dfm documentation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deferredprocrastination.co.uk/blog/2012/putting-dotfiles-in-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

