<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Adam Parrott's Plexus Blog</title>
    <link>http://www.plexusweb.com/staff/adam/blog</link>
    <pubDate>Thu, 03 Jul 2008 06:54:55 GMT</pubDate>
    <description>Adam Parrott's Plexus Blog</description>
    <item>
      <title>How to Remove External Rails Plugins from your Application</title>
      <link>http://www.plexusweb.com/staff/adam/blog/post/187/How-to-Remove-External-Rails-Plugins-from-your-Application</link>
      <description>&lt;p&gt;There isn't a single command in subversion to remove external plugins from your application so I figured I would post this to help the next person save 10 minutes of reading docs.&lt;/p&gt;

&lt;p&gt;Make sure you are in the root of your app and do:
&lt;br /&gt;
&lt;strong&gt;svn propedit svn:externals vendor/plugins&lt;/strong&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Just delete the line(s) of the plugins you no longer want.&lt;/p&gt;
&lt;p&gt;If you get the following error then you need to set your environment variable. &lt;br /&gt;
&lt;strong&gt;svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no 'editor-cmd' run-time configuration option was found&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt; You can set your SVN_EDITOR to use TextMate like so:
&lt;br /&gt;
&lt;strong&gt;export SVN_EDITOR='mate -w'&lt;/strong&gt;
&lt;/p&gt;</description>
      <pubDate>Thu, 24 Jan 2008 21:30:26 GMT</pubDate>
      <guid>http://www.plexusweb.com/staff/adam/blog/post/187/How-to-Remove-External-Rails-Plugins-from-your-Application</guid>
      <author>Adam Parrott</author>
    </item>
    <item>
      <title>My Christmas Wishlist</title>
      <link>http://www.plexusweb.com/staff/adam/blog/post/177/My-Christmas-Wishlist</link>
      <description>&lt;p&gt;
	With Christmas around the corner I have started looking at all the things I don't need but really, really want. A couple of months ago I bought an HD TV and armed it with an &lt;a href="http://www.tivo.com/whatistivo/tivohd/hdfeatures.html"&gt;HD TiVo&lt;/a&gt;. I promised myself (and my wife) that I would stop there but secretly knew that a regular SD DVD player was an embarrassing item to have in my entertainment center. In my search for more HD goodness, I started looking at &lt;a href="http://en.wikipedia.org/wiki/HD_DVD"&gt;HD DVD&lt;/a&gt; players and &lt;a href="http://en.wikipedia.org/wiki/Blu-ray_Disc"&gt;Blu-Ray&lt;/a&gt; players. I have always hated the idea of using a format created by Sony because of the cost to the consumer (ie, &lt;a href="http://www.amazon.com/PlayStation-2-Memory-Card-8MB/dp/B00004YRQA/ref=pd_bbs_sr_2?ie=UTF8&amp;s=videogames&amp;qid=1197572205&amp;sr=1-2"&gt;PlayStation Memory Cards&lt;/a&gt;) so my searching was more &lt;a href="http://en.wikipedia.org/wiki/HD_DVD"&gt;HD DVD&lt;/a&gt; oriented. Today I found the one feature that beats &lt;a href="http://en.wikipedia.org/wiki/Blu-ray_Disc"&gt;Blu-Ray&lt;/a&gt; one million times to one. 
&lt;/p&gt;

&lt;p&gt;
	&lt;img src="http://ecx.images-amazon.com/images/I/51E9eu6EU9L._SS400_.jpg" alt="Season One Star Trek Original Series HD DVD" /&gt;
&lt;/p&gt;

&lt;p&gt;
	That's right. &lt;a href="http://www.amazon.com/gp/product/B000VDDDY6/ref=pe_20890_7387590_as_img_3/"&gt;Season One of the Original Star Trek in HD&lt;/a&gt;. Only available in &lt;a href="http://en.wikipedia.org/wiki/HD_DVD"&gt;HD DVD&lt;/a&gt; format. What more could you possibly need to convince you that &lt;a href="http://en.wikipedia.org/wiki/HD_DVD"&gt;HD DVD&lt;/a&gt; is the format to have?
&lt;/p&gt;</description>
      <pubDate>Thu, 13 Dec 2007 18:57:43 GMT</pubDate>
      <guid>http://www.plexusweb.com/staff/adam/blog/post/177/My-Christmas-Wishlist</guid>
      <author>Adam Parrott</author>
    </item>
    <item>
      <title>Mac OSX Open Terminals from Location in Finder</title>
      <link>http://www.plexusweb.com/staff/adam/blog/post/161/Mac-OSX-Open-Terminals-from-Location-in-Finder</link>
      <description>When working on projects I normally have multiple terminals open in the project directory. I found it quite annoying to type cd /path/to/project in every terminal so I wrote this script that can be used in Automator to open my terminals and change to the directory for me. 

