<?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"
	>

<channel>
	<title>Paint the Tiger, Carve the Swan &#187; Apple</title>
	<atom:link href="http://schinckel.net/category/hardware/apple/feed/" rel="self" type="application/rss+xml" />
	<link>http://schinckel.net</link>
	<description>Like a fortune cookie, only without the fortune, and not a cookie.</description>
	<pubDate>Tue, 09 Feb 2010 06:20:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<item>
		<title>View man pages in Preview</title>
		<link>http://schinckel.net/2009/12/23/view-man-pages-in-preview/</link>
		<comments>http://schinckel.net/2009/12/23/view-man-pages-in-preview/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 13:46:01 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacOS X]]></category>

		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://schinckel.net/2009/12/23/view-man-pages-in-preview/</guid>
		<description><![CDATA[It&#8217;s not a new concept, but here is my take on it:

function man {
    # We can get the actual path to the man command here, so we can override
    # it with our function name.
    MAN=`which man`
    # Change these two if [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not a new concept, but here is my take on it:</p>
<div class="highlight">
<pre><span class="k">function </span>man <span class="o">{</span>
    <span class="c"># We can get the actual path to the man command here, so we can override</span>
    <span class="c"># it with our function name.</span>
    <span class="nv">MAN</span><span class="o">=</span><span class="sb">`</span>which man<span class="sb">`</span>
    <span class="c"># Change these two if you are not on OS X.</span>
    <span class="nv">CACHE_DIR</span><span class="o">=</span><span class="s2">&quot;${HOME}/Library/Caches/manpages&quot;</span>
    <span class="nv">OPEN</span><span class="o">=</span><span class="s2">&quot;open&quot;</span>

    <span class="c"># If we don&#39;t have any arguments, use the nice man error message</span>
    <span class="k">if</span> <span class="o">[</span> ! <span class="nv">$1</span> <span class="o">]</span>; <span class="k">then</span>
        <span class="nv">$MAN</span>
        <span class="k">return</span>
<span class="k">    fi</span>

    <span class="c"># If we have an argument that clashes with what we are wanting to be</span>
    <span class="c"># able to do, pass the whole command through.</span>
    <span class="k">for </span>ARG in <span class="nv">$*</span>; <span class="k">do</span>
<span class="k">        case</span> <span class="nv">$ARG</span> in
            -<span class="o">[</span>dfkKwtWP<span class="o">])</span>
                <span class="nv">$MAN</span> <span class="nv">$*</span>
                <span class="k">return</span>;;
        <span class="k">esac</span>
<span class="k">    done</span>

    <span class="c"># Make sure our cache directory exists.</span>
    mkdir -p <span class="nv">$CACHE_DIR</span>
    <span class="c"># Get the man page(s) that match our query.</span>
    <span class="nv">MAN_FILES</span><span class="o">=</span><span class="sb">`</span><span class="nv">$MAN</span> -w <span class="nv">$*</span><span class="sb">`</span>
    <span class="k">for </span>MAN_FILE in <span class="nv">$MAN_FILES</span>; <span class="k">do</span>
        <span class="c"># Get the name of the man file, and the section.</span>
        <span class="nv">MAN_PAGE</span><span class="o">=</span><span class="sb">`</span>basename <span class="s2">&quot;$MAN_FILE&quot;</span> | cut -d <span class="se">\.</span> -f 1-2 | sed <span class="s1">&#39;s/\./(/&#39;</span> | sed <span class="s1">&#39;s/$/)/&#39;</span><span class="sb">`</span>
        <span class="c"># Our PDF will be in this location</span>
        <span class="nv">PDF_FILE</span><span class="o">=</span><span class="s2">&quot;${CACHE_DIR}/${MAN_PAGE}&quot;</span>

        <span class="c"># If we actually have a man file that matches</span>
        <span class="k">if</span> <span class="o">[</span> -n <span class="s2">&quot;$MAN_FILE&quot;</span> <span class="o">]</span>; <span class="k">then</span>
            <span class="c"># See if the man file is newer than our cached PDF, and if it is,</span>
            <span class="c"># then generate a new PDF. This works even if $PDF_FILE does not</span>
            <span class="c"># exist.</span>
            <span class="k">if</span> <span class="o">[</span> <span class="nv">$MAN_FILE</span> -nt <span class="nv">$PDF_FILE</span> <span class="o">]</span>; <span class="k">then</span>
                <span class="nv">$MAN</span> -t <span class="nv">$*</span> | pstopdf -i -o <span class="s2">&quot;$PDF_FILE&quot;</span>
            <span class="k">fi</span>
            <span class="c"># Then display the file.</span>
            <span class="nv">$OPEN</span> <span class="s2">&quot;$PDF_FILE&quot;</span>
        <span class="k">fi</span>
<span class="k">    done</span>
<span class="o">}</span>
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2009/12/23/view-man-pages-in-preview/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Safari 4 Busy Icon</title>
		<link>http://schinckel.net/2009/02/26/safari-4-busy-icon/</link>
		<comments>http://schinckel.net/2009/02/26/safari-4-busy-icon/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 03:09:56 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Safari]]></category>

		<category><![CDATA[BugReport]]></category>

		<guid isPermaLink="false">http://schinckel.net/2009/02/26/safari-4-busy-icon/</guid>
		<description><![CDATA[The active tab looks wrong.
Inactive tabs not so much.

]]></description>
			<content:encoded><![CDATA[<p>The active tab looks wrong.</p>
<p>Inactive tabs not so much.</p>
<p><img src="http://schinckel.net/blog/wp-content/uploads/2009/02/safari-loading-icon.png" width="99" height="115" alt="Safari_Loading_icon.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2009/02/26/safari-4-busy-icon/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tab completion and ssh/open -a</title>
		<link>http://schinckel.net/2009/01/08/tab-completion-and-sshopen-a/</link>
		<comments>http://schinckel.net/2009/01/08/tab-completion-and-sshopen-a/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 00:38:31 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacOS X]]></category>

		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://schinckel.net/2009/01/08/tab-completion-and-sshopen-a/</guid>
		<description><![CDATA[I use the Terminal just as much as the Finder, and have tab-completion turned on in bash. To make it better, you can set it so that it will complete differently depending upon what you have already typed in.
The first one of these tips will autocomplete from the ~/.ssh/known_hosts file, so that when you type [...]]]></description>
			<content:encoded><![CDATA[<p>I use the Terminal just as much as the Finder, and have tab-completion turned on in bash. To make it better, you can set it so that it will complete differently depending upon what you have already typed in.</p>
<p>The first one of these tips will autocomplete from the ~/.ssh/known_hosts file, so that when you type in:</p>
<p><code>$ ssh ma[tab]</code></p>
<pre style="text-align:left;color:#000000; background-color:#d5fcd8; border:solid black 1px; padding:0.5em 1em 0.5em 1em; overflow:auto;font-size:small; font-family:monospace;">
<span style="color:#440088;">complete</span> -W <span style="color:#760f15;">"$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "</span>\[<span style="color:#760f15;">"`;)"</span> <span style="color:#880088;">ssh</span>
</pre>
<p>it will autocomplete the servers you ssh to that start with "ma".</p>
<p>The next one is more complicated - it allows you to complete from all available applications when typing:</p>
<p><code>$ open -a [tab]</code></p>
<p>Code:</p>
<pre style="text-align:left;color:#000000; background-color:#d5fcd8; border:solid black 1px; padding:0.5em 1em 0.5em 1em; overflow:auto;font-size:small; font-family:monospace;">
<span style="color:#440088;">complete</span> -W <span style="color:#760f15;">"$(/bin/lsregister -dump | /usr/bin/sed -E -n -e '/\/Applications/{s/^.+ ((\/Applications|\/Developer).+\.app)$/\1/p;}' | \/usr/bin/sed 's/ /\\ /g' | \/usr/bin/sed -e s/\'/\\\\\'/g | /usr/bin/xargs /usr/bin/basename -s '.app' | /usr/bin/sed 's/ /\\\\\\ /g')"</span> open -a
</pre>
<p>These can be added to one of your bash startup files: mine live in <code>~/.bashrc</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2009/01/08/tab-completion-and-sshopen-a/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Battery&#8230;</title>
		<link>http://schinckel.net/2008/12/12/battery/</link>
		<comments>http://schinckel.net/2008/12/12/battery/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 07:12:59 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[MacBook Pro]]></category>

		<guid isPermaLink="false">http://schinckel.net/2008/12/12/battery/</guid>
		<description><![CDATA[Dear Apple,
Please send me the battery that you said you would. I&#8217;m not really liking when I see this:


That&#8217;s not much fun at all.
Regards,
Matt.
]]></description>
			<content:encoded><![CDATA[<p>Dear Apple,</p>
<p>Please send me the battery that you said you would. I&#8217;m not really liking when I see this:</p>
<p>
<img src="http://schinckel.net/blog/wp-content/uploads/2008/12/battery.png" width="276" height="426" alt="battery.png" /></p>
<p>That&#8217;s not much fun at all.</p>
<p>Regards,</p>
<p>Matt.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2008/12/12/battery/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mac OS X Internals: A Note on Automounting MacFUSE File Systems</title>
		<link>http://schinckel.net/2008/12/11/mac-os-x-internals-a-note-on-automounting-macfuse-file-systems/</link>
		<comments>http://schinckel.net/2008/12/11/mac-os-x-internals-a-note-on-automounting-macfuse-file-systems/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 12:50:42 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacOS X]]></category>

		<category><![CDATA[FUSE]]></category>

		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://schinckel.net/2008/12/11/mac-os-x-internals-a-note-on-automounting-macfuse-file-systems/</guid>
		<description><![CDATA[A Note on Automounting MacFUSE File Systems

Mac OS X, like many other Unix-like operating systems, includes the “autofs” file system layer that make automatic on-demand mounting of remote resources possible. See the man page for automount(8) for more details.
[From Mac OS X Internals: The Blog » Blog Archive » A Note on Automounting MacFUSE File [...]]]></description>
			<content:encoded><![CDATA[<p>A Note on Automounting MacFUSE File Systems</p>
<blockquote cite="http://www.osxbook.com/blog/2008/12/11/a-note-on-automounting-macfuse-file-systems/">
<p>Mac OS X, like many other Unix-like operating systems, includes the “autofs” file system layer that make automatic on-demand mounting of remote resources possible. See the man page for automount(8) for more details.</p>
<p>[From <a href="http://www.osxbook.com/blog/2008/12/11/a-note-on-automounting-macfuse-file-systems/"><cite>Mac OS X Internals: The Blog » Blog Archive » A Note on Automounting MacFUSE File Systems</cite></a>]</p>
</blockquote>
<p>Awesome. This might replace the need for ExpanDrive. And be even more automatic.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2008/12/11/mac-os-x-internals-a-note-on-automounting-macfuse-file-systems/feed/</wfw:commentRss>
		</item>
		<item>
		<title>NSSegmentedControl selecting NSTabView</title>
		<link>http://schinckel.net/2008/11/28/nssegmentedcontrol-selecting-nstabview/</link>
		<comments>http://schinckel.net/2008/11/28/nssegmentedcontrol-selecting-nstabview/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 06:00:13 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacOS X]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Cocoa]]></category>

		<guid isPermaLink="false">http://schinckel.net/2008/11/28/nssegmentedcontrol-selecting-nstabview/</guid>
		<description><![CDATA[I discovered, quite by accident the other day, that it is possible to use an NSSegmentedControl to control which Tab of an NSTabView is displayed. Here is how to do it.
First of all, it is much easier to change the selected tab if you leave the tabs on to begin with. So, I would suggest [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered, quite by accident the other day, that it is possible to use an NSSegmentedControl to control which Tab of an NSTabView is displayed. Here is how to do it.</p>
<p>First of all, it is much easier to change the selected tab if you leave the tabs on to begin with. So, I would suggest building all of the NSTabView&#8217;s tabs first. I&#8217;ve done five, each with a different control.</p>
<p><img src="http://schinckel.net/blog/wp-content/uploads/2008/11/view1.png" width="240" height="191" alt="View1.png" /> <img src="http://schinckel.net/blog/wp-content/uploads/2008/11/view2.png" width="240" height="191" alt="View2.png" /></p>
<p>Now, you can alter the NSTabView so it doesn&#8217;t show the Tabs:</p>
<p><img src="http://schinckel.net/blog/wp-content/uploads/2008/11/view1tabless.png" width="240" height="191" alt="View1Tabless.png" /> <img src="http://schinckel.net/blog/wp-content/uploads/2008/11/tabviewinspector.png" width="287" height="188" alt="TabViewInspector.png" /></p>
<p>You can now add the NSSegmentedControl, and style it as you wish. I really like the Small Square styling.</p>
<p><img src="http://schinckel.net/blog/wp-content/uploads/2008/11/smallsquarenstabview.png" width="480" height="411" alt="SmallSquareNSTabView.png" /></p>
<p>Now to hook up the connection. There is an outlet on NSTabView called takeSelectedTabViewFromSender:, which can be hooked up to an NSSegmentedControl.</p>
<p><img src="http://schinckel.net/blog/wp-content/uploads/2008/11/connection.png" width="271" height="26" alt="Connection.png" /></p>
<p>You will need to ensure that your initially selected cell and view are the same index, which prohibits having it save the value between runs (or you might be able to, if you know more than me).</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2008/11/28/nssegmentedcontrol-selecting-nstabview/feed/</wfw:commentRss>
		</item>
		<item>
		<title>1Password Licenses</title>
		<link>http://schinckel.net/2008/11/27/1password-licenses/</link>
		<comments>http://schinckel.net/2008/11/27/1password-licenses/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 00:52:15 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacOS X]]></category>

		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://schinckel.net/2008/11/27/1password-licenses/</guid>
		<description><![CDATA[I have a couple of licenses for 1Password to give away. Leave a comment with your name and email if you are interested.
Mac only!
Update: all have been given away. Got quite a few responses in Whirlpool, before my thread was shut down.
]]></description>
			<content:encoded><![CDATA[<p>I have a couple of licenses for 1Password to give away. Leave a comment with your name and email if you are interested.</p>
<p>Mac only!</p>
<p>Update: all have been given away. Got quite a few responses in Whirlpool, before my thread was shut down.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2008/11/27/1password-licenses/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iSync Menu</title>
		<link>http://schinckel.net/2008/11/19/isync-menu/</link>
		<comments>http://schinckel.net/2008/11/19/isync-menu/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 08:56:44 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacOS X]]></category>

		<category><![CDATA[BugReport]]></category>

		<guid isPermaLink="false">http://schinckel.net/2008/11/19/isync-menu/</guid>
		<description><![CDATA[
This stupid menu keeps appearing. I&#8217;ve turned it off several times, but it reappears.
Doesn&#8217;t seem to be every time I reboot.
rdar://6384278
]]></description>
			<content:encoded><![CDATA[<p><img src="http://schinckel.net/blog/wp-content/uploads/2008/11/isyncmenu.png" width="303" height="135" alt="iSyncMenu.png" /></p>
<p>This stupid menu keeps appearing. I&#8217;ve turned it off several times, but it reappears.</p>
<p>Doesn&#8217;t seem to be <em>every</em> time I reboot.</p>
<p><a href="rdar://6384278">rdar://6384278</a></p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2008/11/19/isync-menu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Battery Performance</title>
		<link>http://schinckel.net/2008/11/03/battery-performance/</link>
		<comments>http://schinckel.net/2008/11/03/battery-performance/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 06:35:04 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacBook Pro]]></category>

		<guid isPermaLink="false">http://schinckel.net/2008/11/03/battery-performance/</guid>
		<description><![CDATA[My (replacement) battery capacity dropped today from 95% to below 75%.
I&#8217;m going to do the whole recalibration thing to see if that fixes it. I had noticed it was seeming to have a shorter battery life than before again, actually.
]]></description>
			<content:encoded><![CDATA[<p>My (replacement) battery capacity dropped today from 95% to below 75%.</p>
<p>I&#8217;m going to do the whole recalibration thing to see if that fixes it. I had noticed it was seeming to have a shorter battery life than before again, actually.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2008/11/03/battery-performance/feed/</wfw:commentRss>
		</item>
		<item>
		<title>First sign of MacBook Pro Graphics Failure?</title>
		<link>http://schinckel.net/2008/10/29/first-sign-of-macbook-pro-graphics-failure/</link>
		<comments>http://schinckel.net/2008/10/29/first-sign-of-macbook-pro-graphics-failure/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 04:19:46 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacBook Pro]]></category>

		<guid isPermaLink="false">http://schinckel.net/2008/10/29/first-sign-of-macbook-pro-graphics-failure/</guid>
		<description><![CDATA[Now that I&#8217;ve got my laptop back, and it&#8217;s all working fine, it occurred to me that for some time (maybe forever?) I had been getting a 0°C temperature reading when trying to see the temperature of the graphics related sensors.
I fired up TemperatureMonitor, and sure enough, it&#8217;s now got values in there.
I suspect this [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve got my laptop back, and it&#8217;s all working fine, it occurred to me that for some time (maybe forever?) I had been getting a 0°C temperature reading when trying to see the temperature of the graphics related sensors.</p>
<p>I fired up TemperatureMonitor, and sure enough, it&#8217;s now got values in there.</p>
<p>I suspect this is the first sign that the graphics chip is on it&#8217;s way out.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2008/10/29/first-sign-of-macbook-pro-graphics-failure/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
