<?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>Fri, 13 Jan 2012 03:36:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Securing an external (flash/usb) drive in mac OS X</title>
		<link>http://www.cpierce.org/2012/01/secure-drive-osx/</link>
		<comments>http://www.cpierce.org/2012/01/secure-drive-osx/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 02:55:13 +0000</pubDate>
		<dc:creator>cpierce</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[OS X Lion]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[external Drive]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[Pen Drive]]></category>
		<category><![CDATA[thumb drive]]></category>

		<guid isPermaLink="false">http://www.cpierce.org/?p=233</guid>
		<description><![CDATA[Being the typical nerd that I am, I tend to have several different Thumb drives and some of them have confidential data on them. I try to never loose them but let&#8217;s face it, sometimes those little critters just get lost. The question is do you really want the data you keep on those drives [...]]]></description>
			<content:encoded><![CDATA[<p>Being the typical nerd that I am, I tend to have several different Thumb drives and some of them have confidential data on them.  I try to never loose them but let&#8217;s face it, sometimes those little critters just get lost.  The question is do you really want the data you keep on those drives out in the hands of the general public?  I have a few different drives.  A few I just use to throw junk on and transfer between computers, but I do have drives that I keep confidential data on that I use as a backup from my computer.  So I faced the issue of if that drive came up missing not freaking out that my data is in the hands of someone who might use it maliciously.<br />
<span id="more-233"></span><br />
I use Mac OS X Lion and so I first tried turning to the trusted File Vault, but alas, as you may have found if you&#8217;ve looked yourself, this is only available for the local hard drive OS X Lion is installed on.  So what do we do to secure a flash/thumb/usb/external/secondary/whatever drive?  </p>
<p>Step 1:  Open &#8220;Disk Utility&#8221; app and Locate your disk after inserting the disk into your computer.  *Note this can be used with any type of hard drive that uses standard partition tables.</p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.29.59-PM.png" rel="lightbox[233]"><img src="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.29.59-PM-300x259.png" alt="" title="Opening Disk Utility and finding your drive" width="300" height="259" class="aligncenter size-medium wp-image-234" /></a></p>
<p>As you can see here I have a standard 4 GB SanDisk Cruzer with a FAT partition on it.  </p>
<p>Before we go any further let&#8217;s specify a few things.  All data will be lost on this drive so please move your data to a local folder if you have important things on the drive already.  Secondly, this drive that we are going to secure will only work with Mac OS X computers after we encrypt it.  <strong>You will not be able to use it with Windows Computers anymore.</strong>  </p>
<p>Step 2: Click on the Label for the drive in &#8220;Disk Utility&#8221; app and find and click the Erase tab located toward the top. </p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.33.32-PM.png" rel="lightbox[233]"><img src="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.33.32-PM-300x259.png" alt="" title="Erasing the Disk and the Contents" width="300" height="259" class="aligncenter size-medium wp-image-235" /></a></p>
<p>Step 3: You can see from the above we have a default set of MS-DOS (FAT) for format and UNTITLED as the Name. We will change this to Mac OS Extended (Journaled, Encrypted) and set the name to something more identifiable for us.  In my case I am going to use the Name: cpierce  From here we&#8217;ll click the Erase button.</p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.36.24-PM.png" rel="lightbox[233]"><img src="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.36.24-PM-300x259.png" alt="" title="Naming and Erasing" width="300" height="259" class="aligncenter size-medium wp-image-236" /></a></p>
<p>Step 4:  The box about creating the encrypted partition comes up and asks us to place our password into the box!  We need to use something secure so the more complex the better.  I also choose not to use a password hint (but to each his/her own).  Once more we click the erase button after entering in the data.</p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.38.05-PM.png" rel="lightbox[233]"><img src="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.38.05-PM-300x260.png" alt="" title="Entering our Password Credentials" width="300" height="260" class="aligncenter size-medium wp-image-237" /></a></p>
<p>You&#8217;ll see things about Switching the disk to Core Storage, Formatting Logical File System, etc. in the progress and your light should flash on your pen drive.  Next we&#8217;ll test our encrypted disk as it now shows up as ready:</p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.40.31-PM.png" rel="lightbox[233]"><img src="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.40.31-PM.png" alt="" title="Drive in Disk Utility" width="212" height="141" class="aligncenter size-full wp-image-238" /></a><br />
<a href="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.40.59-PM.png" rel="lightbox[233]"><img src="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.40.59-PM.png" alt="" title="Drive active in system." width="83" height="102" class="aligncenter size-full wp-image-239" /></a></p>
<p>To test eject the drive (Command+E after clicking the drive and remove it from your computer.  Insert it again and you should see the following:</p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.43.42-PM.png" rel="lightbox[233]"><img src="http://www.cpierce.org/wp-content/uploads/2012/01/Screen-Shot-2012-01-01-at-8.43.42-PM-300x127.png" alt="" title="Testing our Encrypted Drive" width="300" height="127" class="aligncenter size-medium wp-image-240" /></a></p>
<p>You have a few options here.  If this is your computer you can remember this password in my keychain if you&#8217;d like.  If not, or if you insert this into another Mac, you&#8217;ll be asked for the password credentials each time the pen drive is inserted.  The drive will remember until the computer is rebooted, or the drive is removed (Unless you Remember the password in the keychain of course).  </p>
<p>Enjoy and I hope this helps someone.  *Note* If you forget your password, you can always repeat the steps, but this is going to cause the data contents to be wiped from the drive.  Now you can safely lose your external drive.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpierce.org/2012/01/secure-drive-osx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dell 3115cn Scanner Support for OSX Lion</title>
		<link>http://www.cpierce.org/2011/12/dell-3115cn-scanner-support-for-osx-lion/</link>
		<comments>http://www.cpierce.org/2011/12/dell-3115cn-scanner-support-for-osx-lion/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 03:28:03 +0000</pubDate>
		<dc:creator>cpierce</dc:creator>
				<category><![CDATA[Dell]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[OS X Lion]]></category>

		<guid isPermaLink="false">http://www.cpierce.org/?p=194</guid>
		<description><![CDATA[Several requests about getting the scanner working on their OSX Lion install with the Dell 3115cn have made me write this post. Some have had trouble getting it to work through SMB. So here goes instructions on how to get your scanner working with OSX Lion via FTP. Please note that this doesn&#8217;t actually work [...]]]></description>
			<content:encoded><![CDATA[<p>Several requests about getting the scanner working on their OSX Lion install with the Dell 3115cn have made me write this post.  Some have had trouble getting it to work through SMB. So here goes instructions on how to get your scanner working with OSX Lion via FTP.  Please note that this doesn&#8217;t actually work the way one might first expect.  When most people think of connecting a scanner to a computer they think of the computer doing the work by prompting the scanner to do the scanning.  This isn&#8217;t actually the case with the 3115cn.  It has the ability to do a scan server which is how we will set this up.<br />
<span id="more-194"></span><br />
<strong>Setting up the computer</strong><br />
Step 1:<br />
Open up System Prefs and find your computers IP Address under &#8220;Network&#8221;. <em>*I recommend you set this manually or set it with a sticky static in your router so that you don&#8217;t have to continue to go in and change the IP information inside the printer.*</em></p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2011/10/find_ip.png" rel="lightbox[194]"><img src="http://www.cpierce.org/wp-content/uploads/2011/10/find_ip-300x230.png" alt="" title="find_ip" width="300" height="230" class="aligncenter size-medium wp-image-195" /></a></p>
<p>Step 2:<br />
Open terminal and type the following command:</p>
<div class="codecolorer-container bash default" 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: #c20cb9; font-weight: bold;">sudo</span> launchctl load <span style="color: #660033;">-w</span> <span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>LaunchDaemons<span style="color: #000000; font-weight: bold;">/</span>ftp.plist</div></div>
<p>Step 3:<br />
Close the terminal.  At this point create a shared folder inside your documents (or anywhere else you&#8217;d like) called &#8220;Scans&#8221; by opening finder and Right clicking and selecting New Folder and naming it scans:</p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2011/10/NewFolder.png" rel="lightbox[194]"><img src="http://www.cpierce.org/wp-content/uploads/2011/10/NewFolder-300x185.png" alt="" title="NewFolder" width="300" height="185" class="aligncenter size-medium wp-image-202" /></a></p>
<p>When complete you should see the following:<br />
<a href="http://www.cpierce.org/wp-content/uploads/2011/10/Scans.png" rel="lightbox[194]"><img src="http://www.cpierce.org/wp-content/uploads/2011/10/Scans-300x150.png" alt="" title="Scans" width="300" height="150" class="aligncenter size-medium wp-image-203" /></a></p>
<p>You can test by going to terminal and typing ftp <IP> and see if you can login with your short name and password. Once you are logged in type cd Documents/Scans and see if it lets you browse to that directory.  You can even place a file in the folder and see if it is there using the &#8220;ls&#8221; command.</p>
<p><strong>Setting Up the Scanner</strong></p>
<p>Now that we have this working we&#8217;ll move on to configuring the Scanner of the Dell 3115cn.  I assume you know the IP Address of your scanner (as far as I know you&#8217;re scanner will not work via USB with the Mac so You&#8217;ll have to give it an ip on the network).  In my case I&#8217;ve setup the printer on 172.16.3.253 so that it&#8217;s on the same network as my machine.  Open up your browser and type the ip you set for the printer into the address bar.  You&#8217;ll see a Dell Printer Screen showing how much toner you have available.  <strong>At any time you are prompted with a password enter Admin with a blank password (unless you&#8217;ve set it to something else)</strong></p>
<p>Step 1:<br />
After opening the browser click on the Address Book Button (this is where you&#8217;ll be prompted for the password as stated above).  </p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2011/10/addressbook.png" rel="lightbox[194]"><img src="http://www.cpierce.org/wp-content/uploads/2011/10/addressbook-300x210.png" alt="" title="addressbook" width="300" height="210" class="aligncenter size-medium wp-image-206" /></a></p>
<p>Then navigate over to Server Address button and then click on the Create Button for 01 (if not in use &#8230; if it is move to 02 and so on).  Also be sure you are on Server Address and not on E-Mail address (although you can setup a simple SMTP Connection there to allow for emailing you scanned files, although this requires a little mail server knowledge and requires you to goto Print Server Settings -> Print Server Settings -> Email Alert (but that&#8217;s for another tutorial))</p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2011/10/Server_address.png" rel="lightbox[194]"><img src="http://www.cpierce.org/wp-content/uploads/2011/10/Server_address-300x210.png" alt="" title="Server_address" width="300" height="210" class="aligncenter size-medium wp-image-207" /></a></p>
<p>You&#8217;ll see the following information:</p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2011/10/what_you_are_seeing.png" rel="lightbox[194]"><img src="http://www.cpierce.org/wp-content/uploads/2011/10/what_you_are_seeing-300x221.png" alt="" title="what_you_are_seeing" width="300" height="221" class="aligncenter size-medium wp-image-208" /></a></p>
<p>The following Information should be entered:</p>
<p><strong>Name:</strong>  Any name you&#8217;d like to call this on the printers console screen.<br />
<strong>Server Type:</strong>  Tick the radial for FTP (The Default) since that&#8217;s how we configured it.<br />
<strong>Server Address:</strong> Enter your ip address for your computer here (in my case 172.16.3.3 from above)<br />
<strong>Server Port:</strong> 21 is the default FTP Port and should be entered here.<br />
<strong>Login Name:</strong> Your &#8220;Short&#8221; username for your OSX account (ex: cpierce). This was the account name you used when you setup your Mac.<br />
<strong>Login Password:</strong> Tick the Enable Password and enter your account password as entered above).<br />
<strong>Share Name:</strong> Leave Blank.<br />
<strong>Server Path:</strong> Enter &#8220;Documents/Scans&#8221; (without quotes).</p>
<p>Click apply New Settings button.  You&#8217;ll get an Engrish style message saying something about &#8220;updating the data and operate it again later&#8221;.  You will then see the following Screen.</p>
<p><a href="http://www.cpierce.org/wp-content/uploads/2011/10/ready_for_test.png" rel="lightbox[194]"><img src="http://www.cpierce.org/wp-content/uploads/2011/10/ready_for_test-300x210.png" alt="" title="ready_for_test" width="300" height="210" class="aligncenter size-medium wp-image-210" /></a></p>
<p>At this point goto your Scan option on the Console of the Printer and try to scan.  I hope this helps someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpierce.org/2011/12/dell-3115cn-scanner-support-for-osx-lion/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>Dell 3115cn on OSx Lion (Fresh or Upgrade Install)</title>
		<link>http://www.cpierce.org/2011/09/dell-3115cn-on-osx-lion-fresh-install/</link>
		<comments>http://www.cpierce.org/2011/09/dell-3115cn-on-osx-lion-fresh-install/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 02:00:44 +0000</pubDate>
		<dc:creator>cpierce</dc:creator>
				<category><![CDATA[Dell]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[OS X Lion]]></category>
		<category><![CDATA[3115cn]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[printer]]></category>

		<guid isPermaLink="false">http://www.cpierce.org/?p=185</guid>
		<description><![CDATA[Many people have contacted me about a 3115cn printer driver for OS X Lion. Unfortunately Dell hasn&#8217;t released a driver for it, and the old installer packet required Rosetta even in Snow Leopard. On a developer box I installed the driver and then created an install for the 3115cn to work on OSX Lion. I [...]]]></description>
			<content:encoded><![CDATA[<p>Many people have contacted me about a 3115cn printer driver for OS X Lion.  Unfortunately Dell hasn&#8217;t released a driver for it, and the old installer packet required Rosetta even in Snow Leopard.  On a developer box I installed the driver and then created an install for the 3115cn to work on OSX Lion.  I hope I have everything included, but please let me know if you are having trouble with the installer package.  </p>
<p><a href="http://cpierce.org/downloads/lion_3115cn.pkg">Download Now!</a></p>
<p>**UPDATE &#8211; Youtube Video showing install of printer ***<br />
<iframe width="420" height="315" src="http://www.youtube.com/embed/G5edubdhfHQ" frameborder="0" allowfullscreen></iframe></p>
<p>**UPDATE &#8211; this is a new driver and now works with Lion Fresh install verses upgrade!  (should work with either now)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpierce.org/2011/09/dell-3115cn-on-osx-lion-fresh-install/feed/</wfw:commentRss>
		<slash:comments>59</slash:comments>
		</item>
		<item>
		<title>Getting Dell 5100cn to work with OS X Lion</title>
		<link>http://www.cpierce.org/2011/07/getting-dell-5100cn-to-work-with-os-x-lion/</link>
		<comments>http://www.cpierce.org/2011/07/getting-dell-5100cn-to-work-with-os-x-lion/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 14:14:27 +0000</pubDate>
		<dc:creator>cpierce</dc:creator>
				<category><![CDATA[Dell]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[OS X Lion]]></category>
		<category><![CDATA[5100cn]]></category>
		<category><![CDATA[lion]]></category>

		<guid isPermaLink="false">http://www.cpierce.org/?p=168</guid>
		<description><![CDATA[OS X 10.7 Lion is finally here and works quit well with few exceptions. I don&#8217;t like the natural scrolling but that might before another post. With the discontinued support of Rosetta my Dell 5100cn OSX driver fails to load. This was always an issue in Snow Leopard as well because I really hated installing [...]]]></description>
			<content:encoded><![CDATA[<p>OS X 10.7 Lion is finally here and works quit well with few exceptions.  I don&#8217;t like the natural scrolling but that might before another post.  With the discontinued support of Rosetta my Dell 5100cn OSX driver fails to load.  This was always an issue in Snow Leopard as well because I really hated installing Rosetta just for a printer to be installed.  Lion doesn&#8217;t even give that option and I hate thinking I&#8217;d have to get rid of a printer just because of a hardware release. </p>
<p>Update:<br />
Use the following packaged by Jeff (Thanks Jeff)<br />
<a href="/downloads/lion_5100cn.pkg">5100 Installer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cpierce.org/2011/07/getting-dell-5100cn-to-work-with-os-x-lion/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<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. Here is what [...]]]></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>cpierce</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Centos Linux]]></category>
		<category><![CDATA[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 source site and [...]]]></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 default" 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; <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; <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; <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; <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; <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 default" 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>=<span style="color: #000000;">2</span> <span style="color: #660033;">--dns-timeout</span>=<span style="color: #000000;">5</span> <span style="color: #660033;">--connect-timeout</span>=<span style="color: #000000;">5</span> <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 default" 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 /></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><span style="color: #cc66cc;">10000</span><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></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 default" 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; <span style="color: #000000;">15</span> &nbsp;<span style="color: #000000;">0</span>-<span style="color: #000000;">23</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">4</span> &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>cpierce</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[OS X Leopard]]></category>
		<category><![CDATA[OS X Lion]]></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 2007 for the [...]]]></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 default" 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>