&lt;div style="padding: 10px; background-color: #000; color: #FFF; width: 95%; margin-bottom: 10px;"&gt;
&lt;p style="padding-bottom: 0;"&gt;
on run {input, parameters}&lt;br /&gt;
&amp;nbsp;set topleft to {5, 25}&lt;br /&gt;
&amp;nbsp;set topright to {860, 25}&lt;br /&gt;
&amp;nbsp;set bottomleft to {5, 520}&lt;br /&gt;
&amp;nbsp;set bottomright to {860, 520}&lt;br /&gt;

&amp;nbsp;set locations to {topleft, topright, bottomleft, bottomright}&lt;br /&gt;

&amp;nbsp;repeat with loc in locations&lt;br /&gt;
&amp;nbsp;&amp;nbsp;tell application "Terminal"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;activate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;with timeout of 1800 seconds&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set firstpath to item 1 of input&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;do script with command "cd " &amp; (quoted form of POSIX path of firstpath)&lt;br /&gt;
			
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tell window 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set position to loc&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set number of columns to 130&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set number of rows to 32&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;end timeout&lt;br /&gt;
&amp;nbsp;&amp;nbsp;end tell&lt;br /&gt;
&amp;nbsp;end repeat&lt;br /&gt;
end run&lt;br /&gt;
&lt;/p&gt;
&lt;/div&gt;</description>
      <pubDate>Mon, 10 Sep 2007 17:33:38 GMT</pubDate>
      <guid>http://www.plexusweb.com/staff/adam/blog/post/161/Mac-OSX-Open-Terminals-from-Location-in-Finder</guid>
      <author>Adam Parrott</author>
    </item>
    <item>
      <title>Rails Caching non HTML Files in a Different Cache Location</title>
      <link>http://www.plexusweb.com/staff/adam/blog/post/142/Rails-Caching-non-HTML-Files-in-a-Different-Cache-Location</link>
      <description>&lt;p&gt;
We use page caching in Rails to speed up sites and improve performance. This is a great feature of Rails but can get cumbersome when trying to keep up with which pages to sweep and when. To make life easier we use a separate directory to house the cache. This solution is great for files that end in a .html extension but for other file types you need a new rewrite rule for mod_rewrite. The example below is for caching dynamic images. 
&lt;/p&gt;

&lt;div style="padding: 10px; background-color: #000; color: #FFF; width: 95%; margin-bottom: 10px;"&gt;
&lt;p style="padding-bottom: 0;"&gt;RewriteRule ^([^"cache"].+)\.(png)$ cache/$1.png&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;
I am rewriting any request for a .png to have the cache/ added to the beginning of the url. I am also checking to make sure the url hasn't already been rewritten otherwise Apache gets stuck in a loop rewriting the url. Depending on the application, you may need to add a slash in front of cache like so:
&lt;/p&gt;

&lt;div style="padding: 10px; background-color: #000; color: #FFF; width: 95%; margin-bottom: 10px;"&gt;
&lt;p style="padding-bottom: 0;"&gt;RewriteRule ^([^"cache"].+)\.(png)$ /cache/$1.png&lt;/p&gt;
&lt;/div&gt;</description>
      <pubDate>Wed, 09 May 2007 00:30:49 GMT</pubDate>
      <guid>http://www.plexusweb.com/staff/adam/blog/post/142/Rails-Caching-non-HTML-Files-in-a-Different-Cache-Location</guid>
      <author>Adam Parrott</author>
    </item>
    <item>
      <title>Snippets and OpenID Fun</title>
      <link>http://www.plexusweb.com/staff/adam/blog/post/129/Snippets-and-OpenID-Fun</link>
      <description>&lt;p&gt;While playing around at lunch today I stumbled across &lt;a href="http://www.parsed.org"&gt;Parsed.org&lt;/a&gt;. It is a code geek snippet repository that uses OpenID as a method of authentication for it's users. I found &lt;a href="http://www.parsed.org/tip/347/"&gt;Random Rows from SQL&lt;/a&gt; interesting since I recently did something very similar.
&lt;/p&gt;</description>
      <pubDate>Tue, 10 Apr 2007 18:38:17 GMT</pubDate>
      <guid>http://www.plexusweb.com/staff/adam/blog/post/129/Snippets-and-OpenID-Fun</guid>
      <author>Adam Parrott</author>
    </item>
    <item>
      <title>Removing Desk Clutter</title>
      <link>http://www.plexusweb.com/staff/adam/blog/post/103/Removing-Desk-Clutter</link>
      <description>&lt;p&gt;
