<?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, 13 Apr 2010 11:14:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<item>
		<title>Am I connected remotely?</title>
		<link>http://schinckel.net/2010/03/30/am-i-connected-remotely/</link>
		<comments>http://schinckel.net/2010/03/30/am-i-connected-remotely/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 14:01:34 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacOS X]]></category>

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

		<guid isPermaLink="false">http://schinckel.net/2010/03/30/am-i-connected-remotely/</guid>
		<description><![CDATA[I now share my dotfiles between the various OS X machines I use daily, using Dropbox and symlinks.
However, I have many aliases and functions that need to act differently if I only have a console session at the machine in question, or a full GUI session.
With bash, this is easy to test:

export EDITOR='nano'
if [[ -z [...]]]></description>
			<content:encoded><![CDATA[<p>I now share my dotfiles between the various OS X machines I use daily, using Dropbox and symlinks.</p>
<p>However, I have many aliases and functions that need to act differently if I only have a console session at the machine in question, or a full GUI session.</p>
<p>With bash, this is easy to test:</p>
<pre>
<code>export EDITOR='nano'
if [[ -z "$SSH_CONNECTION" &amp;&amp; $OSTYPE =~ ^darwin ]]; then
export EDITOR='mate --wait'
export TEXEDIT='mate -w -l %d "%s"'
export LESSEDIT='mate -l %lm %f'
fi</code>
</pre>
<p>Now, if I am remotely connected to a machine, then I will get <code>nano</code> as my editor, but if I am sitting directly in front of it, then it will open Textmate.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/03/30/am-i-connected-remotely/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Issues with PyPI/other python.org sites</title>
		<link>http://schinckel.net/2010/03/28/issues-with-pypiother-pythonorg-sites/</link>
		<comments>http://schinckel.net/2010/03/28/issues-with-pypiother-pythonorg-sites/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 10:57:27 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[Airport Extreme]]></category>

		<guid isPermaLink="false">http://schinckel.net/2010/03/28/issues-with-pypiother-pythonorg-sites/</guid>
		<description><![CDATA[I was having some issues connecting to (although not pinging) python.org and some of the python-subdomains: notably the CheeseShop (http://pypi.python.org).
I disabled IPv6, and they all cleared up.
I don&#8217;t know if this was an issue with Internode&#8217;s IPv6 stuff, but it was being handled by my Airport Extreme. My iPhone was working fine, because it doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I was having some issues connecting to (although not pinging) python.org and some of the python-subdomains: notably the CheeseShop (http://pypi.python.org).</p>
<p>I disabled IPv6, and they all cleared up.</p>
<p>I don&#8217;t know if this was an issue with Internode&#8217;s IPv6 stuff, but it was being handled by my Airport Extreme. My iPhone was working fine, because it doesn&#8217;t use IPv6.</p>
<p>What a relief.</p>
<p>I had tried everything I could think of: from changing my DNS server, DHCP server, I even tried a reinstall of my OS (although this wasn&#8217;t why I did that - I wanted a cleanup of my dev machine).</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/03/28/issues-with-pypiother-pythonorg-sites/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Copy password button in Keychain.app</title>
		<link>http://schinckel.net/2010/02/28/copy-password-button-in-keychainapp/</link>
		<comments>http://schinckel.net/2010/02/28/copy-password-button-in-keychainapp/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 22:27:20 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
		
		<category><![CDATA[MacOS X]]></category>

		<guid isPermaLink="false">http://schinckel.net/2010/02/28/copy-password-button-in-keychainapp/</guid>
		<description><![CDATA[I don&#8217;t know if this is new or not, but I haven&#8217;t noticed it before. My normal workflow for Keychain.app and finding a forgotten password (ie, my Twitter one to put into a new app) is to open the password entry, and copy the value.
Today, I noticed a Copy button at the bottom of the [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know if this is new or not, but I haven&#8217;t noticed it before. My normal workflow for Keychain.app and finding a forgotten password (ie, my Twitter one to put into a new app) is to open the password entry, and copy the value.</p>
<p>Today, I noticed a Copy button at the bottom of the window:</p>
<p><a href="http://schinckel.net/images/Keychain%20Access.png"><img src="http://schinckel.net/images/Keychain%20Access.png" alt="Keychain Access" /></a></p>
<p>This still requires you to enter your keychain password to authorise the copy, but saves a step or two.</p>
]]></content:encoded>
			<wfw:commentRss>http://schinckel.net/2010/02/28/copy-password-button-in-keychainapp/feed/</wfw:commentRss>
		</item>
		<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>
	</channel>
</rss>
