<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3" -->
<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/"
	>

<channel>
	<title>Tim's Bandwagon</title>
	<link>http://www.twisty.com/bandwagon</link>
	<description>Hitch your wagon to a chicken</description>
	<pubDate>Fri, 16 Nov 2007 16:57:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3</generator>
	<language>en</language>
			<item>
		<title>Import Ricoh GX100 RAW files into Apple’s Aperture in MacOS 10.5 Leopard</title>
		<link>http://www.twisty.com/bandwagon/archives/2007/11/16/175701</link>
		<comments>http://www.twisty.com/bandwagon/archives/2007/11/16/175701#comments</comments>
		<pubDate>Fri, 16 Nov 2007 16:57:01 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.twisty.com/bandwagon/archives/2007/11/16/175701</guid>
		<description><![CDATA[Here’s a little hack to enable you to use Ricoh GX100 RAW files in Apple’s Aperture.

Make a backup of the following file:

/System/Library/CoreServices/RawCamera.bundle/Contents/Resources/Raw.plist

Find the key for the Leica D-LUX 3 (line 3316 in MacOS 10.5.1):

3316: &#60;key&#62;Leica D-LUX 3&#60;/key&#62; &#60;string&#62;Panasonic DMC-LX2&#60;/string&#62; &#60;!-- 10.4.10 --&#62;


Then insert the following line before the line showing the Leica D-LUX 3:

3316: &#60;key&#62;RICOH [...]]]></description>
			<content:encoded><![CDATA[<p>Here’s a little hack to enable you to use Ricoh GX100 RAW files in Apple’s Aperture.</p>

<p>Make a backup of the following file:</p>

<pre><code>/System/Library/CoreServices/RawCamera.bundle/Contents/Resources/Raw.plist</code></pre>

<p>Find the key for the Leica D-LUX 3 (line 3316 in MacOS 10.5.1):</p>

<pre><code>3316: &lt;key&gt;Leica D-LUX 3&lt;/key&gt; &lt;string&gt;Panasonic DMC-LX2&lt;/string&gt; &lt;!-- 10.4.10 --&gt;
</code></pre>

<p>Then insert the following line before the line showing the Leica D-LUX 3:</p>

<pre><code>3316: &lt;key&gt;RICOH Caplio GX100&lt;/key&gt; &lt;string&gt;Panasonic DMC-LX2&lt;/string&gt;
3317: &lt;key&gt;Leica D-LUX 3&lt;/key&gt; &lt;string&gt;Panasonic DMC-LX2&lt;/string&gt; &lt;!-- 10.4.10 --&gt;
</code></pre>

<p>You should now be able to use the Ricoh’s RAW files in Aperture.</p>

<p>This is based on a previous hack (<a href="http://forums.dpreview.com/forums/read.asp?forum=1013&amp;message=23723763">detailed here</a>), which doesn&#8217;t apply to Leopard.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2007/11/16/175701/feed</wfw:commentRss>
		</item>
		<item>
		<title>Bristol City Council – Planning application documents only viewable using Internet Explorer</title>
		<link>http://www.twisty.com/bandwagon/archives/2007/08/01/104320</link>
		<comments>http://www.twisty.com/bandwagon/archives/2007/08/01/104320#comments</comments>
		<pubDate>Wed, 01 Aug 2007 09:43:20 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
		
		<category><![CDATA[Bristol]]></category>

		<guid isPermaLink="false">http://www.twisty.com/bandwagon/archives/2007/08/01/104320</guid>
		<description><![CDATA[From Britol City Council’s PublicAccess for Planning page:


    Please note that the documents within PublicAccess can only be accessed by using Internet Explorer. This is due to a limitation within the system which has been raised with the suppliers.


Not good enough. Here’s form I knocked-up in about 2 minutes that gives users [...]]]></description>
			<content:encoded><![CDATA[<p>From Britol City Council’s <a href="http://www.bristol.gov.uk/ccm/content/Environment-Planning/Planning/publicaccess-for-planning.en">PublicAccess for Planning</a> page:</p>

<blockquote>
    <p>Please note that the documents within PublicAccess can only be accessed by using Internet Explorer. This is due to a limitation within the system which has been raised with the suppliers.</p>
</blockquote>

<p>Not good enough. Here’s form I knocked-up in about 2 minutes that gives users of other browsers access to associated planning documents. The associated documents are things like supporting letters, photographs, a copy of the application form etc.</p>

<p>Enter a planning application number to view any supporting documents.</p>

<form action="http://e2edocs.bristol-city.gov.uk/WAM/findCaseFile.do" method="get" accept-charset="utf-8">
<input type="hidden" name="appName" value="planning" id="appName"/>
<p><label for="appNumber">Application number</label> (e.g. <code>02/00001/FUL</code>)<br /><input type="text" name="appNumber" value="" id="appNumber" /> <input type="submit" value="Show Documents" /></p>
</form>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2007/08/01/104320/feed</wfw:commentRss>
		</item>
		<item>
		<title>ActionScript trim function</title>
		<link>http://www.twisty.com/bandwagon/archives/2007/07/23/162642</link>
		<comments>http://www.twisty.com/bandwagon/archives/2007/07/23/162642#comments</comments>
		<pubDate>Mon, 23 Jul 2007 15:26:42 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.twisty.com/bandwagon/archives/2007/07/23/162642</guid>
		<description><![CDATA[ActionScript 2.0 doesn&#8217;t have a trim function to strip whitespace from the start and end of a string. Here&#8217;s a simple function I wrote because I couldn&#8217;t find a satisfactory example on Google!


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function trim&#40;str:String&#41;:String
&#123;
    var stripCharCodes = &#123;
        code_9  : true, // tab
  [...]]]></description>
			<content:encoded><![CDATA[<p>ActionScript 2.0 doesn&#8217;t have a <code>trim</code> function to strip whitespace from the start and end of a string. Here&#8217;s a simple function I wrote because I couldn&#8217;t find a satisfactory example on Google!</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="actionscript"><span style="color: #000000; font-weight: bold;">function</span> trim<span style="color: #66cc66;">&#40;</span>str:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">var</span> stripCharCodes = <span style="color: #66cc66;">&#123;</span>
        code_9  : <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #808080; font-style: italic;">// tab</span>
        code_10 : <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #808080; font-style: italic;">// linefeed</span>
        code_13 : <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #808080; font-style: italic;">// return</span>
        code_32 : <span style="color: #000000; font-weight: bold;">true</span>  <span style="color: #808080; font-style: italic;">// space</span>
    <span style="color: #66cc66;">&#125;</span>;
    <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span>stripCharCodes<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;code_&quot;</span> + str.<span style="color: #0066CC;">charCodeAt</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span> == <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        str = str.<span style="color: #0066CC;">substring</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, str.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span>stripCharCodes<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;code_&quot;</span> + str.<span style="color: #0066CC;">charCodeAt</span><span style="color: #66cc66;">&#40;</span>str.<span style="color: #0066CC;">length</span> - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span> == <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        str = str.<span style="color: #0066CC;">substring</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, str.<span style="color: #0066CC;">length</span> - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">return</span> str;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>


<p>The horrible <code>"code_"</code> prefix hack is there because I don&#8217;t think there&#8217;s a native way to search an array or object for a key or value in ActionScript.</p>

<p><ins>Update:</ins> just found this function at: <a href="http://www.frogstyle.ch/p.cfm?s=18">frogstyle.ch</a>. This one does a similar thing, but strips more characters.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="actionscript"><span style="color: #000000; font-weight: bold;">function</span> trim<span style="color: #66cc66;">&#40;</span>str:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i = <span style="color: #cc66cc;">0</span>; str.<span style="color: #0066CC;">charCodeAt</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span> &lt; <span style="color: #cc66cc;">33</span>; i++<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> j = str.<span style="color: #006600;">length</span><span style="color: #cc66cc;">-1</span>; str.<span style="color: #0066CC;">charCodeAt</span><span style="color: #66cc66;">&#40;</span>j<span style="color: #66cc66;">&#41;</span> &lt; <span style="color: #cc66cc;">33</span>; j--<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">return</span> str.<span style="color: #0066CC;">substring</span><span style="color: #66cc66;">&#40;</span>i, j<span style="color: #cc66cc;">+1</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2007/07/23/162642/feed</wfw:commentRss>
		</item>
		<item>
		<title>array_mode</title>
		<link>http://www.twisty.com/bandwagon/archives/2007/05/03/104903</link>
		<comments>http://www.twisty.com/bandwagon/archives/2007/05/03/104903#comments</comments>
		<pubDate>Thu, 03 May 2007 09:49:03 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.twisty.com/bandwagon/archives/2007/05/03/104903</guid>
		<description><![CDATA[If you&#8217;ve ever needed to get calculate a mode value in php, you&#8217;ll notice that there isn&#8217;t a native function to do so.

I couldn&#8217;t get the function in Pear&#8217;s Math_Statistics to work with non-numeric values, so here&#8217;s a function that does.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
&#60;?php
&#160;
/**
 * Calculates the frequently occuring value(s) in an array.
 *
 * @param  array [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever needed to get calculate a mode value in php, you&#8217;ll notice that there isn&#8217;t a native function to do so.</p>

<p>I couldn&#8217;t get the function in Pear&#8217;s <a href="http://pear.php.net/package/Math_Stats/" title="PEAR :: Package :: Math_Stats">Math_Statistics</a> to work with non-numeric values, so here&#8217;s a function that does.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
</pre></td><td class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/**
 * Calculates the frequently occuring value(s) in an array.
 *
 * @param  array $data
 * @return array
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> array_mode<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>!<span style="color: #000066;">is_array</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        throw <span style="color: #000000; font-weight: bold;">new</span> Exception<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'First argument $data must be an array.'</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #0000ff;">$frequencys</span> = <span style="color: #000066;">array_count_values</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #808080; font-style: italic;">// Double-check that frequencys are sorted in reverse order,</span>
    <span style="color: #808080; font-style: italic;">// I think array_count_values actually returns in this format</span>
    <span style="color: #808080; font-style: italic;">// already, but the manual doesn't mention it.</span>
    <span style="color: #000066;">arsort</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$frequencys</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$isFirst</span> = <span style="color: #000000; font-weight: bold;">true</span>; <span style="color: #808080; font-style: italic;">// Yuk</span>
    <span style="color: #0000ff;">$mode</span> = <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$frequencys</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$thisValue</span>=&gt;<span style="color: #0000ff;">$thisFrequency</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$isFirst</span> == <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #0000ff;">$isFirst</span> = <span style="color: #000000; font-weight: bold;">false</span>; <span style="color: #808080; font-style: italic;">// Wince</span>
            <span style="color: #0000ff;">$mode</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$thisValue</span>;
            <span style="color: #0000ff;">$modeFrequency</span> = <span style="color: #0000ff;">$thisFrequency</span>;
            <span style="color: #b1b100;">continue</span>;
        <span style="color: #66cc66;">&#125;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$modeFrequency</span> == <span style="color: #0000ff;">$thisFrequency</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #0000ff;">$mode</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$thisValue</span>;
        <span style="color: #66cc66;">&#125;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$modeFrequency</span> &gt; <span style="color: #0000ff;">$thisFrequency</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #b1b100;">break</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$mode</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000066;">var_dump</span><span style="color: #66cc66;">&#40;</span>array_mode<span style="color: #66cc66;">&#40;</span><span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'a'</span>, <span style="color: #ff0000;">'a'</span>, <span style="color: #ff0000;">'b'</span>, <span style="color: #ff0000;">'c'</span>, <span style="color: #ff0000;">'d'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">/*
array(1) {
  [0]=&gt;
  string(1) &quot;a&quot;
}
*/</span>
&nbsp;
<span style="color: #000066;">var_dump</span><span style="color: #66cc66;">&#40;</span>array_mode<span style="color: #66cc66;">&#40;</span><span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'a'</span>, <span style="color: #ff0000;">'a'</span>, <span style="color: #ff0000;">'b'</span>, <span style="color: #ff0000;">'b'</span>, <span style="color: #ff0000;">'c'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">/*
array(2) {
  [0]=&gt;
  string(1) &quot;a&quot;
  [1]=&gt;
  string(1) &quot;b&quot;
}
*/</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2007/05/03/104903/feed</wfw:commentRss>
		</item>
		<item>
		<title>Magners</title>
		<link>http://www.twisty.com/bandwagon/archives/2007/04/29/103203</link>
		<comments>http://www.twisty.com/bandwagon/archives/2007/04/29/103203#comments</comments>
		<pubDate>Sun, 29 Apr 2007 09:32:03 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
		
		<category><![CDATA[Bristol]]></category>

		<guid isPermaLink="false">http://www.twisty.com/bandwagon/archives/2007/04/29/103203</guid>
		<description><![CDATA[

mankners&#8230;, originally uploaded by i y e r s.

My thoughts precisely. It&#8217;s depressing how this stuff has become so popular when there&#8217;s such a variety of decent local cider producers within a 25 mile radius of Bristol.

Given the food-miles accumulated importing apples from the UK, France and the Netherlands to Ireland and shipping them back [...]]]></description>
			<content:encoded><![CDATA[<p><a title="photo sharing" href="http://www.flickr.com/photos/i_y_e_r_s/474471473/"><img src="http://farm1.static.flickr.com/178/474471473_febbb1e3c8.jpg" /></a></p>

<p><a href="http://www.flickr.com/photos/i_y_e_r_s/474471473/">mankners&#8230;</a>, originally uploaded by <a href="http://www.flickr.com/people/i_y_e_r_s/">i y e r s</a>.</p>

<p>My thoughts precisely. It&#8217;s depressing how this stuff has become so popular when there&#8217;s such a variety of decent local cider producers within a 25 mile radius of Bristol.</p>

<p>Given the food-miles accumulated importing apples from the <a href="http://news.independent.co.uk/business/news/article1269438.ece">UK, France and the Netherlands</a> to Ireland and shipping them back as cider, its a tad ironic that they have to <a href="http://www.dailymail.co.uk/pages/live/articles/news/news.html?in_article_id=394737&amp;in_page_id=1770">import CO<sub>2</sub> from Poland</a> to make it fizzy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2007/04/29/103203/feed</wfw:commentRss>
		</item>
		<item>
		<title>iPhone</title>
		<link>http://www.twisty.com/bandwagon/archives/2007/01/12/021649</link>
		<comments>http://www.twisty.com/bandwagon/archives/2007/01/12/021649#comments</comments>
		<pubDate>Fri, 12 Jan 2007 01:16:49 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.twisty.com/bandwagon/archives/2007/01/12/021649</guid>
		<description><![CDATA[Remove the phone cruft; add some sensible storage for a media player, and I&#8217;ll buy one!
]]></description>
			<content:encoded><![CDATA[<p>Remove the phone cruft; add some sensible storage for a media player, and I&#8217;ll buy one!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2007/01/12/021649/feed</wfw:commentRss>
		</item>
		<item>
		<title>My Macworld Wishes</title>
		<link>http://www.twisty.com/bandwagon/archives/2007/01/08/011553</link>
		<comments>http://www.twisty.com/bandwagon/archives/2007/01/08/011553#comments</comments>
		<pubDate>Mon, 08 Jan 2007 00:15:53 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.twisty.com/bandwagon/archives/2007/01/08/011553</guid>
		<description><![CDATA[Everyone seems to be up to it at the moment, so here&#8217;s what I&#8217;d like to see announced at Macworld Expo this year&#8230;


    A refund to anyone that has ever paid money for .mac


That&#8217;s all.
]]></description>
			<content:encoded><![CDATA[<p>Everyone seems to be up to it at the moment, so here&#8217;s what I&#8217;d like to see announced at Macworld Expo this year&#8230;</p>

<ol>
    <li>A refund to anyone that has ever paid money for .mac</li>
</ol>

<p>That&#8217;s all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2007/01/08/011553/feed</wfw:commentRss>
		</item>
		<item>
		<title>Happy Day of Slav Letters in Bulgaria</title>
		<link>http://www.twisty.com/bandwagon/archives/2006/05/24/114740</link>
		<comments>http://www.twisty.com/bandwagon/archives/2006/05/24/114740#comments</comments>
		<pubDate>Wed, 24 May 2006 10:47:40 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
		
		<category><![CDATA[Foo]]></category>

		<category><![CDATA[Typography]]></category>

		<guid isPermaLink="false">http://www.twisty.com/bandwagon/?p=242</guid>
		<description><![CDATA[Today is the &#8220;Day of Slav Letters in Bulgaria&#8221;. I&#8217;m not Bulgarian, and have never been there, and definitely can&#8217;t spell your name in Bulgarian for a school project. I just like the idea of holding a national holiday to celebrate letter-forms and their creators, like Korean Alphabet Day.
]]></description>
			<content:encoded><![CDATA[<p>Today is the &#8220;Day of Slav Letters in Bulgaria&#8221;. I&#8217;m not Bulgarian, and have never been there, and definitely can&#8217;t spell your name in Bulgarian for a school project. I just like the idea of holding a national holiday to celebrate letter-forms and <a href="http://en.wikipedia.org/wiki/Saints_Cyril_and_Methodius">their creators</a>, like <a href="http://www.twisty.com/bandwagon/archives/2003/10/09/200339">Korean Alphabet Day</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2006/05/24/114740/feed</wfw:commentRss>
		</item>
		<item>
		<title>Preview Markdown Documents in BBEdit</title>
		<link>http://www.twisty.com/bandwagon/archives/2005/10/31/195241</link>
		<comments>http://www.twisty.com/bandwagon/archives/2005/10/31/195241#comments</comments>
		<pubDate>Mon, 31 Oct 2005 18:52:41 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Markup and CSS]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.twisty.com/bandwagon/?p=241</guid>
		<description><![CDATA[A quickie: here&#8217;s a way of directly previewing Markdown documents in the BBEdit preview window using PHP. (Inspired by this Python method that does the same thing).


Make a template file (you&#8217;ll probably want to add some styles to this).
~/Sites/markdown-preview/template.html


1
2
3
4
5
6
7
8
9
10
11
&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.1//EN&#34;
        &#34;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&#34;&#62;
&#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62;
&#60;head&#62;
	&#60;meta http-equiv=&#34;content-type&#34; content=&#34;text/html; [...]]]></description>
			<content:encoded><![CDATA[<p>A quickie: here&#8217;s a way of directly previewing <a href="http://daringfireball.net/projects/markdown/">Markdown</a> documents in the <a href="http://www.barebones.com/products/bbedit/">BBEdit</a> preview window using <a href="http://www.php.net/">PHP</a>. (Inspired by this <a href="http://blog.mostrom.pp.se/?p=63" title="Preview Markdown documents using BBEdit">Python method</a> that does the same thing).</p>

<ol>
<li><p>Make a template file (you&#8217;ll probably want to add some styles to this).</p>
<p><em>~/Sites/markdown-preview/template.html</em></p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="html4strict"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot;</span>
<span style="color: #00bbdd;">        &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html</span> xmlns=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">&quot;content-type&quot;</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title&gt;</span></span>Markdown Preview<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></span>
##markdown##
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span></pre></td></tr></table></div>


</li>
<li><p>Make the php file, and follow the instructions in the PHP comments.</p>
<p><em>~/Sites/markdown-preview/index.php</em></p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
</pre></td><td class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*
 * Download these and put them somewhere in your php path:
 *
 *     &lt;a href=&quot;http://www.michelf.com/projects/php-markdown/&quot;&gt;http://www.michelf.com/projects/php-markdown/&lt;/a&gt;
 *     &lt;a href=&quot;http://www.michelf.com/projects/php-smartypants/&quot;&gt;http://www.michelf.com/projects/php-smartypants/&lt;/a&gt;
 */</span>
<span style="color: #b1b100;">include_once</span> <span style="color: #ff0000;">'markdown.php'</span>;
<span style="color: #b1b100;">include_once</span> <span style="color: #ff0000;">'smartypants.php'</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">/*
 * You'll need to change this:
 */</span>
<span style="color: #0000ff;">$markdownDocsDir</span> = <span style="color: #000066;">isset</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$_SERVER</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'MARKDOWN_DOCS_DIR'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> ? <span style="color: #0000ff;">$_SERVER</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'MARKDOWN_DOCS_DIR'</span><span style="color: #66cc66;">&#93;</span> : <span style="color: #ff0000;">'/Users/username/Documents'</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">/*
 * You'll need to set up BBEdit to use something like this as the Preview Server URL:
 *
 *     http://localhost/markdown-preview/?file=/
 */</span>
<span style="color: #0000ff;">$file</span> = <span style="color: #0000ff;">$_GET</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'file'</span><span style="color: #66cc66;">&#93;</span>;
<span style="color: #0000ff;">$text</span> = <span style="color: #000066;">file_get_contents</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$markdownDocsDir</span> . <span style="color: #0000ff;">$file</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0000ff;">$formatted</span> = SmartyPants<span style="color: #66cc66;">&#40;</span>Markdown<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$text</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #ff0000;">'2'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">/*
 * Display the formatted text via a simple template.
 */</span>
<span style="color: #0000ff;">$templateFile</span> = <span style="color: #ff0000;">'./template.html'</span>;
<span style="color: #0000ff;">$templateText</span> = <span style="color: #000066;">file_exists</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$templateFile</span><span style="color: #66cc66;">&#41;</span> ? <span style="color: #000066;">file_get_contents</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$templateFile</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #ff0000;">&quot;##markdown##&quot;</span>;
<span style="color: #000066;">echo</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000066;">str_replace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'##markdown##'</span>, <span style="color: #0000ff;">$formatted</span>, <span style="color: #0000ff;">$templateText</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>


</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2005/10/31/195241/feed</wfw:commentRss>
		</item>
		<item>
		<title>Finding Time to Exercise</title>
		<link>http://www.twisty.com/bandwagon/archives/2005/08/23/014337</link>
		<comments>http://www.twisty.com/bandwagon/archives/2005/08/23/014337#comments</comments>
		<pubDate>Tue, 23 Aug 2005 00:43:37 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
		
		<category><![CDATA[Foo]]></category>

		<category><![CDATA[GTD]]></category>

		<guid isPermaLink="false">http://trunk.www.twisty.coronationroad/bandwagon/?p=238</guid>
		<description><![CDATA[I&#8217;m down to less than 200 feeds in NetNewsWire now after culling a few dinosaurs and thinning-out a few sorry specimens.

I&#8217;ve just unsubscribed from the increasingly inane Lifehacker (cf. Finding-Your-Car and Coffee tips) after reading this little gem:

You&#8217;re busy. Your life is a hectic mess. How do you find time to get some exercise? Here [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m down to less than 200 feeds in NetNewsWire now after culling a few <a href="http://ranchero.com/netnewswire/features/dinosaurs.php">dinosaurs</a> and thinning-out a few sorry specimens.</p>

<p>I&#8217;ve just <a href="http://www.gyford.com/phil/writing/2005/08/01/slimming_for_aug.php">unsubscribed</a> from the increasingly inane <a href="http://www.lifehacker.com/">Lifehacker</a> (cf. <a href="http://www.lifehacker.com/software/life-hacks/findingyourcar-hacks-118196.php">Finding-Your-Car</a> and <a href="http://www.lifehacker.com/software/food/c8h10n4o2-and-all-that-117989.php">Coffee tips</a>) after reading <a href="http://www.lifehacker.com/software/health/finding-time-to-exercise-118251.php">this little gem</a>:</p>

<blockquote><p>You&#8217;re busy. Your life is a hectic mess. How do you find time to get some exercise? Here are a few tips from Maria Gracia of GetOrganizedNow.com.</p>
    <blockquote>
        <ul>
            <li>Skip the escalator and elevator. Take the stairs.</li>
            <li>Park at least a block away from work or get off the bus/train a few stops early. Walk the rest of the way.</li>
            <li>Rather than meeting with a friend for lunch, consider going biking, roller blading or swimming together instead.</li>
            <li>Do some calisthenics or ride a stationary bike while watching your favorite television program.</li>
            <li>Do some simple stretches, while you&#8217;re on the telephone and you&#8217;re on hold.</li>
            <li>Schedule just 10 minutes of exercise per day on your calendar. By the time to month is over, you will have exercised over 300 minutes!</li>
        </ul>
    </blockquote>
</blockquote>

<p>If your life was a &#8220;hectic mess&#8221;, and you were <em>riding a stationary bike</em> while watching your favourite television program, would you really feel any better about getting your busy hectic mess of a life under control? Well, that&#8217;s almost irrelevant because you&#8217;ve got at least <em>10 minutes</em> of exercise scheduled for tomorrow and you can enjoy as many <em>simple stretches</em> as you&rsquo;ve got minutes on-hold.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2005/08/23/014337/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