Ever since I bought my MacBook and made the switch to OSX, I have found the Stickies app to be quite useful. Even more useful would be a web based app that I could access from anywhere. Today I have found it. Save a tree and your desk.
&lt;br /&gt;
&lt;a href="http://www.stikis.com"&gt;Stikis&lt;/a&gt;
&lt;/p&gt;</description>
      <pubDate>Fri, 15 Dec 2006 18:59:21 GMT</pubDate>
      <guid>http://www.plexusweb.com/staff/adam/blog/post/103/Removing-Desk-Clutter</guid>
      <author>Adam Parrott</author>
    </item>
    <item>
      <title>Firefox Crashes on Gmail</title>
      <link>http://www.plexusweb.com/staff/adam/blog/post/102/Firefox-Crashes-on-Gmail</link>
      <description>&lt;p&gt;
Last week I noticed that every time I tried to compose an email in Gmail, Firefox would have a hard crash. I figured it was something in the javascript and left Gmail alone for a few days since it is Beta. This week I decided to try it again and I experienced the same behavior. In an effort to debug this problem I tried Gmail in all the browsers that I had installed. I had the same crash in Camino and Opera but it worked fine in Safari. After much poking around I found that my Palatino font was corrupted. After replacing the font everything was fine. 
&lt;/p&gt;</description>
      <pubDate>Fri, 15 Dec 2006 17:11:51 GMT</pubDate>
      <guid>http://www.plexusweb.com/staff/adam/blog/post/102/Firefox-Crashes-on-Gmail</guid>
      <author>Adam Parrott</author>
    </item>
    <item>
      <title>Yes. Significant shrinkage!</title>
      <link>http://www.plexusweb.com/staff/adam/blog/post/101/Yes-Significant-shrinkage</link>
      <description>&lt;p&gt;
I decided to play around with reducing page weight today. I wrote this script to strip out new lines and whitespace. There wasn't a huge amount of difference in the individual file sizes but when you subtract 8-10k per file from the total document weight the difference is noticeable.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="/shrinker"&gt;download shrinker.rb&lt;/a&gt;
&lt;/p&gt;</description>
      <pubDate>Fri, 08 Dec 2006 19:05:38 GMT</pubDate>
      <guid>http://www.plexusweb.com/staff/adam/blog/post/101/Yes-Significant-shrinkage</guid>
      <author>Adam Parrott</author>
    </item>
    <item>
      <title>Rails Caching non HTML Files</title>
      <link>http://www.plexusweb.com/staff/adam/blog/post/94/Rails-Caching-non-HTML-Files</link>
      <description>&lt;p&gt;
Rails page caching is without a doubt the best way to speed up your application and reduce the server load. I decided to cache some XML I was dumping out for a web service and realized that Rails will cache the document as HTML. As long as the controller handles nothing but xml you can do the following as a work-around:
&lt;/p&gt;
&lt;div style="background-color: #222;color: #eee;padding: 10px;width: 95%;"&gt;
&lt;p&gt;
class LinkApiController &lt; ApplicationController
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;session :off&lt;br /&gt;
&amp;nbsp;&amp;nbsp;skip_before_filter :check_authorization&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;LinkApiController.page_cache_extension = '.xml'&lt;br /&gt;
&amp;nbsp;&amp;nbsp;caches_page :get_stuff&lt;br /&gt;&lt;br /&gt;

&amp;nbsp;&amp;nbsp;...
&lt;br /&gt;
end
&lt;/p&gt;
&lt;/div&gt;

</description>
      <pubDate>Fri, 10 Nov 2006 18:35:00 GMT</pubDate>
      <guid>http://www.plexusweb.com/staff/adam/blog/post/94/Rails-Caching-non-HTML-Files</guid>
      <author>Adam Parrott</author>
    </item>
    <item>
      <title>4 8 15 16 23 42</title>
      <link>http://www.plexusweb.com/staff/adam/blog/post/80/4-8-15-16-23-42</link>
      <description>&lt;p&gt;
01010111011001010010000001000010011101
01011010010110110001100100001000000101
01110110010101100010001000000101001101
10100101110100011001010111001110011001
&lt;/p&gt;</description>
      <pubDate>Wed, 04 Oct 2006 14:24:21 GMT</pubDate>
      <guid>http://www.plexusweb.com/staff/adam/blog/post/80/4-8-15-16-23-42</guid>
      <author>Adam Parrott</author>
    </item>
  </channel>
</rss>
