<?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>willoller.com &#187; Hacks</title>
	<atom:link href="http://www.willoller.com/category/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.willoller.com</link>
	<description>Learning to match the beat of the Old World man.</description>
	<lastBuildDate>Sat, 28 Aug 2010 00:33:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Textile ol li count bug</title>
		<link>http://www.willoller.com/textile-ol-li-count-bug/</link>
		<comments>http://www.willoller.com/textile-ol-li-count-bug/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 20:10:41 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.willoller.com/?p=201</guid>
		<description><![CDATA[Just hit a bug with the Textile 2.0 library: # Portland, OR # Sanford, FL # Albuquerque, NM # San Diego, CA # Bellingham, WA &#160; Was producing: &#60;ol&#62; &#160; &#160;&#60;li&#62;Portland, OR&#60;/li&#62; &#160; &#160;&#60;li&#62;Sanford, FL&#60;/li&#62; &#160; &#160;&#60;li&#62;Albuquerque, NM&#60;/li&#62; &#160; &#160;&#60;li&#62;San Diego, CA&#160; &#160;&#60;/li&#62; &#60;/ol&#62; &#60;ol&#62; &#160; &#160;&#60;li&#62;Bellingham, WA&#60;/li&#62; &#60;/ol&#62; &#160; Found the solution here: You [...]]]></description>
			<content:encoded><![CDATA[	<p>Just hit a bug with the Textile 2.0 library:</p>
	<div class="code html" style="font-family: monospace;"><br />
# Portland, OR<br />
# Sanford, FL<br />
# Albuquerque, NM<br />
# San Diego, CA<br />
# Bellingham, WA<br />
&nbsp;</div>
	<p>Was producing:</p>
	<div class="code html" style="font-family: monospace;"><br />
&lt;ol&gt;<br />
&nbsp; &nbsp;&lt;li&gt;Portland, OR&lt;/li&gt;<br />
&nbsp; &nbsp;&lt;li&gt;Sanford, FL&lt;/li&gt;<br />
&nbsp; &nbsp;&lt;li&gt;Albuquerque, NM&lt;/li&gt;<br />
&nbsp; &nbsp;&lt;li&gt;San Diego, CA&nbsp; &nbsp;&lt;/li&gt;<br />
&lt;/ol&gt;<br />
&lt;ol&gt;<br />
&nbsp; &nbsp;&lt;li&gt;Bellingham, WA&lt;/li&gt;<br />
&lt;/ol&gt;<br />
&nbsp;</div>
	<p>Found the solution <a href="http://forum.textpattern.com/viewtopic.php?id=24701&#38;p=3">here</a>:</p>
<blockquote>You can work around the problem, by replacing these two lines (in the fList function in /textpattern/lib/classTextile.php):
<div class="code php" style="font-family: monospace;"><br />
<span style="color: #b1b100;">foreach</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$text</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$line</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; <span style="color: #0000ff;">$nextline</span> = <a href="http://www.php.net/next"><span style="color: #000066;">next</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$text</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
&nbsp;</div>
with:
<div class="code php" style="font-family: monospace;"><br />
<span style="color: #b1b100;">foreach</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$text</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$nr</span> =&gt; <span style="color: #0000ff;">$line</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; <span style="color: #0000ff;">$nextline</span> = <a href="http://www.php.net/isset"><span style="color: #000066;">isset</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$text</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$nr</span><span style="color: #cc66cc;">+1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> ? <span style="color: #0000ff;">$text</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$nr</span><span style="color: #cc66cc;">+1</span><span style="color: #66cc66;">&#93;</span> : <span style="color: #000000; font-weight: bold;">false</span>;<br />
<br />
&nbsp;</div>
</blockquote>

 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/textile-ol-li-count-bug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Generating amazing reports using Basecamp (Part 1 &#8211; Tagging)</title>
		<link>http://www.willoller.com/use-sql-to-query-your-basecamp-account/</link>
		<comments>http://www.willoller.com/use-sql-to-query-your-basecamp-account/#comments</comments>
		<pubDate>Sat, 11 Aug 2007 20:36:23 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[Basecamp]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[php programming]]></category>

		<guid isPermaLink="false">http://www.willoller.com/use-sql-to-query-your-basecamp-account/</guid>
		<description><![CDATA[We&#8217;ve been looking for good ways to produce advanced reports using Basecamp. We have hit upon a system in which we implement a rudimentary tagging system, and add additional metadata for time estimation. In this first part, I will explain the simple tagging system. Next time, I will tell you all about the Big XML [...]]]></description>
			<content:encoded><![CDATA[	<p>We&#8217;ve been looking for good ways to produce advanced reports using Basecamp.  We have hit upon a system in which we implement a rudimentary tagging system, and add additional metadata for time estimation.  </p>
	<p>In this first part, I will explain the simple tagging system.  Next time, I will tell you all about the Big XML Dump.</p>
<h2>Tagging System</h2>
	<p>Tagging will be implemented using { curly braces } around a comma-delimited list.  We will be using our regular work categories as tags, so a typical todo-list might look like:</p>
<blockquote>
   <h4>Implement new feature {Programming}</h4>
   <ul>
      <li>Add new processing loop</li>
      <li>Create new template {HTML Production}</li>
      <li>Connect to pre-existing API</li>
</blockquote> 
	<p>We want our tagging parser to be smart, and change an item&#8217;s tag list on the fly based on it&#8217;s parent item&#8217;s tag list.  That sounds complicated; here&#8217;s an example using the list above.</p>
	<p><h4>Computed Tags</h4><br />
<blockquote>
   <h4>Implement new feature {Programming}</h4>
   <ul>
      <li>Add new processing loop {<em>Programming</em>}</li>
      <li>Create new template {<em>Programming</em>, HTML Production}</li>
      <li>Connect to pre-existing API {<em>Programming</em>}</li><br />
</blockquote> </p>
	<p>The <em>italicized</em> tags are derived from the list&#8217;s name (Implement new feature) and will be programmatically added. </p>
<h2>Time Estimation</h2>
	<p>Time estimates are handled in much the same way as the tags, just using straight brackets instead ([, ]).</p>
	<p>Adding time estimation to our list:</p>
<blockquote>
   <h4>Implement new feature {Programming}</h4>
   <ul>
      <li>Add new processing loop [1]</li>
      <li>Create new template [6.5] {HTML Production}</li>
      <li>Connect to pre-existing API [9]</li>
</blockquote> 
	<p>This way, each todo-item has a time value associated with it.  We will use this data later on to test our estimation skills and to quantify our productivity.</p>
	<p>Next: Part 2 &#8211; The Big XML Dump</p>


 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/use-sql-to-query-your-basecamp-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limiting title and excerpt length with WordPress</title>
		<link>http://www.willoller.com/limiting-title-and-excerpt-length-with-wordpress/</link>
		<comments>http://www.willoller.com/limiting-title-and-excerpt-length-with-wordpress/#comments</comments>
		<pubDate>Sat, 14 Apr 2007 00:55:42 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php programming]]></category>

		<guid isPermaLink="false">http://www.willoller.com/limiting-title-and-excerpt-length-with-wordpress/</guid>
		<description><![CDATA[Sometimes clients have very specific requirements. Sometimes they want autometic controls on simple things they have total control over anyway. I digress. In this case, blog titles needed to be of any length, but have their lengths truncated under certain circumstances. Furthermore, excerpts need to be able to be the default length (50 words), but [...]]]></description>
			<content:encoded><![CDATA[	<p>Sometimes clients have very specific requirements. Sometimes they want autometic controls on simple things they have total control over anyway.  I digress.</p>
	<p>In this case, blog titles needed to be of any length, but have their lengths truncated under certain circumstances.  Furthermore, excerpts need to be able to be the default length (50 words), but shorter (10 words) under those same certain circumstances.</p>
	<p>Fortunately for me, the excerpt was easily fixed using a plugin called <a href="http://guff.szub.net/2005/02/26/the-excerpt-reloaded/">the excerpt reloaded</a>.</p>
	<p>http://guff.szub.net/2005/02/26/the-excerpt-reloaded/</p>
	<p>Next, for the title length requirements, you will need to modifiy a core file: <code>wp-includes/post-template.php</code>.</p>
	<p>[php]<br />
function the_title($before = &#8216;&#8217;, $after = &#8216;&#8217;, $echo = true, $length = false) {
   $title = get_the_title();
    if ( $length &#38;&#38; is_numeric($length) ) {
       $title = substr( $title, 0, $length );
    }
    if ( strlen($title) > 0 ) {
       $title = apply_filters(&#8216;the_title&#8217;, $before . $title . $after, $before, $after);
       if ( $echo )
          echo $title;
       else
          return $title;
    }<br />
}<br />
[/php]</p>
	<p>Finally, when in <strong>The Loop</strong>, call the_title() like this:</p>
	<p>[php]< ?php the_title('', '', true, '40') ?>[/php]</p>
	<p>Now, the title will be a mere 40 characters long, and the excerpt (using <code>the_excerpt_reloaded()</code>) can be any desired length.</p>

 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/limiting-title-and-excerpt-length-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>fuser</title>
		<link>http://www.willoller.com/fuser/</link>
		<comments>http://www.willoller.com/fuser/#comments</comments>
		<pubDate>Tue, 26 Dec 2006 22:25:53 +0000</pubDate>
		<dc:creator>will</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.willoller.com/fuser/</guid>
		<description><![CDATA[A quick blurb about the most useful command you practically never use.]]></description>
			<content:encoded><![CDATA[<p>Ever tried to unmount a drive only to get hit with a mysterious &#8220;in use&#8221; message?<br />

Even when you are <em>sure</em> you are not using it?</p><br />
<p>Yea, that was one of the early problems that made learning linux tough.  Then I learned about the fuser command:<br />

<code>&lt;br /&gt;<br />
fuser -v /path/to/mount&lt;br /&gt;<br />
</code></p><br />
<p>You will get back what process is still using that mountpoint, and who owns that process:<br />

<code>&lt;br /&gt;<br />
USER   PID   ACCESS   COMMAND&lt;br /&gt;<br />
root    2117  ..C... /bin/bash&lt;br /&gt;<br />
</code></p><br />
<p>As you can see, I accidentally left a terminal open.  Oops.</p><br />
<p><strong>Related Links</strong></p>
<ul>
<li><a href="http://www.linuxcommand.org/man_pages/fuser1.html" class="external text" title="http://www.linuxcommand.org/man_pages/fuser1.html">fuser</a> at <a href="http://www.linuxcommand.org/">linuxcommand.org<br />

</a></li>
<li>Also this <a href="http://www.linuxjournal.com/article/7330">linuxjournal</a> article.</li>
</ul>


 ]]></content:encoded>
			<wfw:commentRss>http://www.willoller.com/fuser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
