<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://www.alexdyas.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://www.alexdyas.com/" rel="alternate" type="text/html" /><updated>2026-04-04T08:53:02+00:00</updated><id>https://www.alexdyas.com/feed.xml</id><title type="html">alexdyas</title><subtitle>Being my occasional blog of technical things. A twiddler of bits, a bit of a twiddler.</subtitle><author><name>Alex Dyas</name></author><entry><title type="html">The correct way to install Python Pillow on MacOS</title><link href="https://www.alexdyas.com/technical/Python-Install-Pillow/" rel="alternate" type="text/html" title="The correct way to install Python Pillow on MacOS" /><published>2026-04-04T14:21:38+00:00</published><updated>2026-04-04T14:21:38+00:00</updated><id>https://www.alexdyas.com/technical/Python-Install-Pillow</id><content type="html" xml:base="https://www.alexdyas.com/technical/Python-Install-Pillow/"><![CDATA[<p>The one and only way to correctly and successfully install Python Pillow in MacOS:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>brew install Pillow
</code></pre></div></div>
<p>Don’t bother with <code class="language-plaintext highlighter-rouge">pip</code>, it won’t work. It looks like it’s worked, and it installs something, somewhere, but it hasn’t worked.</p>]]></content><author><name>Alex Dyas</name></author><category term="technical" /><category term="apple" /><category term="macos" /><category term="python" /><category term="pillow" /><summary type="html"><![CDATA[The one and only way to correctly and successfully install Python Pillow in MacOS: brew install Pillow Don’t bother with pip, it won’t work. It looks like it’s worked, and it installs something, somewhere, but it hasn’t worked.]]></summary></entry><entry><title type="html">Stop MacOS Spotlight indexing external drives</title><link href="https://www.alexdyas.com/technical/Stop-Spotlioght/" rel="alternate" type="text/html" title="Stop MacOS Spotlight indexing external drives" /><published>2026-03-12T17:28:38+00:00</published><updated>2026-03-12T17:28:38+00:00</updated><id>https://www.alexdyas.com/technical/Stop-Spotlioght</id><content type="html" xml:base="https://www.alexdyas.com/technical/Stop-Spotlioght/"><![CDATA[<p>Caveat emptor - Some advanced stuff here, follow at your own risk.</p>

<p>I’ve been battling with MacOS writing all sorts of crap onto external drives, and having difficulties ejecting them because some unknown process has files open on the drive.</p>

<p>This seems to be a difinitive way of getting MacOS to ignore external drives in it’s never ending quest to create as many files as possible:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>touch /Volumes/&lt;volume&gt;/.metadata_never_index
</code></pre></div></div>
<p>Once you’ve done this you may also want to delete the <code class="language-plaintext highlighter-rouge">.Spotlight-V100</code> directory from the volume.</p>]]></content><author><name>Alex Dyas</name></author><category term="technical" /><category term="apple" /><category term="macos" /><category term="finder" /><summary type="html"><![CDATA[Caveat emptor - Some advanced stuff here, follow at your own risk.]]></summary></entry><entry><title type="html">C64 .prg to d64</title><link href="https://www.alexdyas.com/technical/c64-prg-to-d64/" rel="alternate" type="text/html" title="C64 .prg to d64" /><published>2026-02-08T00:42:38+00:00</published><updated>2026-02-08T00:42:38+00:00</updated><id>https://www.alexdyas.com/technical/c64-prg-to-d64</id><content type="html" xml:base="https://www.alexdyas.com/technical/c64-prg-to-d64/"><![CDATA[<p>Adding a C64 <code class="language-plaintext highlighter-rouge">.prg</code> file to a C64 <code class="language-plaintext highlighter-rouge">.d64</code> disk image so it will be readable in an emulator:</p>

<ul>
  <li>Get the Vice C64 emulator - <a href="https://vice-emu.sourceforge.io">https://vice-emu.sourceforge.io</a></li>
  <li>Unpack the archive</li>
  <li>Locate the <code class="language-plaintext highlighter-rouge">bin/c1541</code> executable, this is a C64 disk image maintenance utility</li>
  <li>Use the following command, adjusted for your own case:
    <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./c1541 -format disk1,id d64 "somefilename.d64" -attach disk1.d64 -write somefilename.prg "Some File Name"
</code></pre></div>    </div>
  </li>
