<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>apple | Hugo Ferreira</title>
    <link>https://hugo.ferreira.cc/tags/apple/</link>
    <description>Recent content in Apple by Hugo Ferreira</description>
    
    <image>
      
      <title>apple | Hugo Ferreira</title>
      <url>https://hugo.ferreira.cc/hf-bw.jpg</url>
      <link>https://hugo.ferreira.cc/tags/apple/</link>
      
    </image>
    <generator>Hugo</generator>
    <language>en-GB</language>
    
    <copyright>2000–2024 by Hugo Ferreira · CC BY 4.0</copyright>
    
    <lastBuildDate>Tue, 09 Jul 2013 07:07:28 +0000</lastBuildDate>
    <atom:link href="https://hugo.ferreira.cc/tags/apple/index.xml" rel="self" type="application/rss+xml" />
    <item>
      
      <title>🔗 The apps that get featured on the iOS App Store</title>
      <link>https://hugo.ferreira.cc/the-apps-that-get-featured-on-the-ios-app-store/</link>
      
      <pubDate>Tue, 09 Jul 2013 07:07:28 +0000</pubDate>
      <guid>https://hugo.ferreira.cc/the-apps-that-get-featured-on-the-ios-app-store/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://daveaddey.com/appstore/&#34;&gt;The apps that get featured on the iOS App
Store&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Over the past few months, I&amp;rsquo;ve been researching the kinds of apps that
get featured on the iTunes App Store home page for different countries
around the world. Here are my initial findings.&lt;/p&gt;
&lt;/blockquote&gt;</description>

      
      
      <content:encoded><![CDATA[<p><a href="http://daveaddey.com/appstore/">The apps that get featured on the iOS App
Store</a></p>
<blockquote>
<p>Over the past few months, I&rsquo;ve been researching the kinds of apps that
get featured on the iTunes App Store home page for different countries
around the world. Here are my initial findings.</p>
</blockquote>
]]></content:encoded>
    </item>
    <item>
      
      <title>🏞 (image)</title>
      <link>https://hugo.ferreira.cc/technology-giants-at-war-another-game-of-thrones/</link>
      
      <pubDate>Tue, 04 Dec 2012 07:07:28 +0000</pubDate>
      <guid>https://hugo.ferreira.cc/technology-giants-at-war-another-game-of-thrones/</guid>
      <description>&lt;figure&gt;
&lt;a
href=&#34;https://hugo.ferreira.cc/technology-giants-at-war-another-game-of-thrones/attachment/601/&#34;
rel=&#34;attachment&#34;&gt;&lt;img
src=&#34;tumblr_mei80cCeQN1qz82meo1_1280-150x150.png&#34;
width=&#34;150&#34; height=&#34;150&#34; /&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;&lt;a href=&#34;http://www.economist.com/news/21567361-google-apple-facebook-and-amazon-are-each-others-throats-all-sorts-ways-another-game&#34;&gt;Technology giants at war: Another game of thrones  |  The
Economist&lt;/a&gt;
(via &lt;a href=&#34;http://the.taoofmac.com/space/blog/2012/12/01/2220#charted-territory&#34;&gt;Charted Territory &amp;ndash; Tao of
Mac&lt;/a&gt;
)&lt;/p&gt;</description>

      
      
      <content:encoded><![CDATA[<figure>
<a
href="https://hugo.ferreira.cc/technology-giants-at-war-another-game-of-thrones/attachment/601/"
rel="attachment"><img
src="tumblr_mei80cCeQN1qz82meo1_1280-150x150.png"
width="150" height="150" /></a></figure>
<p><a href="http://www.economist.com/news/21567361-google-apple-facebook-and-amazon-are-each-others-throats-all-sorts-ways-another-game">Technology giants at war: Another game of thrones  |  The
Economist</a>
(via <a href="http://the.taoofmac.com/space/blog/2012/12/01/2220#charted-territory">Charted Territory &ndash; Tao of
Mac</a>
)</p>
]]></content:encoded>
    </item>
    <item>
      
      <title>🔗 What retail is hired to do: Apple vs. IKEA  |  asymco</title>
      <link>https://hugo.ferreira.cc/what-retail-is-hired-to-do-apple-vs-ikea/</link>
      
      <pubDate>Tue, 04 Dec 2012 07:07:28 +0000</pubDate>
      <guid>https://hugo.ferreira.cc/what-retail-is-hired-to-do-apple-vs-ikea/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.asymco.com/2012/05/04/measuring-retail-disruption-apple-vs-ikea/&#34;&gt;What retail is hired to do: Apple vs. IKEA  |
