<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7936478420214857332</atom:id><lastBuildDate>Tue, 31 Jan 2012 23:03:00 +0000</lastBuildDate><category>install</category><category>calendar</category><category>south park</category><category>technology</category><category>sad</category><category>funny</category><category>java</category><category>dogs</category><category>comics</category><category>random</category><category>dilbert</category><category>games</category><category>fedora</category><category>Perl</category><category>dog</category><category>computers</category><category>vb</category><category>photo</category><category>pod</category><category>TextMate</category><category>family</category><category>Mac</category><category>video</category><category>.net</category><category>code</category><category>pet</category><category>stupid</category><title>A New Begining</title><description /><link>http://advws.blogspot.com/</link><managingEditor>noreply@blogger.com (Shawn)</managingEditor><generator>Blogger</generator><openSearch:totalResults>152</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ANewBegining" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="anewbegining" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-5984018410796727160</guid><pubDate>Sat, 16 Oct 2010 19:08:00 +0000</pubDate><atom:updated>2011-12-05T19:34:42.874-05:00</atom:updated><title>Ruby, Mechanize, Nokogiri, Xpath and Firebug</title><description>I have done a fair amount of extremely painful screen scraping to get data for a web page in the past using tools like WWW::Mechanize or LWP for perl.  It can be disgustingly ugly to parse HTML to get at the data you need.  When it came it recently all the bad experiences I have had came rushing back and I was dreading starting.  Luckily the world is a nicer place and this had become trivial with ruby.  The once painful process became:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Open page I want to scrape in firefox&lt;/li&gt;
&lt;li&gt;load firebug&lt;/li&gt;
&lt;li&gt;rick click on the html element I want to scrape and select copy xpath&lt;/li&gt;
&lt;li&gt;fire up textmate and create a simple ruby mechanize script&lt;/li&gt;
&lt;li&gt;past in the xpath to script.&lt;/li&gt;
&lt;/ol&gt;
The code simply looks like this:&lt;br /&gt;
&lt;blockquote&gt;
require 'rubygems'&lt;br /&gt;
require 'mechanize'&lt;br /&gt;
require 'mysql'&lt;br /&gt;
&lt;br /&gt;
agent = Mechanize.new&lt;br /&gt;
&lt;br /&gt;
page = agent.get('http://url.to.scrape.com')&lt;br /&gt;
&lt;br /&gt;
upString = page.parser.xpath("/html/body/form/table[2]/tr/td/table/tr[5]/td/table/tr[6]/td[3]/a/img")[0]['title'].to_s&lt;/blockquote&gt;
Life is good.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-5984018410796727160?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2010/10/ruby-mechanize-nokogiri-xpath-and.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-6315594493674435503</guid><pubDate>Sun, 26 Sep 2010 02:34:00 +0000</pubDate><atom:updated>2010-09-25T22:15:10.639-05:00</atom:updated><title>Creating an image of a running EC2 instance</title><description>&lt;span style="font-weight: bold;"&gt;Prerequisites &lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;AWS User ID&lt;/li&gt;&lt;li&gt;AWS Key ID&lt;/li&gt;&lt;li&gt;AWS Secret Key&lt;/li&gt;&lt;li&gt;x.509 Key pair (cert and private key)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;All of this can be obtained from the AWS account info page &lt;a href="https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&amp;amp;action=access-key"&gt;here&lt;/a&gt;.  Note AWS does not store the private key of your x.509 key pair, if you do not have you will need to create a new key pair.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Creating the bundle&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Upload your x.509 cert and private key to your running ec2 instance. &lt;/li&gt;&lt;blockquote&gt;scp PATH_TO_KEYS/{cert,pk}-*.pem root@AWS_INSTANCE:/mnt&lt;/blockquote&gt;&lt;li&gt;Log into your ec2 instance&lt;/li&gt;&lt;blockquote&gt;ssh -i YOURKEY.pem root@AWS_INSTANCE&lt;/blockquote&gt;&lt;li&gt;Set up some environment variables to make the processes a little easier.  Set arch to either i386 or x86_64 depending if you have a 64 bit or 23 bit instance.  If your not sure which to choose you can check &lt;a href="http://aws.amazon.com/ec2/instance-types/"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;blockquote&gt;# export AWS_USER_ID=YOUR_AWS_USER_ID&lt;br /&gt;# export AWS_ACCESS_KEY_ID=YOUR_KEY_ID&lt;br /&gt;# export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY&lt;br /&gt;# export arch=i386&lt;br /&gt;&lt;/blockquote&gt;&lt;li&gt;Create bundle&lt;/li&gt;&lt;blockquote&gt;ec2-bundle-vol -r $arch -d /mnt/ -p $prefix -u $AWS_USER_ID -k /mnt/pk-*.pem -c /mnt/cert-*.pem -s 10240 -e /mnt,/root/.ssh&lt;/blockquote&gt;&lt;li&gt;Upload bundle&lt;/li&gt;&lt;blockquote&gt;ec2-upload-bundle -b $bucket  -m /mnt/$prefix.manifest.xml -a $AWS_ACCESS_KEY_ID -s $AWS_SECRET_ACCESS_KEY&lt;/blockquote&gt;&lt;li&gt;Register bundle&lt;/li&gt;&lt;blockquote&gt;ec2-register   --name "$bucket/$prefix"   $bucket/$prefix.manifest.xml&lt;/blockquote&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-6315594493674435503?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2010/09/creating-image-of-running-ec2-instance.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-1932413246781310464</guid><pubDate>Sat, 27 Feb 2010 22:32:00 +0000</pubDate><atom:updated>2010-02-28T15:47:25.103-05:00</atom:updated><title>Compiling GCC 4.4.3 on Solaris</title><description>First I have to say the compiling on solaris can be a major pain in the ass.  I found my-self wanting gnu find on one of our solaris 10 machines but had issues compiling it, there was a known bug in gcc that can be fixed by upgrading gcc.  That is when the fun began.  I download gcc from gnu.org.  The first problem I ran into was that I didn't read the dependency list, my bad.  I needed to grab gmp and mpfr.  I downloaded and compiled both and passed the --with-gmp and --with-mpfr flags and I though I was all set.  Turns out that I was wrong I ran into a problem finding the mpfr lib.  That sucked seeing as I just downloaded and compiled them.  After looking at the config.log it was pretty obvious, I was building against 64 bit libraries.  Adding the following got me to the next error:&lt;br /&gt;&lt;blockquote&gt;env CC="gcc -m64"&lt;/blockquote&gt;The next problem was similar, apparently Solaris includes the 32 bit binaries in the search path but not 64 bit.  The error I got was:&lt;br /&gt;&lt;blockquote&gt;configure: error: cannot compute suffix of object files&lt;br /&gt;&lt;/blockquote&gt;When I checked the config.log the specific error I found was:&lt;br /&gt;&lt;blockquote&gt;libgcc_s.so.1: wrong ELF class: ELFCLASS32&lt;br /&gt;&lt;/blockquote&gt;I was able to fix it with the following:&lt;br /&gt;&lt;blockquote&gt;export LD_LIBRARY_PATH=/usr/sfw/lib/64/&lt;/blockquote&gt;Ok so now things looked to be on the right path.  The compile went on for an hour and half and died with a new error, again the error was wrong ELF class.  At this point I was about to pull my hair out.  The problem was the CFLAGS were not being passed down to the cross coplier, note the following line:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;/users/srb55/gcc-4.4.3/host-sparc-sun-solaris2.10/prev-gcc/xgcc -B/users/srb55/gcc-4.4.3/host-sparc-sun-solaris2.10/prev-gcc/ -B/global/inf/sys/software/gcc/gcc-4.4.2/sparc-sun-solaris2.10/bin/ -c  -g -O2 -DIN_GCC&lt;br /&gt;--- snip ---&lt;/blockquote&gt;So the fix to this wasnt so bad I just disbabled the bootstrap compile with --disable-bootstrap.  This time the compile completed (after like 3 hours).    The configure line that worked in the end was:&lt;br /&gt;&lt;blockquote&gt;./configure --prefix=/global/inf/sys/software/gcc/gcc-4.4.3 --with-mpfr=/global/inf/sys/software/mpfr/mpfr-2.4.0 --with-gmp=/global/inf/sys/software/gmp/gmp-5.0.1/ --enable-shared --disable-nls --disable-bootstrap --disable-multilib -enable-languages=c,c++&lt;/blockquote&gt;Victory!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-1932413246781310464?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2010/02/compiling-gcc-443-on-solaris.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-4160247298184645382</guid><pubDate>Mon, 16 Mar 2009 00:31:00 +0000</pubDate><atom:updated>2010-11-03T21:31:52.526-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">computers</category><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">Mac</category><category domain="http://www.blogger.com/atom/ns#">code</category><category domain="http://www.blogger.com/atom/ns#">TextMate</category><title>Creating a TextMate Bundle</title><description>I spend a fair amount of time dealing with code written in SQR. Since this isn't a very popular language there isn't a good editor with syntax highlighting for it. I use TextMate a good deal and so it seemed natural to write a bundle for SQR.  Step one is to open TextMate and click Bundle then Bundle Editor and then Show Bundle Editor. Once there click the plus at the bottom of the screen and add new bundle.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_uXc97LP7eDA/Sb2iqECFD-I/AAAAAAAAAEA/xant-gt-g7s/s1600-h/NewBundle.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 333px; height: 292px;" src="http://1.bp.blogspot.com/_uXc97LP7eDA/Sb2iqECFD-I/AAAAAAAAAEA/xant-gt-g7s/s400/NewBundle.jpg" alt="" id="BLOGGER_PHOTO_ID_5313581978887720930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now name the bundle something appropriate, in my case SQR.  Now you need to add a new language to your bundle, the language is what controls syntax highlighting.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_uXc97LP7eDA/Sb2jRm33dDI/AAAAAAAAAEI/9qV7jAg8830/s1600-h/NewLanguage.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 189px; height: 197px;" src="http://1.bp.blogspot.com/_uXc97LP7eDA/Sb2jRm33dDI/AAAAAAAAAEI/9qV7jAg8830/s400/NewLanguage.jpg" alt="" id="BLOGGER_PHOTO_ID_5313582658255025202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This will generate the following code.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;{ scopeName = 'source.untitled';&lt;br /&gt;fileTypes = ( );&lt;br /&gt;foldingStartMarker = '/\*\*|\{\s*$';&lt;br /&gt;foldingStopMarker = '\*\*/|^\s*\}';&lt;br /&gt;patterns = (&lt;br /&gt; { name = 'keyword.control.untitled';&lt;br /&gt;  match = '\b(if|while|for|return)\b';&lt;br /&gt; },&lt;br /&gt; { name = 'string.quoted.double.untitled';&lt;br /&gt;  begin = '"';&lt;br /&gt;  end = '"';&lt;br /&gt;  patterns = (&lt;br /&gt;   { name = 'constant.character.escape.untitled';&lt;br /&gt;    match = '\\.';&lt;br /&gt;   },&lt;br /&gt;  );&lt;br /&gt; },&lt;br /&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Lets go through this in detail.&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;scopeName (line 1) — this should be a unique name for the language.  The convention is for these to be dot separated where the left most piece is the most specific.  In my case I used source.SQR. (TextMate 1)&lt;/li&gt;&lt;li&gt;fileTypes (line 2) — this is an array of file type extensions that the language should (by default) be used with. This is referenced when TextMate does not know what grammar to use for a file the user opens. If however the user selects a grammar from the language pop-up in the status bar, TextMate will remember that choice. (TextMate 1)&lt;span style="font-family:monospace;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:monospace;"&gt;&lt;/span&gt;foldingStartMarker / foldingStopMarker (line 3-4) — these are regular expressions that lines (in the document) are matched against. If a line matches one of the patterns (but not both), it becomes a folding marker.  The means you will get the arrow in the left margin that will allow you to expand and collapse large sections of code (TextMate 1)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;patterns (line 5-18) — this is an array with the actual rules used to parse the document. In this example there are two rules (line 6-8 and 9-17).  (TextMate 1)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;For example this is the beginning of my definition for the SQR language.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;{ scopeName = 'source.SQR';&lt;br /&gt;fileTypes = ( 'sqr', 'sqc', 'SQR', 'SQC' );&lt;br /&gt;foldingStartMarker = '(?i)^\s*+(Begin-Procedure|If|Begin-Report|Begin-Heading|begin-select|begin-sql|#ifdef).*';&lt;br /&gt;foldingStopMarker = '(?i)^\s*+(End-Procedure|End-If|End-Report|End-Heading|end-select|end-sql|#end-if).*';&lt;br /&gt;patterns = (&lt;br /&gt; { name = 'comment.line.double-slash.SQR';&lt;br /&gt;  match = '!.*\n';&lt;br /&gt; },&lt;br /&gt;              ...&lt;br /&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;The name for the scope is source.SQR and it operates by default on files with the following extensions sqr, sqc, SQR, and SQC.  Lets look at just one of the folding markers, Begin-Procedure/End-Procedure.  The regex match I set up does a case insensitive match looking for a line that starts with any number of spaces then Begin-Procedure and basically the same for End-Procedure.  The result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_uXc97LP7eDA/Sb2pz6lWbdI/AAAAAAAAAEQ/lRzSP5M_Lmw/s1600-h/FullColoring.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 205px;" src="http://1.bp.blogspot.com/_uXc97LP7eDA/Sb2pz6lWbdI/AAAAAAAAAEQ/lRzSP5M_Lmw/s400/FullColoring.jpg" alt="" id="BLOGGER_PHOTO_ID_5313589844731391442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Yeah for little arrow thingys!&lt;br /&gt;&lt;br /&gt;So the other you might note is the lines with '!' are grayed out, this is because they are set to be comments by our pattern.  The name of the pattern is a special name that matches a TextMate  property, for a full list see &lt;a href="http://manual.macromates.com/en/language_grammars#naming_conventions.html"&gt;here &lt;/a&gt;under 12.4 Naming Conventions.  In this case I choose one that is for comments, "comment.line.double-slash" then added ".SQR" for the right scope.  The second part of the pattern is the match in this case "!.*\n."  This will watch and '!' and any characters after it.&lt;br /&gt;&lt;br /&gt;You can go on to add more patterns for reserved words, variables, strings, etc.  In not too long you can have syntax highlighting all set.  Then you can go on to add snippets and other commands, but we while have to save that for another time.&lt;br /&gt;&lt;br /&gt;You can download what I have so far &lt;a href="https://sites.google.com/site/shawnbower/sqr-tmbundle.tar.gz?attredirects=0&amp;amp;d=1"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;(TextMate 1, http://manual.macromates.com/en/language_grammars#naming_conventions.html)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-4160247298184645382?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2009/03/creating-textmate-bundle.html</link><author>noreply@blogger.com (Shawn)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_uXc97LP7eDA/Sb2iqECFD-I/AAAAAAAAAEA/xant-gt-g7s/s72-c/NewBundle.jpg" height="72" width="72" /><thr:total>6</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-8230200223355754643</guid><pubDate>Sat, 27 Sep 2008 11:14:00 +0000</pubDate><atom:updated>2008-09-27T06:15:19.005-05:00</atom:updated><title>My Next Mac?</title><description>&lt;object width="400" height="300"&gt; &lt;param name="allowfullscreen" value="true" /&gt; &lt;param name="allowscriptaccess" value="always" /&gt; &lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=1640088&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt; &lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=1640088&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;a href="http://vimeo.com/1640088?pg=embed&amp;amp;sec=1640088"&gt;Bricked Mac - Time-Lapse&lt;/a&gt; from &lt;a href="http://vimeo.com/user685481?pg=embed&amp;amp;sec=1640088"&gt;RP Cuenco&lt;/a&gt; on &lt;a href="http://vimeo.com?pg=embed&amp;amp;sec=1640088"&gt;Vimeo&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-8230200223355754643?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/09/my-next-mac.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-5327108259970908983</guid><pubDate>Sun, 14 Sep 2008 17:34:00 +0000</pubDate><atom:updated>2008-09-14T13:19:20.708-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">install</category><category domain="http://www.blogger.com/atom/ns#">fedora</category><category domain="http://www.blogger.com/atom/ns#">calendar</category><title>Installing Oracle Calendar on Fedora</title><description>This will be the first post in a series chronically my "Can I use Fedora for my work OS?" project.  My first task was to see if I could install Oracle Calendar which is our enterprise calendaring system.&lt;br /&gt;&lt;br /&gt;In theory this should not be a hard install you can get the installer from oracle.com and unzip that tarball and run gui_install.sh.  Of course things never go that easy, the first error I got was this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Preparing to install...&lt;br /&gt;Extracting the JRE from the installer archive...&lt;br /&gt;Unpacking the JRE...&lt;br /&gt;Extracting the installation resources from the installer archive...&lt;br /&gt;Configuring the installer for this system's environment...&lt;br /&gt;awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory&lt;br /&gt;dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory&lt;br /&gt;/bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory&lt;br /&gt;basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory&lt;br /&gt;dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory&lt;br /&gt;basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory&lt;br /&gt;hostname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory&lt;br /&gt;Launching installer...&lt;br /&gt;grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory&lt;br /&gt;/tmp/install.dir.7150/Linux/resource/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory&lt;/blockquote&gt;After doing some research it seems that the LD_ASSUME_KERNEL environment var can cause problems, it is old var used during the time of kernel threading switch.  Some apps, mostly java, still have this set and it cuases problems in fedora.  The soluction is to turn it off:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;perl -pi -e 's/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/' cal_linux&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;After that I got a missing object error:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;libXp.so.6: cannot open shared object file: No such file or directory&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This was an easy fix, I just installed the missing lib.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;yum install libXp.so.6&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The Final error I had was:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;libstdc++.so.5: cannot open shared object file: No such file or directory&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I checked the lib version and found that I had so.6.  My first though was to link this to the so.5 and hope for the best.  I decided to first look for a compat library and I found it.  The solution:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;yum install compat-libstdc++-33&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Finally I had a working calendar!  Woo Hoo!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-5327108259970908983?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/09/installing-oracle-calendar-on-fedora.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-4874921694576385346</guid><pubDate>Wed, 03 Sep 2008 11:15:00 +0000</pubDate><atom:updated>2008-09-03T06:15:24.110-05:00</atom:updated><title>Techie Haiku</title><description>Your razor-sharp wit&lt;br /&gt;Can never stand up to my &lt;br /&gt;Adamantium&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-4874921694576385346?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/09/techie-haiku.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-9147111488462429751</guid><pubDate>Tue, 02 Sep 2008 19:29:00 +0000</pubDate><atom:updated>2008-09-02T14:37:11.296-05:00</atom:updated><title>My Macbook Lives</title><description>My macbook experienced some serious issues last Friday.  When I boot I get the login screen because I have enabled the root account for various things.  When I logged in as my normal user I got stuck at a blue screen that would flash intermittently.  It was like the mac couldn't log in.  After some painful trouble shooting here is what I did to fix it:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;login into the computer using the root account&lt;/li&gt;&lt;li&gt;created a new user called xyz&lt;/li&gt;&lt;li&gt;renamed the home folder  (/Users/xyz)  to xyz_old&lt;/li&gt;&lt;li&gt;renamed my home folder to xyz&lt;/li&gt;&lt;li&gt;rebooted&lt;/li&gt;&lt;li&gt;logged in as xyz&lt;/li&gt;&lt;/ol&gt;I was able to login as the new user and all my settings were just as I left them.  I did have to type in my password for the keychain but that worked fine.  The best part is I still had my time machine back up just in case.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-9147111488462429751?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/09/my-macbook-lives.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-7872954462814964898</guid><pubDate>Tue, 02 Sep 2008 19:05:00 +0000</pubDate><atom:updated>2008-09-02T14:05:25.928-05:00</atom:updated><title>I need this for my mac</title><description>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/KkAtRfA1UXc&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/KkAtRfA1UXc&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-7872954462814964898?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/09/i-need-this-for-my-mac.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-5871650391185834948</guid><pubDate>Mon, 25 Aug 2008 23:19:00 +0000</pubDate><atom:updated>2008-08-25T21:57:54.781-05:00</atom:updated><title>Garcias is rocking</title><description>&lt;p class="mobile-photo"&gt;&lt;a href="http://3.bp.blogspot.com/_uXc97LP7eDA/SLM-f9OyJCI/AAAAAAAAACw/Q3GVY-IUXvA/s1600-h/photo-795073.jpg"&gt;&lt;img src="http://3.bp.blogspot.com/_uXc97LP7eDA/SLM-f9OyJCI/AAAAAAAAACw/Q3GVY-IUXvA/s320/photo-795073.jpg"  border="0" alt="" id="BLOGGER_PHOTO_ID_5238599510295454754" /&gt;&lt;/a&gt;&lt;/p&gt;This is the first time we have got my brother to eat at Garcias in  &lt;br&gt;like five years!  Mallory is way excited!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-5871650391185834948?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/08/garcias-is-rocking.html</link><author>noreply@blogger.com (Shawn)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_uXc97LP7eDA/SLM-f9OyJCI/AAAAAAAAACw/Q3GVY-IUXvA/s72-c/photo-795073.jpg" height="72" width="72" /><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-4599259323193284932</guid><pubDate>Tue, 12 Aug 2008 15:20:00 +0000</pubDate><atom:updated>2008-08-12T10:23:14.093-05:00</atom:updated><title>This scares the crap out of me</title><description>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/XFR-8NVjw-k&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/XFR-8NVjw-k&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-4599259323193284932?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/08/this-scares-crap-out-of-me.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-1189843911203464063</guid><pubDate>Mon, 11 Aug 2008 01:30:00 +0000</pubDate><atom:updated>2008-08-10T20:56:41.215-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">computers</category><category domain="http://www.blogger.com/atom/ns#">technology</category><category domain="http://www.blogger.com/atom/ns#">code</category><title>When to reinvent the wheel</title><description>One of the cardinal rules of software development is to never reinvent the wheel.  I have in my ten years of software development strictly adhered to this rule, primarily because programmers are lazy.  For the most part it is in your best interest to used tested code the is already written, however sometimes it can be a detriment.&lt;br /&gt;&lt;br /&gt;Recently I was working on a project where I wanted to do an auto suggest drop down for a text box.  I started off, as usual, slogging through the net looking for something that work.  Without too much work I was able to find about three contenders.  I downloaded, installed and tested each.  None of the three was really what I wanted so I adventured back to the Internet in search of the perfect auto suggest JavaScript and before I knew it I had spent a whole work day (8 hours) just scouring the internet.&lt;br /&gt;&lt;br /&gt;I took a step back and wrote:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  function suggest() {&lt;br /&gt;   var searchBox = document.getElementById('search-form-query');&lt;br /&gt;   var suggestions = document.getElementById('suggestions');&lt;br /&gt;   &lt;br /&gt;   var url = 'searchData.cfm';&lt;br /&gt;   var pars = 'field=' + searchBox.value;&lt;br /&gt;&lt;br /&gt;   var ajax = new Ajax.Updater(&lt;br /&gt;   {success: 'suggestions'},&lt;br /&gt;   url,&lt;br /&gt;   {method: 'get', parameters: pars, onFailure: reportError});&lt;br /&gt;   &lt;br /&gt;   suggestions.style.display = 'inline'&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  function hideSuggestions() {&lt;br /&gt;   var suggestions = document.getElementById('suggestions');&lt;br /&gt;   suggestions.style.display = 'none'&lt;br /&gt;  }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;With a tiny bit of HTML to help:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;div id="suggestions" style="overflow: auto; position: absolute; background-color: white; width: 150px; height: 250px; display: none;" onclick="hideSuggestions()"&amp;gt;This is where the auto suggestions will go&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This code took me maybe ten minutes to write and test and it was exactly what I wanted in the end.  In the end it was far more efficient for me just to write the code and move on.  It's important for programmers to strike a good balance between writing their own stuff and using packages from the Internet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-1189843911203464063?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/08/when-to-reinvent-wheel.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-6497028905362847438</guid><pubDate>Sun, 10 Aug 2008 03:55:00 +0000</pubDate><atom:updated>2008-08-10T11:54:43.831-05:00</atom:updated><title>How to Pick a Lock with a Bump Key [How To]</title><description>I made one :)&lt;br /&gt;&lt;br /&gt;&lt;div style="margin: 0px 2px; padding-top: 1px; background-color: rgb(195, 217, 255); font-size: 1px ! important; line-height: 0px ! important;"&gt; &lt;/div&gt; &lt;div style="margin: 0px 1px; padding-top: 1px; background-color: rgb(195, 217, 255); font-size: 1px ! important; line-height: 0px ! important;"&gt; &lt;/div&gt; &lt;div style="padding: 4px; background-color: rgb(195, 217, 255);"&gt;&lt;h3 style="margin: 0px 3px; font-family: sans-serif;"&gt;Sent to you by Shawn via Google Reader:&lt;/h3&gt;&lt;/div&gt; &lt;div style="margin: 0px 1px; padding-top: 1px; background-color: rgb(195, 217, 255); font-size: 1px ! important; line-height: 0px ! important;"&gt; &lt;/div&gt; &lt;div style="margin: 0px 2px; padding-top: 1px; background-color: rgb(195, 217, 255); font-size: 1px ! important; line-height: 0px ! important;"&gt; &lt;/div&gt; &lt;div style="margin: 0px 10px; overflow: auto; font-family: sans-serif; width: 100%;"&gt;&lt;h2 style="margin: 0.25em 0pt 0pt;"&gt;&lt;div class=""&gt;&lt;a href="http://feeds.gawker.com/%7Er/lifehacker/full/%7E3/353885289/how-to-pick-a-lock-with-a-bump-key"&gt;How to Pick a Lock with a Bump Key [How To]&lt;/a&gt;&lt;/div&gt;&lt;/h2&gt; &lt;div style="margin-bottom: 0.5em;"&gt;via &lt;a href="http://lifehacker.com/" class="f"&gt;Lifehacker&lt;/a&gt; by Gina Trapani on 8/2/08&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;&lt;embed src="http://www.youtube.com/v/pwTVBWCijEQ&amp;amp;hl=en&amp;amp;fs=1" allowscriptaccess="never" wmode="transparent" type="application/x-shockwave-flash" height="413" width="494"&gt;&lt;/embed&gt;&lt;br /&gt;From the "use this for good, not evil" files comes a fascinating instructional video on how to pick a lock with a "&lt;a href="http://en.wikipedia.org/wiki/Bump_key"&gt;bump key&lt;/a&gt;"—a key modified to fit and open any lock. Like the instructor in the video says, thieves have been using this technique for a long time now—so it's interesting (in the "knowledge is power" kind of way) to see how it's done. Before you start making evil plans, keep in mind that most states in the U.S. consider a bump key &lt;a href="http://en.wikipedia.org/wiki/Bump_key#Legal_Status"&gt;a burglary tool&lt;/a&gt; so don't go getting yourself arrested. &lt;div&gt;&lt;a href="http://howto.wired.com/wiki/Bump_a_Lock"&gt;Bump a Lock&lt;/a&gt; [How-To Wiki]&lt;/div&gt;&lt;p&gt;&lt;/p&gt;     &lt;img alt="" style="border: 0pt none ; height: 1px; width: 1px;" src="http://www.pheedo.com/img.phdo?i=a0fc925c1c33957bec1c1a52b2aee042" border="0" height="1" width="1" /&gt; &lt;img src="http://www.pheedo.com/feeds/tracker.php?i=a0fc925c1c33957bec1c1a52b2aee042" alt="" border="0" height="1" width="1" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin: 0px 2px; padding-top: 1px; background-color: rgb(195, 217, 255); font-size: 1px ! important; line-height: 0px ! important;"&gt; &lt;/div&gt; &lt;div style="margin: 0px 1px; padding-top: 1px; background-color: rgb(195, 217, 255); font-size: 1px ! important; line-height: 0px ! important;"&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-6497028905362847438?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/08/how-to-pick-lock-with-bump-key-how-to.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-6951934446372075470</guid><pubDate>Thu, 07 Aug 2008 16:37:00 +0000</pubDate><atom:updated>2008-08-07T11:37:35.673-05:00</atom:updated><title>The Guild</title><description>&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="playerLoader" width="425" height="371" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"&gt;&lt;param name="movie" value="http://farm.sproutbuilder.com/275173/load/yQDDDTMFBB8Dg7su.swf" /&gt;&lt;param name="quality" value="best" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="wmode" value="transparent" /&gt;&lt;embed src="http://farm.sproutbuilder.com/275173/load/yQDDDTMFBB8Dg7su.swf" width="425" height="371" name="playerLoader" align="middle" wmode="transparent" play="true" loop="false" quality="best" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;img style="visibility:hidden;width:0px;height:0px;" border=0 width=0 height=0 src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.11NXC/bHQ9MTIxODEyNjY4OTE3NSZwdD*xMjE4MTI3MDUyMjYzJnA9JmQ9Mjc1MzMxJm49YmxvZ2dlciZnPTI=.gif" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-6951934446372075470?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/08/guild.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-2814784969983401646</guid><pubDate>Sun, 27 Jul 2008 07:51:00 +0000</pubDate><atom:updated>2008-07-27T02:51:56.665-05:00</atom:updated><title>The Shinnning</title><description>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/dKKNUF-CE6g&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/dKKNUF-CE6g&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" wmode="transparent" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-2814784969983401646?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/07/shinnning.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-68626204406569238</guid><pubDate>Wed, 23 Jul 2008 15:17:00 +0000</pubDate><atom:updated>2008-07-23T10:19:19.470-05:00</atom:updated><title>Dog Barks for six years</title><description>&lt;embed src="http://www.theonion.com/content/themes/common/assets/videoplayer/flvplayer.swf" type="application/x-shockwave-flash" allowScriptAccess="always" wmode="transparent" width="400" height="355" flashvars="file=http://www.theonion.com/content/xml/82717/video&amp;autostart=false&amp;image=http://www.theonion.com/content/files/images/TINY_DOG_article.jpg&amp;bufferlength=3&amp;embedded=true&amp;title=Tiny%20Dog%20Has%20Been%20Barking%20Nonstop%20For%206%20Years"&gt;&lt;/embed&gt;&lt;br/&gt;&lt;a href="http://www.theonion.com/content/video/tiny_dog_has_been_barking_nonstop?utm_source=embedded_video"&gt;Tiny Dog Has Been Barking Nonstop For 6 Years&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-68626204406569238?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/07/dog-barks-for-six-years.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-3330425261586613086</guid><pubDate>Tue, 15 Jul 2008 00:06:00 +0000</pubDate><atom:updated>2008-07-14T19:10:17.416-05:00</atom:updated><title>The iPhone has arrived.</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.geekculture.com/joyoftech/joyimages/1128.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px;" src="http://www.geekculture.com/joyoftech/joyimages/1128.gif" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;http://www.geekculture.com/joyoftech/joyarchives/1128.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-3330425261586613086?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/07/iphone-has-arrived.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-4712743384767937390</guid><pubDate>Thu, 10 Jul 2008 03:07:00 +0000</pubDate><atom:updated>2008-07-09T22:08:32.770-05:00</atom:updated><title>Log rotate final solution</title><description>&lt;code&gt;&lt;br /&gt;#!/usr/bin/perl -w&lt;br /&gt;use strict;&lt;br /&gt;&lt;br /&gt;my $numDays = 7;        #Number of days to retain Output Directories&lt;br /&gt;my $numLongDays = 30;   #Number of days to reatain archived tars&lt;br /&gt;&lt;br /&gt;#get the current date time and break up&lt;br /&gt;my ($sec,$min,$hour,$mday,$mon,$year,$wday,&lt;br /&gt;$yday,$isdst)=localtime(time);&lt;br /&gt;&lt;br /&gt;#create date stamp&lt;br /&gt;$year = $year + 1900;&lt;br /&gt;my $dateStamp = "$mon-$mday-$year";&lt;br /&gt;&lt;br /&gt;#find out who is running this process&lt;br /&gt;my $who = `whoami`;&lt;br /&gt;chomp $who;&lt;br /&gt;&lt;br /&gt;#Get the list of directories&lt;br /&gt;my @baseDirs = `find /usr/peoplesoft/$who/appserv/prcs/* \\( ! -name dir -prune \\) -type d -print`;&lt;br /&gt;&lt;br /&gt;#for each dir arcvhive and delete folder from log_ouput&lt;br /&gt;foreach my $baseDir (@baseDirs) {&lt;br /&gt;  chomp $baseDir;&lt;br /&gt;&lt;br /&gt;  #set the path to the directory that has the logs and the archive directory&lt;br /&gt;  my $logDir = "$baseDir/log_output";&lt;br /&gt;  my $logArchiveDir ="$baseDir/log_output_archive";&lt;br /&gt;&lt;br /&gt;  unless(-d $logArchiveDir){&lt;br /&gt;      mkdir $logArchiveDir or die "Couldn't create dir: [$logArchiveDir] ($!)";;&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt;  #archive then delete out put folders&lt;br /&gt;  system("/usr/bin/tar cvf - `/usr/bin/find $logDir/* -mtime +$numDays` | gzip &gt; $logArchiveDir/log_output_$dateStamp.tar.gz");&lt;br /&gt;  system("/usr/bin/find $logDir/* -mtime +$numDays -exec rm -rf {} \\;");&lt;br /&gt;  system("/usr/bin/find $logArchiveDir/* -mtime +$numLongDays -exec rm -rf {} \\;");&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-4712743384767937390?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/07/log-rotate-final-solution.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-556954950217791297</guid><pubDate>Wed, 09 Jul 2008 01:13:00 +0000</pubDate><atom:updated>2008-07-08T20:29:50.904-05:00</atom:updated><title>Why its important to rotate logs.</title><description>Any of you who have been in the sysadmin business for more then a few days know how critical it is to rotate log files.  When logs get to big your system will stop working. For example each file system has a maximum file size (http://www.novell.com/documentation/suse91/suselinux-adminguide/html/apas04.html#tab:maxsize) which if reached will cause problems.  In the old days linux had a 2 gig ceiling and when your apache access log reached it apache would crash and not come back up.  Some times worse.&lt;br /&gt;&lt;br /&gt;Today I ran into a new one, in Solaris there is a limit to the number of sub directories that can be created.  The magic number is none other than 32,767.  We had a process that was storing log files for in there own sub directories.  It had been doing this for multiple years and finally it had the lmit.  We got this rather unhelp error, mkdir: Failed to make directory "test3"; Too many links.&lt;br /&gt;&lt;br /&gt;The solution was rather simple.  Tar up and archive the folders and then delete the originals.  I set up a quick script to do this monthly and hopefully we will be all set.  Going forward I would like to get a more robust solution in place like the standard logrotate.  Dare to dream.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-556954950217791297?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/07/why-its-important-to-rotate-logs.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-6987700489323422445</guid><pubDate>Thu, 19 Jun 2008 17:57:00 +0000</pubDate><atom:updated>2008-06-19T12:57:57.796-05:00</atom:updated><title>Siesta</title><description>Good on article on how to nap: &lt;a href="http://www.boston.com/bostonglobe/ideas/naps/"&gt;http://www.boston.com/bostonglobe/ideas/naps/&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-6987700489323422445?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/06/siesta.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-6146042931897841963</guid><pubDate>Wed, 18 Jun 2008 18:37:00 +0000</pubDate><atom:updated>2008-06-18T13:38:00.165-05:00</atom:updated><title>Arent they just precious</title><description>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ImBaVm7K6Do&amp;amp;hl=en"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/ImBaVm7K6Do&amp;amp;hl=en" type="application/x-shockwave-flash" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-6146042931897841963?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/06/arent-they-just-precious.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-5022330563622544836</guid><pubDate>Wed, 18 Jun 2008 02:50:00 +0000</pubDate><atom:updated>2008-06-17T22:07:15.356-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">family</category><title>Uncle Shawn</title><description>I just found out that I'm going to be an Uncle, how cool is that?  It is totally awesome and scary all at the same time, I cant imagine how my brother feels!  It really gets you thinking about life and the whole cycle of things.  I'm way excited for this little sea monkey!  I cant wait to teach him/her how to calculate pot odds and bluff on the river.  I'm already thinking about taking them to scouts and camping and the other nine million other things that will be fun to do. &lt;br /&gt;&lt;br /&gt;Congratulations Chad and Mal!!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-5022330563622544836?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/06/uncle-shawn.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-6421761454741751906</guid><pubDate>Wed, 18 Jun 2008 02:36:00 +0000</pubDate><atom:updated>2008-06-17T21:48:19.792-05:00</atom:updated><title>Firefox 3</title><description>I'm very impressed with the latest release of Firefox.  I have for a long time switched between safari and Firefox mostly because I love the way safari looks.  The native look and feel of safari is fantastic!  Not to mention safari is a pretty darn speedy.  Firefox has come a long way, the original version looked awful and was very clunky.  I would have given up on it if it wasn't for the amazing plugins.  Version 3 is just as functional as ever and finally feels like it belongs on the mac.  The history looks great and is search able too. &lt;br /&gt;&lt;br /&gt;Way to go Mozilla!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-6421761454741751906?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/06/firefox-3.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-8840855723049552182</guid><pubDate>Fri, 13 Jun 2008 01:52:00 +0000</pubDate><atom:updated>2008-06-12T21:19:56.232-05:00</atom:updated><title>Interviewing</title><description>Interviewing is hard work.  Its hard to be the interviewee and its hard to be the interviewer.  Fortunately I haven't had to be on the interviewer side of the table in quite some time. I'm a fan of &lt;a href="http://www.joelonsoftware.com/"&gt;Joel Spolsky&lt;/a&gt; who writes a fantastic tech blog, his suggestion is that you should look for people who are smart and get things done.  That is it.  Simple.  When I'm on a interview committee that is my Mantra.  The problem I have seen lately is that others on the committee have very defined set of things they are looking for that blurs their judgment of the canidate at hand.  I believe that at the end of the day you can teach someone to use a tool or set of tools but you can not teach them to think in a different way.  Personality traits are hard if not impossible to change and further more we should not want to change a person to fit our job and environment.&lt;br /&gt;&lt;br /&gt;Today we did a phone screen for two candidates.  Both were technical savvy however one had a lot more programming experience then the other.  The one with programming experience certainly could do the technical aspect of the job however the canidate had a hard time communicate at a level that would engage a functional user.  This to me is a red flag.  We are not going to be able to change this candidates communication style, they have operated this why for years.  Trying to shape away years of learned behavior is almost impossible.  The other canidate was an effective communicate that understood process and methodology.  This canidate was not a strong programmer.  In my opinion we can teach programming and we can teach the tool.  The good news is we are starting with a clean slate!&lt;br /&gt;&lt;br /&gt;My goal when looking at some one to hire is to find someone smart that gets things done.  This is the corner stone!  After we narrow down the candidates I'm looking for some one that fits the job, the organization and has the innate skills that can't be trained.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-8840855723049552182?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/06/interviewing.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7936478420214857332.post-8388150207539995660</guid><pubDate>Sun, 08 Jun 2008 19:23:00 +0000</pubDate><atom:updated>2008-06-08T14:47:24.662-05:00</atom:updated><title>Scripting SCP</title><description>I love scp, its easily one of the most used unix commands in my tool bag.  That said it is a real pain inf the butt to try and script scp.  I was in the midst of writing a little script that would create ssh key pairs and distribute them to a number of servers.  On paper this seemed to be almost trivial and that my friends is the problem wit paper.  In order to make scp more secure the developers had it communicate using PAM instead stdin, sterr and stdout.  Bummer, This meant there was no easy way to supply scp with the users password.  So there is no command line option to supply the password and I can't write to it over stidn, I was a little stuck.  After searching that Internet, and I mean really scouring, I found a command called &lt;a href="http://expect.nist.gov/"&gt;expect&lt;/a&gt;.  Using this I wrote a quick and dirty shell script to do the scp part:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/usr/bin/env expect -f &lt;br /&gt;set password [lindex $argv 0 ]&lt;br /&gt;set file     [lindex $argv 1 ]&lt;br /&gt;set command  [lindex $argv 2 ]&lt;br /&gt;&lt;br /&gt;# trick to pass in command-line args to spawn&lt;br /&gt;eval spawn scp -r $file $command&lt;br /&gt;&lt;br /&gt;expect "password: $"&lt;br /&gt;send "$password\n"&lt;br /&gt;&lt;br /&gt;# wait for regular shell prompt before quitting&lt;br /&gt;# probably a better way using 'wait'&lt;br /&gt;expect "$ $"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;With this the whole scripting experience became trivial again, rock on!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7936478420214857332-8388150207539995660?l=advws.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://advws.blogspot.com/2008/06/scripting-scp.html</link><author>noreply@blogger.com (Shawn)</author><thr:total>1</thr:total></item></channel></rss>