</ul>

<p>Useful link:</p>
<ul>
  <li><a href="https://vice-emu.sourceforge.io/vice_14.html">https://vice-emu.sourceforge.io/vice_14.html</a></li>
</ul>]]></content><author><name>Alex Dyas</name></author><category term="technical" /><category term="c64" /><category term="retrogaming" /><summary type="html"><![CDATA[Adding a C64 .prg file to a C64 .d64 disk image so it will be readable in an emulator:]]></summary></entry><entry><title type="html">Force Yarn to ignore SSL ceritifcate issues</title><link href="https://www.alexdyas.com/technical/yarn-ssl-untrusted/" rel="alternate" type="text/html" title="Force Yarn to ignore SSL ceritifcate issues" /><published>2026-02-07T18:06:38+00:00</published><updated>2026-02-07T18:06:38+00:00</updated><id>https://www.alexdyas.com/technical/yarn-ssl-untrusted</id><content type="html" xml:base="https://www.alexdyas.com/technical/yarn-ssl-untrusted/"><![CDATA[<p>I’m just putting this here as it wasn’t an immediately clear fix. I was building the Traefik container image from source.</p>

<p>Error:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>YN0001: │ RequestError: self-signed certificate in certificate chain
</code></pre></div></div>

<p>Fix:</p>

<p>In <code class="language-plaintext highlighter-rouge">~/.yarnrc.yaml</code> or equivaqlent:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>enableStrictSsl: false
</code></pre></div></div>

<p>Caveat - Be aware that this will prevent errors/warnings about unsafe TLS certificates, blah blah. If you’re already at this point you take full responsibility for what you’re doing.</p>]]></content><author><name>Alex Dyas</name></author><category term="technical" /><category term="linux" /><category term="ssl" /><category term="yarn" /><category term="traefik" /><category term="kubernetes" /><summary type="html"><![CDATA[I’m just putting this here as it wasn’t an immediately clear fix. I was building the Traefik container image from source.]]></summary></entry><entry><title type="html">Copy last command in shell history to clipboard</title><link href="https://www.alexdyas.com/technical/Last-command-copy/" rel="alternate" type="text/html" title="Copy last command in shell history to clipboard" /><published>2026-01-07T20:00:38+00:00</published><updated>2026-01-07T20:00:38+00:00</updated><id>https://www.alexdyas.com/technical/Last-command-copy</id><content type="html" xml:base="https://www.alexdyas.com/technical/Last-command-copy/"><![CDATA[<p>More command line clipboard functionality. This shell function copies the last line in your shell history to the clipboard.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Copy last command from shell history into clipboard
function cl() {
    fc -ln | tail -1 | tr --delete "\n" | xclip -selection clipboard
}
</code></pre></div></div>]]></content><author><name>Alex Dyas</name></author><category term="technical" /><category term="linux" /><category term="zsh" /><category term="bash" /><summary type="html"><![CDATA[More command line clipboard functionality. This shell function copies the last line in your shell history to the clipboard. # Copy last command from shell history into clipboard function cl() { fc -ln | tail -1 | tr --delete "\n" | xclip -selection clipboard }]]></summary></entry><entry><title type="html">Command line path copy to clipboard</title><link href="https://www.alexdyas.com/technical/Path-copy/" rel="alternate" type="text/html" title="Command line path copy to clipboard" /><published>2025-10-20T14:19:38+00:00</published><updated>2025-10-20T14:19:38+00:00</updated><id>https://www.alexdyas.com/technical/Path-copy</id><content type="html" xml:base="https://www.alexdyas.com/technical/Path-copy/"><![CDATA[<p>Two functions to be included in your <code class="language-plaintext highlighter-rouge">.zshrc</code> to copy the current path to the clipboard. These use <code class="language-plaintext highlighter-rouge">xlcip</code>, I’m sure there are alternatives or other tools for your setup.
pwcc - Copy current path to clipboard:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>function pwdcc() {
    pwd | tr -d "\n" | xclip -selection clipboard
}
</code></pre></div></div>
<p>filecc - Copy the full path of <file> to the clipboard:</file></p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>function filecc() {
    if [ -z $1 ] || [ ! -f $1 ]
    then
        echo Give me a file you dummy
        return 1
    fi
    readlink -f $1 | tr -d "\n" | xclip -selection clipboard
}
</code></pre></div></div>
<p>These should easily be convertable to other shells.</p>]]></content><author><name>Alex Dyas</name></author><category term="technical" /><category term="linux" /><category term="zsh" /><summary type="html"><![CDATA[Two functions to be included in your .zshrc to copy the current path to the clipboard. These use xlcip, I’m sure there are alternatives or other tools for your setup. pwcc - Copy current path to clipboard: function pwdcc() { pwd | tr -d "\n" | xclip -selection clipboard } filecc - Copy the full path of to the clipboard: function filecc() { if [ -z $1 ] || [ ! -f $1 ] then echo Give me a file you dummy return 1 fi readlink -f $1 | tr -d "\n" | xclip -selection clipboard } These should easily be convertable to other shells.]]></summary></entry><entry><title type="html">One imagePullBackoff reason amongst many</title><link href="https://www.alexdyas.com/technical/kubernetes-imagepullbackoff/" rel="alternate" type="text/html" title="One imagePullBackoff reason amongst many" /><published>2025-06-15T16:19:38+00:00</published><updated>2025-06-15T16:19:38+00:00</updated><id>https://www.alexdyas.com/technical/kubernetes-imagepullbackoff</id><content type="html" xml:base="https://www.alexdyas.com/technical/kubernetes-imagepullbackoff/"><![CDATA[<p>I stumbled across a new to me reason for the irritating imagePullBackoff error in Kubernetes. Amongst the many well documented reasons this can happen, bad credentials, wrong path to container image etc, you should also check for wrong secret type.</p>

