<?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>Laughing Meme &#187; unix</title>
	<atom:link href="http://laughingmeme.org/tag/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://laughingmeme.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 29 Jan 2012 21:54:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>bceval: arbitrary precision math for PHP without extensions</title>
		<link>http://laughingmeme.org/2008/03/25/bceval-arbitrary-precision-math-for-php-without-extensions/</link>
		<comments>http://laughingmeme.org/2008/03/25/bceval-arbitrary-precision-math-for-php-without-extensions/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 20:50:38 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[big numbers]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://laughingmeme.org/2008/03/25/bceval-arbitrary-precision-math-for-php-without-extensions/</guid>
		<description><![CDATA[I needed arbitrary precision math in PHP, and wasn&#8217;t willing to rebuild PHP to add the bcmath extensions. All hail backticks. function bceval($expr) { return trim(`echo "$expr" &#124; bc`); } Used like so $end = bceval("$start + $batchsize - 1"); Wet cat territory.]]></description>
			<content:encoded><![CDATA[<p>I needed arbitrary precision math in PHP, and wasn&#8217;t willing to rebuild PHP to add the <a href="http://www.php.net/bc">bcmath</a> extensions.  All hail backticks.</p>

<pre><code>function bceval($expr) {
  return trim(`echo "$expr" | bc`);
}
</code></pre>

<p>Used like so</p>

<pre><code>$end = bceval("$start + $batchsize - 1");
</code></pre>

<p><a href="http://simonwillison.net/2003/Jun/24/philosophy/">Wet cat</a> territory.</p>
]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2008/03/25/bceval-arbitrary-precision-math-for-php-without-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading a file backwards in PHP</title>
		<link>http://laughingmeme.org/2008/02/28/reading-a-file-backwards-in-php/</link>
		<comments>http://laughingmeme.org/2008/02/28/reading-a-file-backwards-in-php/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 16:58:51 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://laughingmeme.org/2008/02/28/reading-a-file-backwards-in-php/</guid>
		<description><![CDATA[This morning I needed to read from a file line by line from the bottom. In PHP. Perl, of course, has a module to do this. A quick view source decided that I didn&#8217;t want to get into file seeks before breakfast. Very happy with my solution: $file = popen("tac $filename",'r'); while ($line = fgets($file)) [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I needed to read from a file line by line from the bottom.  In PHP.  Perl, of course, <a href="http://search.cpan.org/dist/File-ReadBackwards/ReadBackwards.pm">has a module to do this</a>.  A quick view source decided that I didn&#8217;t want to get into file seeks before breakfast.  Very happy with my solution:</p>

<pre><code>$file = popen("tac $filename",'r');

while ($line = fgets($file)) {
  echo $line;
}
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2008/02/28/reading-a-file-backwards-in-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>man.splitbrain.org &#8211; web interface to 45k+ Unix man pages</title>
		<link>http://laughingmeme.org/2006/04/17/mansplitbrainorg-web-interface-to-45k-unix-man-pages/</link>
		<comments>http://laughingmeme.org/2006/04/17/mansplitbrainorg-web-interface-to-45k-unix-man-pages/#comments</comments>
		<pubDate>Mon, 17 Apr 2006 18:00:00 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Aside]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://lm.quxx.info/?p=3327</guid>
		<description><![CDATA[Clean URLs and design, user contributions. Nicely done, every documentation set should be so lucky. (from the creator of the excellent dokuWiki, uses his MTC comment system)]]></description>
			<content:encoded><![CDATA[<p>Clean URLs and design, user contributions.  Nicely done, every documentation set should be so lucky.  (from the creator of the excellent <a href="http://wiki.splitbrain.org/wiki:dokuwiki">dokuWiki</a>, uses his <a href="http://www.splitbrain.org/projects/my_two_cents">MTC</a> comment system)</p>
<p><a href='http://man.splitbrain.org/'>http://man.splitbrain.org/</a></p>]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2006/04/17/mansplitbrainorg-web-interface-to-45k-unix-man-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell Scripting and Agg Stats</title>
		<link>http://laughingmeme.org/2005/09/21/shell-scripting-and-agg-stats/</link>
		<comments>http://laughingmeme.org/2005/09/21/shell-scripting-and-agg-stats/#comments</comments>
		<pubDate>Thu, 22 Sep 2005 00:22:50 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[aggregation]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://lm.quxx.info/?p=1136</guid>
		<description><![CDATA[Been a while since I dug into my aggregator stats (intrigued by FeedBurner mentioning their tracking 2000 aggregators), and while I&#8217;ve got my Perl script, but I was alarmed to realize that I had forgotten the shell for doing the equivalent. So killing time waiting for J I re-created it. Assumes you&#8217;re using Apache&#8217;s &#8220;full&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Been a while since I dug into my aggregator stats (intrigued by FeedBurner mentioning their <a href="http://www.burningdoor.com/feedburner/archives/001422.html">tracking 2000 aggregators</a>), and while I&#8217;ve got <a href="http://laughingmeme.org/code/parse_apache.pl">my Perl script</a>, but I was alarmed to realize that I had forgotten the shell for doing the equivalent.  </p>

<p>So killing time waiting for J I re-created it.  Assumes you&#8217;re using Apache&#8217;s &#8220;full&#8221; log format (and that your feed is &#8220;index.rdf&#8221;)</p>

<pre><code>sudo grep '/index.rdf' access.log | cut --delimiter=\" -f6,1 --output-delimiter="=" | 
sed 's/ - - \[[^=]*//' | sort | uniq | cut --delimiter="=" -f2 | sort | uniq -c | sort -n
</code></pre>

<p>Returns a count of unique IPs per User-Agent.  Tack on a little awk to get aggregate counts.</p>

<pre><code>| awk '{sum += $1; print sum}'
</code></pre>

<p>Of course folks like <a href="http://bloglines.com">Bloglines</a>, <a href="http://rojo.com">Rojo</a>, Yahoo FeedSeeker, Feedster, and FeedLounge (among others I&#8217;m sure) are rolling up the user counts. Of course FeedLounge and FeedSeeker are counted multiple times as they add time sensitive info to their User-Agent (that has got to be against some best practices!), and Bloglines comes from a couple of different IPs.</p>

<p>Interestingly, Google Desktop is showing up as generating not only the highest number of hits, but the highest number of 200s.</p>
]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2005/09/21/shell-scripting-and-agg-stats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cal 9 1752</title>
		<link>http://laughingmeme.org/2004/10/22/cal-9-1752/</link>
		<comments>http://laughingmeme.org/2004/10/22/cal-9-1752/#comments</comments>
		<pubDate>Fri, 22 Oct 2004 08:46:51 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Aside]]></category>
		<category><![CDATA[calendaring]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://lm.quxx.info/?p=2591</guid>
		<description><![CDATA[Humans should never have been put in charge of designing calendars]]></description>
			<content:encoded><![CDATA[<p>Humans should never have been put in charge of designing calendars <img src='http://laughingmeme.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href='http://www.pycs.net/bbum/2004/10/21/#200410211'>http://www.pycs.net/bbum/2004/10/21/#200410211</a></p>]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2004/10/22/cal-9-1752/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UNIX Application or Outlawed Paramilitary/Guerrilla Organization?</title>
		<link>http://laughingmeme.org/2004/09/13/unix-application-or-outlawed-paramilitaryguerrilla-organization/</link>
		<comments>http://laughingmeme.org/2004/09/13/unix-application-or-outlawed-paramilitaryguerrilla-organization/#comments</comments>
		<pubDate>Tue, 14 Sep 2004 01:28:20 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Aside]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://lm.quxx.info/?p=2528</guid>
		<description><![CDATA[McSweeney&#8217;s Internet Tendency]]></description>
			<content:encoded><![CDATA[<p>McSweeney&#8217;s Internet Tendency</p>
<p><a href='http://www.mcsweeneys.net/links/lists/10SaraCody.html'>http://www.mcsweeneys.net/links/lists/10SaraCody.html</a></p>]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2004/09/13/unix-application-or-outlawed-paramilitaryguerrilla-organization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mark has a list of 8 tools I use every day, all day, like oxygen.</title>
		<link>http://laughingmeme.org/2004/05/02/mark-has-a-list-of-8-tools-i-use-every-day-all-day-like-oxygen/</link>
		<comments>http://laughingmeme.org/2004/05/02/mark-has-a-list-of-8-tools-i-use-every-day-all-day-like-oxygen/#comments</comments>
		<pubDate>Sun, 02 May 2004 08:26:00 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Aside]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://lm.quxx.info/?p=2243</guid>
		<description><![CDATA[Well except for Emacs, but I acknowledges that is a personal failing]]></description>
			<content:encoded><![CDATA[<p>Well except for Emacs, but I acknowledges that is a personal failing</p>
<p><a href='http://diveintomark.org/archives/2004/05/01/essentials'>http://diveintomark.org/archives/2004/05/01/essentials</a></p>]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2004/05/02/mark-has-a-list-of-8-tools-i-use-every-day-all-day-like-oxygen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>body</title>
		<link>http://laughingmeme.org/2004/03/17/body-18/</link>
		<comments>http://laughingmeme.org/2004/03/17/body-18/#comments</comments>
		<pubDate>Wed, 17 Mar 2004 23:17:46 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Aside]]></category>
		<category><![CDATA[quotable]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://lm.quxx.info/?p=2144</guid>
		<description><![CDATA[Gnat&#8217;s screen tips]]></description>
			<content:encoded><![CDATA[<p>Gnat&#8217;s screen tips</p>
<p><a href='http://use.perl.org/~gnat/journal/17932'>http://use.perl.org/~gnat/journal/17932</a></p>]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2004/03/17/body-18/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fink: xscreensaver-gtk2</title>
		<link>http://laughingmeme.org/2004/03/16/fink-xscreensaver-gtk2/</link>
		<comments>http://laughingmeme.org/2004/03/16/fink-xscreensaver-gtk2/#comments</comments>
		<pubDate>Tue, 16 Mar 2004 19:36:23 +0000</pubDate>
		<dc:creator>Kellan</dc:creator>
				<category><![CDATA[Aside]]></category>
		<category><![CDATA[fink]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://lm.quxx.info/?p=2139</guid>
		<description><![CDATA[If you&#8217;re running bleeding edge Fink unstable]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re running bleeding edge Fink unstable</p>
<p><a href='http://fink.sourceforge.net/pdb/package.php/xscreensaver-gtk2'>http://fink.sourceforge.net/pdb/package.php/xscreensaver-gtk2</a></p>]]></content:encoded>
			<wfw:commentRss>http://laughingmeme.org/2004/03/16/fink-xscreensaver-gtk2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

