<?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>celsobarriga-dot-com</title>
	<atom:link href="http://www.celsobarriga.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.celsobarriga.com</link>
	<description>Wasting bandwidth in style!</description>
	<lastBuildDate>Fri, 06 Nov 2009 14:14:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>dyld: shared cached was built against a different libSystem.dylib, ignoring cache</title>
		<link>http://www.celsobarriga.com/2009/08/13/dyld-shared-cached-was-built-against-a-different-libsystemdylib-ignoring-cache/</link>
		<comments>http://www.celsobarriga.com/2009/08/13/dyld-shared-cached-was-built-against-a-different-libsystemdylib-ignoring-cache/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 16:06:14 +0000</pubDate>
		<dc:creator>celso</dc:creator>
				<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://www.celsobarriga.com/?p=144</guid>
		<description><![CDATA[I just upgraded my MacBook Pro&#8217;s hard drive to one with a bigger capacity. After restoring the contents from the old drive to the new one using an image created by SuperDuper!, I keep on getting this error every time I launch the Terminal application:
dyld: shared cached was built against a different libSystem.dylib, ignoring cache
After [...]]]></description>
			<content:encoded><![CDATA[<p>I just upgraded my MacBook Pro&#8217;s hard drive to one with a bigger capacity. After restoring the contents from the old drive to the new one using an image created by SuperDuper!, I keep on getting this error every time I launch the Terminal application:</p>
<blockquote><p>dyld: shared cached was built against a different libSystem.dylib, ignoring cache</p></blockquote>
<div>After googling around, I found this <a title="discussion thread" href="http://discussions.apple.com/thread.jspa?threadID=1260029&amp;tstart=195" target="_self">discussion thread</a> from Apple&#8217;s Support Forum on how to fix the error:</div>
<div>
<blockquote>
<pre>sudo update_dyld_shared_cache -force</pre>
</blockquote>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.celsobarriga.com/2009/08/13/dyld-shared-cached-was-built-against-a-different-libsystemdylib-ignoring-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wish you were here!</title>
		<link>http://www.celsobarriga.com/2009/08/09/wish-you-were-here/</link>
		<comments>http://www.celsobarriga.com/2009/08/09/wish-you-were-here/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 20:12:01 +0000</pubDate>
		<dc:creator>celso</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.celsobarriga.com/?p=135</guid>
		<description><![CDATA[&#8230; but this is probably the next best thing!   Took some panorama shots of the front and back yards today. It&#8217;s been a while since I&#8217;ve done my last panoramas, so it&#8217;s almost like learning from the beginning once again. Anyway, here&#8217;s the result and pardon some of the photo misalignments.

Frontyard


Backyard

Note:This requires the [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230; but this is probably the next best thing! <img src='http://www.celsobarriga.com/wpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Took some panorama shots of the front and back yards today. It&#8217;s been a while since I&#8217;ve done my last panoramas, so it&#8217;s almost like learning from the beginning once again. Anyway, here&#8217;s the result and pardon some of the photo misalignments.</p>
<p>
<a href="#" onClick="javascript:window.open('http://www.celsobarriga.com/wpress/wp-content/uploads/2009/08/Frontyard/Frontyard.html','_blank','status=yes,top=0,left=0,width=640,height=480');"><img src="http://www.celsobarriga.com/wpress/wp-content/uploads/2009/08/Frontyard/_Frontyard.jpg" width="160" height="80" border="0"></a><br /><a href="#"  onClick="javascript:window.open('http://www.celsobarriga.com/wpress/wp-content/uploads/2009/08/Frontyard/Frontyard.html','_blank','status=yes,top=0,left=0,width=640,height=480');">Frontyard</a>
</p>
<p>
<a href="#" onClick="javascript:window.open('http://www.celsobarriga.com/wpress/wp-content/uploads/2009/08/Backyard/Backyard.html','_blank','status=yes,top=0,left=0,width=640,height=480');"><img src="http://www.celsobarriga.com/wpress/wp-content/uploads/2009/08/Backyard/_Backyard.jpg" width="160" height="80" border="0"></a><br /><a href="#"  onClick="javascript:window.open('http://www.celsobarriga.com/wpress/wp-content/uploads/2009/08/Backyard/Backyard.html','_blank','status=yes,top=0,left=0,width=640,height=480');">Backyard</a>
</p>
<p><b>Note:</b>This requires the Flash Player to view the panoramas. For more information about Flash Player, please visit <a href="http://www.macromedia.com/software/flash/about/" target="_blank">http://www.macromedia.com/software/flash/about/</a>.If you cannot view the panorama, please download and install the latest version of <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash 10 player</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.celsobarriga.com/2009/08/09/wish-you-were-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Base64 Encoding and Decoding</title>
		<link>http://www.celsobarriga.com/2009/05/28/base64-encoding-and-decoding/</link>
		<comments>http://www.celsobarriga.com/2009/05/28/base64-encoding-and-decoding/#comments</comments>
		<pubDate>Thu, 28 May 2009 18:10:31 +0000</pubDate>
		<dc:creator>celso</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.celsobarriga.com/?p=131</guid>
		<description><![CDATA[At one time, I needed to encode and decode strings in Base64 but I was on a very old Perl version that does not include the MIME::Base64 core module, nor am I able to install the said module. So, here&#8217;s the source for encoding and decoding Base64 ripped from the MIME::Base64 module:
sub EncodeBase64
{
   [...]]]></description>
			<content:encoded><![CDATA[<p>At one time, I needed to encode and decode strings in Base64 but I was on a very old Perl version that does not include the MIME::Base64 core module, nor am I able to install the said module. So, here&#8217;s the source for encoding and decoding Base64 ripped from the MIME::Base64 module:</p>
<pre style='color:#000000;background:#ffffff;'><span style='color:#800000; font-weight:bold; '>sub </span>EncodeBase6<span style='color:#008c00; '>4</span>
<span style='color:#800080; '>{</span>
    <span style='color:#800000; font-weight:bold; '>my</span> $s <span style='color:#808030; '>=</span> <span style='color:#800000; font-weight:bold; '>shift</span> <span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>my</span> $r <span style='color:#808030; '>=</span> <span style='color:#0000e6; '>''</span><span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>while</span><span style='color:#808030; '>(</span> $s <span style='color:#808030; '>=</span><span style='color:#808030; '>~</span><span style='color:#0000e6; '> </span><span style='color:#800000; '>/</span><span style='color:#808030; '>(</span><span style='color:#808030; '>.</span><span style='color:#0000e6; '>{1,45}</span><span style='color:#808030; '>)</span><span style='color:#800000; '>/</span><span style='color:#800000; font-weight:bold; '>gs</span> <span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>chop</span><span style='color:#808030; '>(</span> $r <span style='color:#808030; '>.</span><span style='color:#808030; '>=</span> <span style='color:#800000; font-weight:bold; '>substr</span><span style='color:#808030; '>(</span><span style='color:#800000; font-weight:bold; '>pack</span><span style='color:#808030; '>(</span><span style='color:#0000e6; '>"u"</span><span style='color:#808030; '>,</span>$1<span style='color:#808030; '>)</span><span style='color:#808030; '>,</span><span style='color:#008c00; '>1</span><span style='color:#808030; '>)</span> <span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    <span style='color:#800000; font-weight:bold; '>my</span> $pad<span style='color:#808030; '>=</span><span style='color:#808030; '>(</span><span style='color:#008c00; '>3</span><span style='color:#808030; '>-</span><span style='color:#800000; font-weight:bold; '>length</span><span style='color:#808030; '>(</span>$s<span style='color:#808030; '>)</span><span style='color:#808030; '>%</span><span style='color:#008c00; '>3</span><span style='color:#808030; '>)</span><span style='color:#808030; '>%</span><span style='color:#008c00; '>3</span><span style='color:#800080; '>;</span>
    $r <span style='color:#808030; '>=</span><span style='color:#808030; '>~</span> <span style='color:#800000; font-weight:bold; '>tr</span><span style='color:#800000; '>|</span><span style='color:#0000e6; '>` </span><span style='color:#800000; font-weight:bold; '>-</span><span style='color:#0000e6; '>_</span><span style='color:#800000; '>|</span><span style='color:#0000e6; '>AA</span><span style='color:#800000; font-weight:bold; '>-</span><span style='color:#0000e6; '>Za</span><span style='color:#800000; font-weight:bold; '>-</span><span style='color:#0000e6; '>z0</span><span style='color:#800000; font-weight:bold; '>-</span><span style='color:#0000e6; '>9+/</span><span style='color:#800000; '>|</span><span style='color:#800080; '>;</span>
    $r<span style='color:#808030; '>=</span><span style='color:#808030; '>~</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#800000; '>/</span><span style='color:#808030; '>.</span><span style='color:#0000e6; '>{</span><span style='color:#0000e6; '>$pad</span><span style='color:#0000e6; '>}</span><span style='color:#808030; '>$</span><span style='color:#800000; '>/</span><span style='color:#0000e6; '>"="x</span><span style='color:#0000e6; '>$pad</span><span style='color:#800000; '>/</span><span style='color:#800000; font-weight:bold; '>e</span> <span style='color:#800000; font-weight:bold; '>if</span> $pad<span style='color:#800080; '>;</span>
    $r<span style='color:#808030; '>=</span><span style='color:#808030; '>~</span><span style='color:#800000; font-weight:bold; '>s</span><span style='color:#800000; '>/</span><span style='color:#808030; '>(</span><span style='color:#808030; '>.</span><span style='color:#0000e6; '>{1,72}</span><span style='color:#808030; '>)</span><span style='color:#800000; '>/</span><span style='color:#0000e6; '>$1</span><span style='color:#0f69ff; '>\n</span><span style='color:#800000; '>/</span><span style='color:#800000; font-weight:bold; '>g</span><span style='color:#800080; '>;</span>
    $r<span style='color:#800080; '>;</span>
<span style='color:#800080; '>}</span> 

<span style='color:#800000; font-weight:bold; '>sub </span>DecodeBase6<span style='color:#008c00; '>4</span>
<span style='color:#800080; '>{</span>
    <span style='color:#800000; font-weight:bold; '>my</span> $d <span style='color:#808030; '>=</span> <span style='color:#800000; font-weight:bold; '>shift</span><span style='color:#800080; '>;</span>
    $d <span style='color:#808030; '>=</span><span style='color:#808030; '>~</span> <span style='color:#800000; font-weight:bold; '>tr</span><span style='color:#800000; '>!</span><span style='color:#0000e6; '>A</span><span style='color:#800000; font-weight:bold; '>-</span><span style='color:#0000e6; '>Za</span><span style='color:#800000; font-weight:bold; '>-</span><span style='color:#0000e6; '>z0</span><span style='color:#800000; font-weight:bold; '>-</span><span style='color:#0000e6; '>9+/</span><span style='color:#800000; '>!</span><span style='color:#800000; '>!</span><span style='color:#800000; font-weight:bold; '>cd</span><span style='color:#800080; '>;</span>
    $d <span style='color:#808030; '>=</span><span style='color:#808030; '>~</span> <span style='color:#800000; font-weight:bold; '>s</span><span style='color:#800000; '>/</span><span style='color:#0000e6; '>=</span><span style='color:#808030; '>+</span><span style='color:#808030; '>$</span><span style='color:#800000; '>/</span><span style='color:#800000; '>/</span><span style='color:#800080; '>;</span>
    $d <span style='color:#808030; '>=</span><span style='color:#808030; '>~</span> <span style='color:#800000; font-weight:bold; '>tr</span><span style='color:#800000; '>!</span><span style='color:#0000e6; '>A</span><span style='color:#800000; font-weight:bold; '>-</span><span style='color:#0000e6; '>Za</span><span style='color:#800000; font-weight:bold; '>-</span><span style='color:#0000e6; '>z0</span><span style='color:#800000; font-weight:bold; '>-</span><span style='color:#0000e6; '>9+/</span><span style='color:#800000; '>!</span><span style='color:#0000e6; '> </span><span style='color:#800000; font-weight:bold; '>-</span><span style='color:#0000e6; '>_</span><span style='color:#800000; '>!</span><span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>my</span> $r <span style='color:#808030; '>=</span> <span style='color:#0000e6; '>''</span><span style='color:#800080; '>;</span>
    <span style='color:#800000; font-weight:bold; '>while</span><span style='color:#808030; '>(</span> $d <span style='color:#808030; '>=</span><span style='color:#808030; '>~</span><span style='color:#0000e6; '> </span><span style='color:#800000; '>/</span><span style='color:#808030; '>(</span><span style='color:#808030; '>.</span><span style='color:#0000e6; '>{1,60}</span><span style='color:#808030; '>)</span><span style='color:#800000; '>/</span><span style='color:#800000; font-weight:bold; '>gs</span> <span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
        <span style='color:#800000; font-weight:bold; '>my</span> $len <span style='color:#808030; '>=</span> <span style='color:#800000; font-weight:bold; '>chr</span><span style='color:#808030; '>(</span><span style='color:#008c00; '>32</span> <span style='color:#808030; '>+</span> <span style='color:#800000; font-weight:bold; '>length</span><span style='color:#808030; '>(</span>$1<span style='color:#808030; '>)</span><span style='color:#808030; '>*</span><span style='color:#008c00; '>3</span><span style='color:#808030; '>/</span><span style='color:#008c00; '>4</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
        $r <span style='color:#808030; '>.</span><span style='color:#808030; '>=</span> <span style='color:#800000; font-weight:bold; '>unpack</span><span style='color:#808030; '>(</span><span style='color:#0000e6; '>"u"</span><span style='color:#808030; '>,</span> $len <span style='color:#808030; '>.</span> $1 <span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span>
    $r<span style='color:#800080; '>;</span>
<span style='color:#800080; '>}</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.celsobarriga.com/2009/05/28/base64-encoding-and-decoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skydiving video</title>
		<link>http://www.celsobarriga.com/2009/05/25/skydiving-video/</link>
		<comments>http://www.celsobarriga.com/2009/05/25/skydiving-video/#comments</comments>
		<pubDate>Mon, 25 May 2009 14:40:08 +0000</pubDate>
		<dc:creator>celso</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.celsobarriga.com/?p=119</guid>
		<description><![CDATA[Look what I did last weekend! I went for a tandem skydive at Pepperell, MA on May 24th, 2009. What a rush; it was an awesome experience!
See full post to see the movie.


]]></description>
			<content:encoded><![CDATA[<p>Look what I did last weekend! I went for a tandem skydive at Pepperell, MA on May 24th, 2009. What a rush; it was an awesome experience!</p>
<p>See full post to see the movie.<br />
<span id="more-119"></span><br />
<object classid="clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" width="480" height="288" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"><param name="enablejavascript" value="true" /><param name="src" value="/wpress/wp-content/uploads/2009/05/CelsoSkydive.m4v" /><embed type="video/quicktime" width="480" height="288" src="/wpress/wp-content/uploads/2009/05/CelsoSkydive.m4v" enablejavascript="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.celsobarriga.com/2009/05/25/skydiving-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read string from stdin using fgets</title>
		<link>http://www.celsobarriga.com/2009/02/26/read-string-from-stdin-using-fgets/</link>
		<comments>http://www.celsobarriga.com/2009/02/26/read-string-from-stdin-using-fgets/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 19:44:37 +0000</pubDate>
		<dc:creator>celso</dc:creator>
				<category><![CDATA[C]]></category>

		<guid isPermaLink="false">http://www.celsobarriga.com/?p=80</guid>
		<description><![CDATA[#include &#60;stdio.h>
#include &#60;string.h>

int main(void)
{
  char str[80];
  int i;

  printf("Enter a string: ");
  fgets(str, 10, stdin);

  /* remove newline, if present */
  i = strlen(str)-1;
  if( str[ i ] == '\n')
      str[i] = '\0';

  printf("This is your string: %s", str);

  return 0;
}

]]></description>
			<content:encoded><![CDATA[<pre style='color:#000000;background:#ffffff;'><span style='color:#004a43; '>#</span><span style='color:#004a43; '>include </span><span style='color:#800000; '>&lt;</span><span style='color:#40015a; '>stdio.h</span><span style='color:#800000; '>></span>
<span style='color:#004a43; '>#</span><span style='color:#004a43; '>include </span><span style='color:#800000; '>&lt;</span><span style='color:#40015a; '>string.h</span><span style='color:#800000; '>></span>

<span style='color:#800000; font-weight:bold; '>int</span> <span style='color:#400000; '>main</span><span style='color:#808030; '>(</span><span style='color:#800000; font-weight:bold; '>void</span><span style='color:#808030; '>)</span>
<span style='color:#800080; '>{</span>
  <span style='color:#800000; font-weight:bold; '>char</span> str<span style='color:#808030; '>[</span><span style='color:#008c00; '>80</span><span style='color:#808030; '>]</span><span style='color:#800080; '>;</span>
  <span style='color:#800000; font-weight:bold; '>int</span> i<span style='color:#800080; '>;</span>

  printf<span style='color:#808030; '>(</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>Enter a string: </span><span style='color:#800000; '>"</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
  fgets<span style='color:#808030; '>(</span>str<span style='color:#808030; '>,</span> <span style='color:#008c00; '>10</span><span style='color:#808030; '>,</span> <span style='color:#603000; '>stdin</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

  <span style='color:#696969; '>/* remove newline, if present */</span>
  i <span style='color:#808030; '>=</span> strlen<span style='color:#808030; '>(</span>str<span style='color:#808030; '>)</span><span style='color:#808030; '>-</span><span style='color:#008c00; '>1</span><span style='color:#800080; '>;</span>
  <span style='color:#800000; font-weight:bold; '>if</span><span style='color:#808030; '>(</span> str<span style='color:#808030; '>[</span> i <span style='color:#808030; '>]</span> <span style='color:#808030; '>=</span><span style='color:#808030; '>=</span> <span style='color:#0000e6; '>'\n'</span><span style='color:#808030; '>)</span>
      str<span style='color:#808030; '>[</span>i<span style='color:#808030; '>]</span> <span style='color:#808030; '>=</span> <span style='color:#0000e6; '>'\0'</span><span style='color:#800080; '>;</span>

  printf<span style='color:#808030; '>(</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>This is your string: </span><span style='color:#0f69ff; '>%s</span><span style='color:#800000; '>"</span><span style='color:#808030; '>,</span> str<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

  <span style='color:#800000; font-weight:bold; '>return</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span>
<span style='color:#800080; '>}</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.celsobarriga.com/2009/02/26/read-string-from-stdin-using-fgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to determine DST time changes</title>
		<link>http://www.celsobarriga.com/2008/02/01/how-to-determine-dst-time-changes/</link>
		<comments>http://www.celsobarriga.com/2008/02/01/how-to-determine-dst-time-changes/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 17:44:28 +0000</pubDate>
		<dc:creator>celso</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://www.barriga.net/2008/02/01/how-to-determine-dst-time-changes/</guid>
		<description><![CDATA[Here&#8217;s how to determine the dates when the Daylight Savings Time changes for a given year (I keep forgetting how to do this.):


zdump -v /etc/localtime&#124;grep 2008

/etc/localtime  Sun Mar  9 06:59:59 2008 UTC =
    Sun Mar 9 01:59:59 2008 EST isdst=0 gmtoff=-18000
/etc/localtime  Sun Mar  9 07:00:00 2008 UTC =
 [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how to determine the dates when the Daylight Savings Time changes for a given year (I keep forgetting how to do this.):</p>
<pre><code>
<blockquote>
zdump -v /etc/localtime|grep 2008

/etc/localtime  Sun Mar  9 06:59:59 2008 UTC =
    Sun Mar 9 01:59:59 2008 EST isdst=0 gmtoff=-18000
/etc/localtime  Sun Mar  9 07:00:00 2008 UTC =
    Sun Mar 9 03:00:00 2008 EDT isdst=1 gmtoff=-14400
/etc/localtime  Sun Nov  2 05:59:59 2008 UTC =
    Sun Nov 2 01:59:59 2008 EDT isdst=1 gmtoff=-14400
/etc/localtime  Sun Nov  2 06:00:00 2008 UTC =
    Sun Nov 2 01:00:00 2008 EST isdst=0 gmtoff=-18000
</blockquote>

</code></pre>
<p>Obviously, change <strong>2008</strong> to whatever year you want.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.celsobarriga.com/2008/02/01/how-to-determine-dst-time-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uninstall Perl Module</title>
		<link>http://www.celsobarriga.com/2008/01/10/uninstall-perl-module/</link>
		<comments>http://www.celsobarriga.com/2008/01/10/uninstall-perl-module/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 21:00:41 +0000</pubDate>
		<dc:creator>celso</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.barriga.net/2008/01/10/uninstall-perl-module/</guid>
		<description><![CDATA[Here&#39;s how to cleanly uninstall any Perl module:
#!/usr/local/bin/perl

use ExtUtils::Packlist;
use ExtUtils::Installed;

$ARGV[0] or die "Usage: $0 Module::Name\n";

my $mod = $ARGV[0];

my $inst = ExtUtils::Installed->new();

foreach my $item (sort($inst->files($mod))) {
         print "removing $item\n";
         unlink $item;
}

my $packfile = $inst->packlist($mod)->packlist_file();
print "removing $packfile\n";
unlink $packfile;

]]></description>
			<content:encoded><![CDATA[<p>Here&#39;s how to cleanly uninstall any Perl module:</p>
<pre style='color:#000000;background:#ffffff;'><span style='color:#696969; '>#!/usr/local/bin/perl</span>

<span style='color:#800000; font-weight:bold; '>use</span> <span style='color:#bb7977; font-weight:bold; '>ExtUtils</span><span style='color:#808030; '>::</span><span style='color:#bb7977; font-weight:bold; '>Packlist</span><span style='color:#800080; '>;</span>
<span style='color:#800000; font-weight:bold; '>use</span> <span style='color:#bb7977; font-weight:bold; '>ExtUtils</span><span style='color:#808030; '>::</span><span style='color:#bb7977; font-weight:bold; '>Installed</span><span style='color:#800080; '>;</span>

$ARGV<span style='color:#808030; '>[</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>]</span> <span style='color:#808030; '>or</span> <span style='color:#800000; font-weight:bold; '>die</span> <span style='color:#0000e6; '>"Usage: </span><span style='color:#0000e6; '>$0</span><span style='color:#0000e6; '> Module::Name</span><span style='color:#0f69ff; '>\n</span><span style='color:#0000e6; '>"</span><span style='color:#800080; '>;</span>

<span style='color:#800000; font-weight:bold; '>my</span> $mod <span style='color:#808030; '>=</span> $ARGV<span style='color:#808030; '>[</span><span style='color:#008c00; '>0</span><span style='color:#808030; '>]</span><span style='color:#800080; '>;</span>

<span style='color:#800000; font-weight:bold; '>my</span> $inst <span style='color:#808030; '>=</span> <span style='color:#bb7977; font-weight:bold; '>ExtUtils</span><span style='color:#808030; '>::</span><span style='color:#bb7977; font-weight:bold; '>Installed</span><span style='color:#808030; '>-></span>new<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>

<span style='color:#800000; font-weight:bold; '>foreach</span> <span style='color:#800000; font-weight:bold; '>my</span> $item <span style='color:#808030; '>(</span><span style='color:#800000; font-weight:bold; '>sort</span><span style='color:#808030; '>(</span>$inst<span style='color:#808030; '>-></span>files<span style='color:#808030; '>(</span>$mod<span style='color:#808030; '>)</span><span style='color:#808030; '>)</span><span style='color:#808030; '>)</span> <span style='color:#800080; '>{</span>
         <span style='color:#800000; font-weight:bold; '>print</span> <span style='color:#0000e6; '>"removing </span><span style='color:#0000e6; '>$item</span><span style='color:#0f69ff; '>\n</span><span style='color:#0000e6; '>"</span><span style='color:#800080; '>;</span>
         <span style='color:#800000; font-weight:bold; '>unlink</span> $item<span style='color:#800080; '>;</span>
<span style='color:#800080; '>}</span>

<span style='color:#800000; font-weight:bold; '>my</span> $packfile <span style='color:#808030; '>=</span> $inst<span style='color:#808030; '>-></span>packlist<span style='color:#808030; '>(</span>$mod<span style='color:#808030; '>)</span><span style='color:#808030; '>-></span>packlist_file<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
<span style='color:#800000; font-weight:bold; '>print</span> <span style='color:#0000e6; '>"removing </span><span style='color:#0000e6; '>$packfile</span><span style='color:#0f69ff; '>\n</span><span style='color:#0000e6; '>"</span><span style='color:#800080; '>;</span>
<span style='color:#800000; font-weight:bold; '>unlink</span> $packfile<span style='color:#800080; '>;</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.celsobarriga.com/2008/01/10/uninstall-perl-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find Out the Top 10 CPU Hogs</title>
		<link>http://www.celsobarriga.com/2007/08/29/find-out-the-top-10-cpu-hogs/</link>
		<comments>http://www.celsobarriga.com/2007/08/29/find-out-the-top-10-cpu-hogs/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 21:48:23 +0000</pubDate>
		<dc:creator>celso</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://www.barriga.net/notes/2007/08/29/85/</guid>
		<description><![CDATA[I found this command useful in finding out which top 10 processes are hogging my CPU resources. Note that this command is specific to the Red Hat flavor of Linux. See the man page for ps for the correct output format to use for your specific platform:

ps -eo pcpu,pid,user,args &#124; sort -k1 -r &#124; head [...]]]></description>
			<content:encoded><![CDATA[<p>I found this command useful in finding out which top 10 processes are hogging my CPU resources. Note that this command is specific to the Red Hat flavor of Linux. See the man page for ps for the correct output format to use for your specific platform:</p>
<pre>
<blockquote><code>ps -eo pcpu,pid,user,args | sort -k1 -r | head -11</code></blockquote>
</pre>
<p>Substitue <code>pcpu</code> above with <code>pmem</code> to see the memory hogs instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.celsobarriga.com/2007/08/29/find-out-the-top-10-cpu-hogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bourne Shell Logging Routine</title>
		<link>http://www.celsobarriga.com/2007/08/28/bourne-shell-logging-routine/</link>
		<comments>http://www.celsobarriga.com/2007/08/28/bourne-shell-logging-routine/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 03:20:19 +0000</pubDate>
		<dc:creator>celso</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://www.barriga.net/notes/2007/08/28/84/</guid>
		<description><![CDATA[Here&#8217;s another logging routine, this one is written in Bourne shell:
#!/bin/sh

log_message() {
    echo `date "+%m/%d/%y %H:%M:%S %Z"` "$1" &#124; tee -a aaa.out
}

log_message "Hello there"
log_message "Goodbye"

Sample output:


08/28/07 23:16:13 EDT Hello there
08/28/07 23:16:13 EDT Goodbye


]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another logging routine, this one is written in Bourne shell:</p>
<pre style='color:#000000;background:#ffffff;'><span style='color:#696969; '>#!/bin/sh</span>

log_message<span style='color:#808030; '>()</span> <span style='color:#800080; '>{</span>
    <span style='color:#bb7977; font-weight:bold; '>echo</span> <span style='color:#000000; background:#ffffe8; '>`date </span><span style='color:#0000e6; background:#ffffe8; '>"+%m</span><span style='color:#40015a; background:#ffffe8; '>/</span><span style='color:#0000e6; background:#ffffe8; '>%d</span><span style='color:#40015a; background:#ffffe8; '>/</span><span style='color:#0000e6; background:#ffffe8; '>%y %H:%M:%S %Z"</span><span style='color:#000000; background:#ffffe8; '>`</span> <span style='color:#0000e6; '>"</span><span style='color:#0000e6; '>$1</span><span style='color:#0000e6; '>"</span> <span style='color:#e34adc; '>|</span> tee <span style='color:#44aadd; '>-a</span> aaa<span style='color:#800000; font-weight:bold; '>.</span>out
<span style='color:#800080; '>}</span>

log_message <span style='color:#0000e6; '>"Hello there"</span>
log_message <span style='color:#0000e6; '>"Goodbye"</span>
</pre>
<p>Sample output:</p>
<blockquote><p><code>
<pre>
08/28/07 23:16:13 EDT Hello there
08/28/07 23:16:13 EDT Goodbye
</pre>
<p></code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.celsobarriga.com/2007/08/28/bourne-shell-logging-routine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting MySQL Password</title>
		<link>http://www.celsobarriga.com/2006/08/23/setting-mysql-password/</link>
		<comments>http://www.celsobarriga.com/2006/08/23/setting-mysql-password/#comments</comments>
		<pubDate>Wed, 23 Aug 2006 17:40:47 +0000</pubDate>
		<dc:creator>celso</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://www.barriga.net/2006/08/23/78/</guid>
		<description><![CDATA[To set up root password the first time:
$ mysqladmin -u root password NeWPasSwORd

To change an existing root password:
$ mysqladmin -u root -p oldpassword newpass
Enter password:


To change a normal user password:
$ mysqladmin -u dbuser-p oldpassword newpass

]]></description>
			<content:encoded><![CDATA[<p>To set up root password the first time:</p>
<blockquote><pre><code>$ mysqladmin -u root password NeWPasSwORd</code></pre>
</blockquote>
<p>To change an existing root password:</p>
<blockquote><pre><code>$ mysqladmin -u root -p oldpassword newpass
Enter password:
</code></pre>
</blockquote>
<p>To change a normal user password:</p>
<blockquote><pre><code>$ mysqladmin -u dbuser-p oldpassword newpass</code></pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.celsobarriga.com/2006/08/23/setting-mysql-password/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