<p>A properly constructed secret for container registry authentication looks like this:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>apiVersion: v1
kind: Secret
metadata:
  name: mygreatapp-registry-credentials
  namespace: mygreatapp
data:
  .dockerconfigjson: UmVhbGx5IHJlYWxseSByZWVlZWVlZWVlZWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGx5eXl5eXl5eXl5eXl5eXl5eXl5eSBsbGxsbGxsbGxsbGxsbG9vb29vb29vb29vb29vb29vb29vb29vb29vb25ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubmdnZ2dnZ2dnZ2dnZ2dnZ2dnZ2cgYXV0aCBrZXlzCg==
type: kubernetes.io/dockerconfigjson
</code></pre></div></div>
<p>Note the secret type. If you forget to define the correct type Kubernetes will not use the secret as authentication for the image pull.</p>]]></content><author><name>Alex Dyas</name></author><category term="technical" /><category term="kubernetes" /><summary type="html"><![CDATA[I stumbled across a new to me reason for the irritating imagePullBackoff error in Kubernetes. Amongst the many well documented reasons this can happen, bad credentials, wrong path to container image etc, you should also check for wrong secret type.]]></summary></entry><entry><title type="html">vim - Remove carriage returns on save</title><link href="https://www.alexdyas.com/technical/vim-remove-cr-on-save/" rel="alternate" type="text/html" title="vim - Remove carriage returns on save" /><published>2025-05-15T13:23:38+00:00</published><updated>2025-05-15T13:23:38+00:00</updated><id>https://www.alexdyas.com/technical/vim-remove-cr-on-save</id><content type="html" xml:base="https://www.alexdyas.com/technical/vim-remove-cr-on-save/"><![CDATA[<p>I’ve been copying and pasting a lot from Windows sessions into vim recently, and often I get carriage returns copied with the text. I save all my files in vim in ‘Linux’ mode, ie just the line feed.</p>

<p>This small function will strip all carriage return characters out of the file on save:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>" Remove any carriage return (^M) characters that may have crept in
" Inspiration - https://stackoverflow.com/q/7495932/4046442
function TrimCarriageReturns()
  let l:save = winsaveview()
  keeppatterns %s/\r\+$//e
  call winrestview(l:save)
