Congratulations!

[Valid RSS] This is a valid RSS feed.

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: http://portal2portal.blogspot.com/feeds/posts/default?alt=rss

  1. <?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-6740338341177826314</atom:id><lastBuildDate>Thu, 28 Mar 2024 09:19:27 +0000</lastBuildDate><title>A Portal to a Portal</title><description>Geeking in technology since 1985, with IBM Development, focused upon Docker and Kubernetes on the IBM Z LinuxONE platform&#xa;&#xa;In the words of Dr Cathy Ryan, &quot;If you don&#39;t write it down, it never happened&quot;. To paraphrase one of my clients, &quot;Every day is a school day&quot;.&#xa;&#xa;I do, I learn, I share.&#xa;&#xa;The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.&#xa;&#xa;Remember, YMMV&#xa;&#xa;https://infosec.exchange/@davehay</description><link>https://portal2portal.blogspot.com/</link><managingEditor>noreply@blogger.com (Dave Hay)</managingEditor><generator>Blogger</generator><openSearch:totalResults>3135</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-6637950493433615935</guid><pubDate>Sat, 17 Feb 2024 08:29:00 +0000</pubDate><atom:updated>2024-02-17T08:29:42.076+00:00</atom:updated><title>Visual Studio Code - Wow 🙀</title><description>&lt;font size=&quot;3&quot;&gt;Why did I not know that I can merely hit &lt;/font&gt;&lt;b style=&quot;font-size: 16px;&quot;&gt;[cmd] [p]&lt;/b&gt;&lt;font size=&quot;3&quot;&gt;&amp;nbsp;to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub etc. for a file name ?&lt;/font&gt;&lt;div style=&quot;font-size: 16px;&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 16px;&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;font size=&quot;3&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjWk0D2mycdHPeNfjJqa0vc0HNYXz9zrvyV4QuEvGMdbhC75s2mgK41xvFC43iYQEE8TpZqIB9GLzZvwQnBicHza9q3QVn_cq8RWUs10UxrPEq3hxXxBCqGFoR7lqp52H5SM0GT0VgoWeYE8841ys4qdI20R2s-QA9UQCSkTow3MO4DQTj0Sn76pSMTsyM&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjWk0D2mycdHPeNfjJqa0vc0HNYXz9zrvyV4QuEvGMdbhC75s2mgK41xvFC43iYQEE8TpZqIB9GLzZvwQnBicHza9q3QVn_cq8RWUs10UxrPEq3hxXxBCqGFoR7lqp52H5SM0GT0VgoWeYE8841ys4qdI20R2s-QA9UQCSkTow3MO4DQTj0Sn76pSMTsyM=s320&quot;  border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_7336485269350112306&quot; /&gt;&lt;/a&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size=&quot;3&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size=&quot;3&quot;&gt;How long have I spent manually navigating the folder structure on the left-hand side ?&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size=&quot;3&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: xxx-large;&quot;&gt;🙀&lt;/span&gt;&lt;span style=&quot;font-size: xxx-large;&quot;&gt;🙀&lt;/span&gt;&lt;span style=&quot;font-size: xxx-large;&quot;&gt;🙀&lt;/span&gt;&lt;/div&gt;</description><link>https://portal2portal.blogspot.com/2024/02/visual-studio-code-wow.html</link><author>noreply@blogger.com (Dave Hay)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEjWk0D2mycdHPeNfjJqa0vc0HNYXz9zrvyV4QuEvGMdbhC75s2mgK41xvFC43iYQEE8TpZqIB9GLzZvwQnBicHza9q3QVn_cq8RWUs10UxrPEq3hxXxBCqGFoR7lqp52H5SM0GT0VgoWeYE8841ys4qdI20R2s-QA9UQCSkTow3MO4DQTj0Sn76pSMTsyM=s72-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-8226210245822658793</guid><pubDate>Sat, 30 Dec 2023 16:39:00 +0000</pubDate><atom:updated>2023-12-31T03:57:01.264+00:00</atom:updated><title>Getting started with Python in Jupyter Notebooks</title><description>So, as we get ready to start a new year, I&#39;m tinkering with a bunch of new ( to me ) tech toys, including wrangling Python dependencies.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Having spent much of of the past year or so using&amp;nbsp;&lt;a href=&quot;https://pypi.org/project/pip/&quot;&gt;pip&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;https://github.com/pyenv/pyenv&quot;&gt;pyenv&lt;/a&gt;&amp;nbsp;to manage Python dependencies, more recently, I&#39;ve been looking at an alternate solution,&amp;nbsp;&lt;a href=&quot;https://www.anaconda.com/download&quot;&gt;Anaconda&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Having downloaded and installed the Mac version of&amp;nbsp;&lt;a href=&quot;https://www.anaconda.com/download#downloads&quot;&gt;Anaconda&lt;/a&gt;&amp;nbsp;- and allowed it to install itself into&amp;nbsp;&lt;i&gt;~/.zshrc&lt;/i&gt;&amp;nbsp;( as I use Z Shell rather than, say, Bash ), when I start a new Terminal window ( I&#39;m using iTerm &lt;i&gt;&lt;b&gt;3.4.23&lt;/b&gt;&lt;/i&gt; on macOS&amp;nbsp;&lt;i&gt;&lt;b&gt;14.2.1&lt;/b&gt;&lt;/i&gt; ), I automatically open up in a virtual environment called &lt;i&gt;base&lt;/i&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;conda env list&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;# conda environments:&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;#&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;base &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* &amp;nbsp;/Users/hayd/anaconda3&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;type conda&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;conda is a shell function from /Users/hayd/.zshrc&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;This also gives me access to&amp;nbsp;&lt;a href=&quot;https://jupyter.org&quot;&gt;Jupyter&lt;/a&gt;&amp;nbsp;: -&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;type jupyter&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;jupyter is /Users/hayd/anaconda3/bin/jupyter&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;jupyter notebook&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&amp;nbsp; _ &amp;nbsp; _ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_ &amp;nbsp; &amp;nbsp; &amp;nbsp;_&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&amp;nbsp;| | | |_ __ &amp;nbsp;__| |__ _| |_ ___&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&amp;nbsp;| |_| | &#39;_ \/ _` / _` | &amp;nbsp;_/ -_)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&amp;nbsp; \___/| .__/\__,_\__,_|\__\___|&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|_|&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;Please note that updating to Notebook 7 might break some of your extensions.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;[W 15:06:56.602 NotebookApp] Loading JupyterLab as a classic notebook (v6) extension.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;[I 2023-12-29 15:06:56.605 LabApp] JupyterLab extension loaded from /Users/hayd/anaconda3/lib/python3.11/site-packages/jupyterlab&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;[I 2023-12-29 15:06:56.605 LabApp] JupyterLab application directory is /Users/hayd/anaconda3/share/jupyter/lab&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;[I 15:06:57.709 NotebookApp] Serving notebooks from local directory: /Users/hayd&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;[I 15:06:57.709 NotebookApp] Jupyter Notebook 6.5.4 is running at:&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;[I 15:06:57.709 NotebookApp] http://localhost:8888/?token=707355ee0dd1f8fd9bf4e7124b83d1126a024cc4606eade0&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;[I 15:06:57.709 NotebookApp] &amp;nbsp;or http://127.0.0.1:8888/?token=707355ee0dd1f8fd9bf4e7124b83d1126a024cc4606eade0&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;[I 15:06:57.709 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;[C 15:06:57.711 NotebookApp]&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&amp;nbsp; &amp;nbsp; To access the notebook, open this file in a browser:&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file:///Users/hayd/Library/Jupyter/runtime/nbserver-33550-open.html&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&amp;nbsp; &amp;nbsp; Or copy and paste one of these URLs:&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; http://localhost:8888/?token=707355ee0dd1f8fd9bf4e7124b83d1126a024cc4606eade0&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;or http://127.0.0.1:8888/?token=707355ee0dd1f8fd9bf4e7124b83d1126a024cc4606eade0&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;0.00s - Debugger warning: It seems that frozen modules are being used, which may&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;0.00s - to python to disable frozen modules.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;which automatically opens up a browser tab: -&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;display: block;&quot;&gt;&lt;div style=&quot;-webkit-user-select: all; -webkit-user-drag: element; display: inline-block;&quot; class=&quot;apple-rich-link&quot; draggable=&quot;true&quot; role=&quot;link&quot; data-url=&quot;http://localhost:8888/tree&quot;&gt;&lt;a style=&quot;border-radius:10px;font-family:-apple-system, Helvetica, Arial, sans-serif;display:block;-webkit-user-select:none;width:300px;user-select:none;-webkit-user-modify:read-only;user-modify:read-only;overflow:hidden;text-decoration:none;&quot; class=&quot;lp-rich-link&quot; rel=&quot;nofollow&quot; href=&quot;http://localhost:8888/tree&quot; dir=&quot;ltr&quot; role=&quot;button&quot; draggable=&quot;false&quot; width=&quot;300&quot;&gt;&lt;table style=&quot;table-layout:fixed;border-collapse:collapse;width:300px;background-color:#E5E6E9;font-family:-apple-system, Helvetica, Arial, sans-serif;&quot; class=&quot;lp-rich-link-emailBaseTable&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; width=&quot;300&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td vertical-align=&quot;center&quot;&gt;&lt;table bgcolor=&quot;#E5E6E9&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;300&quot; style=&quot;font-family:-apple-system, Helvetica, Arial, sans-serif;table-layout:fixed;background-color:rgba(229, 230, 233, 1);&quot; class=&quot;lp-rich-link-captionBar&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;padding:8px 0px 8px 0px;&quot; class=&quot;lp-rich-link-captionBar-textStackItem&quot;&gt;&lt;div style=&quot;max-width:100%;margin:0px 16px 0px 16px;overflow:hidden;&quot; class=&quot;lp-rich-link-captionBar-textStack&quot;&gt;&lt;div style=&quot;word-wrap:break-word;font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left;&quot; class=&quot;lp-rich-link-captionBar-textStack-topCaption-leading&quot;&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://localhost:8888/tree&quot; style=&quot;text-decoration: none&quot; draggable=&quot;false&quot;&gt;&lt;font color=&quot;#272727&quot; style=&quot;color: rgba(0, 0, 0, 0.847059);&quot;&gt;Jupyter Notebook&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;word-wrap:break-word;font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left;&quot; class=&quot;lp-rich-link-captionBar-textStack-bottomCaption-leading&quot;&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://localhost:8888/tree&quot; style=&quot;text-decoration: none&quot; draggable=&quot;false&quot;&gt;&lt;font color=&quot;#808080&quot; style=&quot;color: rgba(0, 0, 0, 0.498039);&quot;&gt;localhost&lt;/font&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;padding:6px 12px 6px 0px;&quot; class=&quot;lp-rich-link-captionBar-rightIconItem&quot; width=&quot;36&quot;&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://localhost:8888/tree&quot; draggable=&quot;false&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgQKg9hHyg6RXUCjBIiZMCKIN6_95OulzjO6j_IUhGZk1lbPehGCIw4cloINQ8Um8HrixxGwXKrifweXNaJJHDBDAalA1Nv-0P2Lc4FHxoQPNrjqx8mObUuKXEqKTuT76TWIgsHH_mGgVrGcjCNeXq6gCTD9aeJiu6szHRq_d1D1ZhH08yoBAT1MvoT9S0&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgQKg9hHyg6RXUCjBIiZMCKIN6_95OulzjO6j_IUhGZk1lbPehGCIw4cloINQ8Um8HrixxGwXKrifweXNaJJHDBDAalA1Nv-0P2Lc4FHxoQPNrjqx8mObUuKXEqKTuT76TWIgsHH_mGgVrGcjCNeXq6gCTD9aeJiu6szHRq_d1D1ZhH08yoBAT1MvoT9S0=s320&quot;  border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_7318602907800068258&quot; /&gt;&lt;/a&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;jupyter notebook list&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;Currently running servers:&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;IBMPlexMono&quot;&gt;http://localhost:8888/?token=707355ee0dd1f8fd9bf4e7124b8ad1126a024cc4606eade0 :: /Users/hayd&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;shows me the running notebook, plus it&#39;s port AND authentication token :-)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;With the Jupyter server running, I quickly created a new Python3 ( pykernel ) notebook: -&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhkPSRHiIFb94bspmXX-m94_Fb33DQ1FUGGNQhgoeJSKrwj48Mqicz5A3P_V6F-hWnNfemC-SboJv9fxPaKudYh6r_5W4Qcuq80ELfR7YpbGPZ9EJkUobLGP_FdafLI2BmcofKuoH3qQFZR85slcCjIOeJn-MOsCWfiyGdJFUVV9TI0bbwcbriAnTp2fa8&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhkPSRHiIFb94bspmXX-m94_Fb33DQ1FUGGNQhgoeJSKrwj48Mqicz5A3P_V6F-hWnNfemC-SboJv9fxPaKudYh6r_5W4Qcuq80ELfR7YpbGPZ9EJkUobLGP_FdafLI2BmcofKuoH3qQFZR85slcCjIOeJn-MOsCWfiyGdJFUVV9TI0bbwcbriAnTp2fa8=s320&quot;  border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_7318602925046275154&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;and am off to the races: -&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj15lVDcYa2Z4-gQeiyKF9dQs5twUzqe2CQwZgBQYPhJ91dGsHXUf7FdGec9NT28qkv8KODvblAxIfUT5uSly36z1-8j050ll4WQE9gaPu3koedK0YWqmCp9MDsfpVk_8-Ab4PhDRxbrNF7O0t7hj-1BTnEAl9XMGYV3NYKtskhNBt6yMO9gWMSVkVmqM4&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEj15lVDcYa2Z4-gQeiyKF9dQs5twUzqe2CQwZgBQYPhJ91dGsHXUf7FdGec9NT28qkv8KODvblAxIfUT5uSly36z1-8j050ll4WQE9gaPu3koedK0YWqmCp9MDsfpVk_8-Ab4PhDRxbrNF7O0t7hj-1BTnEAl9XMGYV3NYKtskhNBt6yMO9gWMSVkVmqM4=s320&quot;  border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_7318602945144857186&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;For reference, I&#39;m working on&amp;nbsp;&lt;a href=&quot;https://www.ibm.com/products/watsonx-ai&quot;&gt;watsonx.ai&lt;/a&gt;&amp;nbsp;as a coder at present, and am running through some of the Python-based prompt engineering tutorials, and wanted a place to test the generated Python code&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;This was of use, in terms of getting me started: -&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.dataquest.io/blog/jupyter-notebook-tutorial/&quot;&gt;How to Use Jupyter Notebook: A Beginner&#39;s Tutorial&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;</description><link>https://portal2portal.blogspot.com/2023/12/getting-started-with-python-in-jupyter.html</link><author>noreply@blogger.com (Dave Hay)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgQKg9hHyg6RXUCjBIiZMCKIN6_95OulzjO6j_IUhGZk1lbPehGCIw4cloINQ8Um8HrixxGwXKrifweXNaJJHDBDAalA1Nv-0P2Lc4FHxoQPNrjqx8mObUuKXEqKTuT76TWIgsHH_mGgVrGcjCNeXq6gCTD9aeJiu6szHRq_d1D1ZhH08yoBAT1MvoT9S0=s72-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-2856908021762339426</guid><pubDate>Sat, 04 Nov 2023 15:29:00 +0000</pubDate><atom:updated>2023-11-04T15:29:18.962+00:00</atom:updated><title>More on macOS SMB sharing</title><description>&lt;div&gt;As a follow-up to an earlier post: -&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://portal2portal.blogspot.com/2023/06/macos-to-macos-file-sharing-dont-work.html&quot;&gt;macOS to macOS File Sharing - Don&#39;t work, try The IT Crowd&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I hit this problem again and referred back to my post, and also to Dan&#39;s post: -&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://sixcolors.com/post/2022/06/solving-a-file-sharing-mystery-why-one-mac-cant-see-another/&quot;&gt;Solving a file sharing mystery: Why one Mac can&#39;t see another&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;digging further into the firewall settings on my Mac mini&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Having noticed that &lt;b&gt;smbd&lt;/b&gt;&amp;nbsp;did NOT appear in the list returned by&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;/usr/libexec/ApplicationFirewall/socketfilterfw —listapps&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I looked again at the firewall settings: -&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgc8-otvuiaFz9062QGai34UW5OrZ-DOVjJk2slmH2qiIMGFgMNWanUfoTxZn26lcJElaNFj34FItC8e8ThqS8rfSV363ETjKXVRv667tMTso8qKIZ0vIwsVw1vzkeTMdUgtL3_C1CaZuYTr0VjWg2Eb6bIcCb3Ax1JgtGMzU6T7n8pNAWoJeEeWSz2bBs&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgc8-otvuiaFz9062QGai34UW5OrZ-DOVjJk2slmH2qiIMGFgMNWanUfoTxZn26lcJElaNFj34FItC8e8ThqS8rfSV363ETjKXVRv667tMTso8qKIZ0vIwsVw1vzkeTMdUgtL3_C1CaZuYTr0VjWg2Eb6bIcCb3Ax1JgtGMzU6T7n8pNAWoJeEeWSz2bBs=s320&quot;  border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_7297629463949128914&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;and explicitly added &lt;i&gt;smbd&lt;/i&gt;&amp;nbsp;via it&#39;s path: -&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;/usr/sbin/smbd&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;and also enabled &lt;i&gt;smbd&lt;/i&gt;&amp;nbsp;via&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp;/usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp /usr/sbin/smbd&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;Incoming connection to the application is permitted&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Now it looks better: -&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;/usr/libexec/ApplicationFirewall/socketfilterfw --listapps&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;ALF: total number of apps = 4&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;1 : &amp;nbsp;/System/Library/CoreServices/ControlCenter.app&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt; ( Allow incoming connections )&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;2 : &amp;nbsp;/Applications/Firefox.app/Contents/MacOS/updater.app&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt; ( Allow incoming connections )&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;b&gt;3 : &amp;nbsp;/usr/sbin/smbd&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt; ( Allow incoming connections )&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;4 : &amp;nbsp;/System/Library/CoreServices/UniversalControl.app&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face=&quot;Courier New&quot;&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt; ( Allow incoming connections )&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;and, even better, I can access the Mac Mini via SMB from other Macs without issues&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Nice !&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;</description><link>https://portal2portal.blogspot.com/2023/11/more-on-macos-smb-sharing.html</link><author>noreply@blogger.com (Dave Hay)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgc8-otvuiaFz9062QGai34UW5OrZ-DOVjJk2slmH2qiIMGFgMNWanUfoTxZn26lcJElaNFj34FItC8e8ThqS8rfSV363ETjKXVRv667tMTso8qKIZ0vIwsVw1vzkeTMdUgtL3_C1CaZuYTr0VjWg2Eb6bIcCb3Ax1JgtGMzU6T7n8pNAWoJeEeWSz2bBs=s72-c" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-667082937083157346</guid><pubDate>Mon, 23 Oct 2023 12:55:00 +0000</pubDate><atom:updated>2023-11-06T11:59:01.338+00:00</atom:updated><title>Why I can&#39;t install jq on Ubuntu 20.04</title><description>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;A friend asked me why they were unable to install &lt;a href=&quot;https://jqlang.github.io/jq/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jq&lt;/a&gt; onto their Ubuntu &lt;b&gt;20.04&lt;/b&gt; Linux box - which seems like a perfectly reasonable to do / ask.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;So I tried ...&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;And failed ...&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;lsb_release -a&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;No LSB modules are available.&lt;br /&gt;Distributor ID:&amp;nbsp;&amp;nbsp;&amp;nbsp; Ubuntu&lt;br /&gt;Description:&amp;nbsp;&amp;nbsp;&amp;nbsp; Ubuntu 20.04.6 LTS&lt;br /&gt;Release:&amp;nbsp;&amp;nbsp;&amp;nbsp; 20.04&lt;br /&gt;Codename:&amp;nbsp;&amp;nbsp;&amp;nbsp; focal&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;uname -a&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Linux foobar.snafu.com 5.4.0-156-generic #173-Ubuntu SMP Tue Jul 11 07:25:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;apt-get update &amp;amp;&amp;amp; apt-get upgrade -y&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;apt-get install -y jq&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Reading package lists... Done&lt;br /&gt;Building dependency tree&lt;br /&gt;Reading state information... Done&lt;br /&gt;E: Unable to locate package jq&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Having read the &lt;a href=&quot;https://jqlang.github.io/jq/download/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jq download page&lt;/a&gt;, which says, in part: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;jq is in the official Debian and Ubuntu repositories. Install using sudo apt-get install jq.&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I was confused, to say the least ....&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;And then I remembered to check the Aptitude Package Manager&#39;s &lt;i&gt;sources.list&lt;/i&gt; file : -&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;cat /etc/apt/sources.list&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&lt;i&gt;# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to&lt;br /&gt;# newer versions of the distribution.&lt;br /&gt;deb http://us.archive.ubuntu.com/ubuntu focal main&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal main restricted&lt;br /&gt;&lt;br /&gt;## Major bug fix updates produced after the final release of the&lt;br /&gt;## distribution.&lt;br /&gt;deb http://us.archive.ubuntu.com/ubuntu focal-updates main&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal-updates main restricted&lt;br /&gt;&lt;br /&gt;## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu&lt;br /&gt;## team. Also, please note that software in universe WILL NOT receive any&lt;br /&gt;## review or updates from the Ubuntu security team.&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal universe&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal-updates universe&lt;br /&gt;&lt;br /&gt;## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu&lt;br /&gt;## team, and may not be under a free licence. Please satisfy yourself as to&lt;br /&gt;## your rights to use the software. Also, please note that software in&lt;br /&gt;## multiverse WILL NOT receive any review or updates from the Ubuntu&lt;br /&gt;## security team.&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal multiverse&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal-updates multiverse&lt;br /&gt;&lt;br /&gt;## N.B. software from this repository may not have been tested as&lt;br /&gt;## extensively as that contained in the main release, although it includes&lt;br /&gt;## newer versions of some applications which may provide useful features.&lt;br /&gt;## Also, please note that software in backports WILL NOT receive any review&lt;br /&gt;## or updates from the Ubuntu security team.&lt;br /&gt;deb http://us.archive.ubuntu.com/ubuntu focal-backports main&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse&lt;br /&gt;&lt;br /&gt;## Uncomment the following two lines to add software from Canonical&#39;s&lt;br /&gt;## &#39;partner&#39; repository.&lt;br /&gt;## This software is not part of Ubuntu, but is offered by Canonical and the&lt;br /&gt;## respective vendors as a service to Ubuntu users.&lt;br /&gt;# deb http://archive.canonical.com/ubuntu focal partner&lt;br /&gt;# deb-src http://archive.canonical.com/ubuntu focal partner&lt;br /&gt;&lt;br /&gt;deb http://us.archive.ubuntu.com/ubuntu focal-security main&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal-security main restricted&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal-security universe&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal-security multiverse&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;or, more specifically, looking for the &lt;a href=&quot;https://help.ubuntu.com/community/Repositories/Ubuntu&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Ubuntu Universe repository&lt;/a&gt; : -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;cat /etc/apt/sources.list|grep -i universe&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;## team. Also, please note that software in universe WILL NOT receive any&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal universe&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal-updates universe&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse&lt;br /&gt;# deb-src http://us.archive.ubuntu.com/ubuntu focal-security universe&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;which showed that &lt;i&gt;universe&lt;/i&gt; wasn&#39;t enabled ...&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;So I backed up the existing &lt;i&gt;/etc/apt/source.list&lt;/i&gt; file: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;cp /etc/apt/sources.list /etc/apt/sources.list.ORIG&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and then added the &lt;i&gt;universe&lt;/i&gt; repo: - &lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;cat &amp;lt;&amp;lt;EOF &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;deb http://us.archive.ubuntu.com/ubuntu focal universe&lt;br /&gt;deb http://us.archive.ubuntu.com/ubuntu focal-updates universe&lt;br /&gt;deb http://us.archive.ubuntu.com/ubuntu focal-security universe&lt;br /&gt;EOF&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;and tried again: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;apt-get update &amp;amp;&amp;amp; &lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;apt-get install -y jq&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Reading package lists... Done&lt;br /&gt;Building dependency tree&lt;br /&gt;Reading state information... Done&lt;br /&gt;The following additional packages will be installed:&lt;br /&gt;&amp;nbsp; libjq1 libonig5&lt;br /&gt;The following NEW packages will be installed:&lt;br /&gt;&amp;nbsp; jq libjq1 libonig5&lt;br /&gt;0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.&lt;br /&gt;Need to get 313 kB of archives.&lt;br /&gt;After this operation, 1,062 kB of additional disk space will be used.&lt;br /&gt;Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libonig5 amd64 6.9.4-1 [142 kB]&lt;br /&gt;Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libjq1 amd64 1.6-1ubuntu0.20.04.1 [121 kB]&lt;br /&gt;Get:3 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 jq amd64 1.6-1ubuntu0.20.04.1 [50.2 kB]&lt;br /&gt;Fetched 313 kB in 1s (440 kB/s)&lt;br /&gt;Selecting previously unselected package libonig5:amd64.&lt;br /&gt;(Reading database ... 108600 files and directories currently installed.)&lt;br /&gt;Preparing to unpack .../libonig5_6.9.4-1_amd64.deb ...&lt;br /&gt;Unpacking libonig5:amd64 (6.9.4-1) ...&lt;br /&gt;Selecting previously unselected package libjq1:amd64.&lt;br /&gt;Preparing to unpack .../libjq1_1.6-1ubuntu0.20.04.1_amd64.deb ...&lt;br /&gt;Unpacking libjq1:amd64 (1.6-1ubuntu0.20.04.1) ...&lt;br /&gt;Selecting previously unselected package jq.&lt;br /&gt;Preparing to unpack .../jq_1.6-1ubuntu0.20.04.1_amd64.deb ...&lt;br /&gt;Unpacking jq (1.6-1ubuntu0.20.04.1) ...&lt;br /&gt;Setting up libonig5:amd64 (6.9.4-1) ...&lt;br /&gt;Setting up libjq1:amd64 (1.6-1ubuntu0.20.04.1) ...&lt;br /&gt;Setting up jq (1.6-1ubuntu0.20.04.1) ...&lt;br /&gt;Processing triggers for man-db (2.9.1-1) ...&lt;br /&gt;Processing triggers for libc-bin (2.31-0ubuntu9.12) ...&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and now things are happy: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;jq --version&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;jq-1.6&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;cat ~/family.json | jq&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;{&lt;br /&gt;&amp;nbsp; &quot;friends&quot;: [&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;givenName&quot;: &quot;Dave&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;familyName&quot;: &quot;Hay&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;givenName&quot;: &quot;Homer&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;familyName&quot;: &quot;Simpson&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;givenName&quot;: &quot;Marge&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;familyName&quot;: &quot;Simpson&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;givenName&quot;: &quot;Lisa&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;familyName&quot;: &quot;Simpson&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;givenName&quot;: &quot;Bart&quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;familyName&quot;: &quot;Simpson&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; ]&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</description><link>https://portal2portal.blogspot.com/2023/10/why-i-cant-install-jq-on-ubuntu-2004.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-9043571806816965894</guid><pubDate>Thu, 15 Jun 2023 17:59:00 +0000</pubDate><atom:updated>2023-06-15T18:59:17.603+01:00</atom:updated><title>macOS to macOS File Sharing - Don&#39;t work, try The IT Crowd</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;I use File Sharing between two Macs on the same network, both running the latest macOS 13.4 Ventura.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;For some strange reason I wasn&#39;t able to access one Mac - a Mini - from the other - a MacBook Pro.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;As is always the case, the internet solved it for me: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;a href=&quot;https://osxdaily.com/2023/01/18/fix-file-sharing-not-working-in-macos-ventura/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Fix File Sharing Not Working in MacOS Ventura&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;TL;DR; turn it off, and on again&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Yes, The IT Crowd strikes again&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Having said that, Dan Moren, he of Six Colours, acclaimed author AND MacBreak Weekly host, deserves full thanks for directing me to macOS&#39; built-in firewall tool: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;/usr/libexec/ApplicationFirewall/socketfilterfw --listapps&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;a href=&quot;https://sixcolors.com/post/2022/06/solving-a-file-sharing-mystery-why-one-mac-cant-see-another/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Solving a file sharing mystery: Why one Mac can’t see another&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Whilst the TIOAOA trick worked this time, who knows what I&#39;ll need next time ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/06/macos-to-macos-file-sharing-dont-work.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-2269087640297127291</guid><pubDate>Mon, 22 May 2023 12:48:00 +0000</pubDate><atom:updated>2023-05-22T13:48:52.559+01:00</atom:updated><title>On the subject of aliases ...</title><description>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I&#39;m a super-massive fan of time/labour saving devices, and that goes for command-line tips n&#39; tricks to save me: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;(a) typing more stuff&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;(b) looking in my notes to remember what I need, in order to type more stuff&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Therefore, I&#39;ve finally got around to creating an alias to create a new branch in a GitHub repo that I&#39;ve cloned to my Mac.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I&#39;ve added this alias to &lt;i&gt;~/.zprofile&lt;/i&gt;: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;gitbranch=&#39;git fetch origin &amp;amp;&amp;amp; git rebase origin/master &amp;amp;&amp;amp; git checkout master; git checkout -b $1&#39;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;so now I just need to type: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;gitbranch foobar&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;or: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;gitbranch snafu&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;in order to create a new branch ...&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Which is nice.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</description><link>https://portal2portal.blogspot.com/2023/05/on-subject-of-aliases.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-887055379358055321</guid><pubDate>Mon, 22 May 2023 12:41:00 +0000</pubDate><atom:updated>2023-05-22T13:41:16.427+01:00</atom:updated><title>Using 1Password to store API keys ...</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;Following on from my earlier post: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;a href=&quot;https://portal2portal.blogspot.com/2023/05/wow-why-have-i-not-been-using-1password.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Wow, why have I not been using 1Password for my SSH keys before today ?&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I&#39;ve got a little further, with various API keys now stored in my 1Password vault&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;This is far simpler, in that the vault entry, of type &lt;b&gt;API Credential&lt;/b&gt;, only needs to have a name/title e.g. &lt;b&gt;IBM Cloud API Key&lt;/b&gt;&amp;nbsp;and a credential, the actual API key itself.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;With that in place, I&#39;ve then setup an alias to retrieve/display the API key: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;apikey=&#39;export APIKEY=$(op item get &quot;IBM Cloud&quot; --field credential) &amp;amp;&amp;amp; echo $APIKEY&#39;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;in &lt;i&gt;~/.zprofile&lt;/i&gt;, meaning that I just need to run the &quot;command&quot; &lt;i&gt;apikey&lt;/i&gt;&amp;nbsp;to ... see my API key.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I will, of course, be leveraging the same API keys in various other scripts/aliases, including things that login to IBM Cloud etc.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/05/using-1password-to-store-api-keys.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-2283465502336353236</guid><pubDate>Sat, 20 May 2023 16:38:00 +0000</pubDate><atom:updated>2023-05-20T17:39:19.698+01:00</atom:updated><title>Wow, why have I not been using 1Password for my SSH keys before today ?</title><description>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;As an avid user of 1Password, I&#39;ve only really just delved into the Command-Line Interface (CLI), including the ability to create AND use SSH keys.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I&#39;m running on macOS&amp;nbsp;13.4 and, as per the documentation -&amp;nbsp;&lt;a href=&quot;https://developer.1password.com/docs/cli/ssh-keys&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Manage SSH Keys&lt;/a&gt; - I&#39;ve installed the &lt;b&gt;BETA&lt;/b&gt;&amp;nbsp;version of the &lt;i&gt;op&lt;/i&gt;&amp;nbsp;command: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;2.18.0-beta.01&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;downloaded from &lt;a href=&quot;https://app-updates.agilebits.com/product_history/CLI2&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I&#39;m also running&amp;nbsp;&lt;b&gt;1Password for Mac 8.10.6 (81006027)&lt;/b&gt;&amp;nbsp;and,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;having configured the &lt;b&gt;SSH Agent&lt;/b&gt;&amp;nbsp;and the &lt;b&gt;Command-Line Interface (CLI)&lt;/b&gt; options via &lt;b&gt;Settings&lt;/b&gt;&amp;nbsp;&amp;gt; &lt;b&gt;Developer&lt;/b&gt;&amp;nbsp;: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0FpyqAfU5kY1CZNGo9B6Gvsc0R6VKgA4QPv6K6zsZ3d3c9Tx7bQGerLyjKrCYk_4bH5gAviyxu6-sPNI1_ABkYpRr7UhradbsWDTiwzQqRFfO7MwcFD7oKhJmckrYuzbhdDGGwAAF_8pTUNpVRHvy6hk2zBNojY7yO8XkOc8lJs-pyGQGIglrkuGb/s762/Screenshot%202023-05-20%20at%2017.00.27.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;1Password Developer pane showing SSH Agent and CLI settings&quot; border=&quot;0&quot; data-original-height=&quot;506&quot; data-original-width=&quot;762&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0FpyqAfU5kY1CZNGo9B6Gvsc0R6VKgA4QPv6K6zsZ3d3c9Tx7bQGerLyjKrCYk_4bH5gAviyxu6-sPNI1_ABkYpRr7UhradbsWDTiwzQqRFfO7MwcFD7oKhJmckrYuzbhdDGGwAAF_8pTUNpVRHvy6hk2zBNojY7yO8XkOc8lJs-pyGQGIglrkuGb/w320-h212/Screenshot%202023-05-20%20at%2017.00.27.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and then generate a new SSH key: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;op ssh generate --title &quot;SSH Key - 20 May 2023&quot;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;as per&amp;nbsp;&lt;a href=&quot;https://developer.1password.com/docs/ssh/manage-keys#generate-an-ssh-key&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Generate an SSH key&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;The key then appeared under a new 1Password category - &lt;i&gt;SSH Keys&lt;/i&gt;&amp;nbsp;- from where I could select the &lt;b&gt;public&lt;/b&gt;&amp;nbsp;key and add it to the &lt;i&gt;~/.ssh/authorized_keys&lt;/i&gt;&amp;nbsp;file on two of my target Ubuntu boxes&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;This has all made life much easier on the Mac, via iTerm etc. where my SSH config is WAY simpler: -&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;cat ~/.ssh/config&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Host *&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&amp;nbsp; IdentityAgent &quot;~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Even better, I was able to quickly add the &lt;b&gt;public&lt;/b&gt;&amp;nbsp;key to GitHub&#39;s &lt;a href=&quot;https://github.com/settings/keys&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;SSH Keys&lt;/a&gt; page via the &lt;i&gt;New SSH Key&lt;/i&gt;&amp;nbsp;button, which immediately prompted to retrieve the new key - &lt;i&gt;SSH Key - 20 May 2023&lt;/i&gt; - from the 1Password vault ...&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Which is nice&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</description><link>https://portal2portal.blogspot.com/2023/05/wow-why-have-i-not-been-using-1password.html</link><author>noreply@blogger.com (Dave Hay)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0FpyqAfU5kY1CZNGo9B6Gvsc0R6VKgA4QPv6K6zsZ3d3c9Tx7bQGerLyjKrCYk_4bH5gAviyxu6-sPNI1_ABkYpRr7UhradbsWDTiwzQqRFfO7MwcFD7oKhJmckrYuzbhdDGGwAAF_8pTUNpVRHvy6hk2zBNojY7yO8XkOc8lJs-pyGQGIglrkuGb/s72-w320-h212-c/Screenshot%202023-05-20%20at%2017.00.27.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-1126490059402975464</guid><pubDate>Fri, 19 May 2023 08:53:00 +0000</pubDate><atom:updated>2023-05-19T09:53:54.634+01:00</atom:updated><title>Today I Learned - how to deal with Shell Check SC2086</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;So, technically I learned this yesterday but 🤷‍♀️&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;As part of our CI/CD testing, we run &lt;a href=&quot;https://www.shellcheck.net/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;shellcheck&lt;/a&gt;&amp;nbsp; against our shell scripts, and saw the following: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&amp;nbsp; &amp;nbsp;^----^ SC2086 (info): Double quote to prevent globbing and word splitting.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;for a piece of code that referenced a variable e.g.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;echo $FILES&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;The shellcheck Wiki covers this: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.shellcheck.net/wiki/SC2086&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;SC2086 – ShellCheck Wiki&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and suggests that $FILES be wrapped in double quotes e.g.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;echo &quot;$FILES&quot;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;So far, so good&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;However, the code in question was actually a variable containing more than one element e.g. : -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;&lt;i&gt;FILES=&quot;a.txt b.txt c.txt&quot;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;so the next line in the script which leveraged the values within the $FILES variable: -&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;&lt;i&gt;ls &quot;$FILES&quot;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;fails with: -&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;ls: a.txt b.txt c.txt: No such file or directory&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;Thinking more about this, this kinda made sense i.e. we&#39;re treating the values within the &lt;i&gt;$FILES&lt;/i&gt; variable as elements within an array, but we&#39;re not actually treating the variable as an array, by incrementing through the elements by an index.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;The Wiki does reference this: -&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_jiBumpwsjcAudCbklqh-7S9SY_xxVeckqCSJy3lFcjbsvxBKzYZOZu2mzojjRo2S_m8d8DsmKCv-mS5NVbMc8_DLdM1NXJxZBgCeuC1DJCeIS6SEMxBWDNaxd0Wzf4vvucAwFOcIBfAE7dYTtt2Bh0mosJuiyF7gkHhgAr9LpisfPtYctx9CSAAb/s1209/Screenshot%202023-05-19%20at%2009.43.24.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;400&quot; data-original-width=&quot;1209&quot; height=&quot;106&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_jiBumpwsjcAudCbklqh-7S9SY_xxVeckqCSJy3lFcjbsvxBKzYZOZu2mzojjRo2S_m8d8DsmKCv-mS5NVbMc8_DLdM1NXJxZBgCeuC1DJCeIS6SEMxBWDNaxd0Wzf4vvucAwFOcIBfAE7dYTtt2Bh0mosJuiyF7gkHhgAr9LpisfPtYctx9CSAAb/s320/Screenshot%202023-05-19%20at%2009.43.24.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;Using that as inspiration, I updated the script: -&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;read -ra files &amp;lt;&amp;lt;&amp;lt;&quot;${FILES}&quot;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;ls &quot;${files[@]}&quot;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;In essence, this is creating a &quot;real&quot; array from the &lt;i&gt;$FILES&lt;/i&gt;&amp;nbsp;variable, and then we&#39;re incrementing the index using&lt;i&gt; [@]&lt;/i&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;To be clear, I also took inspiration from: -&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://stackoverflow.com/questions/62637465/how-to-be-explicit-about-intentional-word-splitting&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;How to be explicit about intentional word splitting?&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;and this is my demo / test script: -&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;#! /bin/bash&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;# Set variable&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;FILES=&quot;a.txt b.txt c.txt&quot;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;echo &quot;Works, but breaks shellcheck&quot;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;ls $FILES&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;echo &quot;Fails, but passes shellcheck&quot;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;ls &quot;$FILES&quot;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;echo &quot;Works, and passes shellcheck&quot;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;read -ra files &amp;lt;&amp;lt;&amp;lt;&quot;${FILES}&quot;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;ls &quot;${files[@]}&quot;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;which, when I run it, does this: -&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;&lt;i&gt;./test-sc.sh&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Works, but breaks shellcheck&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;a.txt&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;b.txt&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;c.txt&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Fails, but passes shellcheck&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;ls: a.txt b.txt c.txt: No such file or directory&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Works, and passes shellcheck&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;a.txt&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;b.txt&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;c.txt&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;Finally, for now, there&#39;s a great shellcheck plugin for VS Code: -&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;ShellCheck for Visual Studio Code&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;b&gt;and, for the record, the &lt;a href=&quot;https://github.com/koalaman/shellcheck&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;shellcheck&lt;/a&gt;&amp;nbsp;project is available on GitHub&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/05/today-i-learned-how-to-deal-with-shell.html</link><author>noreply@blogger.com (Dave Hay)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_jiBumpwsjcAudCbklqh-7S9SY_xxVeckqCSJy3lFcjbsvxBKzYZOZu2mzojjRo2S_m8d8DsmKCv-mS5NVbMc8_DLdM1NXJxZBgCeuC1DJCeIS6SEMxBWDNaxd0Wzf4vvucAwFOcIBfAE7dYTtt2Bh0mosJuiyF7gkHhgAr9LpisfPtYctx9CSAAb/s72-c/Screenshot%202023-05-19%20at%2009.43.24.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-2924971609765357606</guid><pubDate>Thu, 27 Apr 2023 12:41:00 +0000</pubDate><atom:updated>2023-04-27T13:41:27.803+01:00</atom:updated><title>Why oh why did I forget vimdiff ?</title><description>&lt;p&gt;&amp;nbsp;Whilst trying to compare two branches of a GitHub repo on my Mac, I was using &lt;i&gt;diff&lt;/i&gt;&amp;nbsp;to compare/contrast specific files, and trying to parse the differences.&lt;/p&gt;&lt;p&gt;And then I remembered &lt;i&gt;vimdiff&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://www.freecodecamp.org/news/content/images/2022/08/image-13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;199&quot; data-original-width=&quot;800&quot; height=&quot;199&quot; src=&quot;https://www.freecodecamp.org/news/content/images/2022/08/image-13.png&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Source:&amp;nbsp;&lt;a href=&quot;https://www.freecodecamp.org/news/compare-two-files-in-linux-using-vim/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Linux `Vimdiff` Command – How to Compare Two Files in the Command Line&lt;/a&gt;&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;PS Using &lt;a href=&quot;https://www.freecodecamp.org&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;freeCodeCamp&lt;/a&gt;&amp;nbsp;for the above image, as I don&#39;t want to reveal my sources ( i.e. source code )&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/04/why-oh-why-did-i-forget-vimdiff.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-2682234290797904671</guid><pubDate>Thu, 27 Apr 2023 10:43:00 +0000</pubDate><atom:updated>2023-04-27T11:43:50.095+01:00</atom:updated><title>Unix - redirecting output to /dev/null</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;In the past, I&#39;ve used redirection to send output to &lt;i&gt;/dev/null&lt;/i&gt;&amp;nbsp;such as: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;foobar 2&amp;gt; /dev/null&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;where &lt;i&gt;foobar&lt;/i&gt;&amp;nbsp;is a non-existent command/binary, but I want the error output ( &lt;i&gt;stderr&lt;/i&gt; ) such as: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;zsh: command not found: foobar&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;or: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;foobar: command not found&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;to be &quot;hidden&quot;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Similarly, I&#39;ve used redirection to send &quot;pukka&quot; output ( &lt;i&gt;stdout&lt;/i&gt; ) to also go to &lt;i&gt;/dev/null&lt;/i&gt; e.g. : -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;uptime 1&amp;gt; /dev/null&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;However, I&#39;d not seen the simple way to do both in one fell swoop: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;foobar &amp;amp;&amp;gt; /dev/null&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;uptime &amp;amp;&amp;gt; /dev/null&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;where the ampersand ( &lt;i&gt;&amp;amp;&lt;/i&gt; ) is used to send BOTH &lt;i&gt;stdout&lt;/i&gt;&amp;nbsp;and &lt;i&gt;stderr&lt;/i&gt;&amp;nbsp;to &lt;i&gt;/dev/null&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;As ever, which is nice&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/04/unix-redirecting-output-to-devnull.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-7582295392981835005</guid><pubDate>Thu, 27 Apr 2023 10:23:00 +0000</pubDate><atom:updated>2023-04-27T11:32:04.608+01:00</atom:updated><title>IBM Container Registry - searching and formatting</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;So, when querying images that have been pushed to a namespace within IBM Container Registry, one can format the output to only return certain columns such as repository (image) name and tag.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Who knew ?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Well, the authors of the documentation did, apparently :-)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;&lt;a href=&quot;https://cloud.ibm.com/docs/Registry?topic=Registry-registry_cli_list&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Formatting and filtering the CLI output&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;For example: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;ibmcloud&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;cr images --format &quot;{{ .Repository }}:{{ .Tag }}&quot;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;icr.io/hello/hello_world:1.1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;icr.io/hello/hello_world:1.2&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;icr.io/hello/hello_world:latest&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;etc.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Other examples, from the doc, include: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;ibmcloud cr image-list --format &quot;{{ if gt .Size 1000000 }}{{ .Repository }}:{{ .Tag }} {{ .SecurityStatus.Status }}{{end}}&quot;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;ibmcloud cr image-digests --format &#39;{{if not .Tags}}{{.Repository}}@{{.Digest}}{{end}}&#39;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;ibmcloud cr image-inspect ibmliberty --format &quot;{{ .ContainerConfig.Labels }}&quot;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;etc.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Which is nice!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;*UPDATE*&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;And, bringing two posts together, I can report the created date AND format it from Epoch time: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;ic cr images --format &quot;{{ .Repository }}:{{ .Tag }}:{{ .Created }}&quot; | awk &#39;BEGIN { FS = &quot;:&quot;} ; {$3 = strftime(&quot;%c&quot;, $3)} 1&#39;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/04/ibm-container-registry-searching-and.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-1897105248203971761</guid><pubDate>Fri, 21 Apr 2023 15:42:00 +0000</pubDate><atom:updated>2023-04-21T16:42:02.625+01:00</atom:updated><title>Today I Learned - Munging Epochs using awk</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;So today I had a requirement to convert some Epoch-formatted dates, located in a CSV file, into human-readable dates...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;So today I learned about &lt;i&gt;awk&lt;/i&gt; vs. &lt;i&gt;gawk&lt;/i&gt;, and the &lt;i&gt;strftime()&lt;/i&gt; function ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I also learned that &lt;i&gt;awk&lt;/i&gt; on macOS isn&#39;t the same as &quot;real&quot; Gnu awk ( aka &lt;i&gt;gawk&lt;/i&gt;&amp;nbsp;), hence the need for &lt;i&gt;gawk&lt;/i&gt; ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I started by installing &lt;i&gt;gawk&lt;/i&gt;: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;brew install gawk&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and then updated my PATH to reflect it: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;PATH=&quot;/opt/homebrew/opt/gawk/libexec/gnubin:$PATH&quot;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Using an example of my data: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;cat file.txt&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;1681486514&lt;br /&gt;1681990787&lt;br /&gt;1681992853&lt;br /&gt;1681712949&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;wh&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;ich is WAY simpler than my real data, I was then able to munge it using &lt;i&gt;awk&lt;/i&gt; ( or, really, &lt;i&gt;gawk&lt;/i&gt; ) : -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;awk &#39;BEGIN { FS = &quot;,&quot;} ; {$1 = strftime(&quot;%c&quot;, $1)} 1&#39; file.txt&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;which returns: -&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Fri 14 Apr 16:35:14 2023&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Thu 20 Apr 12:39:47 2023&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Thu 20 Apr 13:14:13 2023&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Mon 17 Apr 07:29:09 2023&lt;/span&gt;&lt;/div&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I&#39;d previously done much the same using Excel, via a formula: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;=F17/86400+DATE(1970,1,1)&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;where cell F17 contained the Epoch-formatted date&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;But scripts are so much more fun ...&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/04/today-i-learned-munging-epochs-using-awk.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-3711903029817991485</guid><pubDate>Mon, 17 Apr 2023 12:36:00 +0000</pubDate><atom:updated>2023-04-17T13:36:08.927+01:00</atom:updated><title>IBM Cloud and JQ - more querying fun</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;A colleague laid down a challenge - well, he didn&#39;t actually lay it down, he merely posted a single-line script that used &lt;i&gt;awk&lt;/i&gt; and &lt;i&gt;sed&lt;/i&gt; and &lt;i&gt;grep&lt;/i&gt; - so I decided to build a better mousetrap ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;The requirement ... to query one&#39;s IBM Cloud account for Kubernetes (K8s) clusters, in this case leveraging the IBM Kubernetes Service (IKS) offering, and report the cluster name and the flavour ( flavor to our US friends )&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Here is up with what I ended: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;for i in $(ic cs cluster ls --provider vpc-gen2 --output JSON | jq -r &#39;.[].name&#39;); do echo &quot;Cluster Name:&quot; $i; echo -n &quot;Flavor: &quot;; ic cs workers --cluster $i --output JSON | jq -r &#39;.[].flavor&#39;; done&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;which resulted in: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Cluster Name: davehay-14042023&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Flavor: bx2.4x16&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Cluster Name: davehay-15042023&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Flavor: bx2.4x16&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;In essence, I list the clusters in the account ( across all regions ), specifically those using the Virtual Private Cloud Generation 2 ( vpc-gen2 ) provider, grab and output the name, and then use the name to inspect the cluster and report on it&#39;s flavor ( sic ).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Rather than using &lt;i&gt;awk&lt;/i&gt; and &lt;i&gt;sed&lt;/i&gt; and &lt;i&gt;grep&lt;/i&gt; etc. I chose to use &lt;i&gt;jq&lt;/i&gt;, working on the assumption that all of our engineers will have that installed as it&#39;s a ubiquitous tool these days.&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/04/ibm-cloud-and-jq-more-querying-fun.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-6842021073407708984</guid><pubDate>Tue, 04 Apr 2023 13:39:00 +0000</pubDate><atom:updated>2023-04-04T14:39:31.019+01:00</atom:updated><title>IBM Cloud CLI - Debugging </title><description>&lt;div style=&quot;text-align: left;&quot;&gt;From this: -&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;a href=&quot;https://www.ibm.com/cloud/blog/tips-and-tricks-for-using-the-ibm-cloud-cli&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Tips and Tricks for Using the IBM Cloud CLI&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;we have some rather useful debugging env vars such as: -&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;- IBMCLOUD_API_KEY&lt;br /&gt;-&amp;nbsp;IBMCLOUD_TRACE&lt;br /&gt;-&amp;nbsp;IBMCLOUD_COLOR&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;etc.&lt;br /&gt;&lt;/div&gt;</description><link>https://portal2portal.blogspot.com/2023/04/ibm-cloud-cli-debugging.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-6646865435935384858</guid><pubDate>Tue, 04 Apr 2023 12:46:00 +0000</pubDate><atom:updated>2023-04-04T13:46:03.975+01:00</atom:updated><title>TIL: FuzzyFinder - fzf - and jq</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Today I learned ( well, actually it was yesterday but who&#39;s counting days ? ) about&amp;nbsp;&lt;a href=&quot;https://github.com/junegunn/fzf&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;fzf&lt;/a&gt;&amp;nbsp;in the context of using it to test JQ expressions.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;The revelation came from &lt;a href=&quot;https://jvns.ca/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Julia Evans&lt;/a&gt;, author of&amp;nbsp;&lt;a href=&quot;https://store.wizardzines.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;WizardZines&lt;/a&gt;, aka b0rk, about whom I&#39;ve written before.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;She&#39;d mentioned the use of fzf and jq in a &lt;a href=&quot;https://social.jvns.ca/@b0rk/110135929111161568&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;post&lt;/a&gt; on Mastodon: -&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL1ffAKpNbwIZYuZhZf6EAJuf2qQz5_9W8wG2n_S3R3-wihI_lFr24_MM_6a2db8RIVQt0OUmWJ-wmEqnvBkEIpW0verrmepw6vIpInFTPDbrob53cXeLyh1SFeMPKxugjnaZfHy_e0v8jP86sI_FPAP4kh9ovx0vGuV5yRjexchiPTRpKEmnJr1_s/s577/Screenshot%202023-04-04%20at%2013.40.11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;539&quot; data-original-width=&quot;577&quot; height=&quot;299&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL1ffAKpNbwIZYuZhZf6EAJuf2qQz5_9W8wG2n_S3R3-wihI_lFr24_MM_6a2db8RIVQt0OUmWJ-wmEqnvBkEIpW0verrmepw6vIpInFTPDbrob53cXeLyh1SFeMPKxugjnaZfHy_e0v8jP86sI_FPAP4kh9ovx0vGuV5yRjexchiPTRpKEmnJr1_s/s320/Screenshot%202023-04-04%20at%2013.40.11.png&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;so I had to try it out ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;Install fzf&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;brew install fzf&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;u&gt;Create a JSON document&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;cat &amp;lt;&amp;lt; EOF &amp;gt; the_simpsons.json&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;[&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;givenName&quot;: &quot;Maggie&quot;,&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;familyName&quot;: &quot;Simpson&quot;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; },&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;givenName&quot;: &quot;Lisa&quot;,&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;familyName&quot;: &quot;Simpson&quot;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; },&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;givenName&quot;: &quot;Marge&quot;,&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;familyName&quot;: &quot;Simpson&quot;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; },&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;givenName&quot;: &quot;Homer&quot;,&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;familyName&quot;: &quot;Simpson&quot;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; },&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;givenName&quot;: &quot;Bart&quot;,&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;familyName&quot;: &quot;Simpson&quot;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;]&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;EOF&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;i&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;u&gt;Fire up fzf&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;echo &#39;&#39; | fzf --preview &#39;jq {q} &amp;lt; the_simpsons.json&#39;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;u&gt;Tinker with various jq queries&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjajG79xj-nKaK6jnxxcc_Tl2n6GZW6ZIchVW026gTpa0mFxipF97CO8FnPLvBGwDDSxWD0E3VEoK_NavZVIFP0eqeuaLnU7ub8i3H0N2C7cZ5EqXojcMNMzmDcRqJVXIruWa6nQe6sqH_-YCHoU1sezQcAQFr0bTQBIEeKgYqHd0yOCkVR3UoYLGxe/s562/Screenshot%202023-04-04%20at%2013.44.04.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;461&quot; data-original-width=&quot;562&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjajG79xj-nKaK6jnxxcc_Tl2n6GZW6ZIchVW026gTpa0mFxipF97CO8FnPLvBGwDDSxWD0E3VEoK_NavZVIFP0eqeuaLnU7ub8i3H0N2C7cZ5EqXojcMNMzmDcRqJVXIruWa6nQe6sqH_-YCHoU1sezQcAQFr0bTQBIEeKgYqHd0yOCkVR3UoYLGxe/s320/Screenshot%202023-04-04%20at%2013.44.04.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl7jUUsY-_gA-unpi0a6D-mZ3csKfnZ_Rw3wFslkOz8Gy2H29aRoT1rO6Y1qlOhUtnZcihB1qTaIMn-hkk3z3MyL8Krwhj0QTP1JUk_4la1b98nTxr_NwiUxJUmbO0BUVI-N6yINL-d2WjU8FJoGB89CoJawDYs6uKHmVFFuPGmh5QLriiEQ2me1sR/s568/Screenshot%202023-04-04%20at%2013.44.15.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;458&quot; data-original-width=&quot;568&quot; height=&quot;258&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl7jUUsY-_gA-unpi0a6D-mZ3csKfnZ_Rw3wFslkOz8Gy2H29aRoT1rO6Y1qlOhUtnZcihB1qTaIMn-hkk3z3MyL8Krwhj0QTP1JUk_4la1b98nTxr_NwiUxJUmbO0BUVI-N6yINL-d2WjU8FJoGB89CoJawDYs6uKHmVFFuPGmh5QLriiEQ2me1sR/s320/Screenshot%202023-04-04%20at%2013.44.15.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Nice!&lt;/span&gt;&lt;/div&gt;</description><link>https://portal2portal.blogspot.com/2023/04/til-fuzzyfinder-fzf-and-jq.html</link><author>noreply@blogger.com (Dave Hay)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL1ffAKpNbwIZYuZhZf6EAJuf2qQz5_9W8wG2n_S3R3-wihI_lFr24_MM_6a2db8RIVQt0OUmWJ-wmEqnvBkEIpW0verrmepw6vIpInFTPDbrob53cXeLyh1SFeMPKxugjnaZfHy_e0v8jP86sI_FPAP4kh9ovx0vGuV5yRjexchiPTRpKEmnJr1_s/s72-c/Screenshot%202023-04-04%20at%2013.40.11.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-4243981297303623662</guid><pubDate>Tue, 21 Feb 2023 12:41:00 +0000</pubDate><atom:updated>2023-02-21T12:41:12.151+00:00</atom:updated><title>Reading up on the differences between Zsh and Bash</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Typically, when writing self-documenting scripts, especially those used during a demonstration, I&#39;d add a command such as: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;read -p &quot;Press [Enter] to continue&quot;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;However, using Zsh on macOS 13.2.1 Ventura, I saw: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;read: -p: no coprocess&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;If I skipped the &lt;i&gt;-p&lt;/i&gt; I saw: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;zsh: not an identifier: Press [Enter] to continue&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;when I actually pressed the Enter key&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;As ever, the internet answered my cry for help&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://superuser.com/questions/555874/zsh-read-command-fails-within-bash-function-read1-p-no-coprocess&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;ZSH: Read command fails within bash function &quot;read:1: -p: no coprocess&quot;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXixBcZg9AGYjqMImLiQ4OL8Bw5JA85UI9VjoC8XmCD-I40Ehi3LyHnVJRQquKy8L8se8KO3l5FiiaoZr0U9HCJ-j7awLrYdyyTYK9Xjb9qIidxjp-F9790S88y_G-idbmSgpMz-bIeeyi_9RMn-voKRfV65A7v8kqaHLanx5fwOJmtvmCCn35bBNP/s703/Screenshot%202023-02-21%20at%2012.39.28.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;356&quot; data-original-width=&quot;703&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXixBcZg9AGYjqMImLiQ4OL8Bw5JA85UI9VjoC8XmCD-I40Ehi3LyHnVJRQquKy8L8se8KO3l5FiiaoZr0U9HCJ-j7awLrYdyyTYK9Xjb9qIidxjp-F9790S88y_G-idbmSgpMz-bIeeyi_9RMn-voKRfV65A7v8kqaHLanx5fwOJmtvmCCn35bBNP/w585-h296/Screenshot%202023-02-21%20at%2012.39.28.png&quot; width=&quot;585&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;So now I have this: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;ibmcloud cs cluster ls&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;read &quot;?Press [Enter] to continue&quot;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;which rightly prompts: -&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Press [Enter] to continue&lt;/span&gt;&lt;/div&gt;</description><link>https://portal2portal.blogspot.com/2023/02/reading-up-on-differences-between-zsh.html</link><author>noreply@blogger.com (Dave Hay)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXixBcZg9AGYjqMImLiQ4OL8Bw5JA85UI9VjoC8XmCD-I40Ehi3LyHnVJRQquKy8L8se8KO3l5FiiaoZr0U9HCJ-j7awLrYdyyTYK9Xjb9qIidxjp-F9790S88y_G-idbmSgpMz-bIeeyi_9RMn-voKRfV65A7v8kqaHLanx5fwOJmtvmCCn35bBNP/s72-w585-h296-c/Screenshot%202023-02-21%20at%2012.39.28.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-4751601330059242</guid><pubDate>Mon, 06 Feb 2023 11:24:00 +0000</pubDate><atom:updated>2023-02-06T11:24:24.201+00:00</atom:updated><title>Fun and games with Docker login on macOS</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I&#39;ve been&amp;nbsp;around the houses with Docker Desktop, Podman and Docker via Homebrew on my Mac over the past few months&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I saw&amp;nbsp;something curious this&amp;nbsp;morning, whilst trying to log into IBM Container&amp;nbsp;Registry&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;ic cr login&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Logging &#39;docker&#39; in to &#39;uk.icr.io&#39;...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;FAILED&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Failed to &#39;docker login&#39; to &#39;uk.icr.io&#39; with error: Error saving credentials: error storing credentials - err: docker-credential-desktop resolves to executable in current directory (./docker-credential-desktop), out: ``&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I then tried the same auth&amp;nbsp;process using &lt;i&gt;docker login&lt;/i&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;docker login --username iamapikey uk.icr.io&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;but with the same effect: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Password:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Error saving credentials: error storing credentials - err: docker-credential-desktop resolves to executable in current directory (./docker-credential-desktop), out: ``&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;In case I was missing something, I even tried the Docker Creds Helper: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;brew install docker-credential-helper&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;but to no avail.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Finally, in desperation, I nuked my Docker credentials file - which is a TERRIBLE thing imho&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;rm ~/.docker/config.json&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and tried again: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;docker login --username iamapikey uk.icr.io&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Password:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Login Succeeded&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Even better, now that I&#39;d installed&amp;nbsp;the creds helper - which caches the creds in the macOS Keychain, the &lt;i&gt;config.json&lt;/i&gt; is somewhat cleaner: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;cat ~/.docker/config.json&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&quot;auths&quot;: {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&quot;uk.icr.io&quot;: {}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;},&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&quot;credsStore&quot;: &quot;osxkeychain&quot;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Better still, the IBM Cloud CLI is also&amp;nbsp;happy: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;ic cr login&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Logging &#39;docker&#39; in to &#39;uk.icr.io&#39;...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;Logged in to &#39;uk.icr.io&#39;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;OK&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/02/fun-and-games-with-docker-login-on-macos.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-6352879114997633458</guid><pubDate>Thu, 02 Feb 2023 10:24:00 +0000</pubDate><atom:updated>2023-02-02T10:24:22.179+00:00</atom:updated><title>Removing filenames with special characters - a reminder </title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I&#39;ve written this down somewhere before but ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I have a file that I created, by mistake, by abusing the target during a &lt;i&gt;scp&lt;/i&gt; command&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;ls -altrc&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;-rw-r--r-- 1 root root 2541 Feb &amp;nbsp;2 02:15 &#39;~&#39;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and I wanted to delete it - but it has weird characters in the file name&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;This to the rescue: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;rm -v -- &#39;~&#39;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;removed &#39;~&#39;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/02/removing-filenames-with-special.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-3670272949778503026</guid><pubDate>Wed, 01 Feb 2023 09:34:00 +0000</pubDate><atom:updated>2023-02-01T09:34:00.448+00:00</atom:updated><title>Reminder to self - check out Finch</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;From this: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;Today we are happy to announce a new open source project, Finch. Finch is a new command line client for building, running, and publishing Linux containers. It provides for simple installation of a native macOS client, along with a curated set of de facto standard open source components including Lima, nerdctl, containerd, and BuildKit. With Finch, you can create and run containers locally, and build and publish Open Container Initiative (OCI) container images.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;a href=&quot;https://aws.amazon.com/blogs/opensource/introducing-finch-an-open-source-client-for-container-development/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Introducing Finch: An Open Source Client for Container Development&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;a friend had&amp;nbsp;recommended that I check out Finch, so it&#39;s definitely on my personal to-do list.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;It&#39;s on &lt;a href=&quot;https://github.com/runfinch&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt;&amp;nbsp;and &lt;a href=&quot;https://cloud-native.slack.com/archives/C04ANHJPA22&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Slack&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/02/reminder-to-self-check-out-finch.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-6857625985589547451</guid><pubDate>Mon, 16 Jan 2023 14:14:00 +0000</pubDate><atom:updated>2023-01-16T14:15:28.528+00:00</atom:updated><title>Go modules and forks</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I&#39;m tinkering with a Go project ( let&#39;s call it &lt;i&gt;foobar&lt;/i&gt;&amp;nbsp;), which has a dependency upon yet&amp;nbsp;another Go project ( let&#39;s call it &lt;i&gt;snafu&lt;/i&gt;&amp;nbsp;)&amp;nbsp;&amp;nbsp;in the same organisation.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;For the moment, I&#39;ve got a fork of &lt;i&gt;snafu&lt;/i&gt;&amp;nbsp;in my own org -&amp;nbsp;&lt;i&gt;david-hay&lt;/i&gt;&amp;nbsp;- and wanted to update &lt;i&gt;go.mod&lt;/i&gt;&amp;nbsp;in the &lt;i&gt;foobar&lt;/i&gt;&amp;nbsp;project to leverage it.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I knew I had to&amp;nbsp;update &lt;i&gt;go.mod&lt;/i&gt;&amp;nbsp;either manually or use &lt;i&gt;go mod edit --replace source=target&lt;/i&gt;&amp;nbsp;but couldn&#39;t get past the exception: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;go: -replace=github.com/org/snafu=github.com/david-hay/snafu: unversioned new path must be local directory&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;It turned out, as ever, that I was holding it wrong ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I needed to&amp;nbsp;explicitly provide a &quot;version&quot; - in this context, that was a branch e.g. &lt;i&gt;main&lt;/i&gt;&amp;nbsp;at which to point the target during &lt;i&gt;go mod edit --replace&lt;/i&gt;&amp;nbsp;like this: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;go mod edit --replace github.com/org/snafu=github.com/david-hay/snafu@main&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;In other words, the right-hand side of the &lt;i&gt;--replace&lt;/i&gt;&amp;nbsp;directive needed to&amp;nbsp;include four things: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;- domain e.g. g&lt;i&gt;ithub.com&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;- organization e.g. d&lt;i&gt;avid-hay&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;- project/repo e.g. &lt;i&gt;snafu&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;- branch e.g. &lt;i&gt;main&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;like this: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Mono;&quot;&gt;replace github.com/org/snafu =&amp;gt; github.com/david-hay/snafu main&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;When I then ran &lt;i&gt;go mod tidy&lt;/i&gt;, this went off to GitHub and&amp;nbsp;pulled down the latest release&amp;nbsp;from that branch in my fork: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;go: downloading github.com/david-hay/snafu v1.11.39-0.20230116121922-46267d910e38&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and updated &lt;i&gt;go.mod&lt;/i&gt;&amp;nbsp;with: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;replace github.com/org/snafu =&amp;gt; github.com/david-hay/snafu v1.11.39-0.20230116121922-46267d910e38&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;In other words, it replaced the branch with the&amp;nbsp;release ... which is nice&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;With thanks to this: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;a href=&quot;https://www.jvt.me/posts/2022/07/07/go-mod-fork/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Pointing to a fork of a Go module&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/01/go-modules-and-forks.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-6894952875448331719</guid><pubDate>Fri, 13 Jan 2023 13:49:00 +0000</pubDate><atom:updated>2023-01-13T13:49:41.865+00:00</atom:updated><title>Fun with Git and branching</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;In very brief terms, I hit an issue last week where I&#39;d created &lt;b&gt;four&lt;/b&gt;&amp;nbsp;branches in a repo, having cloned the &lt;b&gt;main&lt;/b&gt; branch of the upstream repo.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Therefore, I&#39;d done something like this: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;git clone -b main&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;git@github.com:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;snafu/foobar@github.com&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;cd ~/foobar&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;git fetch origin &amp;amp;&amp;amp; git rebase origin/main&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;to bring the &lt;i&gt;main&lt;/i&gt; branch down to my Mac.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I&#39;d then created my first branch: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;git branch dave1&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;git switch dave1&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and added/changed some code, committed it, and pushed my new branch upstream.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I then went ahead and created a second branch: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;git branch dave2&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;git switch dave2&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;git fetch origin &amp;amp;&amp;amp; git rebase origin/main&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and again added/changed some code, committed it, and pushed the new branch upstream&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;All seemed fine ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;And I did the same for two more branches - &lt;i&gt;dave3&lt;/i&gt;&amp;nbsp;and &lt;i&gt;dave4&lt;/i&gt;&amp;nbsp;- with a PR for each branch being reviewed/approved and merged into &lt;i&gt;main&lt;/i&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;And then I found, when merging in&amp;nbsp;separate Pull&amp;nbsp;Request, that my changes&amp;nbsp;from &lt;i&gt;dave2&lt;/i&gt;&amp;nbsp;overwrote the changes made in &lt;i&gt;dave1&lt;/i&gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Which was weird....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;A colleague helped explain ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;I see the 4 PRs were created from a shared branch instead of independently being created from main. That could explain the unexpected behavior where they kept rewriting each other.&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;He went onto explain how to avoid the issue ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;When you run git checkout -b branchname it creates a branch branching off of your current branch.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I am used to running git checkout main; git checkout -b branchname to ensure my branches are direct branches off of main. That helps rebase them based on other PRs merging to&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;.&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;which worked a treat&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;So, now I&#39;ve learned this, and am trying hard to add this to my &quot;muscle memory&quot; ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;git clone -b main git@github.com:snafu/foobar@github.com&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;cd foobar&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;git fetch origin &amp;amp;&amp;amp; git rebase origin/main&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;git checkout main; git checkout -b dave1&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;etc.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;We shall see if that sticks ....&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2023/01/fun-with-git-and-branching.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-5691209591992753721</guid><pubDate>Fri, 30 Dec 2022 13:53:00 +0000</pubDate><atom:updated>2022-12-30T13:53:47.423+00:00</atom:updated><title>Weirdness with Go</title><description>&lt;div&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Whilst tinkering ( my fave word ) with a Go project, &amp;nbsp;I was trying to force a complete rebuild of the module, via &lt;i&gt;go mod tidy&lt;/i&gt;.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Now I started by removing &lt;i&gt;go.mod&lt;/i&gt;&amp;nbsp;and &lt;i&gt;go.sum&lt;/i&gt;&amp;nbsp;: -&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;rm go.mod&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;rm go.sum&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;And, when I ran&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;go mod tidy&lt;/i&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;&amp;nbsp; I noticed that the command was: -&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;(a) failing&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;(b) looking&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;at a whole slew of OTHER Go projects, including those outside of the directory within which I was running the command, namely : -&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;/root/go/src/github.com/docker/sbom-cli-plugin&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Now, of course, note what I did previously i.e. &lt;i&gt;rm go.mod&lt;/i&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;THAT WAS MY DOWNFALL :-)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;From&amp;nbsp;this: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;&lt;a href=&quot;https://github.com/golang/go/wiki/Modules#why-does-go-mod-tidy-record-indirect-and-test-dependencies-in-my-gomod&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Why does &#39;go mod tidy&#39; record indirect and test dependencies in my &#39;go.mod&#39;?&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;lt;snip&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;go mod tidy updates your &lt;b&gt;current go.mod&lt;/b&gt; to include the dependencies needed for tests in your module — if a test fails, we must know which dependencies were used in order to reproduce the failure.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;lt;/snip&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Guess what I didn&#39;t have ?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;So, the&amp;nbsp;key was to re-create &lt;i&gt;go.mod&lt;/i&gt;&amp;nbsp;via: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;go mod init&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and then re-run the &lt;i&gt;make&lt;/i&gt;&amp;nbsp;command that had initially populated &lt;i&gt;go.mod&lt;/i&gt;&amp;nbsp;- which also ran &lt;i&gt;go mod tidy&lt;/i&gt;&amp;nbsp;and then ... everything is OK.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Phew !&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2022/12/weirdness-with-go.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-1604907197734834327</guid><pubDate>Tue, 20 Dec 2022 13:27:00 +0000</pubDate><atom:updated>2022-12-20T13:32:17.935+00:00</atom:updated><title>Giving Twitter the bird ...</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;After 15 years or so, I decided to jump out of the Twitter-verse, and join&amp;nbsp;Mastodon ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;I&#39;m probably following&amp;nbsp;the herd ( well, a mastodon is kinda like a mammoth, which must&#39;ve been a herd critter ), but ... here I am&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;@davehay@infosec.exchange&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;a href=&quot;https://infosec.exchange/@davehay&quot;&gt;https://infosec.exchange/@davehay&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;Let&#39;s see what happens next .....&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2022/12/giving-twitter-bird.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-6740338341177826314.post-6116978394336692285</guid><pubDate>Fri, 02 Dec 2022 16:45:00 +0000</pubDate><atom:updated>2022-12-02T16:45:22.075+00:00</atom:updated><title>Reminder - how to split strings in a shell script</title><description>&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;There&#39;s almost certainly 73 different ways to do this, but this worked for me&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;The problem to be solved ... I have a string containing three container architectures: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&lt;i&gt;export architecture=&quot;amd64 s390x arm64&quot;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;and I want to split it into three, each on a newline&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;This does the needful: -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;echo $&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;IBM Plex Sans&amp;quot;;&quot;&gt;architecture&lt;/span&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;&amp;nbsp;| tr &quot;;&quot; &quot;\n&quot;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: IBM Plex Sans;&quot;&gt;rather nicely&lt;/span&gt;&lt;/p&gt;</description><link>https://portal2portal.blogspot.com/2022/12/reminder-how-to-split-strings-in-shell.html</link><author>noreply@blogger.com (Dave Hay)</author><thr:total>0</thr:total></item></channel></rss>

If you would like to create a banner that links to this page (i.e. this validation result), do the following:

  1. Download the "valid RSS" banner.

  2. Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)

  3. Add this HTML to your page (change the image src attribute if necessary):

If you would like to create a text link instead, here is the URL you can use:

http://www.feedvalidator.org/check.cgi?url=http%3A//portal2portal.blogspot.com/feeds/posts/default%3Falt%3Drss

Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda