<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Advogato blog for prenagha</title>
    <link>http://www.advogato.org/person/prenagha/</link>
    <description>Advogato blog for prenagha</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Mon, 8 Sep 2008 05:26:56 GMT</pubDate>
    <item>
      <pubDate>Fri, 15 Jun 2001 21:40:34 GMT</pubDate>
      <title>15 Jun 2001</title>
      <link>http://www.advogato.org/person/prenagha/diary.html?start=5</link>
      <guid>http://www.advogato.org/person/prenagha/diary.html?start=5</guid>
      <description>Diary/blog now on my &lt;a href="http://www.renaghan.com/pcr/" &gt;home page&lt;/a&gt; 
courtesy of &lt;a href="http://www.kyne.com.au/~mark/software/weblog.php" &gt;
Personal Weblog&lt;/a&gt;.
&lt;br&gt;Read it there if you like.
&lt;br&gt;&lt;a href="http://www.renaghan.com/mailman/listinfo/renaghan-
blog/" &gt;Subscribe&lt;/a&gt; to the mailing list to get new entries 
via email if you prefer.
&lt;br&gt;Or ignore it entirely.</description>
    </item>
    <item>
      <pubDate>Thu, 1 Feb 2001 16:11:42 GMT</pubDate>
      <title>1 Feb 2001</title>
      <link>http://www.advogato.org/person/prenagha/diary.html?start=4</link>
      <guid>http://www.advogato.org/person/prenagha/diary.html?start=4</guid>
      <description>Worked out a server-side caching mechanism for PHP based
sites. This is extremely helpful to performance. Somewhat
like the concept of a reverse-cache sitting in front of a
webserver, like squid, but this can be used on those hosts
that don't have that software installed. Here is a snapshot
of the PHP code, usage should be self-explanatory. I just
started testing it, but so far so good.
&lt;pre&gt;
function pageCacheStart($ttl=600, $debug=FALSE, 
  $cacheDir='/tmp/pagecache', $sidName='psid') {
  global $HTTP_SERVER_VARS, $HTTP_GET_VARS,
$HTTP_COOKIE_VARS;

&lt;p&gt;   //to force the cache OFF, uncomment next line
  //return FALSE;

&lt;p&gt;   // we only use the cache for GET requests.
  // we don't use the cache for ssl requests.
  if ($HTTP_SERVER_VARS['REQUEST_METHOD']!='GET'
  ||  isset($HTTP_SERVER_VARS['HTTPS']) ) {
    return FALSE;
  }

&lt;p&gt;   $REQUEST_URI = $HTTP_SERVER_VARS['REQUEST_URI'];

&lt;p&gt;   // if we have the sid in the get vars,
  // and we have the sid in the cookie vars,
  // then we can act as if the sid is not in the get
  // vars and return a cached page.
  // if the sid is in the get, and not as a cookie,
  // then we don't use a cached version since all the URLs
  // in the page need to be rewritten with the sid by php.
  if (isset($HTTP_GET_VARS[$sidName])) {
    if (isset($HTTP_COOKIE_VARS[$sidName])) {
      if (count($HTTP_GET_VARS)==1) {
        $REQUEST_URI = $HTTP_SERVER_VARS['SCRIPT_NAME'];
      } else {
        $REQUEST_URI =
ereg_replace('&amp;amp;'.$sidName.'=.{32}','',$REQUEST_URI);
      }
    } else {
      return FALSE;
    }
  }

&lt;p&gt;   // get the hostname
  if (isset($HTTP_SERVER_VARS['HTTP_HOST'])) {
    $HOST = $HTTP_SERVER_VARS['HTTP_HOST'];
  } else {
    $HOST = $HTTP_SERVER_VARS['SERVER_NAME'];
  }

&lt;p&gt;   // cache directory use for pages from this host.
  $cacheDirHost = $cacheDir.'/'.strtolower($HOST);

&lt;p&gt;   // build the name of the cache file for this page
  $cacheFile = $cacheDirHost.'/'.md5($REQUEST_URI).'.cache';

&lt;p&gt;   $mtime = filemtime($cacheFile);
  $time  = time();

&lt;p&gt;   if ($mtime &amp;gt;= ($time - $ttl)) {

&lt;p&gt;     //send cache control headers that let client browser
    //cache the page.
    header('Expires: '.gmdate('D, d M Y H:i:s', $time +
$ttl).' GMT');
    header('Last-Modified: '.gmdate('D, d M Y H:i:s',
$mtime).' GMT');
    header('Cache-Control: public');
    header('Cache-Control: max-age='.$ttl);

&lt;p&gt;     //get the cached file and send it to the browser
immediately
    readfile($cacheFile); 

&lt;p&gt;     //debug info
    if ($debug) {
      print("&amp;lt;hr&amp;gt;CACHED COPY&lt;br&gt;filename: $cacheFile\n");
      print("&lt;br&gt;mtime: ".date('m/d/y h:i:s
a',filemtime($cacheFile))."\n");
      print("&lt;br&gt;cache age
".(time()-filemtime($cacheFile))." seconds\n");
    }

&lt;p&gt;     //exit this server session
    exit(); 

&lt;p&gt;   } else {
    // the directory existence is the signal that pages
    // from this host should be cached.
    if (!is_dir($cacheDirHost)) {
      return FALSE;
    }

&lt;p&gt;     ob_start();
    print("&amp;lt;!-- request: ".$HOST.$REQUEST_URI." --&amp;gt;\n");
    return $cacheFile;
  }
}

&lt;p&gt; function pageCacheEnd($cacheFile='', $debug=FALSE) {
  $html = ob_get_contents(); 
  ob_end_flush(); 

&lt;p&gt;   if (empty($cacheFile)) {
  } else {
    if ($debug) {
      print("&amp;lt;hr&amp;gt;writing new cacheFile: $cacheFile\n");
    }

&lt;p&gt;     if ($fp = @fopen ($cacheFile, 'w')) {
      @fwrite ($fp, $html);
      @fclose ($fp);
    }
  }
}
&lt;/pre&gt;
</description>
    </item>
    <item>
      <pubDate>Thu, 25 Jan 2001 16:34:02 GMT</pubDate>
      <title>25 Jan 2001</title>
      <link>http://www.advogato.org/person/prenagha/diary.html?start=3</link>
      <guid>http://www.advogato.org/person/prenagha/diary.html?start=3</guid>
      <description>Ordered an &lt;a href="http://www.wavelan.com/products/productdetail.html?
id=29" &gt;Orinoco RG-1000 Wireless Access Point Kit&lt;/a&gt; from 
&lt;a href="http://www.outpost.com/" &gt;Outpost.com&lt;/a&gt; the other 
day. After unnecessary confusion with &lt;a href="http://www.airborne.com/" &gt;Airborne&lt;/a&gt; I got my hands 
on it yesterday. As mentioned in a recent &lt;a href="http://www.mobilecomputing.com/" &gt;Mobile Computing&lt;/a&gt; 
article, the RG-1000 can be used as an Ethernet bridge. I 
had previously only thought that the much higer priced 
Access Points could act in that capacity.
&lt;p&gt;Setup with Windows 95 was relatively easy, though as 
Mobile Computing points out, Lucent doesn't make the 
configuration for a bridge setup known - in fact, they 
don't really even mention it. You are left to your own 
devices to figure out how to setup DHCP, NAT and such to 
achieve the bridge config.
&lt;p&gt;I got it working on Windows, then rebooted the laptop to 
&lt;a href="http://www.redhat.com/" &gt;RH 7&lt;/a&gt;. After figuring 
out the mutliple drivers that can run these cards, and a 
little trial and error with modules.conf, config.opts, and 
wireless.opts I got it all up and running.
&lt;p&gt;Speed it great - as fast as a wired connection in my 
environment. Range seems to be good, at least I can go up 
and downstairs and in all corners of my small 2 bedroom 
apartment.
&lt;p&gt;Much thanks to Jean Tourrilhes for his vast &lt;a href="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/" 
&gt;Wireless LAN resources for Linux&lt;/a&gt; site.</description>
    </item>
    <item>
      <pubDate>Wed, 24 Jan 2001 01:22:09 GMT</pubDate>
      <title>24 Jan 2001</title>
      <link>http://www.advogato.org/person/prenagha/diary.html?start=2</link>
      <guid>http://www.advogato.org/person/prenagha/diary.html?start=2</guid>
      <description>Hopefully I can help get the &lt;a href="http://apc.communityconnect.com/" &gt;Alternative PHP 
Cache (APC)&lt;/a&gt; up and running and stable. I don't really 
have the cash to pay &lt;a href="http://www.zend.com/" &gt;Zend&lt;/a&gt; for the &lt;a href="http://www.zend.com/store/products/zend-
cache.php" &gt;ZendCache&lt;/a&gt; - and surely not enough for the 
recurring/annual maintenance fees. Hopefully APC can do the 
trick!&lt;p&gt;Right now APC is crapping out on the crazy levels 
of 
class hierarchy scattered among 70+ include files that I 
use for my PHP 
Ecommerce application, &lt;a href="http://www.vendotosell.com/" &gt;VendoToSell&lt;/a&gt;.
</description>
    </item>
    <item>
      <pubDate>Mon, 15 May 2000 04:08:52 GMT</pubDate>
      <title>15 May 2000</title>
      <link>http://www.advogato.org/person/prenagha/diary.html?start=1</link>
      <guid>http://www.advogato.org/person/prenagha/diary.html?start=1</guid>
      <description>Spent the day researching the best means for archiving a portion
of my jazz cd collection to mp3. Ended up going with 
cdparanoia, lame, grip, DigitalDJ, mpg123. Slick. So far got the
Miles Davis and John Coltrane Columba Recordings done.
Next up my Mosaic albums.
&lt;p&gt;Who needs Real Pukebox Plus? Not moi. 
Lame VBR 256 kbps encoding for free.</description>
    </item>
    <item>
      <pubDate>Sat, 13 May 2000 23:04:54 GMT</pubDate>
      <title>13 May 2000</title>
      <link>http://www.advogato.org/person/prenagha/diary.html?start=0</link>
      <guid>http://www.advogato.org/person/prenagha/diary.html?start=0</guid>
      <description>Rewrote 
&lt;a href="http://renaghan.com/pcr/phpop.html" &gt;phpop's&lt;/a&gt;
 template code to use 
&lt;a href="http://phplib.netuse.de" &gt;PHPLIB's&lt;/a&gt; template 
class instead of  
&lt;a href="http://thewebmasters.net" &gt;FastTemplates&lt;/a&gt;. 
Supposedly much faster.</description>
    </item>
  </channel>
</rss>