endfun
autocmd BufWritePre * call TrimCarriageReturns()
</code></pre></div></div>
<p>Just add it to your <code class="language-plaintext highlighter-rouge">.vimrc</code>.</p>]]></content><author><name>Alex Dyas</name></author><category term="technical" /><category term="vim" /><summary type="html"><![CDATA[I’ve been copying and pasting a lot from Windows sessions into vim recently, and often I get carriage returns copied with the text. I save all my files in vim in ‘Linux’ mode, ie just the line feed.]]></summary></entry><entry><title type="html">k9s Plugins load failed! error, one solution</title><link href="https://www.alexdyas.com/technical/k9s-plugins-load-failed/" rel="alternate" type="text/html" title="k9s Plugins load failed! error, one solution" /><published>2025-04-22T15:07:38+00:00</published><updated>2025-04-22T15:07:38+00:00</updated><id>https://www.alexdyas.com/technical/k9s-plugins-load-failed</id><content type="html" xml:base="https://www.alexdyas.com/technical/k9s-plugins-load-failed/"><![CDATA[<p>The <a href="https://k9scli.io">k9s</a> cli Kubernetes front-end is indispensable.</p>

<p>I came across a weird issue with it recently, the following error at startup : “Plugins load failed!”. It turns out this message is rather misleading, at least in my case.</p>

<p>The problem was actually nothing to do with plugins, but instead stale cached information in <code class="language-plaintext highlighter-rouge">~/.local/share/k9s/clusters</code> after some changes to the remote clusters. Removing everything under this directory fixed the issue.</p>

<p>The k9s logs helped debug this. Find your log location:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>k9s info
</code></pre></div></div>]]></content><author><name>Alex Dyas</name></author><category term="technical" /><category term="k9s" /><category term="kubernetes" /><summary type="html"><![CDATA[The k9s cli Kubernetes front-end is indispensable.]]></summary></entry><entry><title type="html">vim macro to validate Jenkinsfile against remote Jenkins server</title><link href="https://www.alexdyas.com/technical/vim-macro-jenkins-validation/" rel="alternate" type="text/html" title="vim macro to validate Jenkinsfile against remote Jenkins server" /><published>2025-02-02T17:06:38+00:00</published><updated>2025-02-02T17:06:38+00:00</updated><id>https://www.alexdyas.com/technical/vim-macro-jenkins-validation</id><content type="html" xml:base="https://www.alexdyas.com/technical/vim-macro-jenkins-validation/"><![CDATA[<p>I’ve been doing a lot of Jenkins pipeline work recently. The development cycle is a bit laborious, code, git commit, re-run the pipeline in Jenkins, find out I missed off a bracket, GOTO 10.</p>

<p>I’ve been experiementing with Groovy/Jenkins pipeline linters, but they are scant and don’t seem to be that useful.</p>

<p>I found out that Jenkins itself has a couple of development related APIs, one of which will validate a Jenkinsfile and report any issues. So I wrote a vim macro to do this with the current buffer. Saves a lot of time.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>let @j = ":w ! curl --silent --insecure --request POST --user '&lt;Jenkins username&gt;:&lt;api token&gt;' --form 'jenkinsfile=&lt;-' 'https://&lt;Jenkins url&gt;/jenkins/pipeline-model-converter/validate'"
</code></pre></div></div>

<p>Typically you put this macro in your <code class="language-plaintext highlighter-rouge">.vimrc</code>.</p>

<p>Replace <code class="language-plaintext highlighter-rouge">&lt;Jenkins username&gt;</code>, <code class="language-plaintext highlighter-rouge">&lt;api token&gt;</code> and <code class="language-plaintext highlighter-rouge">&lt;Jenkins url&gt;</code> with your own values. You <em>may</em> need to remove <code class="language-plaintext highlighter-rouge">/jenkins/</code> from the URL depending on how you’re exposing the app on HTTP.</p>

<p>The Jenkinsfile is read from <code class="language-plaintext highlighter-rouge">stdin</code>, see the <code class="language-plaintext highlighter-rouge">-</code> in the <code class="language-plaintext highlighter-rouge">--form</code> parameter. You can change this to a file in the filesystem if that suits you better.</p>

<p>My Jenkins server runs on a self generated TLS cert, hence the curl <code class="language-plaintext highlighter-rouge">--insecure</code>, remove this as necessary.</p>

<p>This has been written and tested for vim running on Linux, but it <em>should</em> work with little modification under Windows/Powershell.</p>]]></content><author><name>Alex Dyas</name></author><category term="technical" /><category term="vim" /><category term="groovy" /><category term="pipeline" /><category term="jenkins" /><summary type="html"><![CDATA[I’ve been doing a lot of Jenkins pipeline work recently. The development cycle is a bit laborious, code, git commit, re-run the pipeline in Jenkins, find out I missed off a bracket, GOTO 10.]]></summary></entry></feed>