<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mick F</title>
    <description>The latest articles on DEV Community by Mick F (@dirtyhenry).</description>
    <link>https://dev.to/dirtyhenry</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3158551%2F4ad9e644-cde1-4a2a-9adf-8eb300c59bb2.png</url>
      <title>DEV Community: Mick F</title>
      <link>https://dev.to/dirtyhenry</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dirtyhenry"/>
    <language>en</language>
    <item>
      <title>Command line instructions to uncheck “Select the previous input source” on macOS</title>
      <dc:creator>Mick F</dc:creator>
      <pubDate>Sun, 18 May 2025 19:48:57 +0000</pubDate>
      <link>https://dev.to/dirtyhenry/command-line-instructions-to-uncheck-select-the-previous-input-source-on-macos-254g</link>
      <guid>https://dev.to/dirtyhenry/command-line-instructions-to-uncheck-select-the-previous-input-source-on-macos-254g</guid>
      <description>&lt;p&gt;Still on the subject of post macOS clean reinstall tips, if control + space stops doing what it is supposed to do — such as autocompletion suggestions on Visual Studio Code —, it is probably caused by macOS global shortcut. &lt;/p&gt;

&lt;p&gt;Check if Settings &amp;gt; Keyboard &amp;gt; Keyboard Shortcuts… &amp;gt; Input Sources and see if “Select the previous input source” and “Select next source in input menu” are checked. If so run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;defaults write com.apple.symbolichotkeys.plist AppleSymbolicHotKeys &lt;span class="nt"&gt;-dict-add&lt;/span&gt; 60 &lt;span class="s2"&gt;"&amp;lt;dict&amp;gt;&amp;lt;key&amp;gt;enabled&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&amp;lt;/dict&amp;gt;"&lt;/span&gt;
defaults write com.apple.symbolichotkeys.plist AppleSymbolicHotKeys &lt;span class="nt"&gt;-dict-add&lt;/span&gt; 61 &lt;span class="s2"&gt;"&amp;lt;dict&amp;gt;&amp;lt;key&amp;gt;enabled&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&amp;lt;/dict&amp;gt;"&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will do the same as unchecking boxes, and will require a reboot to be accounted for, but it probably belongs to your own reinstall script.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Installing/maintaining Ruby on macOS with a script</title>
      <dc:creator>Mick F</dc:creator>
      <pubDate>Thu, 15 May 2025 21:49:18 +0000</pubDate>
      <link>https://dev.to/dirtyhenry/installingmaintaining-ruby-on-macos-with-a-script-28a1</link>
      <guid>https://dev.to/dirtyhenry/installingmaintaining-ruby-on-macos-with-a-script-28a1</guid>
      <description>&lt;p&gt;Still working on a reinstall, here is my script to setup Ruby on macOS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhill69w52pkgiajx5mmq.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhill69w52pkgiajx5mmq.gif" alt="Terminal Demo" width="688" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Prerequisite: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/rbenv/rbenv" rel="noopener noreferrer"&gt;&lt;code&gt;rbenv&lt;/code&gt;&lt;/a&gt; is installed and ready to go;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/charmbracelet/gum?tab=readme-ov-file#choose" rel="noopener noreferrer"&gt;&lt;code&gt;gum&lt;/code&gt;&lt;/a&gt; is installed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The script to pick a version of Ruby to install and actually installing it is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;picked_version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;rbenv &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; | gum choose&lt;span class="si"&gt;)&lt;/span&gt;

install_ruby&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
    rbenv &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--skip-existing&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$picked_version&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    rbenv global &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$picked_version&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

gum confirm &lt;span class="s2"&gt;"Install Ruby version &lt;/span&gt;&lt;span class="nv"&gt;$picked_version&lt;/span&gt;&lt;span class="s2"&gt;?"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; install_ruby
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>ruby</category>
      <category>programming</category>
      <category>cli</category>
      <category>installation</category>
    </item>
    <item>
      <title>Fixing canvas package install</title>
      <dc:creator>Mick F</dc:creator>
      <pubDate>Wed, 14 May 2025 12:59:03 +0000</pubDate>
      <link>https://dev.to/dirtyhenry/fixing-canvas-package-install-j4a</link>
      <guid>https://dev.to/dirtyhenry/fixing-canvas-package-install-j4a</guid>
      <description>&lt;p&gt;After a clean macOS reinstall, running a web project using the &lt;code&gt;canvas&lt;/code&gt; package (via &lt;code&gt;react-pdf&lt;/code&gt;) failed with the following error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Cannot find module &lt;span class="s1"&gt;'../build/Release/canvas.node'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Many occurrences online suggested that fixing this only required to reinstall the package but it turns out that in my case, a Python library was missing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ModuleNotFoundError: No module named 'distutils'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It turns out what fixed the error was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;setuptools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>react</category>
      <category>installation</category>
    </item>
  </channel>
</rss>