asymco&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;However, there is one major thing they have in common: a clear formula
for positioning your retail operations. Both operations are positioned
around a &lt;strong&gt;job-to-be-done&lt;/strong&gt; that has a high priority in people&amp;rsquo;s life.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Apple offers a place where people can discover and get answers about
technology without the pressure of making a purchase. The job is to
simplify that which is complex for a price premium.&lt;/p&gt;</description>

      
      
      <content:encoded><![CDATA[<p><a href="http://www.asymco.com/2012/05/04/measuring-retail-disruption-apple-vs-ikea/">What retail is hired to do: Apple vs. IKEA  |
asymco</a></p>
<blockquote>
<p>However, there is one major thing they have in common: a clear formula
for positioning your retail operations. Both operations are positioned
around a <strong>job-to-be-done</strong> that has a high priority in people&rsquo;s life.</p>
</blockquote>
<blockquote>
<p>Apple offers a place where people can discover and get answers about
technology without the pressure of making a purchase. The job is to
simplify that which is complex for a price premium.</p>
</blockquote>
<blockquote>
<p>IKEA offers a place where people can get exactly what they need
exactly when they need it. The only downside is that &ldquo;some assembly is
required&rdquo;. In a way, their job is to introduce some complexity in
exchange for convenience and a discount.</p>
</blockquote>
]]></content:encoded>
    </item>
    <item>
      
      <title>🏞 (image)</title>
      <link>https://hugo.ferreira.cc/via-chart-apples-astonishing-profit-in-context/</link>
      
      <pubDate>Tue, 27 Nov 2012 07:07:28 +0000</pubDate>
      <guid>https://hugo.ferreira.cc/via-chart-apples-astonishing-profit-in-context/</guid>
      <description>&lt;figure&gt;
&lt;a
href=&#34;https://hugo.ferreira.cc/via-chart-apples-astonishing-profit-in-context/attachment/607/&#34;
rel=&#34;attachment&#34;&gt;&lt;img
src=&#34;tumblr_me5656AhQU1qz82meo1_100.jpg&#34;
width=&#34;100&#34; height=&#34;71&#34; /&gt;&lt;/a&gt;&lt;/figure&gt;
&lt;p&gt;(via &lt;a href=&#34;http://www.statista.com/topics/847/apple/chart/735/apple-s-astonishing-profit-in-context/&#34;&gt;Chart: Apple&amp;rsquo;s Astonishing Profit in Context  |
Statista&lt;/a&gt;
)&lt;/p&gt;
&lt;p&gt;Wow!&lt;/p&gt;</description>

      
      
      <content:encoded><![CDATA[<figure>
<a
href="https://hugo.ferreira.cc/via-chart-apples-astonishing-profit-in-context/attachment/607/"
rel="attachment"><img
src="tumblr_me5656AhQU1qz82meo1_100.jpg"
width="100" height="71" /></a></figure>
<p>(via <a href="http://www.statista.com/topics/847/apple/chart/735/apple-s-astonishing-profit-in-context/">Chart: Apple&rsquo;s Astonishing Profit in Context  |
Statista</a>
)</p>
<p>Wow!</p>
]]></content:encoded>
    </item>
    <item>
      
      <title>🔗 Dozens of iPhone, iPad Prototypes Shown in New Apple v. Samsung Filing -- AllThingsD</title>
      <link>https://hugo.ferreira.cc/dozens-of-iphone-ipad-prototypes-shown-in-new/</link>
      
      <pubDate>Wed, 01 Aug 2012 07:07:28 +0000</pubDate>
      <guid>https://hugo.ferreira.cc/dozens-of-iphone-ipad-prototypes-shown-in-new/</guid>
      <description>&lt;h2 id=&#34;dozens-of-iphone-ipad-prototypes-shown-in-new-apple-v-samsung-filing&#34;&gt;[Dozens of iPhone, iPad Prototypes Shown in New Apple v. Samsung Filing&lt;/h2&gt;
