<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Cowell Computer Consulting</title>
    <link>http://www.lukecowell.com</link>
    <language>en</language>
    <webMaster>luke@talesa.net (Luke Cowell)</webMaster>
    <copyright>Copyright 2007-2012</copyright>
    <ttl>60</ttl>
    <pubDate>Fri, 30 Sep 2011 05:15:00 GMT</pubDate>
    <description></description>
    <item>
      <title>New Blog</title>
      <link>http://www.lukecowell.com/archives/2011/9/30/new_blog/</link>
      <pubDate>Fri, 30 Sep 2011 05:14:00 GMT</pubDate>
      <guid>http://www.lukecowell.com/archives/2011/9/30/new_blog/</guid>
      <author>luke@talesa.net (Luke Cowell)</author>
      <description>&lt;p&gt;I've moved my blog to &lt;a href=&quot;http://blog.lukecowell.com&quot;&gt;http://blog.lukecowell.com&lt;/a&gt; because this blog software is getting old and difficult to maintain.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to fix failing time machine backups due to a corrupt disk image</title>
      <link>http://www.lukecowell.com/archives/2010/4/2/how_to_fix_failing_time/</link>
      <pubDate>Fri, 02 Apr 2010 10:05:00 GMT</pubDate>
      <guid>http://www.lukecowell.com/archives/2010/4/2/how_to_fix_failing_time/</guid>
      <author>luke@talesa.net (Luke Cowell)</author>
      <description>&lt;p&gt;I do time machine backups through a USB disk attached to my Airport Extreme unit. Over time the disk image that I'm backing up to seems to become corrupt. Time Machine requires that if you're backing up to a disk image that it was unmounted cleanly or it pass a fsck before it will mount the image and use if for a backup.&lt;/p&gt;

&lt;p&gt;The simplest solution is to start backing up to a new disk image, but this doesn't give you the same access to all your previous backups.&lt;/p&gt;

&lt;p&gt;Here are the steps I took to fix the disk image, so I can continue backing up to the same image.&lt;/p&gt;

&lt;p&gt;Mount the disk image in read write and do not mount the volume&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;hdiutil attach -noautofsck -nomount -readwrite location_of_your_image.sparsebundle
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When you mount, fsck might be called on the image, but you want to kill that process.&lt;/p&gt;

&lt;p&gt;Get the info about your attached disk image here:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;hdiutil info
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Call this fsck command and put your device number in place of the one I have here.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;fsck_hfs -rfy /dev/disk1s2
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;-r means to rebuild that catalog btree (more options can be found in the fsck_hfs man page.&lt;/p&gt;

&lt;p&gt;You may need to run this a couple of times before the image is marked as clean.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Static Pages in Rails</title>
      <link>http://www.lukecowell.com/archives/2010/2/11/static_pages_in_rails/</link>
      <pubDate>Thu, 11 Feb 2010 02:22:00 GMT</pubDate>
      <guid>http://www.lukecowell.com/archives/2010/2/11/static_pages_in_rails/</guid>
      <author>luke@talesa.net (Luke Cowell)</author>
      <description>&lt;p&gt;I just read an &lt;a href=&quot;http://www.mendable.com/quick-and-easy-static-pages-in-rails/&quot;&gt;interesting post&lt;/a&gt; on how to handle static pages in rails and I had a different approach that I wanted to share. There's lots of different ways to do this and each method has its own merit.&lt;/p&gt;

&lt;p&gt;When I say static page, I mean any page that doesn't fit into your other controllers. This might be an about us or a contact page or anything else that might not require a dedicated controller to handle.&lt;/p&gt;

&lt;p&gt;In routes.rb, I would set something like this up:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;map.static '/static/:id', :controller =&amp;gt; &quot;static&quot;, :action =&amp;gt; &quot;show&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We can grab the name of the page from params[:id] in the controller. Feel free to change the name 'id' some something else if it gives you that wrong feeling to treat something as an id that isn't really an id.&lt;/p&gt;

&lt;p&gt;Next, I define a controller called static.&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;
class StaticController &lt; ApplicationController
  def show
     short_name = params[:id]
     begin
       render short_name
     rescue ActionView::MissingPageTemplate
       render :file =&gt; &quot;#{RAILS_ROOT}/public/404.html&quot;, :status =&gt; 404
     end
   end
end
&lt;/code&gt;
&lt;/pre&gt;

&lt;p&gt;So, what's happening here? We know we have an params[:id] or the route wouldn't match.  We then call a begin block, so that we can rescue the exception. Which, in our case, is if someone passes an invalid filename through or the page hasn't yet been defined under app/views/static/pagename.html.erb. We just handle it as a 404.&lt;/p&gt;

&lt;p&gt;What about if we want our static pages to live in a namespace without /static at the beginning ? ie. /about instead of /static/about&lt;/p&gt;

&lt;p&gt;Define a regular expression that matches all the pages you want to support.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;STATIC_PAGES = %w(about contact fun_facts)
STATIC_REGEXP = %r{#{STATIC_PAGES.join(&quot;|&quot;)}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then, in your routes file use the requirements parameter to match only these pages.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;map.static ':id', :controller =&amp;gt; &quot;static&quot;, :action =&amp;gt; &quot;show&quot;, :requirements =&amp;gt; {:id =&amp;gt; STATIC_REGEXP}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is just another approach and there are lots of ways to do this. I was inspired by Yehuda Katz to write this as he recently wrote a &lt;a href=&quot;http://yehudakatz.com/2010/02/09/the-blind-men-and-the-elephant-a-story-of-noobs/&quot;&gt;post&lt;/a&gt; about giving back to the community. Also, be sure to check out his &lt;a href=&quot;http://www.engineyard.com/blog/2009/rails-and-merb-merge-the-anniversary-part-1-of-6/&quot;&gt;posts&lt;/a&gt; about rails 3.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix for inDesign CS3 crashes</title>
      <link>http://www.lukecowell.com/archives/2009/10/1/fix_for_indesign_cs3_crashes/</link>
      <pubDate>Thu, 01 Oct 2009 05:17:00 GMT</pubDate>
      <guid>http://www.lukecowell.com/archives/2009/10/1/fix_for_indesign_cs3_crashes/</guid>
      <author>luke@talesa.net (Luke Cowell)</author>
      <description>&lt;p&gt;If inDesign is crashing when you quit it, launch it, when you activate fonts or at any other time, you should consider removing or replacing the following file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$HOME/Library/Preferences/Adobe\ InDesign/Version\ 5.0/InDesign\ Defaults
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It appears to contain font information among other things. You care about this because if you were to have activated a corrupt font, or a font with a duplicate postscript name, your problems may continue even after you resolve the font issue because that font will still be cached in here.&lt;/p&gt;

&lt;p&gt;eg.&lt;/p&gt;

&lt;pre&gt;
...
@Semibold
@MyriadPro-Semibold
@Myriad Pro Semibold
@Semibold
@Myriad Pro Semibold
8@Version 2.007;PS 002.000;Core 1.0.38;makeotf.lib1.7.9032
@Semibold Italic
@MyriadPro-SemiboldIt
@Myriad Pro Semibold Italic
@Semibold Italic
...
&lt;/pre&gt;</description>
    </item>
    <item>
      <title>iPhone recovery mode vs. DFU mode</title>
      <link>http://www.lukecowell.com/archives/2009/9/26/iphone_recovery_mode_vs_dfu/</link>
      <pubDate>Fri, 25 Sep 2009 23:46:00 GMT</pubDate>
      <guid>http://www.lukecowell.com/archives/2009/9/26/iphone_recovery_mode_vs_dfu/</guid>
      <author>luke@talesa.net (Luke Cowell)</author>
      <description>&lt;p&gt;DFU mode and recovery mode are different. Here's how to get tot either one.&lt;/p&gt;

&lt;p&gt;To put your phone in DFU mode:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Turn your iPhone off&lt;/li&gt;
&lt;li&gt;press and hold the home and sleep/wake button for 10 seconds&lt;/li&gt;
&lt;li&gt;release the sleep wake button and hold the home button for 10 more seconds&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To put your phone in recovery mode follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Disconnect the USB cable from the iPhone&lt;/li&gt;
&lt;li&gt;Turn your iPhone off&lt;/li&gt;
&lt;li&gt;Press and hold the home button while connecting the USB cable to your device.&lt;/li&gt;
&lt;li&gt;iTunes should now display a message to indicate you are in recovery mode&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Installing rmagick on OS X</title>
      <link>http://www.lukecowell.com/archives/2009/6/1/installing_rmagick_on_os_x/</link>
      <pubDate>Mon, 01 Jun 2009 14:59:00 GMT</pubDate>
      <guid>http://www.lukecowell.com/archives/2009/6/1/installing_rmagick_on_os_x/</guid>
      <author>luke@talesa.net (Luke Cowell)</author>
      <description>&lt;p&gt;For some reason the gem tries to build against a PPC library, which on my intel machine, doesn't not work. &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo su -
ARCHFLAGS='-arch i386' gem install rmagick
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note: you might need to fix the quotes.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Linotype FontExplorer Settings via command line</title>
      <link>http://www.lukecowell.com/archives/2009/5/25/linotype_settings/</link>
      <pubDate>Mon, 25 May 2009 13:31:00 GMT</pubDate>
      <guid>http://www.lukecowell.com/archives/2009/5/25/linotype_settings/</guid>
      <author>luke@talesa.net (Luke Cowell)</author>
      <description>&lt;p&gt;&lt;br&gt;&lt;/p&gt;

&lt;h3&gt;Finding setting keys for Linotype Font Explorer&lt;/h3&gt;

&lt;p&gt;There's lots more and they're easy to figure out.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;defaults read com.linotype.FontExplorerX &amp;gt; a
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now make your setting change in Font Explorer - it works best to quit at this point.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;defaults read com.linotype.FontExplorerX &amp;gt; a
diff a b
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The output of the diff will tell you what keys changed.&lt;/p&gt;

&lt;p&gt;This output from diff:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;fontRequestsAutoActivate = 1;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Becomes:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;defaults write com.linotype.FontExplorerX fontRequestsAutoActivate 1
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;A list of keys I've found useful&lt;/h3&gt;

&lt;p&gt;Here are a list of linotype keys that I've found useful in configuring workstations settings. &lt;/p&gt;

&lt;p&gt;If a font from a different path with the same name is imported, remove the old one and re-add&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;defaults write com.linotype.FontExplorerX sameFont_importingAdjustments 1
defaults write com.linotype.FontExplorerX sameFont_useGlobalImportingAdjustments 1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Remove and re-add a font if imported from the same path&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;defaults write com.linotype.FontExplorerX samePath_importingAdjustments
defaults write com.linotype.FontExplorerX samePath_useGlobalImportingAdjustments
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When a duplicate font is requested deactivate the current font and activate the requested font without warning&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;defaults write com.linotype.FontExplorerX hideActivationWarning  1
defaults write com.linotype.FontExplorerX hideActivationWarningOption  1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When activating a font activate the entire suitcase&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;defaults write com.linotype.FontExplorerX alwaysActivateSuitcase 1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Deactivate Fonts when linotype quits&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;defaults write com.linotype.FontExplorerX deactivateFontsFromSessionOnQuit 1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Autoactivate fonts when possible&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;defaults write com.linotype.FontExplorerX fontRequestsAutoActivate 1
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Contributing to the Community</title>
      <link>http://www.lukecowell.com/archives/2009/4/23/contributing_to_the_community/</link>
      <pubDate>Thu, 23 Apr 2009 16:13:00 GMT</pubDate>
      <guid>http://www.lukecowell.com/archives/2009/4/23/contributing_to_the_community/</guid>
      <author>luke@talesa.net (Luke Cowell)</author>
      <description>&lt;p&gt;I'm proud to announce I made my first real contribution to the ruby / ROR community. I added a current quiz feature to the ruby quiz site and added an RSS feed to the site for all quizzes and solutions.&lt;/p&gt;

&lt;p&gt;Announcement
&lt;a href=&quot;http://www.ruby-forum.com/topic/183984#809279&quot;&gt;http://www.ruby-forum.com/topic/183984#809279&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ruby Quiz RSS Feed:
&lt;a href=&quot;http://rubyquiz.strd6.com/quizzes.rss&quot;&gt;http://rubyquiz.strd6.com/quizzes.rs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ruby Quiz Site:
&lt;a href=&quot;http://rubyquiz.strd6.com/&quot;&gt;http://rubyquiz.strd6.com/&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Lie</title>
      <link>http://www.lukecowell.com/archives/2009/4/16/the_lie/</link>
      <pubDate>Thu, 16 Apr 2009 15:23:00 GMT</pubDate>
      <guid>http://www.lukecowell.com/archives/2009/4/16/the_lie/</guid>
      <author>luke@talesa.net (Luke Cowell)</author>
      <description>&lt;p&gt;Fixtures Suck:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://techno-weenie.net/2009/2/9/the-lie&quot;&gt;http://techno-weenie.net/2009/2/9/the-lie&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Machinist Doesn't:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/notahat/machinist/tree/master&quot;&gt;http://github.com/notahat/machinist/tree/master&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Blueprint CSS</title>
      <link>http://www.lukecowell.com/archives/2009/4/16/blueprint_css/</link>
      <pubDate>Thu, 16 Apr 2009 15:14:00 GMT</pubDate>
      <guid>http://www.lukecowell.com/archives/2009/4/16/blueprint_css/</guid>
      <author>luke@talesa.net (Luke Cowell)</author>
      <description>&lt;p&gt;Blueprint &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; does a bunch of different things, but this is what really interests me: &amp;#8220;A &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; reset that eliminates the discrepancies across browsers.&amp;#8221;&lt;/p&gt;
&lt;p&gt;This means that many of those annoying quirks (ie your layout is broken in Firefox or more likely IE) may be a thing of the past.&lt;/p&gt;
&lt;p&gt;Hooray!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.blueprintcss.org&quot;&gt;http://www.blueprintcss.org&lt;/a&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>

