<?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>jamesoff.net</title>
	<atom:link href="http://jamesoff.net/site/feed/" rel="self" type="application/rss+xml" />
	<link>http://jamesoff.net/site</link>
	<description>you heard</description>
	<lastBuildDate>Thu, 01 Sep 2011 17:39:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Alfred script to toggle AirPort</title>
		<link>http://jamesoff.net/site/2011/07/13/alfred-script-to-toggle-airport/</link>
		<comments>http://jamesoff.net/site/2011/07/13/alfred-script-to-toggle-airport/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 08:25:41 +0000</pubDate>
		<dc:creator>jamesoff</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[airport]]></category>
		<category><![CDATA[alfred]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://jamesoff.net/site/?p=448</guid>
		<description><![CDATA[Please see my Alfred Extensions page for updates! A quick and easy one for Alfred: a command which toggles AirPort on/off. If you are using Alfred 0.9.9 (or better), you should be able to download this ZIP file and import it! If you are using an earlier version of Alfred, follow these instructions: AIRPORT=`networksetup -getairportpower [...]]]></description>
			<content:encoded><![CDATA[<p><b>Please see my <a href="http://jamesoff.net/site/alfred-extensions/">Alfred Extensions</a> page for updates!</b></p>

<p>A quick and easy one for Alfred: a command which toggles AirPort on/off.</p>

<p>If you are using Alfred 0.9.9 (or better), you should be able to download <a href="http://cl.ly/2m0G3a110E141B3j3t03">this ZIP file</a> and import it!</p>

<p>If you are using an earlier version of Alfred, follow these instructions:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">AIRPORT</span>=<span style="color: #000000; font-weight: bold;">`</span>networksetup <span style="color: #660033;">-getairportpower</span> AirPort <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> Off<span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$?&quot;</span> = <span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> networksetup <span style="color: #660033;">-setairportpower</span> AirPort on; <span style="color: #007800;">MSG</span>=<span style="color: #ff0000;">&quot;AirPort enabled&quot;</span>; <span style="color: #000000; font-weight: bold;">else</span> networksetup <span style="color: #660033;">-setairportpower</span> Airport off; <span style="color: #007800;">MSG</span>=<span style="color: #ff0000;">&quot;AirPort disabled&quot;</span>; <span style="color: #000000; font-weight: bold;">fi</span>; <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>growlnotify <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$MSG</span>&quot;</span> <span style="color: #660033;">-a</span> <span style="color: #ff0000;">&quot;/Applications/Utilities/Airport Utility.app&quot;</span> AirPort status</pre></div></div>


<p>Create as a terminal script and configure it to be silent. I also borrowed the icon from AirPort utility for the script (Alfred for &#8220;airport&#8221; and then use Reveal in Finder on it; Get Info; click Icon and ⌘C; click the icon area in Alfred and ⌘V).</p>

<p><img src="http://f.cl.ly/items/0l3e1R2t3Z35233r310U/Screen%20shot%202011-07-13%20at%2009.19.44.png" alt="Script configuration screenshot" /></p>
]]></content:encoded>
			<wfw:commentRss>http://jamesoff.net/site/2011/07/13/alfred-script-to-toggle-airport/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfred script to change network location in OS X</title>
		<link>http://jamesoff.net/site/2011/06/09/alfred-script-to-change-network-location-in-os-x/</link>
		<comments>http://jamesoff.net/site/2011/06/09/alfred-script-to-change-network-location-in-os-x/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 18:43:32 +0000</pubDate>
		<dc:creator>jamesoff</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[alfred]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[useful]]></category>

		<guid isPermaLink="false">http://jamesoff.net/site/?p=434</guid>
		<description><![CDATA[Please see my Alfred Extensions page for updates! I wrote this little scriptlet to change network location in OS X using Alfred, but you could trigger it using whatever method you wanted. If you&#8217;re using Alfred 0.9.9 or later, you should be able to download this ZIP file and import it! if you using an [...]]]></description>
			<content:encoded><![CDATA[<p><b>Please see my <a href="http://jamesoff.net/site/alfred-extensions/">Alfred Extensions</a> page for updates!</b></p>

<p>I wrote this little scriptlet to change network location in OS X using <a href="http://alfredapp.com">Alfred</a>, but you could trigger it using whatever method you wanted.</p>

<p>If you&#8217;re using Alfred 0.9.9 or later, you should be able to download <a href="http://cl.ly/2t1O2G16341p2E1z3407">this ZIP file</a> and import it!</p>

<p>if you using an earlier version, follow the instructions below:</p>

<p><strike></p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>scselect <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>query<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">4</span>-<span style="color: #000000;">39</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>scselect</pre></div></div>


<p></strike></p>

<p><b>UPDATE</b> 2011-06-11: I have significantly improved the script to work around a bug caused by the 3Connect profile (3Connect is pants FYI), as well as use <code>growlnotify</code> to tell you if the change worked or not. It also allows substring matches (anchored at the start) so you can use &#8220;auto&#8221; for &#8220;Automatic&#8221;. If you have more than one profile that starts with a matching substring, the behaviour is currently undefined.</p>

<p><a href="http://jamesoff.net/site/wp-content/uploads/2011/06/Screen-shot-2011-06-11-at-19.02.40.png"><img src="http://jamesoff.net/site/wp-content/uploads/2011/06/Screen-shot-2011-06-11-at-19.02.40.png" alt="Growl showing network change notification" title="Screen shot 2011-06-11 at 19.02.40" width="322" height="100" class="alignnone size-full wp-image-441" /></a></p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">MSG</span>=<span style="color: #000000; font-weight: bold;">`/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>scselect <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">egrep</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;\({query}&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">4</span>- <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>scselect <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-E</span> <span style="color: #ff0000;">'s/.+ \((.+)\)/Location changed to \1/'</span><span style="color: #000000; font-weight: bold;">`</span>; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$MSG</span>&quot;</span> = <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>growlnotify <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>PreferencePanes<span style="color: #000000; font-weight: bold;">/</span>Network.prefPane <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;Unable to change location&quot;</span> Error; <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>growlnotify <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>PreferencePanes<span style="color: #000000; font-weight: bold;">/</span>Network.prefPane <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$MSG</span>&quot;</span> Location changed; <span style="color: #000000; font-weight: bold;">fi</span>;</pre></div></div>


<p>If you want it without Growl notifications, use this version:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>scselect <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">egrep</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;\({query}&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">4</span>- <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">cut</span> <span style="color: #660033;">-f</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>scselect</pre></div></div>


<p>It&#8217;s slightly convoluted as it&#8217;s case-insensitive. To use it, create a Terminal/Shell script entry like this:</p>

<p><img src="http://f.cl.ly/items/3t0B301j3Q2X102y1C0V/Screen%20shot%202011-06-09%20at%2020.38.05.png" alt="Alfred settings" /></p>

<p>Now you can just type &#8220;location work&#8221; or similar into Alfred to change network location. I&#8217;ll add Growl-confirmation support when the next version of Alfred is released :)</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesoff.net/site/2011/06/09/alfred-script-to-change-network-location-in-os-x/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>iPhone apps, Xcode and Dropbox</title>
		<link>http://jamesoff.net/site/2011/01/10/iphone-apps-xcode-and-dropbox/</link>
		<comments>http://jamesoff.net/site/2011/01/10/iphone-apps-xcode-and-dropbox/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 12:33:27 +0000</pubDate>
		<dc:creator>jamesoff</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[my stuff]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://jamesoff.net/site/?p=428</guid>
		<description><![CDATA[A while back I put some of my Xcode bits (i.e. the Random Recipe Generator) into my Dropbox to make it easier to stay up to date on my laptop and my desktop. (Yes, I know, source control blah blah blah :) However, building the Distribution version of the app gave me this warning: &#8220;The [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I put some of my Xcode bits (i.e. the <a href="http://itunes.com/apps/jamesseward/randomrecipegenerator">Random Recipe Generator</a>) into my <a href="http://db.tt/ojcracC">Dropbox</a> to make it easier to stay up to date on my laptop and my desktop. (Yes, I know, source control blah blah blah :)</p>

<p>However, building the Distribution version of the app gave me this warning:</p>

<blockquote>&#8220;The CodeResources file must be a symbolic link to _CodeSignature/CodeResources&#8221;</blockquote>

<p>which I duly ignored. However, the Application Loader (used to push the new binary to the App Store) also complained about that and wouldn&#8217;t upload it.</p>

<p>It looks like Dropbox&#8217;s replication may have been to blame for the symlink stopping being a symlink, so the solution is to use the handy new selective sync option in Dropbox and not sync the build/ directory between my machines (which is pretty much pointless anyway and certainly generates a lot of network overhead when you build). Having done that and built a clean copy it worked fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesoff.net/site/2011/01/10/iphone-apps-xcode-and-dropbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS X Service to use b.oooom.net</title>
		<link>http://jamesoff.net/site/2010/12/31/mac-os-x-service-to-use-b-oooom-net/</link>
		<comments>http://jamesoff.net/site/2010/12/31/mac-os-x-service-to-use-b-oooom-net/#comments</comments>
		<pubDate>Fri, 31 Dec 2010 11:03:43 +0000</pubDate>
		<dc:creator>jamesoff</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[internets]]></category>
		<category><![CDATA[my stuff]]></category>
		<category><![CDATA[apple scripting boooom]]></category>

		<guid isPermaLink="false">http://jamesoff.net/site/?p=425</guid>
		<description><![CDATA[Use this Mac OS X Hints tip and use the following URL for the &#8220;download&#8221; line: http://b.oooom.net/shrink.php?api=1&#38;url=]]></description>
			<content:encoded><![CDATA[<p>Use this <a href="http://hints.macworld.com/article.php?story=20101223123552534">Mac OS X Hints tip</a> and use the following URL for the &#8220;download&#8221; line:</p>

<p><code>http://b.oooom.net/shrink.php?api=1&amp;url=</code></p>
]]></content:encoded>
			<wfw:commentRss>http://jamesoff.net/site/2010/12/31/mac-os-x-service-to-use-b-oooom-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMware Fusion upgrade error messages</title>
		<link>http://jamesoff.net/site/2010/12/03/vmware-fusion-upgrade-error-messages/</link>
		<comments>http://jamesoff.net/site/2010/12/03/vmware-fusion-upgrade-error-messages/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 09:18:10 +0000</pubDate>
		<dc:creator>jamesoff</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[fusion]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://jamesoff.net/site/?p=422</guid>
		<description><![CDATA[CDS Internal Error (3014) Means: Can&#8217;t reach the HTTP proxy you have configured. Maybe you should turn it off.]]></description>
			<content:encoded><![CDATA[<blockquote>CDS Internal Error (3014)</blockquote>

<p>Means: Can&#8217;t reach the HTTP proxy you have configured. Maybe you should turn it off.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesoff.net/site/2010/12/03/vmware-fusion-upgrade-error-messages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tarsnap under cygwin</title>
		<link>http://jamesoff.net/site/2009/09/10/tarsnap-under-cygwin/</link>
		<comments>http://jamesoff.net/site/2009/09/10/tarsnap-under-cygwin/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 10:36:31 +0000</pubDate>
		<dc:creator>jamesoff</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[tarsnap]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://jamesoff.net/site/?p=386</guid>
		<description><![CDATA[To get tarsnap working under cygwin, here&#8217;s what you need to do: Install the following packages using the cygwin setup tool: gcc4 make openssl (needed for runtime, not for building) openssl-devel zlib-devel Download and extract the tarsnap code. Run ./configure (this seems to be much slower on cygwin than on other more UNIXy platforms) Run [...]]]></description>
			<content:encoded><![CDATA[<p>To get <a href="http://beta.tarsnap.com">tarsnap </a>working under cygwin, here&#8217;s what you need to do:</p>

<ol>
    <li>Install the following packages using the cygwin setup tool:
<ul>
    <li>gcc4</li>
    <li>make</li>
    <li>openssl (needed for runtime, not for building)</li>
    <li>openssl-devel</li>
    <li>zlib-devel</li>
</ul></li>


    <li>Download and extract the <a href="https://beta.tarsnap.com/download.html">tarsnap code</a>.</li>

    <li>Run <code>./configure</code> (this seems to be much slower on cygwin than on other more UNIXy platforms)</li>

    <li>Run <code>make all install clean</code></li>
</ol>

<p>Tarsnap should now be installed and you can use it in the normal fashion &#8211; create a host key with <code>tarsnap-keygen</code> and then get backing up!</p>

<p>Edit 2009-12-16: checkers from #tarsnap on EFnet has written a post with scripts for Linux and Cygwin tarsnapping at <a href="http://www.bluebottle.net.au/blog/2009/tarsnap-backups-on-windows-and-linux">http://www.bluebottle.net.au/blog/2009/tarsnap-backups-on-windows-and-linux</a></p>

<p>You may also wish at add <code>--prefix=/</code> to the <code>configure</code> command line, as <code>/usr/local</code> isn&#8217;t in the default path.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesoff.net/site/2009/09/10/tarsnap-under-cygwin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using gvim to edit mail in Outlook</title>
		<link>http://jamesoff.net/site/2009/04/03/using-gvim-to-edit-mail-in-outlook/</link>
		<comments>http://jamesoff.net/site/2009/04/03/using-gvim-to-edit-mail-in-outlook/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 16:43:45 +0000</pubDate>
		<dc:creator>jamesoff</dc:creator>
				<category><![CDATA[Exim and email]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[outlook]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://jamesoff.net/site/?p=375</guid>
		<description><![CDATA[Before you go any further, this isn&#8217;t about having gvim embedded in Outlook, or using it automatically as an external editor. This method lets you use one keystroke to edit a mail in gvim and when you close gvim, it&#8217;s put back into the Outlook compose mail window. You will need: AutoHotkey, a keystroke mapping/scripting [...]]]></description>
			<content:encoded><![CDATA[<p>Before you go any further, this isn&#8217;t about having gvim embedded in Outlook, or using it automatically as an external editor.</p>

<p>This method lets you use one keystroke to edit a mail in gvim and when you close gvim, it&#8217;s put back into the Outlook compose mail window.</p>

<p><span id="more-375"></span></p>

<p><strong>You will need:</strong></p>

<ul>
<li><a href="http://www.autohotkey.com/">AutoHotkey</a>, a keystroke mapping/scripting application</li>
<li>My script (below)</li>
<li>gvim for Windows</li>
</ul>

<p><strong>Method:</strong></p>

<ol>
<li>Install AutoHotKey</li>
<li>Install gvim</li>
<li>Install my script into AutoHotKey (it appears at the end of this post). Note that my script has the gvim path hard-coded in and you may well need to change it.</li>
<li>Configure your Outlook to use plain text for composing mail.</li>
<li>Press <strong>Win-V</strong> with an Outlook compose window open and when the cursor is in the message pane</li>
</ol>

<p><strong>Serving suggestion:</strong></p>

<ul>
<li>Goes really well with <a href="http://home.in.tum.de/~jain/software/outlook-quotefix/">Outlook QuoteFix</a></li>
<li>gvim will be opened with the contents of the message window</li>
<li>Edit your mail in gvim and when done, save and quit</li>
<li>Your edited message is put back into the Outlook message window.</li>
</ul>

<p><strong>Additional notes:</strong></p>

<ul>
<li>At the moment, this only works with one mail at a time, as the file for the mail is statically named. If you try Win-V in a mail while you have another already opened, Bad Things will Happen.</li>
<li>You may want to adjust your vimrc file so that it uses the &#8220;mail&#8221; filetype for editing; I also have a mail.vim file with macros and things in it which I tell it to load for this. I pinched it off the web, I&#8217;m sure you can find it. The required vimrc lines are below.</li>
<li>If the cursor isn&#8217;t in the message pane of the Outlook compose window when you press Win-V (or if it moves there before you close the gvim window), things will probably go wrong.</li>
<li>I&#8217;ve tested this with Outlook 2003, gvim 7.2 and AutoHotkey 1.0.47.06.</li>
</ul>

<p>Here&#8217;s the optional vimrc line:</p>


<div class="wp_syntax"><div class="code"><pre class="vim" style="font-family:monospace;"><span style="color: #804040;">autocmd</span> <span style="color: #25BB4D;">BufRead</span> <span style="color: #000000;">*/</span>outlook<span style="color: #000000;">.</span>txt <span style="color: #000000;">:</span>source <span style="color: #000000;">$</span>HOME<span style="color: #000000;">/</span>vimfiles<span style="color: #000000;">/</span>mail<span style="color: #000000;">.</span>vim</pre></div></div>


<p>Here&#8217;s the script itself:</p>

<pre lang="">
#v::
SetTitleMatchMode, 2
IfWinActive, Message (Plain Text)
{
    WinGet, ActiveWindow, ID
    SendInput ^a
    Send ^c

    clipboard = %clipboard%

    FileDelete, %TEMP%\outlook.txt
    FileAppend, %Clipboard%, %TEMP%\outlook.txt

    RunWait, C:\Program Files\vim\vim72a\gvim.exe %TEMP%\outlook.txt

    FileRead, Clipboard, %TEMP%\outlook.txt

    WinActivate, ActiveWindow
    Send ^a^v^{HOME}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jamesoff.net/site/2009/04/03/using-gvim-to-edit-mail-in-outlook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Risk Disk and Squid</title>
		<link>http://jamesoff.net/site/2008/09/10/risk-disk-and-squid/</link>
		<comments>http://jamesoff.net/site/2008/09/10/risk-disk-and-squid/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 15:06:18 +0000</pubDate>
		<dc:creator>jamesoff</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[riskdisk]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://jamesoff.net/site/?p=357</guid>
		<description><![CDATA[We use RiskDisk at work to see if a company we&#8217;re going to do business with is trustworthy, but recently it was complaining HTTP Error 417: Expectation Failed when it tried to do any online lookups. I tracked this down to it sending Expect: 100-continue in the headers of the request it sent to its [...]]]></description>
			<content:encoded><![CDATA[<p>We use <a href="http://www.riskdisk.com/">RiskDisk</a> at work to see if a company we&#8217;re going to do business with is trustworthy, but recently it was complaining <code>HTTP Error 417: Expectation Failed</code> when it tried to do any online lookups.</p>

<p>I tracked this down to it sending <code>Expect: 100-continue</code> in the headers of the request it sent to its server. However, it was going via our web proxy at work, which is <a href="http://www.squid-cache.org/">Squid</a>. Recently I upgraded Squid to 2.7, and this seems to be the cause of the problems. Squid 2.7 is less forgiving about that particular header (which is apparently an RFC violation on the part of the client).</p>

<p>It&#8217;s easily fixed by adding <code>ignore_expect_100 on</code> to your Squid configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesoff.net/site/2008/09/10/risk-disk-and-squid/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>grepping the output of ccze</title>
		<link>http://jamesoff.net/site/2008/07/09/grepping-the-output-of-ccze/</link>
		<comments>http://jamesoff.net/site/2008/07/09/grepping-the-output-of-ccze/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 13:46:34 +0000</pubDate>
		<dc:creator>jamesoff</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://jamesoff.net/site/?p=356</guid>
		<description><![CDATA[If you ever want to grep the output of ccze and found it didn&#8217;t work right, here&#8217;s the magic incantation to do it: tail somefile &#124; ccze -A -o noscroll &#124; grep ... -A makes ccze output ASCII sequences, and -o noscroll turns off the scroll option &#8211; whatever that is exactly. The man page [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever want to grep the output of ccze and found it didn&#8217;t work right, here&#8217;s the magic incantation to do it:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tail</span> somefile <span style="color: #000000; font-weight: bold;">|</span> ccze <span style="color: #660033;">-A</span> <span style="color: #660033;">-o</span> noscroll <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> ...</pre></div></div>


<p><code>-A</code> makes ccze output ASCII sequences, and <code>-o noscroll</code> turns off the scroll option &#8211; whatever that is exactly. The man page says it&#8217;s a good idea to turn it off if you&#8217;re redirecting the output. Omitting it seems to make the output appear in lumps :)</p>

<p>For example, keep an eye on squid logs omitting all MSN crap:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #660033;">-F</span> access.log <span style="color: #000000; font-weight: bold;">|</span> ccze <span style="color: #660033;">-A</span> <span style="color: #660033;">-C</span> <span style="color: #660033;">-o</span> noscroll <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-v</span> gateway.dll</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://jamesoff.net/site/2008/07/09/grepping-the-output-of-ccze/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Delphi documentation</title>
		<link>http://jamesoff.net/site/2008/04/11/delphi-documentation/</link>
		<comments>http://jamesoff.net/site/2008/04/11/delphi-documentation/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 11:43:26 +0000</pubDate>
		<dc:creator>jamesoff</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://jamesoff.net/site/?p=352</guid>
		<description><![CDATA[While writing some Delphi code at work, I spotted this in the documentation. Not sure if I want to call that function or not now&#8230;]]></description>
			<content:encoded><![CDATA[<p>While writing some Delphi code at work, I spotted this in the documentation. Not sure if I want to call that function or not now&#8230;</p>

<p><a href='http://jamesoff.net/site/wp-content/uploads/2008/04/delphi.png'><img src="http://jamesoff.net/site/wp-content/uploads/2008/04/delphi.png" alt="" title="delphi documentation" width="350" height="264" class="aligncenter size-full wp-image-353" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jamesoff.net/site/2008/04/11/delphi-documentation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

