<?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>cpierce.org &#187; OS</title>
	<atom:link href="http://www.cpierce.org/category/os/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cpierce.org</link>
	<description>Chris Lee Pierce</description>
	<lastBuildDate>Sat, 29 Aug 2009 22:00:10 +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>Getting Devonthink Pro Office 2 to work with Snow Leopard</title>
		<link>http://www.cpierce.org/2009/08/getting-devonthink-pro-office-2-to-work-with-snow-leopard/</link>
		<comments>http://www.cpierce.org/2009/08/getting-devonthink-pro-office-2-to-work-with-snow-leopard/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 21:58:53 +0000</pubDate>
		<dc:creator>cpierce</dc:creator>
				<category><![CDATA[OS X Leopard]]></category>
		<category><![CDATA[devonthink]]></category>
		<category><![CDATA[installing]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.cpierce.org/?p=152</guid>
		<description><![CDATA[I looked all over the internet and found several articles and posts about how Devonthink wasn&#8217;t supported with snow leopard.  This is frustrating to me because for the most part it should work just fine.  So I started investigating how to get it to work and I&#8217;ve got about 80% functionality now.  [...]]]></description>
			<content:encoded><![CDATA[<p>I looked all over the internet and found several articles and posts about how Devonthink wasn&#8217;t supported with snow leopard.  This is frustrating to me because for the most part it should work just fine.  So I started investigating how to get it to work and I&#8217;ve got about 80% functionality now.  Here is what I did:</p>
<p>Install DevonThink Pro Office from download on the website.  After downloaded drag to the applications folder as normal.  Then open Devon Think.  Upon the first open it will ask you if you would like to install Devon Think&#8217;s Add-on&#8217;s and Extras.  Uncheck all of these and then devonthink will open.  Go ahead and enter your license in and test to make sure you can open a few different databases if you have them.  This was all working great so I decided to see if I could take it step further.  </p>
<p>For the most part, I use Devonthink to take scans of papers on my desk and place them into searchable groups.  Its a giant filing cabinet on the computer for me.  I like this process to be fast so I turn off the OCR part and then manually OCR and organize from the inbox at the end of the day.  But without Abbyy FineReader installed I have no way of doing the conversions to OCR nor are the options even there on the context menus.  So the next thing I tried is to install the PDF Services Scripts.  This worked without a hitch.   I then restarted DevonThink and installed ABBYY as the only option in the Install Add-ons (Under Help Install Add-ons).  I don&#8217;t really use the sorter and turn it off anyway so I didn&#8217;t need to install it, and I also don&#8217;t use the Mail built into OSX so I didn&#8217;t install that plug-in either.  After this I went back and installed Application Scripts and DevonThink Pro Scripts.  Both worked but the program does hang when trying to print a pdf directly to devonthink from Safari.  I can live with this.   </p>
<p>I haven&#8217;t tried scanning from my s1500m yet but this is next on my list.  I hope this helps someone get to your files at least for reference purposes.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpierce.org/2009/08/getting-devonthink-pro-office-2-to-work-with-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Aggregating RSS Feeds</title>
		<link>http://www.cpierce.org/2009/01/aggregating-rss-feeds/</link>
		<comments>http://www.cpierce.org/2009/01/aggregating-rss-feeds/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 01:31:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Centos Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ubuntu Linux]]></category>
		<category><![CDATA[aggregation]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.cpierce.org/?p=65</guid>
		<description><![CDATA[Pull from several RSS feeds on a high traffic site for too long and you&#8217;ll wonder if there is a better way.  Fortunately for you there is.  Aggregating your RSS feeds solves several problems for both you and the source of the RSS.  First it reduces the bandwidth required from both the [...]]]></description>
			<content:encoded><![CDATA[<p>Pull from several RSS feeds on a high traffic site for too long and you&#8217;ll wonder if there is a better way.  Fortunately for you there is.  Aggregating your RSS feeds solves several problems for both you and the source of the RSS.  First it reduces the bandwidth required from both the source site and your site.  Imagine a site that gets several requests per hour.  Now imagine this site pulling from another site via RSS every time that a client loads the page.  The result is the same data getting pulled over and over again.  There is a better way!<br />
<span id="more-65"></span><br />
Aggregated RSS software is available for a variety of operating systems and languages.  The problem is that many of these have rather large footprints and cause for extra strain to be put on already busy servers.  If you host with Linux you already have the tools required to do aggregation.  Here are the things you will need:</p>
<ul>
<li>Access to crontab</li>
<li>wget installed on your server</li>
<li>PHP</li>
</ul>
<p>First lets look at the command that makes this all possible and go into a little detail about how it works.  RSS feeds are XML based pages served for the most part by HTML browsers.  A sample of RSS can be seen below:</p>
<div class="codecolorer-container xml dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Ice Rink Shiner<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://www.cpierce.org/2009/01/ice-rink-shiner/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/link<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;comments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://www.cpierce.org/2009/01/ice-rink-shiner/#comments<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/comments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pubDate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Mon, 05 Jan 2009 21:20:11 +0000<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pubDate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:creator<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>admin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:creator<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>This is a excerpt from my RSS feed here at <a href="http://cpierce.org/feed">http://cpierce.org/feed</a>.  If we were to simply want to pull this one feed to our server we could use wget as follows:</p>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">--tries</span>=2 <span style="color: #660033;">--dns-timeout</span>=5 <span style="color: #660033;">--connect-timeout</span>=5 <span style="color: #660033;">--no-check-certificate</span> <span style="color: #ff0000;">&quot;http://www.cpierce.org/feed/&quot;</span> <span style="color: #660033;">-O</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>html<span style="color: #000000; font-weight: bold;">/</span>cpierce.org.xml</div></div>
<p>Now that the RSS feed is on our own server we don&#8217;t have to rely on the speed of the source during page loads.  We can also still provide user content even if the source host is down.  We could simply run the bash script above every time we wanted to pull a new copy of the feed, but we are looking for a more automated way of doing this.  Lets start by upgrading our bash script to PHP so that we can easily pull multiple RSS feeds at once.  Here is the example /var/www/html/rss/rss_feed.php code:</p>
<div class="codecolorer-container php dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// we start with a simple function that allows us to run command line scripts from php</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">function</span> syscmd<span style="color: #009900;">&#40;</span><span style="color: #000088;">$cmd</span><span style="color: #339933;">,</span> <span style="color: #000088;">$output</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prun</span><span style="color: #339933;">=</span><a href="http://www.php.net/popen"><span style="color: #990000;">popen</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;(<span style="color: #006699; font-weight: bold;">$cmd</span>)2&gt;&amp;1&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;r&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">126</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/feof"><span style="color: #990000;">feof</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prun</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000088;">$buffer</span><span style="color: #339933;">=</span><a href="http://www.php.net/fgets"><span style="color: #990000;">fgets</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prun</span><span style="color: #339933;">,</span>10000<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$output</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">print</span> <a href="http://www.php.net/nl2br"><span style="color: #990000;">nl2br</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$buffer</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">return</span> <a href="http://www.php.net/pclose"><span style="color: #990000;">pclose</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$prun</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// we need a place to store these files we are going to be pulling (this path must be writable from your httpd</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$path</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/var/www/html/rss/'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// now we need an array that will hold our file name (the key) and our rss feed url (the value)</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$feeds</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cpierce.org'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://www.cpierce.org/feed'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'jbcrawford.net'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://www.jbcrawford.net/feed'</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">'jstownsley.com'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'http://www.jstownsley.com/feed'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// now we need to loop through the array $feeds and pull each rss feed to our local $path.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$feeds</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$name</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; syscmd<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/usr/bin/wget --tries=2 --dns-timeout=5 --connect-timeout=5 --no-check-certificate &quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; -O '</span><span style="color: #339933;">.</span><span style="color: #000088;">$path</span><span style="color: #339933;">.</span><span style="color: #000088;">$name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.xml'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>We can test this by running it in our browser http://www.site.com/rss/rss_feed.php.  Note this is also handy to do if you need to manually refresh an rss feed before the scheduled time.  Once this is all working you&#8217;ll have xml files in your specified path.  Just one thing left to do, schedule a time for them to start using &#8216;crontab -e&#8217;:</p>
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; 15 &nbsp;0-23<span style="color: #000000; font-weight: bold;">/</span>4 &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">*</span> &nbsp; <span style="color: #000000; font-weight: bold;">*</span> &nbsp; <span style="color: #000000; font-weight: bold;">*</span> &nbsp; <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">--delete-after</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.site.com<span style="color: #000000; font-weight: bold;">/</span>rss<span style="color: #000000; font-weight: bold;">/</span>rss_feed.php <span style="color: #000000; font-weight: bold;">&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span></div></div>
<p>This tells our system scheduled crontab to run every 4 hours when the minute hand is on the 15 (I do this so everything isn&#8217;t scheduled at the top of the hour).  If you need to add other rss feeds you simply add them to your array and then access them via http://www.site.com/rss/cpierce.org.xml.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpierce.org/2009/01/aggregating-rss-feeds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Safari Tip:  Open targeted links in a new tab</title>
		<link>http://www.cpierce.org/2009/01/safari-tip-open-targeted-links-in-a-new-tab/</link>
		<comments>http://www.cpierce.org/2009/01/safari-tip-open-targeted-links-in-a-new-tab/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 04:27:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[OS X Leopard]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[tab]]></category>
		<category><![CDATA[tabbed links]]></category>
		<category><![CDATA[targeted links]]></category>

		<guid isPermaLink="false">http://www.cpierce.org/?p=26</guid>
		<description><![CDATA[Before I got my Mac I was a die hard firefox user.  I used firefox for almost 99% of my web browsing.  Even before I was a firefox user I was a die hard keyboarder (I hate slowing myself down by using a mouse).  When I got my Mac Book Pro in [...]]]></description>
			<content:encoded><![CDATA[<p>Before I got my Mac I was a die hard firefox user.  I used firefox for almost 99% of my web browsing.  Even before I was a firefox user I was a die hard keyboarder (I hate slowing myself down by using a mouse).  When I got my Mac Book Pro in 2007 for the <a href="http://2007.webjamsession.com/">Webmaster Jam Session</a>, I soon found that maybe safari was a better choice for my keyboarding habbits.  While firefox (in many ways) works the same on all operating systems, one little thing drives me crazy about it on the mac.  It skips over several form elements while using the tab key (Drop Downs, checkboxes, radio buttons).  This is what drove me to use Safari.</p>
<p><span id="more-26"></span></p>
<p>After a few months of getting used to clicking on the navigation compass instead of the phoenix fox surrounding the earth, I grew to love some of the features even more than firefox (especially the way that you can drag tabs in and out of workspace windows).  There was one little thing that I could not find though.  How to open targeted links in a new tab instead of a new browser window.  This means that any link you click that has a target=&#8221;_blank&#8221; is automatically opened in a new window.  This is fine until you have 15 different windows open.  15 tabs are much easier to manage.  To make this change requires only one simple command be typed in a terminal window.  Here is what you do:</p>
<ul>
<li>Close Safari</li>
<li>Open Terminal.app (found in the utilities folder under applications)</li>
<li>Type in the following:
<div class="codecolorer-container bash dawn" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">defaults <span style="color: #c20cb9; font-weight: bold;">write</span> com.apple.Safari TargetedClicksCreateTabs <span style="color: #660033;">-bool</span> <span style="color: #c20cb9; font-weight: bold;">true</span><br />
<span style="color: #7a0874; font-weight: bold;">exit</span></div></div>
</li>
<li>Close Terminal</li>
<li>Restart Safari</li>
</ul>
<p>Now targeted links will open in a new tab every time you click them.  If you want to turn this feature off you can simply type the command again with -bool false instead of -bool true.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpierce.org/2009/01/safari-tip-open-targeted-links-in-a-new-tab/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