&lt;p&gt;AllThingsD](&lt;a href=&#34;http://allthingsd.com/20120729/court-case-offers-rare-glimpse-at-dozen-of-iphone-and-ipad-prototype-designs/&#34;&gt;http://allthingsd.com/20120729/court-case-offers-rare-glimpse-at-dozen-of-iphone-and-ipad-prototype-designs/&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Gallery with dozens of images from the Apple vs. Samsung court case
filings.&lt;/p&gt;</description>

      
      
      <content:encoded><![CDATA[<h2 id="dozens-of-iphone-ipad-prototypes-shown-in-new-apple-v-samsung-filing">[Dozens of iPhone, iPad Prototypes Shown in New Apple v. Samsung Filing</h2>
<p>AllThingsD](<a href="http://allthingsd.com/20120729/court-case-offers-rare-glimpse-at-dozen-of-iphone-and-ipad-prototype-designs/">http://allthingsd.com/20120729/court-case-offers-rare-glimpse-at-dozen-of-iphone-and-ipad-prototype-designs/</a>)</p>
<p>Gallery with dozens of images from the Apple vs. Samsung court case
filings.</p>
]]></content:encoded>
    </item>
    <item>
      
      <title>📜 Simplicity is not the absence of clutter, that&#39;s a consequence of</title>
      <link>https://hugo.ferreira.cc/simplicity-is-not-the-absence-of-clutter-thats-a/</link>
      
      <pubDate>Mon, 25 Jun 2012 07:07:28 +0000</pubDate>
      <guid>https://hugo.ferreira.cc/simplicity-is-not-the-absence-of-clutter-thats-a/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Simplicity is not the absence of clutter, that&amp;rsquo;s a consequence of
simplicity. Simplicity is somehow essentially describing the purpose
and place of an object and product. The absence of clutter is just a
clutter-free product. That&amp;rsquo;s not simple.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&#34;http://www.telegraph.co.uk/technology/apple/9283706/Jonathan-Ive-interview-simplicity-isnt-simple.html&#34;&gt;Jonathan Ive interview: simplicity isn&amp;rsquo;t simple &amp;ndash;
Telegraph&lt;/a&gt;&lt;/p&gt;</description>

      
      
      <content:encoded><![CDATA[<blockquote>
<p>Simplicity is not the absence of clutter, that&rsquo;s a consequence of
simplicity. Simplicity is somehow essentially describing the purpose
and place of an object and product. The absence of clutter is just a
clutter-free product. That&rsquo;s not simple.</p>
</blockquote>
<p><a href="http://www.telegraph.co.uk/technology/apple/9283706/Jonathan-Ive-interview-simplicity-isnt-simple.html">Jonathan Ive interview: simplicity isn&rsquo;t simple &ndash;
Telegraph</a></p>
]]></content:encoded>
    </item>
    <item>
      
      <title>🔗 How to Become a Content Marketing Hero by Emulating Apple and Subway  |  Entreproducer</title>
      <link>https://hugo.ferreira.cc/how-to-become-a-content-marketing-hero-by/</link>
      
      <pubDate>Wed, 13 Jun 2012 07:07:28 +0000</pubDate>
      <guid>https://hugo.ferreira.cc/how-to-become-a-content-marketing-hero-by/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://entreproducer.com/content-marketing-hero/&#34;&gt;How to Become a Content Marketing Hero by Emulating Apple and Subway  |
Entreproducer&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;About the &lt;a href=&#34;http://en.wikipedia.org/wiki/Monomyth&#34;&gt;monomyth&lt;/a&gt; and heroic
content format of marketing.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&#34;http://en.m.wikipedia.org/wiki/Joseph_Campbell&#34;&gt;Joseph Campbell&lt;/a&gt; &amp;rsquo;s
&lt;strong&gt;monomyth&lt;/strong&gt; , or the &lt;strong&gt;hero&amp;rsquo;s journey&lt;/strong&gt; , is a basic pattern that its
proponents argue is found in many narratives from around the world.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A hero ventures forth from the world of common day into a region of
supernatural wonder: fabulous forces are there encountered and a
decisive victory is won: the hero comes back from this mysterious
adventure with the power to bestow boons on his fellow man.&lt;/p&gt;</description>

      
      
      <content:encoded><![CDATA[<p><a href="http://entreproducer.com/content-marketing-hero/">How to Become a Content Marketing Hero by Emulating Apple and Subway  |
Entreproducer</a></p>
<p>About the <a href="http://en.wikipedia.org/wiki/Monomyth">monomyth</a> and heroic
content format of marketing.</p>
<blockquote>
<p><a href="http://en.m.wikipedia.org/wiki/Joseph_Campbell">Joseph Campbell</a> &rsquo;s
<strong>monomyth</strong> , or the <strong>hero&rsquo;s journey</strong> , is a basic pattern that its
proponents argue is found in many narratives from around the world.</p>
<blockquote>
<p>A hero ventures forth from the world of common day into a region of
supernatural wonder: fabulous forces are there encountered and a
decisive victory is won: the hero comes back from this mysterious
adventure with the power to bestow boons on his fellow man.</p>
</blockquote>
<p><a href="http://en.wikipedia.org/wiki/Monomyth"><img loading="lazy" src="http://upload.wikimedia.org/wikipedia/commons/1/1b/Heroesjourney.svg"></a></p>
</blockquote>
]]></content:encoded>
    </item>
    <item>
      
      <title>🔗 8 Best Practices for Deploying a Top-Ranked Mobile App</title>
      <link>https://hugo.ferreira.cc/8-best-practices-for-deploying-a-top-ranked-mobile/</link>
      
      <pubDate>Wed, 24 Aug 2011 07:07:28 +0000</pubDate>
      <guid>https://hugo.ferreira.cc/8-best-practices-for-deploying-a-top-ranked-mobile/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://mashable.com/2011/08/23/mobile-app-ranking-tips/?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed:%20Mashable%20(Mashable)&#34;&gt;8 Best Practices for Deploying a Top-Ranked Mobile
App&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Developing a mobile app is the easy part. Getting that app noticed is
difficult. And getting the app to go viral is like winning the
lottery. Yet many developers get millions of downloads time after
time. How?&lt;/p&gt;
&lt;/blockquote&gt;</description>

      
      
      <content:encoded><![CDATA[<p><a href="http://mashable.com/2011/08/23/mobile-app-ranking-tips/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:%20Mashable%20(Mashable)">8 Best Practices for Deploying a Top-Ranked Mobile
App</a></p>
<blockquote>
<p>Developing a mobile app is the easy part. Getting that app noticed is
difficult. And getting the app to go viral is like winning the
lottery. Yet many developers get millions of downloads time after
time. How?</p>
</blockquote>
]]></content:encoded>
    </item>
    <item>
      
      <title>✂️ Apple</title>
      <link>https://hugo.ferreira.cc/apple/</link>
      
      <pubDate>Tue, 01 Jan 2008 12:07:52 +0000</pubDate>
      <guid>https://hugo.ferreira.cc/apple/</guid>
      <description>Small information nuggets and recipies about Apple OS’s</description>

      
      
      <content:encoded><![CDATA[<p><em>(most recent on top)</em></p>
<h2 id="list-all-registered-url-schemes">List all registered url schemes</h2>
<ul>
<li><a href="https://apple.stackexchange.com/a/397188">applications - What are all of the URI Schemes Available on macOS - Ask Different</a></li>
</ul>
<pre tabindex="0"><code>/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump URLSchemeBinding
</code></pre><p>or, to make it more readily available:</p>
<pre tabindex="0"><code>alias lsregister=&#39;/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister&#39;
lsregister -dump URLSchemeBinding
</code></pre><h2 id="access-unicode-characters-for-keyboard-symbols">Access unicode characters for keyboard symbols</h2>
<ul>
<li>
<p><a href="https://apple.stackexchange.com/a/293486">keyboard - Where can I find the unicode symbols for Mac functional keys? (Command, Shift, etc.) - Ask Different</a></p>
<blockquote>
<p>You can click the ⚙️ or (•••) button &gt; <strong>Customize List</strong> and enable additional unicode characters groups, including <strong>Code Tables &gt; Unicode</strong> which will show the full unicode table grouped by categories.</p>
<p>The ⌘ ⇪⌥ ⏎ symbols are grouped under the <strong>Symbols &gt; Technical Symbols</strong> category which you can enable for quick access</p>
</blockquote>
</li>
<li>
<p>Interesting categories to enable:</p>
<ul>
<li>Symbols &gt; Musical Symbols</li>
<li>Symbols &gt; Signs and Standard Symbols</li>
<li>Symbols &gt; Technical Symbol</li>
</ul>
</li>
</ul>
<h2 id="link-to-notes">Link to Notes</h2>
<div class="notice tip" >
    <p class="notice-title">
        <span class="icon-notice baseline">
            <svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 -960 960 960" width="20"><path d="m429-336 238-237-51-51-187 186-85-84-51 51 136 135Zm51 240q-79 0-149-30t-122.5-82.5Q156-261 126-331T96-480q0-80 30-149.5t82.5-122Q261-804 331-834t149-30q80 0 149.5 30t122 82.5Q804-699 834-629.5T864-480q0 79-30 149t-82.5 122.5Q699-156 629.5-126T480-96Z"/></svg>
        </span> Tip </p><p><strong>Apple Notes</strong> now allows crating links to notes from any text, which exposes the note url via an easy “<strong>Copy link</strong>” action:</p>
<ul>
<li><a href="https://support.apple.com/guide/notes/add-links-apde615d29c2/mac#apd01aa2d97c">Add links in Notes on Mac # Link to another note - Apple Support</a></li>
<li><a href="https://support.apple.com/guide/iphone/add-links-iph908d1558b/ios#iph311d60862">Add links in Notes on iPhone # Link to another note using custom link text - Apple Support</a></li>
</ul></div>

<ul>
<li>To find out the id of a Note use shortcut <a href="https://showcuts.app/share/view/e370c4eacc7441a18e7ec95667b2e32f">Get URL of Note</a> (via <a href="https://www.reddit.com/r/shortcuts/comments/aot272/get_url_of_note_copy_note_url_to_clipboard">iBanks3</a>)</li>
</ul>
<ol>
<li>
<p>Run shortcut <strong>Get URL of Note</strong></p>
</li>
<li>
<p>Enter node <code>Note</code> and check the <code>LNEntity</code> Supported Type to get the UUID, e.g.:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;LNEntity:</span> <span class="err">0x123456789,</span> <span class="err">identifier:</span> <span class="err">NoteEntity/applenotes:note/12345678-abcd-bcde-cdef-123456789012,</span> <span class="err">...</span>
</span></span></code></pre></div><p>➔<code>12345678-abcd-bcde-cdef-123456789012</code></p>
</li>
<li>
<p>Convert the UUID to ALL CAPS (<em>for example, using <a href="https://convertcase.net/">Convert Case</a> or the <strong>Pages</strong> app</em>):</p>
<p>➔<code>12345678-ABCD-BCDE-CDEF-123456789012</code></p>
</li>
<li>
<p>Append it to the url sheme to open Notes:</p>
<p><mark>➔<code>applenotes://showNote?identifier=12345678-ABCD-BCDE-CDEF-123456789012</code></mark></p>
</li>
</ol>
<p><em>Note</em>: Sometimes you might get the following error:</p>
<blockquote>
<p><strong>An error occurred while running Get URL of Note</strong><br>
Couldn&rsquo;t communicate with a helper application.</p>
</blockquote>
<p>I haven’t found any way around it other than trying again some other time 🤷‍♂️ — restarts haven’t helped at all.</p>
<h2 id="enable-touch-id-for-sudo">Enable Touch ID for sudo</h2>
<ul>
<li><a href="https://sixcolors.com/post/2020/11/quick-tip-enable-touch-id-for-sudo/">Quick Tip: Enable Touch ID for sudo – Six Colors</a></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nb">cd</span> /etc/pam.d/ <span class="o">&amp;&amp;</span> sudo chmod a+w sudo <span class="o">&amp;&amp;</span> vi sudo <span class="o">&amp;&amp;</span> sudo chmod a-w sudo <span class="o">&amp;&amp;</span> <span class="nb">cd</span> -
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># sudo: auth account password session</span>
</span></span><span class="line"><span class="cl">auth       sufficient     pam_tid.so        <span class="c1"># &lt;= add this line here</span>
</span></span><span class="line"><span class="cl">auth       sufficient     pam_smartcard.so
</span></span><span class="line"><span class="cl">auth       required       pam_opendirectory.so
</span></span><span class="line"><span class="cl">account    required       pam_permit.so
</span></span><span class="line"><span class="cl">password   required       pam_deny.so
</span></span><span class="line"><span class="cl">session    required       pam_permit.so
</span></span></code></pre></div><h2 id="remove-quarantine">Remove quarantine</h2>
<p><em>… “‘command’ cannot be opened because the developer cannot be verified.”</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">xattr -d com.apple.quarantine /usr/local/bin/cmd
</span></span></code></pre></div><h2 id="file-extended-attributes">File extended attributes</h2>
<p><em>… list attributes</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">ls -l -@ file
</span></span><span class="line"><span class="cl">xattr file
</span></span></code></pre></div><p><em>… show values</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">xattr -l file
</span></span><span class="line"><span class="cl">xattr -p attribute file
</span></span></code></pre></div><h2 id="add-to-sudoers-without-needing-a-restart">Add to sudoers without needing a restart</h2>
<ul>
<li><a href="https://apple.stackexchange.com/questions/76088/how-do-i-give-a-user-sudo-permissions/76096#76096">macos - How do I give a user sudo permissions? - Ask Different</a></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">su - admin
</span></span></code></pre></div><p><em>… add</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">sudo dseditgroup -o edit -a hugo -t user admin
</span></span><span class="line"><span class="cl">sudo dseditgroup -o edit -a hugo -t user wheel
</span></span></code></pre></div><p><em>… delete</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">sudo dseditgroup -o edit -d hugo -t user admin
</span></span><span class="line"><span class="cl">sudo dseditgroup -o edit -d hugo -t user wheel
</span></span></code></pre></div><h2 id="create-encrypted-zip-file">Create encrypted zip file</h2>
<ul>
<li><a href="http://www.koozie.org/blog/2014/08/creating-aes256-encrypted-zip-archive-files-mac-command-line/">Creating AES256 encrypted Zip Archive Files on a Mac from the Command Line</a></li>
<li><a href="https://security.stackexchange.com/questions/186128/what-encryption-method-is-used-by-the-zip-program-in-macos/186132#186132">macosx - What encryption method is used by the zip program in macOS? - Information Security Stack Exchange</a></li>
</ul>
<p><em>… install</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew install p7zip
</span></span></code></pre></div><p><em>… create</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">7za a -tzip -mem<span class="o">=</span>AES256 -p secrets-encrypted.zip secrets/
</span></span><span class="line"><span class="cl">7za x secrets-encrypted.zip
</span></span></code></pre></div><h2 id="view-and-change-file-flags">View and change file flags</h2>
<p><em>… invisible = <code>hidden</code>; visible = <code>nohidden</code></em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">$ touch seeme hideme
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">$ chflags hidden hideme
</span></span><span class="line"><span class="cl">$ chflags nohidden seeme
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">$ ls -lO *me  <span class="c1"># -O is an “oh” not a “zero”</span>
</span></span><span class="line"><span class="cl">-rw-r--r--  <span class="m">1</span> hugo  staff  hidden <span class="m">0</span> Mar <span class="m">12</span> 11:28 hideme
</span></span><span class="line"><span class="cl">-rw-r--r--  <span class="m">1</span> hugo  staff  -      <span class="m">0</span> Mar <span class="m">12</span> 11:28 seeme
</span></span></code></pre></div><h2 id="reset-unlocking-macbook-by-apple-watch">Reset unlocking MacBook by Apple Watch</h2>
<ul>
<li>In <strong>Messages</strong>
<ul>
<li>Preferences ➤ Accounts</li>
<li>Sign Out</li>
<li>Sign In</li>
</ul>
</li>
<li>In <strong>System Preferences</strong>
<ul>
<li>Security &amp; Privacy</li>
<li>Check “Allow your Apple Watch to unlock you Mac”</li>
</ul>
</li>
</ul>
<h2 id="why-does-it-keep-waking-from-sleep">Why does it keep waking from sleep?</h2>
<ul>
<li><a href="https://support.apple.com/en-us/HT204760">If your Mac doesn&rsquo;t sleep or wake when expected - Apple Support</a></li>
<li><a href="http://osxdaily.com/2010/07/17/why-mac-wakes-from-sleep/">Determine Why Your Mac Wakes Up From Sleep</a></li>
</ul>
<p><em>… definition of log terms</em></p>
<ul>
<li><strong>OHC</strong> (Open Host Controller) is usually USB or Firewire. OHC1 or OHC2 is almost certainly an <strong>external USB keyboard or mouse</strong></li>
<li><strong>EHC</strong> (Enhanced Host Controller) is another USB interface, but can also be <strong>wireless devices and bluetooth</strong></li>
<li><strong>USB</strong> when a USB device woke the machine up</li>
<li><strong>LID0</strong> when you open the lid the machine wakes up from sleep</li>
<li><strong>PWRB</strong> (Power Button) which is the <strong>physical power button</strong> on your Mac</li>
<li><strong>RTC</strong> (Real Time Clock Alarm) is generally from <strong>wake-on-demand services</strong>
<ul>
<li>Schedule sleep and wake via the Energy Saver control panel</li>
<li><code>launchd</code> setting</li>
<li>User applications</li>
<li>Backups</li>
<li>Other scheduled events</li>
</ul>
</li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">log show --last 1d --predicate <span class="s1">&#39;eventMessage contains &#34;Wake reason&#34;&#39;</span>
</span></span><span class="line"><span class="cl">log show --last 1d <span class="p">|</span> grep -C15 -i <span class="s2">&#34;wake reason&#34;</span>
</span></span></code></pre></div><h2 id="delete-old-time-machine-backups">Delete old Time Machine backups</h2>
<ul>
<li><a href="https://apple.stackexchange.com/questions/39287/how-can-i-manually-delete-old-backups-to-free-space-for-time-machine/55646#55646">macos - How can I manually delete old backups to free space for Time Machine? - Ask Different</a></li>
<li><a href="https://apple.stackexchange.com/a/404761">time machine - Remove unnecessary backups from TimeMachine to get space - Ask Different</a></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">tmutil listbackups
</span></span><span class="line"><span class="cl">sudo tmutil delete /Volumes/<span class="o">[</span>Disk<span class="o">]</span>/Backups.backupdb/<span class="o">[</span>Name<span class="o">]</span>/2000-00-00-000000
</span></span><span class="line"><span class="cl">sudo tmutil delete /Volumes/<span class="o">[</span>Disk<span class="o">]</span>/Backups.backupdb/<span class="o">[</span>Name<span class="o">]</span>/2000-*
</span></span></code></pre></div><h2 id="use-keychain-for-unlocking-ssh-private-key">Use Keychain for unlocking SSH private key</h2>
<ul>
<li><a href="http://apple.stackexchange.com/questions/254468/macos-sierra-doesn-t-seem-to-remember-ssh-keys-between-reboots/264974#264974">terminal - macOS Sierra doesn’t seem to remember SSH keys between reboots - Ask Different</a></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">Host *
</span></span><span class="line"><span class="cl">   AddKeysToAgent yes
</span></span><span class="line"><span class="cl">   UseKeychain yes
</span></span><span class="line"><span class="cl">   IdentityFile ~/.ssh/id_rsa
</span></span></code></pre></div><h2 id="spoof-mac-address">Spoof MAC address</h2>
<ul>
<li><a href="http://osxdaily.com/2012/03/01/change-mac-address-os-x/">Change (Spoof) a MAC Address in OS X Mountain Lion &amp; Mavericks</a></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">openssl rand -hex <span class="m">6</span> <span class="p">|</span> sed <span class="s1">&#39;s/\(..\)/\1:/g; s/.$//&#39;</span>  <span class="c1"># make</span>
</span></span><span class="line"><span class="cl">sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx  <span class="c1"># set</span>
</span></span><span class="line"><span class="cl">ifconfig en0 <span class="p">|</span>grep ether  <span class="c1"># check</span>
</span></span></code></pre></div><h2 id="consult-timestamps-on-safari-history">Consult timestamps on Safari history</h2>
<ul>
<li><a href="http://stackoverflow.com/a/34546556/1380781">sqlite - What format is the Safari History.db history_visits.visit_time in? - Stack Overflow</a></li>
<li><a href="https://apple.stackexchange.com/a/313670/66527">See website visit time in Safari history - Ask Different</a></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">$ sqlite3 ~/Library/Safari/History.db
</span></span><span class="line"><span class="cl">sqlite&gt; .headers on
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sql" data-lang="sql"><span class="line"><span class="cl"><span class="k">select</span><span class="w"> </span><span class="n">datetime</span><span class="p">(</span><span class="n">v</span><span class="p">.</span><span class="n">visit_time</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">978307200</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;unixepoch&#39;</span><span class="p">,</span><span class="w"> </span><span class="s1">&#39;localtime&#39;</span><span class="p">)</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="nb">date</span><span class="p">,</span><span class="w"> </span><span class="n">v</span><span class="p">.</span><span class="n">visit_time</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">978307200</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">epoch</span><span class="p">,</span><span class="w"> </span><span class="n">v</span><span class="p">.</span><span class="n">visit_time</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">.</span><span class="n">domain_expansion</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">.</span><span class="n">url</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">from</span><span class="w"> </span><span class="n">history_items</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="k">left</span><span class="w"> </span><span class="k">join</span><span class="w"> </span><span class="n">history_visits</span><span class="w"> </span><span class="n">v</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="n">i</span><span class="p">.</span><span class="n">id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">v</span><span class="p">.</span><span class="n">history_item</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">order</span><span class="w"> </span><span class="k">by</span><span class="w"> </span><span class="n">i</span><span class="p">.</span><span class="n">id</span><span class="w"> </span><span class="k">desc</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="k">limit</span><span class="w"> </span><span class="mi">100</span><span class="p">;</span><span class="w">
</span></span></span></code></pre></div><p>Quick one-liner to paste into the Terminal:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">sqlite3 ~/Library/Safari/History.db <span class="s2">&#34;select datetime(v.visit_time + 978307200, &#39;unixepoch&#39;, &#39;localtime&#39;) as date, v.title, i.url from history_items i left join history_visits v on i.id = v.history_item order by v.visit_time desc;&#34;</span> <span class="p">|</span> less
</span></span></code></pre></div><h2 id="homebrew-remove-formula-and-its-dependencies-if-not-in-use">Homebrew: Remove formula and its dependencies, if not in use</h2>
<ul>
<li><a href="https://github.com/Homebrew/homebrew/issues/7465#issuecomment-49252187">Add an option to <code>brew rm</code> to uninstall / remove a package, including all it&rsquo;s dependencies. · Issue #7465 · Homebrew/homebrew</a></li>
<li><a href="https://github.com/beeftornado/homebrew-rmtree">beeftornado/homebrew-rmtree - Ruby</a></li>
</ul>
<p><em>… installing command</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew tap beeftornado/rmtree <span class="o">&amp;&amp;</span> brew install brew-rmtree
</span></span></code></pre></div><p><em>… removing a formula</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew rmtree --dry-run formula
</span></span></code></pre></div><h2 id="homebrew-show-installed-formulae-and-dependencies">Homebrew: Show installed formulae and dependencies</h2>
<p><em>… top-level only</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew leaves
</span></span></code></pre></div><p><em>… all dependencies</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew deps --installed <span class="o">[</span>--tree<span class="o">]</span>
</span></span></code></pre></div><p><em>… what uses a dependency</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew uses --installed --recursive formula
</span></span></code></pre></div><h2 id="homebrew-quick-guide">Homebrew quick guide</h2>
<ul>
<li><a href="https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md#faq">homebrew/FAQ.md at master · Homebrew/homebrew · GitHub</a></li>
</ul>
<p><em>… installed things</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew list
</span></span></code></pre></div><p><em>… bumping version</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew update                       <span class="c1"># Homebrew itself</span>
</span></span><span class="line"><span class="cl">brew outdated                     <span class="c1"># Formulas</span>
</span></span><span class="line"><span class="cl">brew upgrade <span class="o">[</span><span class="nv">$FORMULA</span><span class="o">]</span>           <span class="c1"># Formulas</span>
</span></span></code></pre></div><p><em>… clearing things</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew list --versions --multiple
</span></span><span class="line"><span class="cl">brew cleanup -n                   <span class="c1"># dry run</span>
</span></span><span class="line"><span class="cl">brew cleanup <span class="o">[</span><span class="nv">$FORMULA</span><span class="o">]</span>
</span></span></code></pre></div><h2 id="homebrew-using-caskroom-sources">Homebrew: Using Caskroom sources</h2>
<ul>
<li><a href="http://caskroom.io/">Homebrew Cask</a></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">brew tap caskroom/cask
</span></span><span class="line"><span class="cl">brew cask info Caskroom/cask/rowanj-gitx
</span></span></code></pre></div><h2 id="test-and-debug-launchagents-and-launchdaemons">Test and debug LaunchAgents and LaunchDaemons</h2>
<ul>
<li><a href="http://tim.vanwerkhoven.org/post/2011/11/17/OSX-launchd-and-launchctl-issues">OSX launchd and launchctl issues - Tim&rsquo;s blag</a></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">sudo launchctl log level debug
</span></span><span class="line"><span class="cl">tail -f /var/log/system.log
</span></span><span class="line"><span class="cl">sudo launchctl log level error
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">launchctl list <span class="o">[</span>cc.ferreira.backlog.daily<span class="o">]</span>
</span></span><span class="line"><span class="cl">launchctl start cc.ferreira.backlog.daily
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">launchctl unload -w ~/Library/LaunchAgents/cc.ferreira.backlog.daily.plist 
</span></span><span class="line"><span class="cl">launchctl load -w ~/Library/LaunchAgents/cc.ferreira.backlog.daily.plist 
</span></span></code></pre></div><h2 id="resolve-host-from-ip">Resolve host from IP</h2>
<ul>
<li><em>with zeroconf / Multicast DNS / mDNS</em></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">dig +short -x 192.168.1.65 -p <span class="m">5353</span> @224.0.0.251
</span></span></code></pre></div><h2 id="disablerevoke-disk-decryption-from-a-user">Disable/revoke disk decryption from a user</h2>
<ul>
<li><em>for FileVault 2</em></li>
<li><a href="http://apple.stackexchange.com/questions/18358/disable-a-users-ability-to-unlock-a-filevault-2-volume-at-startup-login-time/53803#53803">osx - Disable a user&rsquo;s ability to unlock a FileVault 2 volume at startup/login time - Ask Different</a></li>
<li><a href="http://www.tuaw.com/2011/12/12/prevent-certain-accounts-from-unlocking-filevault-2/">Prevent certain accounts from unlocking FileVault 2 | TUAW - The Unofficial Apple Weblog</a></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">$ sudo su - testing  
</span></span><span class="line"><span class="cl">$ passwd 
</span></span><span class="line"><span class="cl">Changing password <span class="k">for</span> charlie.
</span></span><span class="line"><span class="cl">Old Password:                     <span class="c1"># [enter old password here]</span>
</span></span><span class="line"><span class="cl">New Password:                     <span class="c1"># [press enter]</span>
</span></span><span class="line"><span class="cl">Retype New Password:              <span class="c1"># [press enter]</span>
</span></span></code></pre></div><ul>
<li>System Preferences ➤ Security &amp; Privacy ➤ FileVault
<ul>
<li>Enable Users …</li>
<li>Set Password …</li>
</ul>
</li>
</ul>
<h2 id="create-user-manually-without-disk-encryption-rights">Create user manually without disk encryption rights</h2>
<ul>
<li><em>for FileVault 2</em></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">sudo dscl /Local/Default -create /Users/testing
</span></span><span class="line"><span class="cl">sudo dscl /Local/Default -create /Users/testing UserShell /bin/bash
</span></span><span class="line"><span class="cl">sudo dscl /Local/Default -create /Users/testing RealName <span class="s2">&#34;Testing&#34;</span>
</span></span><span class="line"><span class="cl">sudo dscl /Local/Default -create /Users/testing UniqueID <span class="m">503</span>
</span></span><span class="line"><span class="cl">sudo dscl /Local/Default -create /Users/testing PrimaryGroupID <span class="m">1000</span>
</span></span><span class="line"><span class="cl">sudo dscl /Local/Default -create /Users/testing NFSHomeDirectory /Users/testing
</span></span><span class="line"><span class="cl">sudo passwd testing
</span></span></code></pre></div><h2 id="check-user-definitions">Check user definitions</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">sudo dscl /Local/Default -read /Users/testing
</span></span></code></pre></div><h2 id="where-the-modem-passwords-are-stored">Where the modem passwords are stored</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">cat /Library/Preferences/SystemConfiguration/preferences.plist
</span></span></code></pre></div><h2 id="where-the-dhcp-leases-are-stored">Where the dhcp leases are stored</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">cat /var/db/dhcpd_leases
</span></span></code></pre></div><h2 id="flush-dns-cache">Flush DNS cache</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">sudo dscacheutil -flushcache
</span></span></code></pre></div><h2 id="force-spotlight-to-re-index">Force Spotlight to re-index</h2>
<ul>
<li><a href="http://support.apple.com/kb/HT2409">Spotlight: How to re-index folders or volumes</a></li>
</ul>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">sudo mdutil -E /
</span></span></code></pre></div><h2 id="remove-duplicates-in-the-open-with-menu">Remove duplicates in the &ldquo;Open With&rdquo; menu</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nb">cd</span> /System/Library/Frameworks/ApplicationServices.framework/<span class="se">\F</span>rameworks/LaunchServices.framework/Support/
</span></span><span class="line"><span class="cl">lsregister -kill -r -domain <span class="nb">local</span> -domain system -domain user
</span></span></code></pre></div><h2 id="view-resource-forks"><del>View resource forks</del></h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># DEPRECATED: ls -l path/to/file/rsrc</span>
</span></span></code></pre></div><h2 id="mysql-server">MySQL server</h2>
<p><em>… MacPorts</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">su - admin -c <span class="s2">&#34;sudo mysql.server start | stop | …&#34;</span>
</span></span></code></pre></div><p><em>… Homebrew</em></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">su - admin<span class="p">;</span> mysql.server start <span class="p">|</span> stop <span class="p">|</span> …
</span></span></code></pre></div><h2 id="iphoto-speedup">iPhoto speedup</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="nb">cd</span> Pictures/iPhoto<span class="se">\ </span>Library/
</span></span><span class="line"><span class="cl"><span class="k">for</span> db in *.db<span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">    sqlite3 <span class="nv">$db</span> <span class="s2">&#34;vacuum;&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span></code></pre></div><h2 id="stop-nmbd">Stop nmbd</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">sudo launchctl unload /System/Library/LaunchDaemons/nmbd.plist
</span></span></code></pre></div><h2 id="quit-application">Quit application</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">osascript -e <span class="s1">&#39;tell app &#34;iCal&#34; to quit&#39;</span>
</span></span></code></pre></div><h2 id="old-style-sleep-mode">“Old” style sleep mode</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">pmset -g <span class="p">|</span> grep hibernatemode
</span></span><span class="line"><span class="cl">sudo pmset -a hibernatemode <span class="m">0</span>
</span></span></code></pre></div><h2 id="eject-cd">Eject cd</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">drutil tray eject
</span></span></code></pre></div><h2 id="text-styles-and-substitutions">Text styles and substitutions</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">open ~/Library/Preferences/.GlobalPreferences.plist
</span></span><span class="line"><span class="cl"><span class="c1"># See `NSFavoriteStyles`</span>
</span></span><span class="line"><span class="cl"><span class="c1"># See `NSUserReplacementItems`</span>
</span></span></code></pre></div><h2 id="open-man-pages-in-pdf">Open man pages in PDF</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">man -t opensnoop <span class="p">|</span> open -f -a /Applications/Preview.app
</span></span></code></pre></div><h2 id="startstop-local-ftp-server">Start/Stop local FTP Server</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
</span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist
</span></span></code></pre></div>]]></content:encoded>
    </item>
  </channel>
</rss>
