<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Chester Wyke</title>
    <subtitle>Chester Wyke is a software developer by trade and passion. This is his personal site with information about him and his publicly accessible notes on various topics.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://dev.chester.wykies.com/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-05-19T00:00:00+00:00</updated>
    <id>https://dev.chester.wykies.com/atom.xml</id>
    <entry xml:lang="en">
        <title>Tags</title>
        <published>2026-05-18T00:00:00+00:00</published>
        <updated>2026-05-18T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/tags/"/>
        <id>https://dev.chester.wykies.com/git/tags/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/tags/">&lt;h1 id=&quot;see-existing-tags&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-existing-tags&quot; aria-label=&quot;Anchor link for: see-existing-tags&quot;&gt;See existing tags&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_listing_your_tags&quot;&gt;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_listing_your_tags&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;List all&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; tag&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Filter listing using wildcard pattern (eg.)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; tag&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -l&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;v1.*&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;see-details-about-one-of-the-tags&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-details-about-one-of-the-tags&quot; aria-label=&quot;Anchor link for: see-details-about-one-of-the-tags&quot;&gt;See details about one of the tags&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_annotated_tags&quot;&gt;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_annotated_tags&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; show&lt;&#x2F;span&gt;&lt;span&gt; [TagName]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;creating-tags&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-tags&quot; aria-label=&quot;Anchor link for: creating-tags&quot;&gt;Creating Tags&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_creating_tags&quot;&gt;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_creating_tags&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;For annotated tags&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; tag&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;span&gt; [TagName] -m &lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&amp;quot;Tag Message&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For lightweight tags&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; tag&lt;&#x2F;span&gt;&lt;span&gt; [TagName]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;tagging-previous-commits&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tagging-previous-commits&quot; aria-label=&quot;Anchor link for: tagging-previous-commits&quot;&gt;Tagging previous commits&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_tagging_later&quot;&gt;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_tagging_later&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Get the &lt;code&gt;commit checksum&lt;&#x2F;code&gt; of the commit you want to tag.
You can use &lt;code&gt;git log --pretty=oneline&lt;&#x2F;code&gt; to see recent commits.
You need to just add the &lt;code&gt;commit checksum&lt;&#x2F;code&gt; to the end (seems to be at least 4 characters if that makes it unique)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; tag&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;span&gt; [TagName] [CommitChecksum]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For Example&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; tag&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; v1.2 9fceb02&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;pushing-tags-to-remote&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#pushing-tags-to-remote&quot; aria-label=&quot;Anchor link for: pushing-tags-to-remote&quot;&gt;Pushing Tags to Remote&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_sharing_tags&quot;&gt;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_sharing_tags&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; push&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --tags&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;deleting-tags&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#deleting-tags&quot; aria-label=&quot;Anchor link for: deleting-tags&quot;&gt;Deleting Tags&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;5480258&#x2F;how-can-i-delete-a-remote-tag&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;5480258&#x2F;how-can-i-delete-a-remote-tag&lt;&#x2F;a&gt;
Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_deleting_tags&quot;&gt;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Tagging#_deleting_tags&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;To delete locally use&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; tag&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --delete&lt;&#x2F;span&gt;&lt;span&gt; [TagName]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To delete on the remote use&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; push origin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --delete&lt;&#x2F;span&gt;&lt;span&gt; [TagName]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Versioning Crates</title>
        <published>2026-04-29T00:00:00+00:00</published>
        <updated>2026-04-29T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/versioning/"/>
        <id>https://dev.chester.wykies.com/rust/versioning/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/versioning/">&lt;h1 id=&quot;general-tips&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#general-tips&quot; aria-label=&quot;Anchor link for: general-tips&quot;&gt;General tips&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;The cargo book has a great &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;semver.html&quot;&gt;section on semver&lt;&#x2F;a&gt; that gives examples of different types of changes. Note: breaking changes require a bump of the first non-zero version number. That is what cargo looks for to determine incompatibility.&lt;&#x2F;li&gt;
&lt;li&gt;If you are releasing a library I highly recommend using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;cargo-semver-checks&quot;&gt;cargo-semver-checks&lt;&#x2F;a&gt; to help detect breaking changes. It’s not perfect but it’s always improving and is IMO a minimum amount of checking for libraries.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;opinions-on-when-to-bump-version-numbers&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#opinions-on-when-to-bump-version-numbers&quot; aria-label=&quot;Anchor link for: opinions-on-when-to-bump-version-numbers&quot;&gt;Opinions on when to bump version numbers&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;For clarity I’m not talking which part of the version number to bump here which indicates the type of changes included.
I’m only taking about when that bump should happen.&lt;&#x2F;p&gt;
&lt;details&gt;
&lt;summary&gt;Background&lt;&#x2F;summary&gt;
&lt;p&gt;I’ve been giving this a lot of thought recently as I’ve noticed different ways that various crates do it.
After much consideration I came up with my opinions below.
I recently wanted to patch a library create that I depended on but they’d already bumped the version number in the git repo so I wasn’t able to use patch.
Fortunately, it was a direct dependency so I just changed the source and was able to use my fork until my patch lands.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;&#x2F;details&gt;
&lt;ul&gt;
&lt;li&gt;For library crates do not bump until you are ready to release. I think this is the best way because if someone needs to make a change to your crate having the version number the same as the released version makes it easy to use &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;cargo&#x2F;#patch-a-crate&quot;&gt;patch section&lt;&#x2F;a&gt; of the &lt;code&gt;Cargo.toml&lt;&#x2F;code&gt; to replace your create throughout their dependencies. They are at least able to replace it without using patch if it’s a direct dependency, but would still be better IMO to use patch to separate out when you’re changing something on purpose.&lt;&#x2F;li&gt;
&lt;li&gt;For binary crates I think the bump should happen right after release by bumping the minor (or patch if still pre 1.0) and appending &lt;code&gt;-dev&lt;&#x2F;code&gt;. For example from &lt;code&gt;0.1.3&lt;&#x2F;code&gt; to &lt;code&gt;0.1.4-dev&lt;&#x2F;code&gt; so that you users who build from the git repo instead have a different version number.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Divine Mercy Chaplet</title>
        <published>2026-03-03T00:00:00+00:00</published>
        <updated>2026-05-19T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/prayers/divine-mercy-chaplet/"/>
        <id>https://dev.chester.wykies.com/prayers/divine-mercy-chaplet/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/prayers/divine-mercy-chaplet/">&lt;p&gt;After I copied the bellow from the app to make it easier to access I found that the Marian Fathers already have a website with more information and laid out much better than I have.
I’ll keep this page as I already typed it up but I would deferrer any visitors to the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.thedivinemercy.org&#x2F;&quot;&gt;divine mercy website&lt;&#x2F;a&gt; or see links to parts I found helpful to get started as it may feel a bit overwhelming to start off:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.thedivinemercy.org&#x2F;message&quot;&gt;message&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.thedivinemercy.org&#x2F;message&#x2F;devotions&#x2F;chaplet&quot;&gt;chaplet&lt;&#x2F;a&gt; and the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.thedivinemercy.org&#x2F;message&#x2F;devotions&#x2F;pray-the-chaplet&quot;&gt;step by step&lt;&#x2F;a&gt; instructions&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.thedivinemercy.org&#x2F;message&#x2F;devotions&#x2F;novena&quot;&gt;Novena&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.thedivinemercy.org&#x2F;message&#x2F;devotions&#x2F;chaplet&quot;&gt;Pray along with Video&lt;&#x2F;a&gt; Really moving &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=p5TGfisOKMM&quot;&gt;The Chaplet of Divine Mercy in Song (Complete)&lt;&#x2F;a&gt;.&lt;br &#x2F;&gt;
&lt;div class=&quot;yv&quot;&gt;
    &lt;iframe src=&quot;https:&#x2F;&#x2F;www.youtube-nocookie.com&#x2F;embed&#x2F;p5TGfisOKMM&quot; title=&quot;Youtube&quot; class=&quot;yvi&quot; webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;&#x2F;iframe&gt;
&lt;&#x2F;div&gt;
&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;details&gt;
&lt;summary&gt; Lyrics, and prayer versions used in video&lt;&#x2F;summary&gt;
&lt;details&gt;
&lt;summary&gt;Show &lt;strong&gt;Optional Opening Prayer&lt;&#x2F;strong&gt;&lt;&#x2F;summary&gt;
&lt;p&gt;You expired, Jesus,&lt;br &#x2F;&gt;
but the source of life gushed forth for souls,&lt;br &#x2F;&gt;
and the ocean of mercy opened up for the whole world.&lt;br &#x2F;&gt;
O Fount of Life, unfathomable Divine Mercy,&lt;br &#x2F;&gt;
envelop the whole world and empty Yourself out upon us.&lt;&#x2F;p&gt;
&lt;p&gt;O Blood and Water,&lt;br &#x2F;&gt;
which gushed forth from the Heart of Jesus as a fount of mercy for us,&lt;br &#x2F;&gt;
I trust in You! (3x)&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Lyrics to opening hymn&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Hail to Thee! True body sprung&lt;br &#x2F;&gt;
From the Virgin Mary’s womb!&lt;br &#x2F;&gt;
Same that on the cross was hung&lt;br &#x2F;&gt;
Bore for man the bitter doom.&lt;br &#x2F;&gt;
Sweet Jesus, Mary’s son.&lt;br &#x2F;&gt;
Thou whose side was pierced and flowed&lt;br &#x2F;&gt;
Both with water and with blood;&lt;br &#x2F;&gt;
Suffer us to taste of Thee&lt;br &#x2F;&gt;
In our life’s last agony.&lt;br &#x2F;&gt;
Sweet Jesus, Mary’s son.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Apostle’s Creed&lt;&#x2F;strong&gt; (version said in the video)&lt;br &#x2F;&gt;
I believe in God,&lt;br &#x2F;&gt;
the Father almighty,&lt;br &#x2F;&gt;
Creator of Heaven and earth,&lt;br &#x2F;&gt;
I believe in Jesus Christ,&lt;br &#x2F;&gt;
His only Son, our Lord,&lt;br &#x2F;&gt;
He was conceived by the power of the Holy Spirit,&lt;br &#x2F;&gt;
and born of the Virgin Mary,&lt;br &#x2F;&gt;
He suffered under Pontius Pilate,&lt;br &#x2F;&gt;
was crucified, died, and was buried;&lt;br &#x2F;&gt;
He descended to the dead;&lt;br &#x2F;&gt;
on the third day He rose again;&lt;br &#x2F;&gt;
He ascended into Heaven,&lt;br &#x2F;&gt;
and is seated at the right hand of the Father.&lt;br &#x2F;&gt;
He will come again to judge the living and the dead.&lt;br &#x2F;&gt;
I believe in the Holy Spirit, the holy catholic Church,&lt;br &#x2F;&gt;
the communion of Saints,&lt;br &#x2F;&gt;
the forgiveness of sins,&lt;br &#x2F;&gt;
the resurrection of the body,&lt;br &#x2F;&gt;
and the life everlasting. Amen.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Closing Song&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Holy God, Holy Mighty One, Holy Immortal One, have mercy on us and on the whole world. (x3)&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Closing prayer&lt;&#x2F;strong&gt; (Not included in video)&lt;br &#x2F;&gt;
Eternal God, in whom mercy is endless,&lt;br &#x2F;&gt;
and the treasury of compassion inexhaustible,&lt;br &#x2F;&gt;
look kindly upon us,&lt;br &#x2F;&gt;
and increase Your mercy in us,&lt;br &#x2F;&gt;
that in difficult moments,&lt;br &#x2F;&gt;
we might not despair, nor become despondent,&lt;br &#x2F;&gt;
but with great confidence, submit ourselves to Your holy will,&lt;br &#x2F;&gt;
which is Love and Mercy Itself. Amen.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;details&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;play.google.com&#x2F;store&#x2F;apps&#x2F;details?id=com.jacobsmedia.divinem&quot;&gt;Divine Mercy&lt;&#x2F;a&gt; App&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Start with the sign of the cross&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;On the first big bead&lt;&#x2F;p&gt;
&lt;details&gt;
&lt;summary&gt;Show &lt;strong&gt;Optional Opening Prayer&lt;&#x2F;strong&gt;&lt;&#x2F;summary&gt;
&lt;p&gt;You expired, Jesus,&lt;br &#x2F;&gt;
but the source of life gushed forth for souls,&lt;br &#x2F;&gt;
and the ocean of mercy opened up for the whole world.&lt;br &#x2F;&gt;
O Fount of Life, unfathomable Divine Mercy,&lt;br &#x2F;&gt;
envelop the whole world and empty Yourself out upon us.&lt;&#x2F;p&gt;
&lt;p&gt;O Blood and Water,&lt;br &#x2F;&gt;
which gushed forth from the Heart of Jesus as a fount of mercy for us,&lt;br &#x2F;&gt;
I trust in You! (3x)&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;details&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;On the three small beads say&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;ol&gt;
&lt;li&gt;Pray an &lt;strong&gt;Our Father&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;details&gt;
&lt;summary&gt;Show words&lt;&#x2F;summary&gt;
&lt;p&gt;Our Father, who art in Heaven,&lt;br &#x2F;&gt;
hallowed by Thy Name;&lt;br &#x2F;&gt;
Thy kingdom come;&lt;br &#x2F;&gt;
Thy will be done on earth&lt;br &#x2F;&gt;
as it is in Heaven.&lt;br &#x2F;&gt;
Give us this day&lt;br &#x2F;&gt;
our daily bread;&lt;br &#x2F;&gt;
and forgive us our trespasses&lt;br &#x2F;&gt;
as we forgive those who trespass against us;&lt;br &#x2F;&gt;
and lead us not into temptation,&lt;br &#x2F;&gt;
but deliver us from evil. Amen.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;Pray a &lt;strong&gt;Hail Mary&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;details&gt;
&lt;summary&gt;Show words&lt;&#x2F;summary&gt;
&lt;p&gt;Hail Mary, full of grace.&lt;br &#x2F;&gt;
The Lord is with thee.&lt;br &#x2F;&gt;
Blessed art thou among women,&lt;br &#x2F;&gt;
and blessed is the fruit of thy womb, Jesus.&lt;br &#x2F;&gt;
Holy Mary, Mother of God,&lt;br &#x2F;&gt;
pray for us sinners,&lt;br &#x2F;&gt;
now and at the hour of our death. Amen&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Pray &lt;strong&gt;The Apostle’s Creed&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;details&gt;
&lt;summary&gt;Show words&lt;&#x2F;summary&gt;
&lt;p&gt;I believe in God,&lt;br &#x2F;&gt;
the Father almighty,&lt;br &#x2F;&gt;
Creator of Heaven and earth,&lt;br &#x2F;&gt;
and in Jesus Christ,&lt;br &#x2F;&gt;
His only Son, our Lord,&lt;br &#x2F;&gt;
who was conceived by the Holy Spirit,&lt;br &#x2F;&gt;
born of the Virgin Mary,&lt;br &#x2F;&gt;
suffered under Pontius Pilate,&lt;br &#x2F;&gt;
was crucified, died, and was buried;&lt;br &#x2F;&gt;
He descended into hell;&lt;br &#x2F;&gt;
on the third day He rose again from the dead;&lt;br &#x2F;&gt;
He ascended into Heaven,&lt;br &#x2F;&gt;
and is seated at the right hand of God the Father almighty;&lt;br &#x2F;&gt;
from there He will come to judge the living and the dead.&lt;br &#x2F;&gt;
I believe in the Holy Spirit, the holy catholic Church,&lt;br &#x2F;&gt;
the communion of Saints,&lt;br &#x2F;&gt;
the forgiveness of sins,&lt;br &#x2F;&gt;
the resurrection of the body,&lt;br &#x2F;&gt;
and life everlasting. Amen.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;On each of the remaining large beads pray:&lt;br &#x2F;&gt;
&lt;strong&gt;The Eternal Father&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Eternal Father,&lt;br &#x2F;&gt;
I offer You the Body and Blood,&lt;br &#x2F;&gt;
Soul and Divinity&lt;br &#x2F;&gt;
of Your dearly beloved Son,&lt;br &#x2F;&gt;
Our Lord Jesus Christ,&lt;br &#x2F;&gt;
in atonement for our sins and those of the whole world.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;On each of the remaining small beads pray:&lt;br &#x2F;&gt;
For the sake of His sorrowful Passion,&lt;br &#x2F;&gt;
have mercy on us and on the whole world.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Closing Prayers&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
Holy God, Holy Mighty One, Holy Immortal One, have mercy on us and on the whole world. (x3)&lt;&#x2F;p&gt;
&lt;p&gt;Eternal God, in whom mercy is endless,&lt;br &#x2F;&gt;
and the treasury of compassion inexhaustible,&lt;br &#x2F;&gt;
look kindly upon us,&lt;br &#x2F;&gt;
and increase Your mercy in us,&lt;br &#x2F;&gt;
that in difficult moments,&lt;br &#x2F;&gt;
we might not despair, nor become despondent,&lt;br &#x2F;&gt;
but with great confidence, submit ourselves to Your holy will,&lt;br &#x2F;&gt;
which is Love and Mercy Itself. Amen.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;End with the sign of the cross.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;www.thedivinemercy.org&#x2F;sites&#x2F;default&#x2F;files&#x2F;divinemercyvilniusimage.jpg&quot; alt=&quot;Divine Mercy Image&quot; &#x2F;&gt;&lt;br &#x2F;&gt;
Image credit the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.thedivinemercy.org&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.thedivinemercy.org&#x2F;&lt;&#x2F;a&gt; page on: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.thedivinemercy.org&#x2F;message&#x2F;devotions&#x2F;image&quot;&gt;The Image of The Divine Mercy&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Priestly Benediction</title>
        <published>2026-03-02T00:00:00+00:00</published>
        <updated>2026-03-02T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/prayers/priestly-benediction/"/>
        <id>https://dev.chester.wykies.com/prayers/priestly-benediction/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/prayers/priestly-benediction/">&lt;p&gt;Source: Numbers Chapter 6: 22-27&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;22&lt;&#x2F;em&gt; The Lord said to Moses, &lt;em&gt;23&lt;&#x2F;em&gt; “Say to Aaron and his sons, Thus you shall bless the people of Israel: you shall say to them,&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;24    The Lord bless you and keep you:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;25    The Lord make his face to shine upon you, and be gracious to you:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;26    The Lord lift up his countenance upon you, and give you peace.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;em&gt;27&lt;&#x2F;em&gt; “So shall they put my name upon the people of Israel, and I will bless them.”&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Regarded as a good prayer to pray over your children. Got it from &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;bibleinayear.fireside.fm&#x2F;day-57-2026&quot;&gt;The Bible in a Year Podcast&lt;&#x2F;a&gt; and tracked it down more easily because of the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;podcasts.happyscribe.com&#x2F;the-bible-in-a-year-with-fr-mike-schmitz&#x2F;day-57-hear-o-israel-2026#t823-14&quot;&gt;transcript&lt;&#x2F;a&gt; that came up when I searched.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Github Notifications</title>
        <published>2026-01-20T00:00:00+00:00</published>
        <updated>2026-01-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/github/notifications/"/>
        <id>https://dev.chester.wykies.com/github/notifications/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/github/notifications/">&lt;h1 id=&quot;emails&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#emails&quot; aria-label=&quot;Anchor link for: emails&quot;&gt;Emails&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I noticed that github cc’s specific email addresses depending on the reason for the notification. Found a list of them on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;subscriptions-and-notifications&#x2F;reference&#x2F;email-notification-headers&quot;&gt;their site&lt;&#x2F;a&gt;.
Copied below in case the site gets moved or something.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;GitHub will &lt;code&gt;cc&lt;&#x2F;code&gt; you if you’re subscribed to a conversation. The second &lt;code&gt;cc&lt;&#x2F;code&gt; email address matches the notification reason. The suffix for these notification reasons is &lt;code&gt;@noreply.github.com&lt;&#x2F;code&gt;. The possible notification reasons are:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;assign&lt;&#x2F;code&gt;: You were assigned to an issue or pull request.&lt;br &#x2F;&gt;
&lt;code&gt;author&lt;&#x2F;code&gt;: You created an issue or pull request.&lt;br &#x2F;&gt;
&lt;code&gt;ci_activity&lt;&#x2F;code&gt;: A GitHub Actions workflow run that you triggered was completed.&lt;br &#x2F;&gt;
&lt;code&gt;comment&lt;&#x2F;code&gt;: You commented on an issue or pull request.&lt;br &#x2F;&gt;
&lt;code&gt;manual&lt;&#x2F;code&gt;: There was an update to an issue or pull request you manually subscribed to.&lt;br &#x2F;&gt;
&lt;code&gt;mention&lt;&#x2F;code&gt;: You were mentioned on an issue or pull request.&lt;br &#x2F;&gt;
&lt;code&gt;push&lt;&#x2F;code&gt;: Someone committed to a pull request you’re subscribed to.&lt;br &#x2F;&gt;
&lt;code&gt;review_requested&lt;&#x2F;code&gt;: You or a team you’re a member of was requested to review a pull request.&lt;br &#x2F;&gt;
&lt;code&gt;security_alert&lt;&#x2F;code&gt;: GitHub detected a vulnerability in a repository you receive alerts for.&lt;br &#x2F;&gt;
&lt;code&gt;state_change&lt;&#x2F;code&gt;: An issue or pull request you’re subscribed to was either closed or opened.&lt;br &#x2F;&gt;
&lt;code&gt;subscribed&lt;&#x2F;code&gt;: There was an update in a repository you’re watching.&lt;br &#x2F;&gt;
&lt;code&gt;team_mention&lt;&#x2F;code&gt;: A team you belong to was mentioned on an issue or pull request.&lt;br &#x2F;&gt;
&lt;code&gt;your_activity&lt;&#x2F;code&gt;: You opened, commented on, or closed an issue or pull request.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Site Setup Instructions</title>
        <published>2025-12-03T00:00:00+00:00</published>
        <updated>2025-12-03T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/site-setup/"/>
        <id>https://dev.chester.wykies.com/misc/site-setup/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/site-setup/">&lt;h1 id=&quot;presentation-history&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#presentation-history&quot; aria-label=&quot;Anchor link for: presentation-history&quot;&gt;Presentation History&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;site-setup&#x2F;&quot;&gt;Show live&lt;&#x2F;a&gt; site and &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;themes&#x2F;&quot;&gt;Templates&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Briefly describe Static Site Generators (SSG)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;&quot;&gt;Zola&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;commonmark.org&#x2F;help&#x2F;&quot;&gt;Markdown&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Briefly show what controls how github knows how to publish your site (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;c-git.github.io&#x2F;tree&#x2F;main&#x2F;.github&#x2F;workflows&quot;&gt;Github Actions&lt;&#x2F;a&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;Make a correction to this page and push it live&lt;&#x2F;li&gt;
&lt;li&gt;Create sample site&lt;&#x2F;li&gt;
&lt;li&gt;Tooling recommendations &#x2F; options
&lt;ol&gt;
&lt;li&gt;In browser only via github (Either limited hours with &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;github&#x2F;codespaces&#x2F;&quot;&gt;codespaces&lt;&#x2F;a&gt; or less convenient interface via their website)&lt;&#x2F;li&gt;
&lt;li&gt;Local with vscode and git (which I use)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;My additional notes on &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;markdown&#x2F;&quot;&gt;markdown&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Cost
&lt;ol&gt;
&lt;li&gt;Hosting&lt;&#x2F;li&gt;
&lt;li&gt;Tools&lt;&#x2F;li&gt;
&lt;li&gt;Domain Registration&lt;&#x2F;li&gt;
&lt;li&gt;Support&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;e-Commerce&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Google Forms</title>
        <published>2025-11-16T00:00:00+00:00</published>
        <updated>2025-11-16T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/google_workspace/forms/"/>
        <id>https://dev.chester.wykies.com/google_workspace/forms/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/google_workspace/forms/">&lt;h1 id=&quot;pre-fill-google-forms-with-answers-from-google-sheets&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#pre-fill-google-forms-with-answers-from-google-sheets&quot; aria-label=&quot;Anchor link for: pre-fill-google-forms-with-answers-from-google-sheets&quot;&gt;Pre-fill Google Forms with Answers from Google Sheets&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=vcEju__MPtw&quot;&gt;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=vcEju__MPtw&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I don’t add much here to what is in the video but I decided to add this article for ease of future reference and to provide a provide concise way to follow the steps without needing to re-watch the video.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;In the three dot menu in the top right select &lt;code&gt;Pre-fill form&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Fill in unique “search keys” to be replaced then click &lt;code&gt;Get link&lt;&#x2F;code&gt; then click the &lt;code&gt;COPY LINK&lt;&#x2F;code&gt; button that appears at the bottom.&lt;&#x2F;li&gt;
&lt;li&gt;Pick a cell in your Google Sheet to store the template link and paste there&lt;&#x2F;li&gt;
&lt;li&gt;Use nested calls to the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;support.google.com&#x2F;docs&#x2F;answer&#x2F;3094215&quot;&gt;&lt;code&gt;SUBSTITUTE&lt;&#x2F;code&gt;&lt;&#x2F;a&gt; function to replace each “search key” from above&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>GitLens</title>
        <published>2025-05-24T00:00:00+00:00</published>
        <updated>2025-05-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/vscode/gitlens/"/>
        <id>https://dev.chester.wykies.com/vscode/gitlens/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/vscode/gitlens/">&lt;h1 id=&quot;easily-pull-in-changes-from-another-branch&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#easily-pull-in-changes-from-another-branch&quot; aria-label=&quot;Anchor link for: easily-pull-in-changes-from-another-branch&quot;&gt;Easily pull in changes from another branch&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;strong&gt;WARNING:&lt;&#x2F;strong&gt;: Depending on your use case using merging branches or &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.atlassian.com&#x2F;git&#x2F;tutorials&#x2F;cherry-pick&quot;&gt;git cherry picking&lt;&#x2F;a&gt; might make more sense but if the branches will never be merged and you don’t want to take entire commits or want to selectively pick from just the current diff between the branches then this might make sense.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Source Control&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;vscode&#x2F;gitlens&#x2F;source_control.png&quot; alt=&quot;Source Control Screenshot&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;GITLENS Branches Tab&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;vscode&#x2F;gitlens&#x2F;GITLENS.png&quot; alt=&quot;GITLENS Branches screenshot&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Right click on a branch then click &lt;code&gt;Compare Working Tree to Here&lt;&#x2F;code&gt;&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;vscode&#x2F;gitlens&#x2F;compare.png&quot; alt=&quot;Screenshot of context menu&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Click &lt;code&gt;Open All Changes&lt;&#x2F;code&gt;&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;vscode&#x2F;gitlens&#x2F;open_all_changes.png&quot; alt=&quot;Screenshot of button to show all changes&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Screen Application</title>
        <published>2025-05-06T00:00:00+00:00</published>
        <updated>2025-05-06T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/screen/"/>
        <id>https://dev.chester.wykies.com/debian/screen/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/screen/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;linuxize.com&#x2F;post&#x2F;how-to-use-linux-screen&#x2F;&quot;&gt;https:&#x2F;&#x2F;linuxize.com&#x2F;post&#x2F;how-to-use-linux-screen&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;check-if-installed&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-if-installed&quot; aria-label=&quot;Anchor link for: check-if-installed&quot;&gt;Check if Installed&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;screen&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --version&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;installation-command&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#installation-command&quot; aria-label=&quot;Anchor link for: installation-command&quot;&gt;Installation command&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install screen&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;start-session&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#start-session&quot; aria-label=&quot;Anchor link for: start-session&quot;&gt;Start session&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;unnamed&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#unnamed&quot; aria-label=&quot;Anchor link for: unnamed&quot;&gt;Unnamed&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;screen&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;named&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#named&quot; aria-label=&quot;Anchor link for: named&quot;&gt;Named&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Where &lt;code&gt;session_name&lt;&#x2F;code&gt; is the name of the session&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;screen&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -S&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; session_name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;list-sessions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#list-sessions&quot; aria-label=&quot;Anchor link for: list-sessions&quot;&gt;List sessions&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;screen&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -ls&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;reconnect-to-session&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#reconnect-to-session&quot; aria-label=&quot;Anchor link for: reconnect-to-session&quot;&gt;Reconnect to session&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;screen&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -r&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;in-session-commands&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#in-session-commands&quot; aria-label=&quot;Anchor link for: in-session-commands&quot;&gt;In session commands&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;NB: Typing &lt;code&gt;exit&lt;&#x2F;code&gt; closes the screen.&lt;&#x2F;li&gt;
&lt;li&gt;Both in the help and below all commands are &lt;strong&gt;preceded by pressing&lt;&#x2F;strong&gt; &lt;kbd&gt;Ctrl&lt;&#x2F;kbd&gt;+&lt;kbd&gt;a&lt;&#x2F;kbd&gt; then releasing both buttons.
Eg. To disconnect You press &lt;kbd&gt;Ctrl&lt;&#x2F;kbd&gt;+&lt;kbd&gt;a&lt;&#x2F;kbd&gt; simultaneously then release both buttons then press &lt;kbd&gt;d&lt;&#x2F;kbd&gt; alone.&lt;&#x2F;li&gt;
&lt;li&gt;In some versions the help commands are shown as either &lt;code&gt;^A&lt;&#x2F;code&gt; or &lt;code&gt;^A: a&lt;&#x2F;code&gt;. If it shows &lt;code&gt;^A&lt;&#x2F;code&gt; then you press &lt;kbd&gt;Ctrl&lt;&#x2F;kbd&gt;+&lt;kbd&gt;a&lt;&#x2F;kbd&gt;, however if it shows &lt;code&gt;^A a&lt;&#x2F;code&gt; you press only &lt;kbd&gt;a&lt;&#x2F;kbd&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;detaching&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#detaching&quot; aria-label=&quot;Anchor link for: detaching&quot;&gt;Detaching&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;kbd&gt; d &lt;&#x2F;kbd&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;help&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#help&quot; aria-label=&quot;Anchor link for: help&quot;&gt;Help&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;kbd&gt; ? &lt;&#x2F;kbd&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;window-list&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#window-list&quot; aria-label=&quot;Anchor link for: window-list&quot;&gt;Window List&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Used to select open screens or know if your in a screen&lt;&#x2F;p&gt;
&lt;p&gt;&lt;kbd&gt; “ &lt;&#x2F;kbd&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;start-up-a-new-screen&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#start-up-a-new-screen&quot; aria-label=&quot;Anchor link for: start-up-a-new-screen&quot;&gt;Start up a new screen&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;kbd&gt; c &lt;&#x2F;kbd&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;rename-current-screen&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#rename-current-screen&quot; aria-label=&quot;Anchor link for: rename-current-screen&quot;&gt;Rename current screen&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;kbd&gt; A &lt;&#x2F;kbd&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;kill-current-screen&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#kill-current-screen&quot; aria-label=&quot;Anchor link for: kill-current-screen&quot;&gt;Kill current screen&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;kbd&gt; \ &lt;&#x2F;kbd&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;screen-config&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#screen-config&quot; aria-label=&quot;Anchor link for: screen-config&quot;&gt;Screen Config&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;First create or open screen config file&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;nano&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;.screenrc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Sample Config Contents&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Turn off the welcome message&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;startup_message off&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Disable visual bell&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#vbell off&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Set scrollback buffer to 10000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;defscrollback 10000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Customize the status line&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;hardstatus alwayslastline&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;hardstatus string &amp;#39;%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W}%c %{g}]&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Set IP</title>
        <published>2025-05-06T00:00:00+00:00</published>
        <updated>2025-05-06T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/set-ip/"/>
        <id>https://dev.chester.wykies.com/debian/set-ip/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/set-ip/">&lt;h1 id=&quot;set-static-ip-from-cli-on-ubuntu-server-18&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-static-ip-from-cli-on-ubuntu-server-18&quot; aria-label=&quot;Anchor link for: set-static-ip-from-cli-on-ubuntu-server-18&quot;&gt;Set static IP from CLI on Ubuntu Server 18&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.techrepublic.com&#x2F;article&#x2F;how-to-configure-a-static-ip-address-in-ubuntu-server-18-04&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.techrepublic.com&#x2F;article&#x2F;how-to-configure-a-static-ip-address-in-ubuntu-server-18-04&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;If editing the flat file isn’t working then check out if there is a netplan config folder.
If there is then that’s likely the way it is being managed.
If it’s not this still may not be the way (doesn’t always work).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;check-what-configuration-files-are-present&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-what-configuration-files-are-present&quot; aria-label=&quot;Anchor link for: check-what-configuration-files-are-present&quot;&gt;Check what configuration files are present&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;netplan&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If there are none present, proceed to create one, otherwise edit the existing one.
Expectation is that the folder exists but not necessarily the file.
If the folder doesn’t exist then likely this is not the way to do it.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;edit-configuration-file-as-needed&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#edit-configuration-file-as-needed&quot; aria-label=&quot;Anchor link for: edit-configuration-file-as-needed&quot;&gt;Edit configuration file as needed&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;open-config-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#open-config-file&quot; aria-label=&quot;Anchor link for: open-config-file&quot;&gt;Open config file&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;NB: &lt;code&gt;00-installer-config.yaml&lt;&#x2F;code&gt; is the name of the config file in the example below&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; nano &#x2F;etc&#x2F;netplan&#x2F;00-installer-config.yaml&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;sample-config-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#sample-config-file&quot; aria-label=&quot;Anchor link for: sample-config-file&quot;&gt;Sample config file&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# This is the network config written by &amp;#39;subiquity&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;network&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;  ethernets&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;    ens160&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;      addresses&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; 192.168.1.5&#x2F;24&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;      gateway4&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 192.168.1.1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;      nameservers&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;        addresses&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;          -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 192.168.1.1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;  version&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;apply-changes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#apply-changes&quot; aria-label=&quot;Anchor link for: apply-changes&quot;&gt;Apply Changes&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;normal&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#normal&quot; aria-label=&quot;Anchor link for: normal&quot;&gt;Normal&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; netplan apply&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;debug&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#debug&quot; aria-label=&quot;Anchor link for: debug&quot;&gt;Debug&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; netplan&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --debug&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apply&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;set-static-ip-from-cli-on-debian-10&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-static-ip-from-cli-on-debian-10&quot; aria-label=&quot;Anchor link for: set-static-ip-from-cli-on-debian-10&quot;&gt;Set static IP from CLI on Debian 10&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;linuxconfig.org&#x2F;how-to-set-a-static-ip-address-on-debian-10-buster&quot;&gt;https:&#x2F;&#x2F;linuxconfig.org&#x2F;how-to-set-a-static-ip-address-on-debian-10-buster&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;foreword-1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword-1&quot; aria-label=&quot;Anchor link for: foreword-1&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The source that this was taken from advises you to disable NetworkManager but if you are using a headless server this likely isn’t something you can do as it appears that it is already not in use.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;install-resolvconf-for-dns-optional&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-resolvconf-for-dns-optional&quot; aria-label=&quot;Anchor link for: install-resolvconf-for-dns-optional&quot;&gt;Install resolvconf (for dns, optional)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install resolvconf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;check-what-interfaces-are-configured-using&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-what-interfaces-are-configured-using&quot; aria-label=&quot;Anchor link for: check-what-interfaces-are-configured-using&quot;&gt;Check what interfaces are configured using&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;NB: Make a note of which ones are available&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;or&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;sys&#x2F;class&#x2F;net&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Note where &lt;code&gt;ens192:&lt;&#x2F;code&gt; and &lt;code&gt;ens224:&lt;&#x2F;code&gt; are below.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ip a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;1: lo: &amp;lt;LOOPBACK,UP,LOWER_UP&amp;gt; mtu 65536 qdisc noqueue state UNKNOWN group default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;qlen 1000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   link&#x2F;loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   inet 127.0.0.1&#x2F;8 scope host lo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      valid_lft forever preferred_lft forever&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   inet6 ::1&#x2F;128 scope host&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      valid_lft forever preferred_lft forever&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;2: ens192: &amp;lt;BROADCAST,MULTICAST,UP,LOWER_UP&amp;gt; mtu 1500 qdisc mq state UP group&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;default qlen 1000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   link&#x2F;ether 00:0c:29:b5:2d:0d brd ff:ff:ff:ff:ff:ff&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   inet 172.20.1.26&#x2F;16 brd 172.20.255.255 scope global ens192&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      valid_lft forever preferred_lft forever&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   inet6 fe80::20c:29ff:feb5:2d0d&#x2F;64 scope link&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      valid_lft forever preferred_lft forever&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;3: ens224: &amp;lt;BROADCAST,MULTICAST&amp;gt; mtu 1500 qdisc noop state DOWN group default qlen&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;1000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;   link&#x2F;ether 00:0c:29:b5:2d:17 brd ff:ff:ff:ff:ff:ff&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;edit-config&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#edit-config&quot; aria-label=&quot;Anchor link for: edit-config&quot;&gt;Edit Config&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;backup-existing-config&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#backup-existing-config&quot; aria-label=&quot;Anchor link for: backup-existing-config&quot;&gt;Backup Existing Config&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;network&#x2F;interfaces ~&#x2F;interfaces.old&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;update-config&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#update-config&quot; aria-label=&quot;Anchor link for: update-config&quot;&gt;Update config&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.debian.org&#x2F;NetworkConfiguration&quot;&gt;https:&#x2F;&#x2F;wiki.debian.org&#x2F;NetworkConfiguration&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Edit &lt;code&gt;&#x2F;etc&#x2F;network&#x2F;interfaces&lt;&#x2F;code&gt; to set the configuration.
NB: Indented lines use tab. Edit file as needed.
&lt;strong&gt;NB: ENSURE YOU INCLUDE THE LINE WITH AUTO - THAT CONTROLS WHICH INTERFACES ARE STARTED ON BOOTUP AND RESTART OF THE SERVICE.&lt;&#x2F;strong&gt;
Alternatively you can bring up single interfaces using &lt;code&gt;ifup&lt;&#x2F;code&gt; after you edit the file without restarting the service.
More info can also be found on the man page: &lt;code&gt;man interface&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; nano &#x2F;etc&#x2F;network&#x2F;interfaces&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;See sample file below&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# This file describes the network interfaces available on your system&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# and how to activate them. For more information, see interfaces(5).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;source &#x2F;etc&#x2F;network&#x2F;interfaces.d&#x2F;*&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# The loopback network interface&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;auto lo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;iface lo inet loopback&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# The primary network interface&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;auto ens192&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;allow-hotplug ens192&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;iface ens192 inet static&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     address 172.20.1.26&#x2F;16&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     gateway 172.20.1.1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     # dns-* options are implemented by the resolvconf package, if installed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     dns-nameservers 172.20.1.1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# The secondary network interface&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;auto ens224&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;allow-hotplug ens224&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;iface ens224 inet static&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     address 10.140.209.237&#x2F;24&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     dns-nameservers 10.140.209.10&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;restart-services-or-just-bring-up-the-new-interface&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#restart-services-or-just-bring-up-the-new-interface&quot; aria-label=&quot;Anchor link for: restart-services-or-just-bring-up-the-new-interface&quot;&gt;Restart Services or Just bring up the new interface&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl restart networking&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl restart resolvconf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;or use the &lt;code&gt;ifup&lt;&#x2F;code&gt; command to just bring up the interface edited.
Example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ifup ens224&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>favicon</title>
        <published>2025-04-17T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/favicon/"/>
        <id>https://dev.chester.wykies.com/misc/favicon/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/favicon/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;evilmartians.com&#x2F;chronicles&#x2F;how-to-favicon-in-2021-six-files-that-fit-most-needs&quot;&gt;https:&#x2F;&#x2F;evilmartians.com&#x2F;chronicles&#x2F;how-to-favicon-in-2021-six-files-that-fit-most-needs&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;See site for full explanation but &lt;strong&gt;TLDR&lt;&#x2F;strong&gt; from site is:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Instead of serving dozens of icons, all you need is just five icons and one JSON file.&lt;&#x2F;p&gt;
&lt;p&gt;For the browser using HTML:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;html&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;link&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; rel&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;icon&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; href&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&#x2F;favicon.ico&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; sizes&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;32x32&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;link&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; rel&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;icon&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; href&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&#x2F;icon.svg&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; type&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;image&#x2F;svg+xml&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;link&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; rel&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;apple-touch-icon&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; href&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&#x2F;apple-touch-icon.png&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&amp;lt;!-- 180×180 --&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you’re making a PWA (Progressive Web App), also add this to the HTML:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;html&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;link&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; rel&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;manifest&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; href&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&#x2F;manifest.webmanifest&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And a file with the web app manifest:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; manifest.webmanifest&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;&amp;quot;icons&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: [&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; &amp;quot;src&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&#x2F;icon-192.png&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; &amp;quot;type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;image&#x2F;png&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; &amp;quot;sizes&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;192x192&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; &amp;quot;src&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&#x2F;icon-mask.png&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; &amp;quot;type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;image&#x2F;png&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; &amp;quot;sizes&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;512x512&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; &amp;quot;purpose&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;maskable&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; },&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; &amp;quot;src&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&#x2F;icon-512.png&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; &amp;quot;type&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;image&#x2F;png&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; &amp;quot;sizes&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;512x512&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Maskable icons should have bigger paddings. The safe zone is a 409×409 circle. Use &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;maskable.app&#x2F;&quot;&gt;maskable.app&lt;&#x2F;a&gt; to check your icon.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Offline Mode</title>
        <published>2025-04-13T00:00:00+00:00</published>
        <updated>2025-04-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/offline/"/>
        <id>https://dev.chester.wykies.com/offline/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/offline/">&lt;h2 id=&quot;offline-mode&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#offline-mode&quot; aria-label=&quot;Anchor link for: offline-mode&quot;&gt;Offline Mode&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Sorry, no cache found and it looks like you’re offline, a connection is required.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Privacy Policy</title>
        <published>2025-04-13T00:00:00+00:00</published>
        <updated>2025-04-25T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/privacy/"/>
        <id>https://dev.chester.wykies.com/privacy/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/privacy/">&lt;h2 id=&quot;privacy&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#privacy&quot; aria-label=&quot;Anchor link for: privacy&quot;&gt;Privacy&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;This site does not set or use cookies.&lt;&#x2F;li&gt;
&lt;li&gt;This site does not store data in the browser to be shared, sent, or sold to third-parties.&lt;&#x2F;li&gt;
&lt;li&gt;No personal information is shared, sent, or sold to third-parties.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;Effective Date:&lt;&#x2F;strong&gt; &lt;em&gt;1st Jan 2022&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Leetcode</title>
        <published>2025-03-24T00:00:00+00:00</published>
        <updated>2025-10-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/leetcode/"/>
        <id>https://dev.chester.wykies.com/misc/leetcode/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/leetcode/">&lt;p&gt;I quite enjoy doing leetcode as small contained puzzles that are easy to verify.
It’s also pretty good for trying out a new language in some regards.
This page is a collection of resources for various purposes:&lt;&#x2F;p&gt;
&lt;h1 id=&quot;problem-solving-tips-and-notes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#problem-solving-tips-and-notes&quot; aria-label=&quot;Anchor link for: problem-solving-tips-and-notes&quot;&gt;Problem solving tips and notes&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;This is a list of tips I want to remember.
It’s likely that there is a more comprehensive list somewhere but I haven’t looked for it.
There are just small techniques to apply.
Not really a full pattern but just a way to reframe problems.
If you know of a comprehensive list of techniques like these please tell me about it.
I’ll check it out and link to it if I find it good.
I included an example problem where the technique applies.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;try-brute-force&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#try-brute-force&quot; aria-label=&quot;Anchor link for: try-brute-force&quot;&gt;Try brute force&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;details&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;path-sum-iii&#x2F;description&#x2F;&quot;&gt;437. Path Sum III&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Coding up brute force is a good starting point but a better starting point is just typing out or writing up what you need to keep track of to solve it as a human.
Add “digital” constraints like only looking at one variable at a time and then try to solve and see where you have repeated work and things like that which could cause the optimal solution to fall out.
In the example problem once I &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=zraEXluZLj0&quot;&gt;looked at Deepti&lt;&#x2F;a&gt; manually solve it, the solution became obvious and I wasn’t stuck anymore.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;longest-repeating-character-replacement&quot;&gt;424. Longest Repeating Character Replacement&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Also note where information you track gets used.
Is this example, &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=gqXU1UyA8pk&quot;&gt;Neetcode&lt;&#x2F;a&gt; was able to drop the constant 26 in the &lt;code&gt;O(26n)&lt;&#x2F;code&gt; down to 1 by tracking the max frequency.
This works (also explained in the video) because the only time we can increase the result is when we find a new max.
Before that it really doesn’t matter, so having a max that is too high does not have negative side effects.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;h2 id=&quot;tips-for-detecting-dp&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tips-for-detecting-dp&quot; aria-label=&quot;Anchor link for: tips-for-detecting-dp&quot;&gt;Tips for detecting DP&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;details&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;word-break&#x2F;description&#x2F;&quot;&gt;139. Word Break&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I eventually solved the problem by patterning on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=TK9pptFzH-A&quot;&gt;Deepti’s solution&lt;&#x2F;a&gt;.
What I think I missed is that even though because of how the question is constructed the ways must be tried, brute force even with a trie would be too slow as it’s exponential.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Lesson:&lt;&#x2F;strong&gt; If the ways really must be tried and trying them is exponential, it’s likely a dynamic programming (DP) problem.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;h2 id=&quot;rearrange-formulas-especially-if-modulus-is-involved-think-of-operations-closed-under-modulus&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#rearrange-formulas-especially-if-modulus-is-involved-think-of-operations-closed-under-modulus&quot; aria-label=&quot;Anchor link for: rearrange-formulas-especially-if-modulus-is-involved-think-of-operations-closed-under-modulus&quot;&gt;Rearrange formulas (especially if modulus is involved - think of operations closed under modulus (+,-,*))&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;details&gt;
&lt;p&gt;Source: Taken from Hint #2 for problem.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;count-number-of-bad-pairs&#x2F;&quot;&gt;2364. Count Number of Bad Pairs&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;count-of-interesting-subarrays&#x2F;&quot;&gt;2845. Count of Interesting Subarrays&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Check to see if formulas in question can be rearranged into one that is easier to optimize for&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Notice that (j - i != nums[j] - nums[i]) is the same as (nums[i] - i != nums[j] - j).&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;&#x2F;details&gt;
&lt;h2 id=&quot;consider-partition-point&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#consider-partition-point&quot; aria-label=&quot;Anchor link for: consider-partition-point&quot;&gt;Consider &lt;code&gt;partition_point&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;details&gt;
&lt;p&gt;Inspired by: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=TjthKf7Mc_8&quot;&gt;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=TjthKf7Mc_8&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;search-in-rotated-sorted-array&quot;&gt;33. Search in Rotated Sorted Array&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;find-first-and-last-position-of-element-in-sorted-array&quot;&gt;34. Find First and Last Position of Element in Sorted Array&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;binary-search&quot;&gt;704. Binary Search&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;When you need binary search consider using &lt;code&gt;partition_point&lt;&#x2F;code&gt; function from &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;primitive.slice.html#method.partition_point&quot;&gt;rust std&lt;&#x2F;a&gt;. If it’s not allowed manually implement as below.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F;&#x2F; Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F;&#x2F; See &amp;lt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;primitive.slice.html#method.partition_point&amp;gt; for more info&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; partition_point&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;T&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;(arr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;: &amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;T&lt;&#x2F;span&gt;&lt;span&gt;], is_left_half&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;: impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Fn&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;T&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; bool&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; arr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;len&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; base&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;usize&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    while&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; half&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; mid&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; base&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; half;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        base&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; = if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; is_left_half&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;arr[mid]) { mid }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; else&lt;&#x2F;span&gt;&lt;span&gt; { base };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        size&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -=&lt;&#x2F;span&gt;&lt;span&gt; half;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; is_left_half&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;arr[base]) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        base&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; else&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        base&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;h2 id=&quot;be-comfortable-with-permutations&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#be-comfortable-with-permutations&quot; aria-label=&quot;Anchor link for: be-comfortable-with-permutations&quot;&gt;Be comfortable with permutations&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;details&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;permutations&#x2F;&quot;&gt;46. Permutations&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Sometimes brute force is what the question wants.
I prefer &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Heap%27s_algorithm&quot;&gt;Heap’s Algorithm&lt;&#x2F;a&gt; but it’s too difficult to memorize.
So instead I think the iterative solution from the video is the easiest to remember without feeling too icky&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F;&#x2F; Based on https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=FZe0UqISmUw&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; permute&lt;&#x2F;span&gt;&lt;span&gt;(nums&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;i32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;i32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; vec!&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;vec!&lt;&#x2F;span&gt;&lt;span&gt;[]];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; For each number insert it into each position in the previous solutions&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Including at the end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; nums {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let mut&lt;&#x2F;span&gt;&lt;span&gt; new_result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; vec!&lt;&#x2F;span&gt;&lt;span&gt;[];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        for&lt;&#x2F;span&gt;&lt;span&gt; prev_result_val&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; result {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            for&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;..=&lt;&#x2F;span&gt;&lt;span&gt;prev_result_val&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;len&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;                let mut&lt;&#x2F;span&gt;&lt;span&gt; clone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; prev_result_val&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;clone&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                clone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;insert&lt;&#x2F;span&gt;&lt;span&gt;(i, num);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                new_result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;push&lt;&#x2F;span&gt;&lt;span&gt;(clone);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; new_result;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    result&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;h2 id=&quot;be-comfortable-with-subsets&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#be-comfortable-with-subsets&quot; aria-label=&quot;Anchor link for: be-comfortable-with-subsets&quot;&gt;Be comfortable with subsets&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;details&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;subsets&quot;&gt;78. Subsets&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Note that this is not subarrays.
Similarly to &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;leetcode&#x2F;#be-comfortable-with-permutations&quot;&gt;permutations&lt;&#x2F;a&gt; an iterative approach can be used to just add all numbers to the end only instead of all positions like permutations.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; subsets&lt;&#x2F;span&gt;&lt;span&gt;(nums&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;i32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;i32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Based on editorial and https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=z3xEwMA5Rn8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; vec!&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;vec!&lt;&#x2F;span&gt;&lt;span&gt;[]];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; nums {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;len&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        for&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span&gt;n {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            let mut&lt;&#x2F;span&gt;&lt;span&gt; next&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; result[i]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;clone&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            next&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;push&lt;&#x2F;span&gt;&lt;span&gt;(num);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;push&lt;&#x2F;span&gt;&lt;span&gt;(next);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    result&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;h1 id=&quot;interview-preparation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#interview-preparation&quot; aria-label=&quot;Anchor link for: interview-preparation&quot;&gt;Interview Preparation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;In my opinion if you already have experience with leetcode then a good video to start with is &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=0XUzt0D3xMw&quot;&gt;this one&lt;&#x2F;a&gt; from &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;alifeengineered.substack.com&#x2F;about&quot;&gt;Uncle Steve&lt;&#x2F;a&gt; where he starts of with summarizing the article &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;interviewing.io&#x2F;blog&#x2F;how-well-do-leetcode-ratings-predict-interview-performance&quot;&gt;How well do LeetCode ratings predict interview performance? Here’s the data&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;details&gt;
&lt;summary&gt;List of problems from the description of the video&lt;&#x2F;summary&gt;
&lt;blockquote&gt;
&lt;p&gt;Top ‘Secretly Easy’ Hard Problems:&lt;br &#x2F;&gt;
#1: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;reverse-nodes-in-k-group&#x2F;description&#x2F;&quot;&gt;Reverse Nodes in k-Group&lt;&#x2F;a&gt; - Score: 0.034&lt;br &#x2F;&gt;
#2: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;median-of-two-sorted-arrays&#x2F;description&#x2F;&quot;&gt;Median of Two Sorted Arrays&lt;&#x2F;a&gt; - Score: 0.0298&lt;br &#x2F;&gt;
#3: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;n-queens-ii&#x2F;description&#x2F;&quot;&gt;N-Queens II&lt;&#x2F;a&gt; - Score: 0.0288&lt;br &#x2F;&gt;
#4: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;n-queens&#x2F;description&#x2F;&quot;&gt;N-Queens&lt;&#x2F;a&gt; - Score: 0.0255&lt;br &#x2F;&gt;
#5: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;robot-room-cleaner&#x2F;description&#x2F;&quot;&gt;Robot Room Cleaner&lt;&#x2F;a&gt; - Score: 0.0192&lt;&#x2F;p&gt;
&lt;p&gt;Top ‘Most Efficient for Interview Prep’ Hard Problems:&lt;br &#x2F;&gt;
#1: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;longest-increasing-path-in-a-matrix&#x2F;description&#x2F;&quot;&gt;Longest Increasing Path in a Matrix&lt;&#x2F;a&gt; - Score: 1.8094&lt;br &#x2F;&gt;
#2: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;trapping-rain-water&#x2F;description&#x2F;&quot;&gt;Trapping Rain Water&lt;&#x2F;a&gt; - Score: 1.6964&lt;br &#x2F;&gt;
#3: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;the-skyline-problem&#x2F;description&#x2F;&quot;&gt;The Skyline Problem&lt;&#x2F;a&gt; - Score: 1.5794&lt;br &#x2F;&gt;
#4: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;word-break-ii&#x2F;description&#x2F;&quot;&gt;Word Break II&lt;&#x2F;a&gt; - Score: 1.5601&lt;br &#x2F;&gt;
#5: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;smallest-range-covering-elements-from-k-lists&#x2F;description&#x2F;&quot;&gt;Smallest Range Covering Elements from K Lists&lt;&#x2F;a&gt; - Score: 1.1687&lt;&#x2F;p&gt;
&lt;p&gt;Hardest Questions Actually Used in FAANG Interviews:&lt;br &#x2F;&gt;
#1: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;partition-array-into-two-arrays-to-minimize-sum-difference&#x2F;description&#x2F;&quot;&gt;Partition Array Into Two Arrays to Minimize Sum Difference&lt;&#x2F;a&gt; - Score: 12.3924&lt;br &#x2F;&gt;
#2: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;regular-expression-matching&#x2F;description&#x2F;&quot;&gt;Regular Expression Matching&lt;&#x2F;a&gt; - Score: 12.1070&lt;br &#x2F;&gt;
#3: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;reverse-pairs&#x2F;description&#x2F;&quot;&gt;Reverse Pairs&lt;&#x2F;a&gt; - Score: 9.0915&lt;br &#x2F;&gt;
#4: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;median-of-two-sorted-arrays&#x2F;description&#x2F;&quot;&gt;Median of Two Sorted Arrays&lt;&#x2F;a&gt; - Score: 8.2952&lt;br &#x2F;&gt;
#5: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;max-points-on-a-line&#x2F;description&#x2F;&quot;&gt;Max Points on a Line&lt;&#x2F;a&gt; - Score: 8.0952&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;&#x2F;details&gt;
&lt;p&gt;If you’re new to leetcode then start with &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;&quot;&gt;neetcode&lt;&#x2F;a&gt; it makes it easy to find a path to follow.
My key takeaway is that “reasonable” hard problems are actually not hard just require multiple techniques and thus you get more value from doing them.
But be warned some of the hard problems (the one’s I don’t generally consider reasonable) just require niche knowledge.
The following are some lists I think are worth taking a look at and why.
When starting off getting practice on different techniques for developing solutions is good to help you build up intuition on when a particular technique is appropriate.
However, once you are comfortable with the techniques then not having a hint on which technique to use is better to help you practice identifying the technique(s) you should use.&lt;&#x2F;p&gt;
&lt;details&gt;
&lt;summary&gt; Short List from Neetcode &lt;&#x2F;summary&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.linkedin.com&#x2F;posts&#x2F;navdeep-singh-3aaa14161_if-i-only-had-a-short-time-to-study-for-my-activity-7312473774598012928-ZhXz&quot;&gt;https:&#x2F;&#x2F;www.linkedin.com&#x2F;posts&#x2F;navdeep-singh-3aaa14161_if-i-only-had-a-short-time-to-study-for-my-activity-7312473774598012928-ZhXz&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;If I only had a short time to study for my coding interview, these are the 15 questions I would solve (in order)&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;🟢 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;two-integer-sum&quot;&gt;Two Sum&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;two-sum&#x2F;&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice using hash maps.&lt;&#x2F;li&gt;
&lt;li&gt;🟡 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;products-of-array-discluding-self&quot;&gt;Product of Array Except Self&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;product-of-array-except-self&#x2F;&quot;&gt;Leetcode&lt;&#x2F;a&gt;) Practice prefix &#x2F; suffix sums.&lt;&#x2F;li&gt;
&lt;li&gt;🟡 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;three-integer-sum&#x2F;&quot;&gt;3Sum&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;3sum&#x2F;&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice sorting and two pointers.&lt;&#x2F;li&gt;
&lt;li&gt;🟡 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;longest-repeating-substring-with-replacement&quot;&gt;Longest Repeating Character Replacement&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;longest-repeating-character-replacement&#x2F;&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice sliding window.&lt;&#x2F;li&gt;
&lt;li&gt;🟡 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;daily-temperatures&quot;&gt;Daily Temperatures&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;daily-temperatures&#x2F;&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice monotonic stack.&lt;&#x2F;li&gt;
&lt;li&gt;🟡 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;find-target-in-rotated-sorted-array&quot;&gt;Search in Rotated Sorted Array&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;search-in-rotated-sorted-array&#x2F;&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice Binary Search on array.&lt;&#x2F;li&gt;
&lt;li&gt;🟡 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;eating-bananas&quot;&gt;Koko Eating Bananas&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;koko-eating-bananas&#x2F;&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice Binary Search on a range of values, rather then a data structure.&lt;&#x2F;li&gt;
&lt;li&gt;🟡 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;lru-cache&quot;&gt;LRU Cache&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;lru-cache&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice doubly linked lists and hashmaps.&lt;&#x2F;li&gt;
&lt;li&gt;🟢 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;same-binary-tree&quot;&gt;Same Binary Tree&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;same-tree&#x2F;&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice tree traversal - DFS or BFS.&lt;&#x2F;li&gt;
&lt;li&gt;🔴 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;serialize-and-deserialize-binary-tree&quot;&gt;Serialize and Deserialize Binary Tree&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;serialize-and-deserialize-binary-tree&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice hard tree traversal.&lt;&#x2F;li&gt;
&lt;li&gt;🔴 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;find-median-in-a-data-stream&quot;&gt;Median in Data Stream&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;find-median-from-data-stream&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice two heaps pattern.&lt;&#x2F;li&gt;
&lt;li&gt;🟡 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;combination-target-sum&quot;&gt;Combination Sum&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;combination-sum&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice two-branch backtracking.&lt;&#x2F;li&gt;
&lt;li&gt;🟡 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;course-schedule&quot;&gt;Course Schedule&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;course-schedule&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice DFS or BFS on adjacency list.&lt;&#x2F;li&gt;
&lt;li&gt;🟡 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;rotting-fruit&quot;&gt;Rotting Oranges&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;rotting-oranges&#x2F;&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice multi-source BFS.&lt;&#x2F;li&gt;
&lt;li&gt;🟡 &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;problems&#x2F;longest-common-subsequence&quot;&gt;Longest Common Subsequence&lt;&#x2F;a&gt; (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;longest-common-subsequence&quot;&gt;Leetcode&lt;&#x2F;a&gt;) - Practice dynamic programming, top-down or bottom-up.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;details&gt;
&lt;p&gt;These are some good videos to help you get oriented:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=2V7yPrxJ8Ck&quot;&gt;The LeetCode Fallacy&lt;&#x2F;a&gt; by &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;&quot;&gt;NeetCode&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=G5_Q2_yRFsY&quot;&gt;How to Start LeetCode from ZERO in 2025&lt;&#x2F;a&gt; by &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;algomaster.io&#x2F;practice&#x2F;dsa-patterns&quot;&gt;AlgoMaster&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;List&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Reason&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Organization&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;neetcode.io&#x2F;roadmap&quot;&gt;NeetCode Roadmap&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Provides a guided tree to follow based on prerequisites&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Tree with solution types&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;studyplan&#x2F;leetcode-75&#x2F;&quot;&gt;LeetCode 75&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Provided by leetcode and free (they also have list available to premium users, support them if you’re able)&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Grouped by Solution Type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;algomaster.io&#x2F;practice&#x2F;dsa-patterns&quot;&gt;AlgoMaster&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Has links to an explanation for each solution type before the problems. Has links to solutions for each problem (seems like his) and preloaded search for solutions on YouTube&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Grouped by Solution Type&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.techinterviewhandbook.org&#x2F;grind75&#x2F;&quot;&gt;Grind 75 by author of Blind 75&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Allows customization of plan to the amount of time you have available and can not show what topic is covered by a question for you to practice that skill&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Customizable&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h1 id=&quot;recreational&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#recreational&quot; aria-label=&quot;Anchor link for: recreational&quot;&gt;Recreational&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;If you’re objective is just practice or for fun then working locally can be less annoying than working in the text editor provided.
Also if you want to get practice with using your IDE of choice and learning from the autocomplete and docs displayed in the IDE.
Then I recommend &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rust-practice&#x2F;cargo-leet&#x2F;&quot;&gt;cargo-leet&lt;&#x2F;a&gt;.
It’s a pretty basic download tool that just tries to setup the tests from the description for you.
Happy to accept contributions if you’re so included.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Google APIs</title>
        <published>2025-03-20T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/google-apis/"/>
        <id>https://dev.chester.wykies.com/rust/google-apis/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/google-apis/">&lt;h1 id=&quot;google-sheets&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#google-sheets&quot; aria-label=&quot;Anchor link for: google-sheets&quot;&gt;Google Sheets&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;It’s been a journey trying to decide what would be the most sustainable way to interact with Google’s API for “Google Sheets”.
Seems that currently Google is currently developing a &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;googleapis&#x2F;google-cloud-rust&quot;&gt;client library&lt;&#x2F;a&gt; for rust but it isn’t done yet.
My current use case isn’t amenable to a still experimental API thus I decided to use the next best one.
&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Byron&quot;&gt;Byron&lt;&#x2F;a&gt; setup a &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Byron&#x2F;google-apis-rs&quot;&gt;repo&lt;&#x2F;a&gt; to generate clients based on Google’s discovery service.
He really did a very good job with it and it seems to at present be the best option.
I also considered &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;sheets&#x2F;latest&#x2F;sheets&#x2F;&quot;&gt;one&lt;&#x2F;a&gt; created by the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;oxidecomputer&quot;&gt;Oxide Computer Company&lt;&#x2F;a&gt; but decided to use the one Byron created as his also came with a CLI that I could use to better understand how to use it.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;using-google-sheets4&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-google-sheets4&quot; aria-label=&quot;Anchor link for: using-google-sheets4&quot;&gt;Using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;google-sheets4&#x2F;latest&#x2F;google_sheets4&#x2F;index.html&quot;&gt;google_sheets4&lt;&#x2F;a&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;medium.com&#x2F;@iamchrisgrounds&#x2F;google-sheets-with-rust-6ecab23fa765&quot;&gt;Medium Article&lt;&#x2F;a&gt; by Chris Grounds&lt;&#x2F;li&gt;
&lt;li&gt;Auto &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Byron&#x2F;google-apis-rs&#x2F;tree&#x2F;main&#x2F;gen&#x2F;sheets4-cli&quot;&gt;generated CLI&lt;&#x2F;a&gt; created by Byron&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;strong&gt;WIP&lt;&#x2F;strong&gt; The project I was going to use this on has been paused but already started the notes so saving them.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>lettre</title>
        <published>2025-03-15T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/crate-lettre/"/>
        <id>https://dev.chester.wykies.com/rust/crate-lettre/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/crate-lettre/">&lt;h1 id=&quot;sending-email-using-smtp-and-gmail&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#sending-email-using-smtp-and-gmail&quot; aria-label=&quot;Anchor link for: sending-email-using-smtp-and-gmail&quot;&gt;Sending email using smtp and Gmail&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;They have a pretty &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;lettre&#x2F;lettre&#x2F;blob&#x2F;master&#x2F;examples&#x2F;smtp_tls.rs&quot;&gt;clear example&lt;&#x2F;a&gt; on in their crate.
I’d just add that you should ensure you have 2 factor authentication enabled and then that will allow you to create an APP password that you can use for this purpose.
You’ll also need to enable POP in settings.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Delete Old Files Automatically</title>
        <published>2025-02-28T00:00:00+00:00</published>
        <updated>2025-08-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/delete-old/"/>
        <id>https://dev.chester.wykies.com/debian/delete-old/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/delete-old/">&lt;h1 id=&quot;explanation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#explanation&quot; aria-label=&quot;Anchor link for: explanation&quot;&gt;Explanation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;45838304&#x2F;bash-delete-files-older-than-3-months&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;45838304&#x2F;bash-delete-files-older-than-3-months&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Before you actually run the delete command it might be good to use &lt;code&gt;-print&lt;&#x2F;code&gt; as below to see what will be deleted.
In both commands (the print and delete one):&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PATH&lt;&#x2F;code&gt; should be replaced with the path to the folder you want to do the deletes in.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;DAYS&lt;&#x2F;code&gt; should be replaced with the number of days you need.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;See also &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;cron&#x2F;&quot;&gt;cron&lt;&#x2F;a&gt; for automating the command&lt;&#x2F;p&gt;
&lt;h1 id=&quot;preview-output-via-print&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#preview-output-via-print&quot; aria-label=&quot;Anchor link for: preview-output-via-print&quot;&gt;Preview output via print&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Format:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;find&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; PATH&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -mtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; DAYS&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -print&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;find&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -mtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; +90&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -print&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;actual-delete-command&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#actual-delete-command&quot; aria-label=&quot;Anchor link for: actual-delete-command&quot;&gt;Actual delete command&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;find&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; PATH&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -mtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; DAYS&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -delete&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Macros</title>
        <published>2025-02-24T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/macros/"/>
        <id>https://dev.chester.wykies.com/rust/macros/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/macros/">&lt;h1 id=&quot;info-sources&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#info-sources&quot; aria-label=&quot;Anchor link for: info-sources&quot;&gt;Info Sources&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;stable&#x2F;book&#x2F;ch19-06-macros.html&quot;&gt;Rust Book&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;stable&#x2F;book&#x2F;ch20-05-macros.html#declarative-macros-with-macro_rules-for-general-metaprogramming&quot;&gt;Declarative Macros with macro_rules! for General Metaprogramming&lt;&#x2F;a&gt; - Explained example of a macro&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;stable&#x2F;rust-by-example&#x2F;macros.html&quot;&gt;Rust by Example&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;reference&#x2F;macros-by-example.html&quot;&gt;Rust Reference&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;stable&#x2F;rust-by-example&#x2F;macros&#x2F;syntax.html&quot;&gt;Syntax&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;stable&#x2F;rust-by-example&#x2F;macros&#x2F;designators.html&quot;&gt;Designators&lt;&#x2F;a&gt; - Types of designators available (Macro Variable types)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;motivation-to-finally-try-macros&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#motivation-to-finally-try-macros&quot; aria-label=&quot;Anchor link for: motivation-to-finally-try-macros&quot;&gt;Motivation to finally try macros&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;exercism.org&#x2F;tracks&#x2F;rust&#x2F;exercises&#x2F;space-age&quot;&gt;Exercism - Space Age&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Omit From History</title>
        <published>2025-02-20T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/bash/omit-from-history/"/>
        <id>https://dev.chester.wykies.com/bash/omit-from-history/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/bash/omit-from-history/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;6475524&#x2F;how-do-i-prevent-commands-from-showing-up-in-bash-history&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;6475524&#x2F;how-do-i-prevent-commands-from-showing-up-in-bash-history&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;If you want to leave commands out of the history prefix them with whitespace.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Enum Conversion</title>
        <published>2025-01-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/enum-conversion/"/>
        <id>https://dev.chester.wykies.com/rust/enum-conversion/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/enum-conversion/">&lt;h1 id=&quot;switching-back-and-forth-between-an-enum-and-u8&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#switching-back-and-forth-between-an-enum-and-u8&quot; aria-label=&quot;Anchor link for: switching-back-and-forth-between-an-enum-and-u8&quot;&gt;Switching back and forth between an Enum and u8&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;76785380&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;76785380&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;76299020&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;76299020&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;!&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;usr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;bin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;S&lt;&#x2F;span&gt;&lt;span&gt; cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt;nightly&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zscript&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;span&gt;cargo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;package&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;edition &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;2021&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; # &lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Desirable&lt;&#x2F;span&gt;&lt;span&gt; to stop warning but not needed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[dependencies]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;strum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; { version&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;0.26.3&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, features&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;derive&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; strum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;FromRepr&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[derive(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;FromRepr&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Debug&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PartialEq&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[repr(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;u8&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;enum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; MyEnum&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    A&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    B&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    C&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; u8 to Enum&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; MyEnum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from_repr&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    assert_eq!&lt;&#x2F;span&gt;&lt;span&gt;(x,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Some&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;MyEnum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;B&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Enum to u8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; MyEnum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;C&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; u8&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    assert_eq!&lt;&#x2F;span&gt;&lt;span&gt;(x,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>vscode</title>
        <published>2025-01-04T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/vscode/"/>
        <id>https://dev.chester.wykies.com/rust/vscode/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/vscode/">&lt;p&gt;In all headings RA means RustAnalyzer&lt;&#x2F;p&gt;
&lt;h1 id=&quot;setting-features-for-ra&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setting-features-for-ra&quot; aria-label=&quot;Anchor link for: setting-features-for-ra&quot;&gt;Setting features for RA&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;In &lt;code&gt;.vscode&#x2F;settings.json&lt;&#x2F;code&gt; add:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; .vscode&#x2F;settings.json&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    &amp;quot;rust-analyzer.cargo.features&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;FEATURE1_HERE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;FEATURE2_HERE&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;setting-target-for-ra&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setting-target-for-ra&quot; aria-label=&quot;Anchor link for: setting-target-for-ra&quot;&gt;Setting target for RA&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;See the &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;wasm&#x2F;#switch-the-vscode-extension-to-target-wasm&quot;&gt;example for wasm&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;disable-default-features-for-ra&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#disable-default-features-for-ra&quot; aria-label=&quot;Anchor link for: disable-default-features-for-ra&quot;&gt;Disable default features for RA&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; .vscode&#x2F;settings.json&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    &amp;quot;rust-analyzer.cargo.noDefaultFeatures&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Wayland or x11?</title>
        <published>2024-12-23T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/wayland-or-x11/"/>
        <id>https://dev.chester.wykies.com/debian/wayland-or-x11/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/wayland-or-x11/">&lt;h1 id=&quot;how-to-know-which-you-are-using&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#how-to-know-which-you-are-using&quot; aria-label=&quot;Anchor link for: how-to-know-which-you-are-using&quot;&gt;How to know which you are using&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;unix.stackexchange.com&#x2F;questions&#x2F;202891&#x2F;how-to-know-whether-wayland-or-x11-is-being-used&quot;&gt;https:&#x2F;&#x2F;unix.stackexchange.com&#x2F;questions&#x2F;202891&#x2F;how-to-know-whether-wayland-or-x11-is-being-used&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Based on an &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rust-windowing&#x2F;winit&#x2F;blob&#x2F;6896de5b73817a51c2e9311a52a571b400411602&#x2F;src&#x2F;platform_impl&#x2F;linux&#x2F;mod.rs#L323&quot;&gt;error message&lt;&#x2F;a&gt; in the rust winit crate I think the easiest way to check is see if either of the environment variables &lt;code&gt;WAYLAND_DISPLAY&lt;&#x2F;code&gt; or &lt;code&gt;WAYLAND_SOCKET&lt;&#x2F;code&gt; is set.
And the environment variable &lt;code&gt;DISPLAY&lt;&#x2F;code&gt; should be set if you are on x11.
So…&lt;&#x2F;p&gt;
&lt;p&gt;You get output on at least one of this if you are on Wayland:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt; $WAYLAND_DISPLAY&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt; $WAYLAND_SOCKET&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And you should get output on this if you are on x11:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt; $DISPLAY&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The actual instruction from the site are to run&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;loginctl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then take the value under session in the first column and insert into &lt;code&gt;&amp;lt;SESSION&amp;gt;&lt;&#x2F;code&gt; in the next command&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;loginctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; show-session&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;SESSIO&lt;&#x2F;span&gt;&lt;span&gt;N&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; Type&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Github Actions</title>
        <published>2024-12-23T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/github/actions/"/>
        <id>https://dev.chester.wykies.com/github/actions/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/github/actions/">&lt;h1 id=&quot;reusing-a-github-action&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#reusing-a-github-action&quot; aria-label=&quot;Anchor link for: reusing-a-github-action&quot;&gt;Reusing a github action&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;actions&#x2F;sharing-automations&#x2F;reusing-workflows#calling-a-reusable-workflow&quot;&gt;https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;actions&#x2F;sharing-automations&#x2F;reusing-workflows#calling-a-reusable-workflow&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;See source for more details but I’ll focus on the use case I most commonly have, two workflows in the same repo and I want to call one from the other to ensure it runs and succeeds before the other one starts.
Example use case can be found at &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;wykies&#x2F;crates&#x2F;&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;wykies&#x2F;crates&#x2F;&lt;&#x2F;a&gt; where the &lt;code&gt;shuttle.yml&lt;&#x2F;code&gt; calls &lt;code&gt;general.yml&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;In the workflow being called you must have the following in inside of the &lt;code&gt;on&lt;&#x2F;code&gt; section.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;on&lt;&#x2F;span&gt;&lt;span&gt;:  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;  workflow_call&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;and in the caller you need to have a separate job that put the relative path the called workflow in uses as below:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;jobs&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;  run_tests&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;    uses&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; .&#x2F;.github&#x2F;workflows&#x2F;general.yml&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;  deploy&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;    runs-on&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ubuntu-latest&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;    needs&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; run_tests&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; # Requires that the other job succeeds before this one will start&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;    steps&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Regex</title>
        <published>2024-12-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/regex/"/>
        <id>https://dev.chester.wykies.com/rust/regex/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/regex/">&lt;h1 id=&quot;capture-first-match&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#capture-first-match&quot; aria-label=&quot;Anchor link for: capture-first-match&quot;&gt;Capture first match&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;NB: If regex is not executed more than once then you may opt to not use the Cells but they remove the need to recompile the regex.&lt;&#x2F;p&gt;
&lt;p&gt;Dependencies (&lt;code&gt;anyhow&lt;&#x2F;code&gt; is not needed by makes the code cleaner)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; add regex&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; add anyhow&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; anyhow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Context&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; _;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; regex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Regex&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;OnceLock&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; anyhow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;()&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    static&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; CELL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; OnceLock&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Regex&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; OnceLock&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; re&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; CELL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;get_or_init&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;||&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        Regex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;r&amp;quot;(\d+)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;failed to compile static regex that was known at design time&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    });&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; haystack&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;There are 20 bad apples in the batch of 100&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; captures&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; re&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;captures&lt;&#x2F;span&gt;&lt;span&gt;(haystack)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;with_context&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;||&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;failed to find a match in: {haystack:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; number&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; captures&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;with_context&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;||&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;failed to extract number from: {haystack:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_str&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Prints: The number 20 was found in &amp;quot;There are 20 bad apples in the batch of 100&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;The number {number} was found in {haystack:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;capture-all-matches&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#capture-all-matches&quot; aria-label=&quot;Anchor link for: capture-all-matches&quot;&gt;Capture all matches&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;See notes on &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;regex&#x2F;#capture-first-match&quot;&gt;Capture first match&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; add regex&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; add anyhow&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; anyhow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Context&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; _;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; regex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Regex&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;OnceLock&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; anyhow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;()&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    static&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; CELL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; OnceLock&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Regex&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; OnceLock&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; re&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; CELL&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;get_or_init&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;||&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        Regex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;r&amp;quot;(\d+)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;failed to compile static regex that was known at design time&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    });&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; haystack&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;There are 20 bad apples in the batch of 100&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; captures_iter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; re&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;captures_iter&lt;&#x2F;span&gt;&lt;span&gt;(haystack);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; captures&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; captures_iter {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; number&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; captures&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;with_context&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;||&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;failed to extract number from: {haystack:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_str&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;A number {number} was found in {haystack:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Prints:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; A number 20 was found in &amp;quot;There are 20 bad apples in the batch of 100&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; A number 100 was found in &amp;quot;There are 20 bad apples in the batch of 100&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Crate Tracing Subscriber</title>
        <published>2024-11-24T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/crate-tracing-subscriber/"/>
        <id>https://dev.chester.wykies.com/rust/crate-tracing-subscriber/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/crate-tracing-subscriber/">&lt;h1 id=&quot;crate-docs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#crate-docs&quot; aria-label=&quot;Anchor link for: crate-docs&quot;&gt;Crate Docs&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;tracing-subscriber&#x2F;latest&#x2F;tracing_subscriber&#x2F;&quot;&gt;https:&#x2F;&#x2F;docs.rs&#x2F;tracing-subscriber&#x2F;latest&#x2F;tracing_subscriber&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;example-initialization&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-initialization&quot; aria-label=&quot;Anchor link for: example-initialization&quot;&gt;Example initialization&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Other examples available &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;tracing-subscriber&#x2F;latest&#x2F;tracing_subscriber&#x2F;filter&#x2F;struct.EnvFilter.html#examples&quot;&gt;here&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Requires features: &lt;code&gt;env-filter&lt;&#x2F;code&gt; and &lt;code&gt;std&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; tracing_subscriber&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    fmt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; format&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;FmtSpan&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    prelude&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::*&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    EnvFilter&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;tracing_subscriber&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;registry&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;with&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;fmt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;layer&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;with_span_events&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;FmtSpan&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;ACTIVE&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;with&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;EnvFilter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;try_from_default_env&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap_or_else&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;_&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        EnvFilter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; cfg!&lt;&#x2F;span&gt;&lt;span&gt;(debug_assertions) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;            &amp;quot;zbus=warn,info&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; else&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;            &amp;quot;warn&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        })&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;init&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Redirect Output</title>
        <published>2024-11-13T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/bash/redirect-output/"/>
        <id>https://dev.chester.wykies.com/bash/redirect-output/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/bash/redirect-output/">&lt;h1 id=&quot;stderr-to-stdout&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#stderr-to-stdout&quot; aria-label=&quot;Anchor link for: stderr-to-stdout&quot;&gt;stderr to stdout&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Use &lt;code&gt;2&amp;gt;&amp;amp;1&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;In the example without the redirect there is no output in vscode because &lt;code&gt;tar&lt;&#x2F;code&gt; requires arguments and instead prints to &lt;code&gt;stderr&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;tar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; 2&amp;gt;&amp;amp;1 |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; code&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; -&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If sending to a file instead of piping &lt;code&gt;stdout&lt;&#x2F;code&gt; then redirect &lt;code&gt;stdout&lt;&#x2F;code&gt; first (the order the redirects are done in matters).
As it does the redirects from left to right as per &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;876239&#x2F;how-to-redirect-and-append-both-standard-output-and-standard-error-to-a-file-wit&quot;&gt;SA Question&lt;&#x2F;a&gt;. (See excerpt below)&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;cmd &amp;gt;&amp;gt;file.txt 2&amp;gt;&amp;amp;1&lt;&#x2F;code&gt;&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
Bash executes the redirects from left to right as follows:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;&amp;gt;&amp;gt;file.txt&lt;&#x2F;code&gt;: Open file.txt in append mode and redirect stdout there.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;2&amp;gt;&amp;amp;1&lt;&#x2F;code&gt;: Redirect stderr to “where stdout is currently going”. In this case, that is a file opened in append mode. In other words, the &amp;amp;1 reuses the file descriptor which stdout currently uses.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;tar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;file.txt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; 2&amp;gt;&amp;amp;1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>QR Codes</title>
        <published>2024-11-01T00:00:00+00:00</published>
        <updated>2026-02-17T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/qr-codes/"/>
        <id>https://dev.chester.wykies.com/misc/qr-codes/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/qr-codes/">&lt;h1 id=&quot;my-personal-website-this-site&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#my-personal-website-this-site&quot; aria-label=&quot;Anchor link for: my-personal-website-this-site&quot;&gt;My personal website (This site)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;chester.wykies.com&quot;&gt;https:&#x2F;&#x2F;chester.wykies.com&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;chester.wykies.com&quot;&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;qr-codes&#x2F;qr_code_personal_site.png&quot; alt=&quot;QR Code for https:&#x2F;&#x2F;chester.wykies.com&quot; &#x2F;&gt;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;linkedin&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#linkedin&quot; aria-label=&quot;Anchor link for: linkedin&quot;&gt;LinkedIn&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.linkedin.com&#x2F;in&#x2F;cwyke&quot;&gt;https:&#x2F;&#x2F;www.linkedin.com&#x2F;in&#x2F;cwyke&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.linkedin.com&#x2F;in&#x2F;cwyke&quot;&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;qr-codes&#x2F;qr_code_linkedin.png&quot; alt=&quot;QR Code for https:&#x2F;&#x2F;www.linkedin.com&#x2F;in&#x2F;cwyke&quot; &#x2F;&gt;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;github&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#github&quot; aria-label=&quot;Anchor link for: github&quot;&gt;GitHub&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;&quot;&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;qr-codes&#x2F;qr_code_github.png&quot; alt=&quot;QR Code for https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;&quot; &#x2F;&gt;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;using-included-apps-on-your-phone-to-create-qr-codes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-included-apps-on-your-phone-to-create-qr-codes&quot; aria-label=&quot;Anchor link for: using-included-apps-on-your-phone-to-create-qr-codes&quot;&gt;Using included apps on your phone to create QR Codes&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;This was tested on a Samsung Android phone.
Not sure how well this generalizes.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Go to the phone app&lt;&#x2F;li&gt;
&lt;li&gt;Go to the contacts tab&lt;&#x2F;li&gt;
&lt;li&gt;Find the contact you want to create the QR Code for (add them and come back if you don’t have them saved, eg. create a contact for yourself for the info you want to share)&lt;&#x2F;li&gt;
&lt;li&gt;Tap on the contact to bring up the options&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;qr-codes&#x2F;contact_options.png&quot; alt=&quot;screen shot&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Select the “i” option to open the contact details&lt;&#x2F;li&gt;
&lt;li&gt;Use the three dots labelled &lt;code&gt;More&lt;&#x2F;code&gt; to open the context menu&lt;&#x2F;li&gt;
&lt;li&gt;Select &lt;code&gt;QR code&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Use the &lt;code&gt;Share&lt;&#x2F;code&gt; button to do with it what seems good to you&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h1 id=&quot;decoding-qr-codes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#decoding-qr-codes&quot; aria-label=&quot;Anchor link for: decoding-qr-codes&quot;&gt;Decoding QR codes&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I was fortunate to notice a very cool rust crate in &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;this-week-in-rust.org&#x2F;blog&#x2F;2026&#x2F;02&#x2F;11&#x2F;this-week-in-rust-638&#x2F;#crate-of-the-week&quot;&gt;This Week In Rust&lt;&#x2F;a&gt;.
It’s called &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;zedbar&quot;&gt;zedbar&lt;&#x2F;a&gt; and is:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;a &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;zedbar.org&#x2F;&quot;&gt;webpage&lt;&#x2F;a&gt; running wasm that you can drag and drop images onto&lt;&#x2F;li&gt;
&lt;li&gt;a library that can be included in your &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;zedbar&quot;&gt;rust&lt;&#x2F;a&gt; or &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;zedbar&quot;&gt;Node.js&lt;&#x2F;a&gt; project (via WASM)&lt;&#x2F;li&gt;
&lt;li&gt;a CLI that you can install using &lt;code&gt;cargo&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install zedbar&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;See sample output from the CLI below on the QR code for my website&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; zedbarimg qr_code_personal_site.png&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;QrCode:https:&#x2F;&#x2F;chester.wykies.com&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;scanned&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; barcode symbols from&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; image&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;s&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Presentation Animation Removal</title>
        <published>2024-10-09T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/presentation-animation-removal/"/>
        <id>https://dev.chester.wykies.com/misc/presentation-animation-removal/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/presentation-animation-removal/">&lt;p&gt;I prefer create slides with animations to help the viewers follow the part of the slide I’m referring to.
However, if you need a PDF version without animations then it becomes necessary to remove split the slides with animations into multiple slides.
The following is the sequence of steps I used to do this as it takes a lot of the concentration out of the process making it more bearable.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;script type=&quot;text&#x2F;javascript&quot; src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;enable_checkboxes.js&quot; defer&gt;&lt;&#x2F;script&gt;
&lt;script type=&quot;text&#x2F;javascript&quot; src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;checkboxes_nesting_behaviour.js&quot; defer&gt;&lt;&#x2F;script&gt;&lt;&#x2F;p&gt;
&lt;p&gt;For each slide do:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Remove the parts related to the pervious animations (Not applicable if not a duplicate of a page with animations from one of the other steps)
&lt;ul&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Delete speaker notes from previous page (previous duplicate)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Delete next set on animations that cause things to appear in a single click&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Delete items on the page that have disappear animations in that same single click&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Duplicate the page if it has at least one more click&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Ensure focus is on the earlier version of the page just duplicated&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Clear the speaker notes for the following clicks&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Delete items that have appear click animations&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Delete any animations that remove items&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Go to the next page&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Featured Projects and Contributions</title>
        <published>2024-09-24T00:00:00+00:00</published>
        <updated>2025-04-24T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/featured-projects/"/>
        <id>https://dev.chester.wykies.com/featured-projects/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/featured-projects/">&lt;h1 id=&quot;author&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#author&quot; aria-label=&quot;Anchor link for: author&quot;&gt;Author&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;log-viewer-rust&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#log-viewer-rust&quot; aria-label=&quot;Anchor link for: log-viewer-rust&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;log-viewer&quot;&gt;log-viewer&lt;&#x2F;a&gt; (Rust)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Simple log viewer for logs with json lines&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I developed a simple log viewing application using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;egui&quot;&gt;egui&lt;&#x2F;a&gt;.
It enables basic log file navigation.
There is an a version able to be run from the browser available &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;log-viewer&#x2F;&quot;&gt;here&lt;&#x2F;a&gt;.
(See &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;log-viewer&#x2F;tree&#x2F;main&#x2F;tests&#x2F;sample_logs&quot;&gt;sample log files&lt;&#x2F;a&gt;)
It works on log files where each line is a json string.&lt;&#x2F;p&gt;
&lt;details&gt;
    &lt;summary&gt;Click to see more&lt;&#x2F;summary&gt;
&lt;p&gt;This project servers as an example for many things that I’ve learned to do in &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;egui&quot;&gt;egui&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;It demonstrates how to “preserve empty space”.
By default &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;egui&quot;&gt;egui&lt;&#x2F;a&gt; will shrink controls to the size of the content that they contain but I wanted the height of the bottom panel to stay the same size even when it had less content.
That was accomplished using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;log-viewer&#x2F;blob&#x2F;3a2e82a65550dfd349b965fd36ffa7f74b129541&#x2F;src&#x2F;app.rs#L805&quot;&gt;a function&lt;&#x2F;a&gt; that allocates the rest of the space so that the control does not shrink.
If using this example, take note of the &lt;code&gt;if&lt;&#x2F;code&gt; that comes before calling the function.
Without the &lt;code&gt;if&lt;&#x2F;code&gt; the size of the control will grow instead of staying the same. (See exert of code below)&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span&gt; ui&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;available_height&lt;&#x2F;span&gt;&lt;span&gt;() &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0.0&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ui&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;allocate_space&lt;&#x2F;span&gt;&lt;span&gt;(ui&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;available_size&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;It also demonstrates the use of hotkeys in &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;egui&quot;&gt;egui&lt;&#x2F;a&gt; applications, both how to only enable the hotkey when the corresponding &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;log-viewer&#x2F;blob&#x2F;3a2e82a65550dfd349b965fd36ffa7f74b129541&#x2F;src&#x2F;app.rs#L829&quot;&gt;button is active&lt;&#x2F;a&gt; and global hotkeys that are &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;log-viewer&#x2F;blob&#x2F;3a2e82a65550dfd349b965fd36ffa7f74b129541&#x2F;src&#x2F;app.rs#L480&quot;&gt;always active&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;details&gt;
&lt;h2 id=&quot;bazooka-bot-rust&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#bazooka-bot-rust&quot; aria-label=&quot;Anchor link for: bazooka-bot-rust&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;bazooka-bot&quot;&gt;bazooka-bot&lt;&#x2F;a&gt; (Rust)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Discord bot for the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;discord.gg&#x2F;uQVy7BH&quot;&gt;Bazooka Alliance Server&lt;&#x2F;a&gt; (Alliance for &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.ea.com&#x2F;en-ca&#x2F;games&#x2F;command-and-conquer&#x2F;command-and-conquer-rivals&quot;&gt;Command and Conquer: Rivals&lt;&#x2F;a&gt; Game)&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Created a discord bot rust using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;poise&#x2F;latest&#x2F;poise&#x2F;&quot;&gt;poise&lt;&#x2F;a&gt; to replace the older one that I had written in &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;fone-git&#x2F;bazooka-bot&quot;&gt;python&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;Hosted on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.shuttle.rs&#x2F;&quot;&gt;shuttle&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;details&gt;
    &lt;summary&gt;Click to see more&lt;&#x2F;summary&gt;
&lt;ul&gt;
&lt;li&gt;Highlighted features:
&lt;ul&gt;
&lt;li&gt;Schedule events&lt;&#x2F;li&gt;
&lt;li&gt;Manage players voting on ideas&lt;&#x2F;li&gt;
&lt;li&gt;Manage recording of scores during the event&lt;&#x2F;li&gt;
&lt;li&gt;Uses both text based commands and &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;support.discord.com&#x2F;hc&#x2F;en-us&#x2F;articles&#x2F;1500000368501-Slash-Commands-FAQ&quot;&gt;slash commands&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;See the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;bazooka-bot&quot;&gt;readme&lt;&#x2F;a&gt; of the project for all functionality&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;details&gt;
&lt;h1 id=&quot;contributor&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#contributor&quot; aria-label=&quot;Anchor link for: contributor&quot;&gt;Contributor&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;trippy-rust&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#trippy-rust&quot; aria-label=&quot;Anchor link for: trippy-rust&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;fujiapple852&#x2F;trippy&quot;&gt;trippy&lt;&#x2F;a&gt; (Rust)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Combines the functionality of traceroute and ping and is designed to assist with the analysis of networking issues.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I help out with the development of the trippy program.
I answer issues on github (when I can) and occasionally assist with code reviews.
I’ve also corrected a few typos and introduced a more automated approach to snapshot testing using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;mitsuhiko&#x2F;insta&quot;&gt;insta&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;details&gt;
    &lt;summary&gt;Click to see more&lt;&#x2F;summary&gt;
&lt;p&gt;I was originally interested in trippy when I was looking for a way to do “ping” from rust.
I was building a network monitoring tool to provide alerts when devices became unreachable.
Trippy wasn’t yet a good fit for this use case but the maintainer was open to working with me on what I needed and thus I got involved with the project.
Trippy is now at a point where it is ready to support my use case.
However while waiting I developed a &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rust-practice&#x2F;conn_mon&quot;&gt;temporary solution&lt;&#x2F;a&gt; based on the ping program that ships with debian.
Once time permits I will rebuild on top of trippy and incorporate what I learned from the temporary solution.
Even though I’ve not used trippy yet for my original use case, I am actively involved with the project.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;h2 id=&quot;egui-rust&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#egui-rust&quot; aria-label=&quot;Anchor link for: egui-rust&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;egui&quot;&gt;egui&lt;&#x2F;a&gt; (Rust)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;blockquote&gt;
&lt;p&gt;An easy-to-use immediate mode GUI in Rust that runs on both web and native&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I’ve contributed several small improvements based on my interactions with this community.&lt;&#x2F;p&gt;
&lt;details&gt;
    &lt;summary&gt;Click to see more&lt;&#x2F;summary&gt;
&lt;p&gt;I’ve really enjoyed using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;egui&quot;&gt;egui&lt;&#x2F;a&gt;.
This crate was my introduction to immediate mode GUI development.
I’ve found that using immediate mode for &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Proof_of_concept&quot;&gt;PoC&lt;&#x2F;a&gt; helps me focus on functionality instead of ascetics.
&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.merriam-webster.com&#x2F;dictionary&#x2F;IMHO&quot;&gt;IMHO&lt;&#x2F;a&gt; they end up looking reasonable anyway (&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;uruth-lab.github.io&#x2F;dbv&#x2F;&quot;&gt;example&lt;&#x2F;a&gt;).
I am using it for multiple of my ongoing projects.
I’ve contributed:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;a few typo fixes&lt;&#x2F;li&gt;
&lt;li&gt;ensured &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;egui&#x2F;pull&#x2F;3770&quot;&gt;all examples&lt;&#x2F;a&gt; on the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.egui.rs&#x2F;&quot;&gt;demo website&lt;&#x2F;a&gt; include links to the source code&lt;&#x2F;li&gt;
&lt;li&gt;updated the template to make it easy for new users to &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;eframe_template&#x2F;pull&#x2F;122&quot;&gt;set the icon&lt;&#x2F;a&gt; for an application&lt;&#x2F;li&gt;
&lt;li&gt;and created an alternate &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;egui_file_picker_poll_promise&quot;&gt;example of how to load files&lt;&#x2F;a&gt; using the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;EmbarkStudios&#x2F;poll-promise&quot;&gt;poll-promise&lt;&#x2F;a&gt; crate, which is closer to code I would want to use in an actual project.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;details&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Resume writing</title>
        <published>2024-09-23T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/resume-writing/"/>
        <id>https://dev.chester.wykies.com/misc/resume-writing/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/resume-writing/">&lt;h1 id=&quot;templates&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#templates&quot; aria-label=&quot;Anchor link for: templates&quot;&gt;Templates&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I found the following sources for templates.
I eventually decided on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;azzamsa&#x2F;cv-template&#x2F;&quot;&gt;this one&lt;&#x2F;a&gt;.
It was written using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;typst.app&#x2F;&quot;&gt;typst&lt;&#x2F;a&gt; and turns out that’s a really simple and powerful language so learned that in addition.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.latextemplates.com&#x2F;cat&#x2F;curricula-vitae&quot;&gt;http:&#x2F;&#x2F;www.latextemplates.com&#x2F;cat&#x2F;curricula-vitae&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.overleaf.com&#x2F;latex&#x2F;templates&#x2F;tagged&#x2F;cv&#x2F;page&#x2F;1&quot;&gt;https:&#x2F;&#x2F;www.overleaf.com&#x2F;latex&#x2F;templates&#x2F;tagged&#x2F;cv&#x2F;page&#x2F;1&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;bullet-point-formula&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#bullet-point-formula&quot; aria-label=&quot;Anchor link for: bullet-point-formula&quot;&gt;Bullet point formula&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.freecodecamp.org&#x2F;news&#x2F;writing-a-killer-software-engineering-resume-b11c91ef699d&#x2F;&quot;&gt;How to write a killer Software Engineering résumé&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Accomplished [X] as measured by [Y] by doing [Z]&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;em&gt;The &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.freecodecamp.org&#x2F;news&#x2F;writing-a-killer-software-engineering-resume-b11c91ef699d&#x2F;&quot;&gt;article I read&lt;&#x2F;a&gt; attributed it to Laszlo Bock, Former SVP of People Operations at Google&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;verb-word-bank-from-article&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#verb-word-bank-from-article&quot; aria-label=&quot;Anchor link for: verb-word-bank-from-article&quot;&gt;Verb word bank from article&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Improved&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Transformed&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Obtained&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Integrated&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Shaped&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Decreased&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Incorporated&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Redesigned&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Developed&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Piloted&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Structured&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Created&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Optimized&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Increased&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Revitalized&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Reduced&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Established&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;United&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Refactored&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Added&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Used&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Utilized&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Spearheaded&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Built&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Implemented&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Spurred&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Designed&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Produced&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Detached Head</title>
        <published>2024-09-12T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/detached-head/"/>
        <id>https://dev.chester.wykies.com/git/detached-head/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/detached-head/">&lt;h1 id=&quot;recovering-a-detached-head-created-from-a-hard-reset&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#recovering-a-detached-head-created-from-a-hard-reset&quot; aria-label=&quot;Anchor link for: recovering-a-detached-head-created-from-a-hard-reset&quot;&gt;Recovering a detached head created from a hard reset&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;“Accidentally” did a hard reset and lost commits I’d done.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; reflog&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This showed the commit with a &lt;code&gt;HEAD@{1}&lt;&#x2F;code&gt; next to it&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; checkout HEAD@{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This moved me onto a detached head. And git gave me instructions how to “save it”&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; switch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -c&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; new_branch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This created a branch for my head and I just switched back to my previous branch and merged in the &lt;code&gt;new_branch&lt;&#x2F;code&gt;. (Did in vscode don’t have command and they shouldn’t be hard to find).&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Crate egui</title>
        <published>2024-09-05T00:00:00+00:00</published>
        <updated>2025-09-03T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/crate-egui/"/>
        <id>https://dev.chester.wykies.com/rust/crate-egui/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/crate-egui/">&lt;h1 id=&quot;get-window-size&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-window-size&quot; aria-label=&quot;Anchor link for: get-window-size&quot;&gt;Get window size&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;egui&#x2F;discussions&#x2F;2015&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;egui&#x2F;discussions&#x2F;2015&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ctx&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;input&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    if let&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Some&lt;&#x2F;span&gt;&lt;span&gt;(rect)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;viewport&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;outer_rect {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        dbg!&lt;&#x2F;span&gt;&lt;span&gt;(rect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;size&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;});&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;prevent-a-ui-from-shrinking-if-the-contents-get-smaller&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#prevent-a-ui-from-shrinking-if-the-contents-get-smaller&quot; aria-label=&quot;Anchor link for: prevent-a-ui-from-shrinking-if-the-contents-get-smaller&quot;&gt;Prevent a UI from shrinking if the contents get smaller&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;egui&#x2F;discussions&#x2F;465&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;egui&#x2F;discussions&#x2F;465&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The example below checks for changes in hight but width should be similar.
Without the if statement it causes the widget to grow if the contents get bigger.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span&gt; ui&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;available_height&lt;&#x2F;span&gt;&lt;span&gt;() &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0.0&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ui&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;allocate_space&lt;&#x2F;span&gt;&lt;span&gt;(ui&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;available_size&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;accommodate-dark-monitors&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#accommodate-dark-monitors&quot; aria-label=&quot;Anchor link for: accommodate-dark-monitors&quot;&gt;Accommodate dark monitors&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;details&gt;
  &lt;summary&gt;See back story&lt;&#x2F;summary&gt;
&lt;p&gt;I use the screen a lot and don’t like my main screen very bright or very high contrast.
One might even say I’ve set it too low.
Unfortunately, that means that the default dark theme for egui is extremely low contrast on my screen and thus I need to change from the defaults.
I keep forgetting what I have to change so I’m going to make notes here to make it easier for next time.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;p&gt;Using the built in settings page (needs to exposed by application, like it is on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;egui.rs&quot;&gt;https:&#x2F;&#x2F;egui.rs&lt;&#x2F;a&gt; in the Backend window).&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;Style&lt;&#x2F;code&gt; -&amp;gt; &lt;code&gt;Visuals&lt;&#x2F;code&gt; -&amp;gt; &lt;code&gt;Background colors&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Windows = 64,64,64&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Panels = 60,60,60&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Iterators</title>
        <published>2024-09-05T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/iterators/"/>
        <id>https://dev.chester.wykies.com/rust/iterators/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/iterators/">&lt;h1 id=&quot;references&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#references&quot; aria-label=&quot;Anchor link for: references&quot;&gt;References&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;aloso.github.io&#x2F;2021&#x2F;03&#x2F;09&#x2F;creating-an-iterator&quot;&gt;Blog post&lt;&#x2F;a&gt; on how to use iterator to traverse a tree&lt;&#x2F;p&gt;
&lt;h1 id=&quot;examples&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#examples&quot; aria-label=&quot;Anchor link for: examples&quot;&gt;Examples&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Copied from an example by &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;robjtede&quot;&gt;robjtede @ Actix Web&lt;&#x2F;a&gt; on discord. It was an aside to Tim’s &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=RQE4GeDe4yw&quot;&gt;video&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;!&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;usr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;bin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;S&lt;&#x2F;span&gt;&lt;span&gt; cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt;nightly&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zscript&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;span&gt;cargo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;package&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;edition &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;2021&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; # &lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Desirable&lt;&#x2F;span&gt;&lt;span&gt; to stop warning but not needed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[dependencies]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;itertools&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;0.12.1&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; itertools&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Itertools&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; _;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; pas&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Pas&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; row&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; pas&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;take&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;8&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, row&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;join&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;, &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[derive(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Debug&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Pas&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    row&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    prev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;i32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Pas&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; new&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; Self&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        Self&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            row&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            prev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; vec!&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Iterator&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Pas&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Item&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;i32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; next&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;mut&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Option&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;Self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Item&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;row &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;+=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;row &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            return&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Some&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;prev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;clone&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;prev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;insert&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;prev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;push&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;prev &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span&gt;prev&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;tuple_windows&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;(a, b)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt; b)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;collect&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        Some&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;prev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;clone&lt;&#x2F;span&gt;&lt;span&gt;())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Surrender Novena</title>
        <published>2024-08-31T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/prayers/surrender-novena/"/>
        <id>https://dev.chester.wykies.com/prayers/surrender-novena/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/prayers/surrender-novena/">&lt;h1 id=&quot;foreword-and-sources&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword-and-sources&quot; aria-label=&quot;Anchor link for: foreword-and-sources&quot;&gt;Foreword and sources&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;The original link that was referred to me for this novena was from &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;catholicexchange.com&#x2F;the-surrender-novena-let-jesus-take-care-of-everything&#x2F;&quot;&gt;Catholic Exchange&lt;&#x2F;a&gt;.
However after reading the article I still wasn’t clear on how the novena should be prayed.
I found a more prescriptive version on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;hallow.com&#x2F;blog&#x2F;how-to-pray-the-surrender-novena&#x2F;&quot;&gt;Hallow&lt;&#x2F;a&gt; but I found a small typo in one of the prays for the days and thus text for the prayers for the days has been copied from the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;catholicexchange.com&#x2F;the-surrender-novena-let-jesus-take-care-of-everything&#x2F;&quot;&gt;Catholic Exchange&lt;&#x2F;a&gt; Article.
I patterned on the prescriptive structure from &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;hallow&quot;&gt;Hallow&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;steps&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#steps&quot; aria-label=&quot;Anchor link for: steps&quot;&gt;Steps&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;step-1-sign-of-the-cross&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#step-1-sign-of-the-cross&quot; aria-label=&quot;Anchor link for: step-1-sign-of-the-cross&quot;&gt;Step 1. Sign of the cross&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Begin by making the sign of the cross.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;In the name of Father, and of the Son, and of the Holy Spirit, Amen.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;step-2-prayer-for-the-day&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#step-2-prayer-for-the-day&quot; aria-label=&quot;Anchor link for: step-2-prayer-for-the-day&quot;&gt;Step 2. Prayer for the day&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Then, listen or read the words that Jesus spoke to Fr. Dolindo Ruotolo and that He continues to speak to us.
Each day of the novena, listen and reflect on His words and consider how He is leading you to peace and comfort throughout the next nine days and forever.&lt;&#x2F;p&gt;
&lt;p&gt;For me I found that reading &lt;code&gt;the prayer for the day&lt;&#x2F;code&gt; a few times, instead of once, helped me understand it a bit more and helped me apply it to my situation.&lt;&#x2F;p&gt;
&lt;p&gt;Link to jump to days:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#day-1&quot;&gt;Day 1&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#day-2&quot;&gt;Day 2&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#day-3&quot;&gt;Day 3&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#day-4&quot;&gt;Day 4&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#day-5&quot;&gt;Day 5&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#day-6&quot;&gt;Day 6&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#day-7&quot;&gt;Day 7&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#day-8&quot;&gt;Day 8&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#day-9&quot;&gt;Day 9&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;day-1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#day-1&quot; aria-label=&quot;Anchor link for: day-1&quot;&gt;Day 1&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Why do you confuse yourselves by worrying? Leave the care of your affairs to me and everything will be peaceful.
I say to you in truth that every act of true, blind, complete surrender to me produces the effect that you desire and resolves all difficult situations.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#step-3-repeat-the-surrender-refrain-10-times&quot;&gt;Go to step 3&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;day-2&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#day-2&quot; aria-label=&quot;Anchor link for: day-2&quot;&gt;Day 2&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Surrender to me does not mean to fret, to be upset, or to lose hope, nor does it mean offering to me a worried prayer asking me to follow you and change your worry into prayer.
It is against this surrender, deeply against it, to worry, to be nervous and to desire to think about the consequences of anything.&lt;&#x2F;p&gt;
&lt;p&gt;It is like the confusion that children feel when they ask their mother to see to their needs, and then try to take care of those needs for themselves so that their childlike efforts get in their mother’s way.
Surrender means to placidly close the eyes of the soul, to turn away from thoughts of tribulation and to put yourself in my care, so that only I act, saying, “You take care of it.”&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#step-3-repeat-the-surrender-refrain-10-times&quot;&gt;Go to step 3&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;day-3&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#day-3&quot; aria-label=&quot;Anchor link for: day-3&quot;&gt;Day 3&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;How many things I do when the soul, in so much spiritual and material need, turns to me, looks at me and says to me, “You take care of it,” then closes its eyes and rests.
In pain you pray for me to act, but that I act in the way you want.
You do not turn to me, instead, you want me to adapt to your ideas.
You are not sick people who ask the doctor to cure you, but rather sick people who tell the doctor how to.
So do not act this way, but pray as I taught you in the Our Father: “Hallowed be thy Name,” that is, be glorified in my need.
“Thy kingdom come,” that is, let all that is in us and in the world be in accord with your kingdom.
“Thy will be done on Earth as it is in Heaven,” that is, in our need, decide as you see fit for our temporal and eternal life.
If you say to me truly: “Thy will be done,” which is the same as saying: “You take care of it,” I will intervene with all my omnipotence, and I will resolve the most difficult situations.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#step-3-repeat-the-surrender-refrain-10-times&quot;&gt;Go to step 3&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;day-4&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#day-4&quot; aria-label=&quot;Anchor link for: day-4&quot;&gt;Day 4&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;You see evil growing instead of weakening? Do not worry.
Close your eyes and say to me with faith: “Thy will be done, You take care of it.”
I say to you that I will take care of it, and that I will intervene as does a doctor and I will accomplish miracles when they are needed.
Do you see that the sick person is getting worse? Do not be upset, but close your eyes and say, “You take care of it.”
I say to you that I will take care of it, and that there is no medicine more powerful than my loving intervention.
By my love, I promise this to you.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#step-3-repeat-the-surrender-refrain-10-times&quot;&gt;Go to step 3&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;day-5&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#day-5&quot; aria-label=&quot;Anchor link for: day-5&quot;&gt;Day 5&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;And when I must lead you on a path different from the one you see, I will prepare you; I will carry you in my arms; I will let you find yourself, like children who have fallen asleep in their mother’s arms, on the other bank of the river.
What troubles you and hurts you immensely are your reason, your thoughts and worry, and your desire at all costs to deal with what afflicts you.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#step-3-repeat-the-surrender-refrain-10-times&quot;&gt;Go to step 3&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;day-6&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#day-6&quot; aria-label=&quot;Anchor link for: day-6&quot;&gt;Day 6&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;You are sleepless; you want to judge everything, direct everything and see to everything and you surrender to human strength, or worse—to men themselves, trusting in their intervention—this is what hinders my words and my views.
Oh, how much I wish from you this surrender, to help you; and how I suffer when I see you so agitated! Satan tries to do exactly this: to agitate you and to remove you from my protection and to throw you into the jaws of human initiative.
So, trust only in me, rest in me, surrender to me in everything.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#step-3-repeat-the-surrender-refrain-10-times&quot;&gt;Go to step 3&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;day-7&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#day-7&quot; aria-label=&quot;Anchor link for: day-7&quot;&gt;Day 7&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;I perform miracles in proportion to your full surrender to me and to your not thinking of yourselves.
I sow treasure troves of graces when you are in the deepest poverty.
No person of reason, no thinker, has ever performed miracles, not even among the saints.
He does divine works whosoever surrenders to God.
So don’t think about it any more, because your mind is acute and for you it is very hard to see evil and to trust in me and to not think of yourself.
Do this for all your needs, do this, all of you, and you will see great continual silent miracles.
I will take care of things, I promise this to you.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#step-3-repeat-the-surrender-refrain-10-times&quot;&gt;Go to step 3&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;day-8&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#day-8&quot; aria-label=&quot;Anchor link for: day-8&quot;&gt;Day 8&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Close your eyes and let yourself be carried away on the flowing current of my grace; close your eyes and do not think of the present, turning your thoughts away from the future just as you would from temptation.
Repose in me, believing in my goodness, and I promise you by my love that if you say, “You take care of it,” I will take care of it all; I will console you, liberate you and guide you.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#step-3-repeat-the-surrender-refrain-10-times&quot;&gt;Go to step 3&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;day-9&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#day-9&quot; aria-label=&quot;Anchor link for: day-9&quot;&gt;Day 9&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Pray always in readiness to surrender, and you will receive from it great peace and great rewards, even when I confer on you the grace of immolation, of repentance, and of love.
Then what does suffering matter? It seems impossible to you? Close your eyes and say with all your soul, “Jesus, you take care of it.”
Do not be afraid, I will take care of things and you will bless my name by humbling yourself.
A thousand prayers cannot equal one single act of surrender, remember this well.
There is no novena more effective than this.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;prayers&#x2F;surrender-novena&#x2F;#step-3-repeat-the-surrender-refrain-10-times&quot;&gt;Go to step 3&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;step-3-repeat-the-surrender-refrain-10-times&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#step-3-repeat-the-surrender-refrain-10-times&quot; aria-label=&quot;Anchor link for: step-3-repeat-the-surrender-refrain-10-times&quot;&gt;Step 3. Repeat the surrender refrain 10 times.&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;blockquote&gt;
&lt;p&gt;“O Jesus, I surrender myself to You, take care of everything!”&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;step-4-closing-prayer&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#step-4-closing-prayer&quot; aria-label=&quot;Anchor link for: step-4-closing-prayer&quot;&gt;Step 4. Closing prayer&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;blockquote&gt;
&lt;p&gt;“Mother, I am yours now and forever. Through you and with you, I always want to belong completely to Jesus.”&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;step-5-sign-of-the-cross&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#step-5-sign-of-the-cross&quot; aria-label=&quot;Anchor link for: step-5-sign-of-the-cross&quot;&gt;Step 5. Sign of the cross&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Conclude with the sign of the cross.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;In the name of Father, and of the Son, and of the Holy Spirit, Amen.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Colors</title>
        <published>2024-07-28T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/colors/"/>
        <id>https://dev.chester.wykies.com/misc/colors/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/colors/">&lt;h1 id=&quot;color-blindness&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#color-blindness&quot; aria-label=&quot;Anchor link for: color-blindness&quot;&gt;Color Blindness&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;When choosing colors it’s always good to bear accessibility in mind.
One of the best explanations of color blindness that I’ve come across is the one on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;venngage.com&#x2F;blog&#x2F;color-blind-friendly-palette&#x2F;&quot;&gt;venngage.com&lt;&#x2F;a&gt;.
I’ve found the following color palette from their site to be very useful:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;venngage.com&#x2F;templates&#x2F;infographics&#x2F;color-palettes-dd1b862e-4294-4dac-bcda-324dd0a05360&quot;&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;colors&#x2F;dd1b862e-4294-4dac-bcda-324dd0a05360.png&quot; alt=&quot;color palette&quot; &#x2F;&gt;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Regex</title>
        <published>2024-07-28T00:00:00+00:00</published>
        <updated>2025-05-11T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/regex/"/>
        <id>https://dev.chester.wykies.com/misc/regex/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/regex/">&lt;h1 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I’ve written many regexes over the years that I’d like to be able to find again…
Decided it’s probably time to take note of ones I think I’ll use again even if they’re easy to rewrite because, sometimes when you rewrite them you bump into the same edge cases again.
Also you do know that “find and replace” in many programs supports regex right… (like vscode and Notepad++).&lt;&#x2F;p&gt;
&lt;h1 id=&quot;tools-writing-and-understanding-regex-expressions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tools-writing-and-understanding-regex-expressions&quot; aria-label=&quot;Anchor link for: tools-writing-and-understanding-regex-expressions&quot;&gt;Tools writing and understanding regex expressions&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;regex101.com&#x2F;&quot;&gt;https:&#x2F;&#x2F;regex101.com&#x2F;&lt;&#x2F;a&gt; - This is my favorite tool when writing regex.
It makes it very easy to test and debug regex expressions and has a quick reference with all the groups and quantifiers and things I don’t commit to memory.&lt;&#x2F;li&gt;
&lt;li&gt;PyCharm’s expression tester - Built into PyCharm is a &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;pycharm&#x2F;regex&#x2F;&quot;&gt;regex expression&lt;&#x2F;a&gt; tester which is useful but I still get more value out of &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;regex101.com&quot;&gt;https:&#x2F;&#x2F;regex101.com&lt;&#x2F;a&gt; as that works even when I’m not using PyCharm.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;pythonium.net&#x2F;regex&quot;&gt;https:&#x2F;&#x2F;pythonium.net&#x2F;regex&lt;&#x2F;a&gt; - Provides a graphical state machine like view of the regex supplied.
Found it good for visualizing expressions to try to understand them.
Note that there is a mini tutorial on how to use the tool lower down on the page.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;cookbook&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#cookbook&quot; aria-label=&quot;Anchor link for: cookbook&quot;&gt;Cookbook&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;find-repeated-words-in-a-document&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#find-repeated-words-in-a-document&quot; aria-label=&quot;Anchor link for: find-repeated-words-in-a-document&quot;&gt;Find repeated words in a document&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;\b(\w+)\s+\1\b&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Quotes</title>
        <published>2024-06-07T00:00:00+00:00</published>
        <updated>2026-05-18T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/quotes/"/>
        <id>https://dev.chester.wykies.com/misc/quotes/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/quotes/">&lt;blockquote&gt;
&lt;p&gt;Stand for something or you will fall for anything.
Today’s mighty oak is yesterday’s nut that held its ground.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;ca.sports.yahoo.com&#x2F;style&#x2F;25-best-rosa-parks-quotes-213800313.html&quot;&gt;by&lt;&#x2F;a&gt; Rosa Parks&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;blockquote&gt;
&lt;p&gt;I have learned over the years that when one’s mind is made up, this diminishes fear; knowing what must be done does away with fear.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;ca.sports.yahoo.com&#x2F;style&#x2F;25-best-rosa-parks-quotes-213800313.html&quot;&gt;by&lt;&#x2F;a&gt; Rosa Parks&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;blockquote&gt;
&lt;p&gt;I have two kinds of problems, the urgent and the important. The urgent are not important, and the important are never urgent.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;thesquareplanet.com&#x2F;blog&#x2F;eisenhower-vectors&#x2F;&quot;&gt;by&lt;&#x2F;a&gt; US President Dwight D. Eisenhower (In the speech, Eisenhower in turn attributes it to a “former college president”)&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;blockquote&gt;
&lt;p&gt;You have brains in your head. You have feet in your shoes. You can steer yourself any direction you choose.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Dr._Seuss&quot;&gt;by&lt;&#x2F;a&gt; Dr. Seuss&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;blockquote&gt;
&lt;p&gt;If You’re Going Through Hell, Keep Going.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.forbes.com&#x2F;sites&#x2F;geoffloftus&#x2F;2012&#x2F;05&#x2F;09&#x2F;if-youre-going-through-hell-keep-going-winston-churchill&#x2F;&quot;&gt;by&lt;&#x2F;a&gt; Winston Churchill&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;blockquote&gt;
&lt;p&gt;Spread love everywhere you go. Let no one ever come to you without leaving happier.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.brainyquote.com&#x2F;quotes&#x2F;mother_teresa_133195&quot;&gt;by&lt;&#x2F;a&gt; Mother Teresa&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;blockquote&gt;
&lt;p&gt;God grant me Serenity to accept the things I cannot change,&lt;br &#x2F;&gt;
Courage to change the things I can,&lt;br &#x2F;&gt;
And the wisdom to know the difference.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Serenity_Prayer&quot;&gt;Author Unclear&lt;&#x2F;a&gt; but words to live by all the same&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Therefore, in every deed and every thought, act as though you were to die this very day. If you had a good conscience you would not fear death very much. It is better to avoid sin than to fear death. If you are not prepared today, how will you be prepared tomorrow? Tomorrow is an uncertain day; how do you know you will have a tomorrow?&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;catholicarchive.org&#x2F;thomas_a_kempis&#x2F;the_imitation_of_christ&#x2F;1&#x2F;23.html&quot;&gt;by&lt;&#x2F;a&gt; Thomas à Kempis in The Imitation of Christ&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Crate CSV</title>
        <published>2024-05-04T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/crate-csv/"/>
        <id>https://dev.chester.wykies.com/rust/crate-csv/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/crate-csv/">&lt;h1 id=&quot;example-of-writing-csv-to-a-buffer-string&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-of-writing-csv-to-a-buffer-string&quot; aria-label=&quot;Anchor link for: example-of-writing-csv-to-a-buffer-string&quot;&gt;Example of writing CSV to a Buffer (String)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;This is a modified version of the example from the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-lang-nursery.github.io&#x2F;rust-cookbook&#x2F;encoding&#x2F;csv.html#filter-csv-records-matching-a-predicate&quot;&gt;rust cookbook&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Writes to a vector of bytes then converts it into a string.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;!&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;usr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;bin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;S&lt;&#x2F;span&gt;&lt;span&gt; cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt;nightly&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zscript&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;span&gt;cargo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;package&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;edition &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;2021&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; # &lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Desirable&lt;&#x2F;span&gt;&lt;span&gt; to stop warning but not needed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[dependencies]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;csv&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;1.3.0&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;(),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Box&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;dyn&lt;&#x2F;span&gt;&lt;span&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;error&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Error&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; query&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;CA&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;City,State,Population,Latitude,Longitude&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;Kenai,AK,7610,60.5544444,-151.2583333&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;Oakman,AL,,33.7133333,-87.3886111&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;Sandfort,AL,,32.3380556,-85.2233333&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;West Hollywood,CA,37031,34.0900000,-118.3608333&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; rdr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; csv&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ReaderBuilder&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from_reader&lt;&#x2F;span&gt;&lt;span&gt;(data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_bytes&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; write_buffer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; wtr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; csv&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Writer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from_writer&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;mut&lt;&#x2F;span&gt;&lt;span&gt; write_buffer);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    wtr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;write_record&lt;&#x2F;span&gt;&lt;span&gt;(rdr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;headers&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; rdr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;records&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; record&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span&gt; record&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;any&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;field&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; field&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span&gt; query) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            wtr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;write_record&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;record)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    wtr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;flush&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    drop&lt;&#x2F;span&gt;&lt;span&gt;(wtr);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;str&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from_utf8&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;write_buffer)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>phpMyAdmin</title>
        <published>2024-04-17T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/php-my-admin/"/>
        <id>https://dev.chester.wykies.com/misc/php-my-admin/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/php-my-admin/">&lt;p&gt;I have XAMPP installed and wanted to document part of my config in case I have to setup again on a new computer.&lt;&#x2F;p&gt;
&lt;p&gt;Notable changes (that I remember) are:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;No auto login to the MySQL server.&lt;&#x2F;li&gt;
&lt;li&gt;Added a second host which is the same computer but by IP, which I use to connect to MySQL running in docker images.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;File found at: &lt;code&gt;&#x2F;opt&#x2F;lampp&#x2F;phpmyadmin&#x2F;config.inc.php&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;php&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;lt;?&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;php&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; * phpMyAdmin sample configuration, you can use it as base for&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; * manual configuration. For easier setup you can use setup&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; *&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; * All directives are explained in documentation in the doc&#x2F; folder&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; * or at &amp;lt;https:&#x2F;&#x2F;docs.phpmyadmin.net&#x2F;&amp;gt;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;** &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; * This part has been truncated&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; * Servers configuration&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; * First server&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;++&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;* Authentication type *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$cfg[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Servers&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;][$i][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;auth_type&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;cookie&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$cfg[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Servers&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;][$i][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;user&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;root&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$cfg[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Servers&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;][$i][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;password&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;* Server parameters *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F;$cfg[&amp;#39;Servers&amp;#39;][$i][&amp;#39;host&amp;#39;] = &amp;#39;localhost&amp;#39;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$cfg[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Servers&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;][$i][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;compress&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$cfg[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Servers&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;][$i][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;AllowNoPassword&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;** &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; * This part has been truncated&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;++&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$cfg[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Servers&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;][$i][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;host&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;127.0.0.1&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F;provide hostname and port if other than default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$cfg[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Servers&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;][$i][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;user&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;root&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$cfg[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Servers&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;][$i][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;password&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;  &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$cfg[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Servers&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;][$i][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;auth_type&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;cookie&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; * End of servers configuration&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;** &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; * This part has been truncated&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Create new egui project</title>
        <published>2024-04-08T00:00:00+00:00</published>
        <updated>2026-04-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/create-new-egui-project/"/>
        <id>https://dev.chester.wykies.com/rust/create-new-egui-project/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/create-new-egui-project/">&lt;p&gt;Currently have a PR in flight to solve this &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;eframe_template&#x2F;pull&#x2F;227&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;emilk&#x2F;eframe_template&#x2F;pull&#x2F;227&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Background Commands</title>
        <published>2024-03-03T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/bash/background-commands/"/>
        <id>https://dev.chester.wykies.com/bash/background-commands/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/bash/background-commands/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;510811&#x2F;what-is-the-difference-between-ctrl-z-and-ctrl-c-in-the-terminal&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;510811&#x2F;what-is-the-difference-between-ctrl-z-and-ctrl-c-in-the-terminal&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Note: I found more info on &lt;code&gt;fg&lt;&#x2F;code&gt; in the man page for sh (see &lt;code&gt;man sh&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
&lt;p&gt;We all end up pressing &lt;code&gt;Ctrl + Z&lt;&#x2F;code&gt; instead of &lt;code&gt;Ctrl + C&lt;&#x2F;code&gt; one day and not knowing what to do.
This isn’t always a big deal unless the program that was running locked some resource you want to use.
Closing the terminal “fixes” it but that might be inconvenient.
What &lt;code&gt;Ctrl + Z&lt;&#x2F;code&gt; does is suspend the program instead of stopping it like &lt;code&gt;Ctrl + C&lt;&#x2F;code&gt;.
So it’s not running but it’s basically paused and in the background.&lt;&#x2F;p&gt;
&lt;p&gt;There are two commands you can use to control programs in the background &lt;code&gt;bg&lt;&#x2F;code&gt; and &lt;code&gt;fg&lt;&#x2F;code&gt;.
Didn’t find any info on these programs from a cursory search. No man page for either and &lt;code&gt;--help&lt;&#x2F;code&gt; doesn’t seem to be an argument.
The following is from my testing mostly using &lt;code&gt;ping&lt;&#x2F;code&gt; which still sends messages to the terminal even if it’s running in the background.
To see if it is in the background I tried using another command like top.
From those test I concluded the following:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;fg&lt;&#x2F;code&gt; - brings a suspended (or running in the background) program to the foreground&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;bg&lt;&#x2F;code&gt; - resumes a suspended program in the background (you can continue to use the terminal, with the background program possibly sending messages)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;&amp;amp;&lt;&#x2F;code&gt; at the end of command seems to start a command and then put it to run in the background so &lt;code&gt;fg&lt;&#x2F;code&gt; can be used to bring it back to the foreground&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>7z encrypted file</title>
        <published>2024-02-28T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/7zip/"/>
        <id>https://dev.chester.wykies.com/debian/7zip/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/7zip/">&lt;p&gt;Found an old &lt;code&gt;7z&lt;&#x2F;code&gt; file that was password protected and the UI &lt;code&gt;Extract Here&lt;&#x2F;code&gt; option wouldn’t extract it for me. It said&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;There was an error while extracting “file.7z”
The archive header is encrypted, but currently not supported&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Found an &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;13474&#x2F;how-do-i-extract-a-password-protected-7z-file&quot;&gt;SO question&lt;&#x2F;a&gt; that a solution that worked for me.&lt;&#x2F;p&gt;
&lt;p&gt;Install tool &lt;code&gt;sudo apt install p7zip-full&lt;&#x2F;code&gt; then run &lt;code&gt;7z x file.7z&lt;&#x2F;code&gt;.
It prompted for the password and all was well.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Links between files</title>
        <published>2024-02-24T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/link-files/"/>
        <id>https://dev.chester.wykies.com/debian/link-files/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/link-files/">&lt;h1 id=&quot;tldr&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tldr&quot; aria-label=&quot;Anchor link for: tldr&quot;&gt;TLDR&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;Hard links share the same data but are independent of each other in terms of the file system and deleting one doesn’t affect the other&lt;&#x2F;li&gt;
&lt;li&gt;Hard links are usually restricted to only files and withing the same file system&lt;&#x2F;li&gt;
&lt;li&gt;Soft links are usually allowed to be dangling and can break and can also be relative or absolute&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;ln&lt;&#x2F;code&gt; defaults to hard links&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;ln&lt;&#x2F;code&gt; with &lt;code&gt;-s&lt;&#x2F;code&gt; will create a symbolic link instead&lt;&#x2F;li&gt;
&lt;li&gt;It is easiest to create link from the directory where the link should be created, if that is not the case and a relative is used ensure the &lt;code&gt;-r&lt;&#x2F;code&gt; option is set&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Usage: ln [OPTION]… [-T] TARGET LINK_NAME
or: ln [OPTION]… TARGET
or: ln [OPTION]… TARGET… DIRECTORY
or: ln [OPTION]… -t DIRECTORY TARGET…
In the 1st form, create a link to TARGET with the name LINK_NAME.
In the 2nd form, create a link to TARGET in the current directory.
In the 3rd and 4th forms, create links to each TARGET in DIRECTORY.
Create hard links by default, symbolic links with –symbolic.
By default, each destination (name of new link) should not already exist.
When creating hard links, each TARGET must exist. Symbolic links
can hold arbitrary text; if later resolved, a relative link is
interpreted in relation to its parent directory.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Example from the folder to create link in (same for directory or file)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ln&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ORIGINAL .&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;hard-links-vs-soft-links-symbolic-link-symlinks&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#hard-links-vs-soft-links-symbolic-link-symlinks&quot; aria-label=&quot;Anchor link for: hard-links-vs-soft-links-symbolic-link-symlinks&quot;&gt;Hard links vs Soft Links (Symbolic Link &#x2F; Symlinks)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;The man page for &lt;code&gt;ln&lt;&#x2F;code&gt; is really good and I can’t add much to it.
It links to the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;coreutils&#x2F;manual&#x2F;html_node&#x2F;ln-invocation.html#ln-invocation&quot;&gt;full documentation&lt;&#x2F;a&gt; which is also really good.&lt;&#x2F;p&gt;
&lt;p&gt;The most succinct explanation I found was on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;185899&#x2F;what-is-the-difference-between-a-symbolic-link-and-a-hard-link&quot;&gt;SO&lt;&#x2F;a&gt; and is quoted below for ease of reference. The &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;coreutils&#x2F;manual&#x2F;html_node&#x2F;ln-invocation.html#ln-invocation&quot;&gt;full documentation&lt;&#x2F;a&gt; linked by the man page included the same info but was longer. However the documentation is more authoritative. In particular see examples at the end of the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;coreutils&#x2F;manual&#x2F;html_node&#x2F;ln-invocation.html#ln-invocation&quot;&gt;full documentation&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Underneath the file system, files are represented by inodes. (Or is it multiple inodes? Not sure.)&lt;&#x2F;p&gt;
&lt;p&gt;A file in the file system is basically a link to an inode.
A hard link, then, just creates another file with a link to the same underlying inode.&lt;&#x2F;p&gt;
&lt;p&gt;When you delete a file, it removes one link to the underlying inode. The inode is only deleted (or deletable&#x2F;over-writable) when all links to the inode have been deleted.&lt;&#x2F;p&gt;
&lt;p&gt;A symbolic link is a link to another name in the file system.&lt;&#x2F;p&gt;
&lt;p&gt;Once a hard link has been made the link is to the inode. Deleting, renaming, or moving the original file will not affect the hard link as it links to the underlying inode. Any changes to the data on the inode is reflected in all files that refer to that inode.&lt;&#x2F;p&gt;
&lt;p&gt;Note: Hard links are only valid within the same File System. Symbolic links can span file systems as they are simply the name of another file.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Other good references that I found were:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.linkedin.com&#x2F;pulse&#x2F;hard-link-soft-link-ana-maria-roman-valencia&#x2F;&quot;&gt;table on LinkedIn&lt;&#x2F;a&gt; with the differences between hard and soft link&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.baeldung.com&#x2F;linux&#x2F;file-hard-soft-link-test&quot;&gt;How to Determine Whether a File Is Hard Link or a Soft Link&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;determine-number-of-hard-links-to-a-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#determine-number-of-hard-links-to-a-file&quot; aria-label=&quot;Anchor link for: determine-number-of-hard-links-to-a-file&quot;&gt;Determine number of hard links to a file&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source:&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;ftp.gnu.org&#x2F;old-gnu&#x2F;Manuals&#x2F;findutils-4.1&#x2F;html_node&#x2F;find_13.html&quot;&gt;https:&#x2F;&#x2F;ftp.gnu.org&#x2F;old-gnu&#x2F;Manuals&#x2F;findutils-4.1&#x2F;html_node&#x2F;find_13.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Note: There more information in the source article but this is what I wanted from it.&lt;&#x2F;p&gt;
&lt;p&gt;Use &lt;code&gt;-i&lt;&#x2F;code&gt; on ls to see the inode number of a file.
That is actually what stores the information in the file and the file system links to that.
Use &lt;code&gt;-li&lt;&#x2F;code&gt; to also see how many hard links there are to the file.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;example-of-checking-if-a-file-has-multiple-links-to-it&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-of-checking-if-a-file-has-multiple-links-to-it&quot; aria-label=&quot;Anchor link for: example-of-checking-if-a-file-has-multiple-links-to-it&quot;&gt;Example of checking if a file has multiple links to it&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;In the example below the first column is the inode number and the 3rd is the number of hard links.
&lt;code&gt;a&lt;&#x2F;code&gt; is separate but after &lt;code&gt;b&lt;&#x2F;code&gt; was created I ran &lt;code&gt;ln b c&lt;&#x2F;code&gt; so c is just another link to &lt;code&gt;b&lt;&#x2F;code&gt; and then I ran &lt;code&gt;ln -s b d&lt;&#x2F;code&gt; so &lt;code&gt;d&lt;&#x2F;code&gt; is a soft link to &lt;code&gt;b&lt;&#x2F;code&gt;.
If &lt;code&gt;b&lt;&#x2F;code&gt; goes away then &lt;code&gt;d&lt;&#x2F;code&gt; also stops working but &lt;code&gt;c&lt;&#x2F;code&gt; lives on (along with the data).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;% ls -li&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;total 12&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;5262999 -rw-rw-r-- 1 one one 91 Feb 24 08:33 a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;5304232 -rw-rw-r-- 2 one one  5 Feb 24 09:47 b&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;5304232 -rw-rw-r-- 2 one one  5 Feb 24 09:47 c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;example-of-trying-ln-command&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-of-trying-ln-command&quot; aria-label=&quot;Anchor link for: example-of-trying-ln-command&quot;&gt;Example of trying ln command&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; echo &amp;quot;Text for separate file a&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; echo &amp;quot;Text for all the other files&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; b&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ln b c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ln&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; b d&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -li&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;total 12&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;18879400 -rw-rw-r-- 1 one one 25 Feb 24 10:11 a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;18879529 -rw-rw-r-- 2 one one 29 Feb 24 10:11 b&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;18879529 -rw-rw-r-- 2 one one 29 Feb 24 10:11 c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;18879531 lrwxrwxrwx 1 one one  1 Feb 24 10:11 d -&amp;gt; b&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -l&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;total 12&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;-rw-rw-r-- 1 one one 25 Feb 24 10:11 a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;-rw-rw-r-- 2 one one 29 Feb 24 10:11 b&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;-rw-rw-r-- 2 one one 29 Feb 24 10:11 c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;lrwxrwxrwx 1 one one  1 Feb 24 10:11 d -&amp;gt; b&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;% cat a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Text for separate file a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;% cat b&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Text for all the other files&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;% cat c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Text for all the other files&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;% cat d&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Text for all the other files&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;% rm b # Delete first copy of file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;% cat c # Still works&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Text for all the other files&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;% cat d # Broken because source file is gone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cat: d: No such file or directory&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -li&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;total 8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;18879400 -rw-rw-r-- 1 one one 25 Feb 24 10:11 a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;18879529 -rw-rw-r-- 1 one one 29 Feb 24 10:11 c&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;18879531 lrwxrwxrwx 1 one one  1 Feb 24 10:11 d -&amp;gt; b&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>zsh</title>
        <published>2024-02-23T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/zsh/"/>
        <id>https://dev.chester.wykies.com/debian/zsh/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/zsh/">&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;itsfoss.com&#x2F;zsh-ubuntu&#x2F;&quot;&gt;https:&#x2F;&#x2F;itsfoss.com&#x2F;zsh-ubuntu&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;131823&#x2F;how-to-make-zsh-the-default-shell&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;131823&#x2F;how-to-make-zsh-the-default-shell&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;steps-to-install-on-ubuntu&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#steps-to-install-on-ubuntu&quot; aria-label=&quot;Anchor link for: steps-to-install-on-ubuntu&quot;&gt;Steps to install on Ubuntu&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Tested on Ubuntu 22.04&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Install zsh&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install zsh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Start zsh&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;zsh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Select 0 to create an empty config (This step didn’t happen for me but I’m not sure why)&lt;&#x2F;li&gt;
&lt;li&gt;Set zsh as default shell&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;chsh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -s&lt;&#x2F;span&gt;&lt;span&gt; $(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;which&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; zsh&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Check that it is set properly (Should show zsh at end of the line)&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;grep&lt;&#x2F;span&gt;&lt;span&gt; $USER&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;passwd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Logout and log back in for settings to take effect&lt;&#x2F;li&gt;
&lt;li&gt;After logging back in open a terminal and test with &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;useful-commands&#x2F;#check-which-shell-is-in-use&quot;&gt;this command&lt;&#x2F;a&gt; (Really probably not necessary the prompt looks different)&lt;&#x2F;li&gt;
&lt;li&gt;For the equivalent of &lt;code&gt;.bashrc&lt;&#x2F;code&gt; see &lt;code&gt;.zshrc&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;To set terminal title see &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;terminal&#x2F;#changing-terminal-title&quot;&gt;my notes&lt;&#x2F;a&gt; on that&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Forking</title>
        <published>2024-02-22T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/github/forking/"/>
        <id>https://dev.chester.wykies.com/github/forking/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/github/forking/">&lt;p&gt;If forking a repo to make a PR and you intend to keep fork around then it’s advisable not to commit to the main branch to avoid issues with history not being able to be linear.
I normally set branch protection on the main branch as shown in the screenshot.
This still allows it to be updated from the upstream but not committed to directly.&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;github&#x2F;forking&#x2F;options.png&quot; alt=&quot;Screenshot of options selected&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Note: If &lt;code&gt;Do not allow bypassing the above settings&lt;&#x2F;code&gt; is not checked it is still very easy to accidentally commit to main.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Controllers</title>
        <published>2024-02-20T00:00:00+00:00</published>
        <updated>2026-03-29T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/controllers/"/>
        <id>https://dev.chester.wykies.com/misc/controllers/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/controllers/">&lt;h1 id=&quot;ps4-controller-on-linux&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ps4-controller-on-linux&quot; aria-label=&quot;Anchor link for: ps4-controller-on-linux&quot;&gt;PS4 Controller on Linux&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;On current versions of Ubuntu you don’t need to install anything separate just pair the controller to be able to use it.
To put the controller into pair mode press and hold &lt;code&gt;Share&lt;&#x2F;code&gt; + &lt;code&gt;PS&lt;&#x2F;code&gt; buttons until the LED starts blinking rapidly.&lt;&#x2F;p&gt;
&lt;details&gt;
    &lt;summary&gt;Controller IDs (personal notes)&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;This is the easiest place to find it so saving here:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;- 46 - Gold&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;- B5 - Black and blue (aftermarket)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;- CD - Black&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
&lt;details&gt;
    &lt;summary&gt;Instructions I found for older versions before I found out I didn&#x27;t need them&lt;&#x2F;summary&gt;
&lt;p&gt;Before I realized you didn’t need any software there was a python tool I tried that gave some options that I found from this &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;LrpipgIH8Q8&quot;&gt;video&lt;&#x2F;a&gt;.
Summary of the instructions below&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install python3-pip&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; pip install ds4drv&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ds4drv&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;chrippa&#x2F;ds4drv&#x2F;wiki&#x2F;Bluetooth%20dongle%20compatibility&quot;&gt;Bluetooth dongle compatibility&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Don’t remember what this command was for but I saved it &lt;code&gt;ds4drv --hidraw&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Tips</title>
        <published>2024-02-08T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/tips/"/>
        <id>https://dev.chester.wykies.com/rust/tips/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/tips/">&lt;h1 id=&quot;recovering-storage-space&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#recovering-storage-space&quot; aria-label=&quot;Anchor link for: recovering-storage-space&quot;&gt;Recovering Storage Space&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;tips&#x2F;#sharing-a-cargo-build-folder&quot;&gt;Sharing a Cargo Build Folder&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Remove unused toolchains (Recovered about 4gb removing 1.58.1, 1.61, 1.65, 1.70 and 1.71)
&lt;ul&gt;
&lt;li&gt;See list of toolchains &lt;code&gt;rustup toolchain list&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Remove a toolchain &lt;code&gt;rustup toolchain uninstall &amp;lt;VALUE FROM LAST LIST&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;cargo-sweep&quot;&gt;Cargo Sweep&lt;&#x2F;a&gt; (Suggested by &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;conradludgate&quot;&gt;Conrad Ludgate&lt;&#x2F;a&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;[Not tested yet] Run cargo clean on all projects &lt;code&gt;find ~ -type d -name target -exec sh -c &#x27;cd {} &amp;amp;&amp;amp; cd .. &amp;amp;&amp;amp; cargo clean&#x27; \&lt;&#x2F;code&gt; from &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;timClicks&#x2F;notebook&#x2F;blob&#x2F;main&#x2F;rust&#x2F;cheatsheet.md#free-up-disk-space&quot;&gt;timClicks notes&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;sharing-a-cargo-build-folder&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#sharing-a-cargo-build-folder&quot; aria-label=&quot;Anchor link for: sharing-a-cargo-build-folder&quot;&gt;Sharing a Cargo Build Folder&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;guide&#x2F;build-cache.html&quot;&gt;The Cargo Book - Build Cache&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;config.html#buildtarget-dir&quot;&gt;The Cargo Book - Configuration&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;details&gt;
   &lt;summary&gt;Back story on why I looked into this in the first place&lt;&#x2F;summary&gt;
&lt;p&gt;Over time I’d worked on several projects, and compiled many more that I was looking into and after a while I noticed that the folder where I kept my projects was several gigs larger than I expected.
So, I checked what the &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;useful-commands&#x2F;#show-largest-folder-files&quot;&gt;largest folders&lt;&#x2F;a&gt; were and noticed all of them were &lt;code&gt;target&lt;&#x2F;code&gt; folders in rust projects.
I needed the space at the time so I manually cleaned it up.
Time passed and it built up again… so needed a better solution.
I remembered that &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;jonhoo&#x2F;&quot;&gt;Jon Gjengset&lt;&#x2F;a&gt; used a shared build folder from one of his streams and inquired if he’d run into any issues.
Based on him not having had any issues using it I decided to try it and found that it worked out pretty well for me.&lt;&#x2F;p&gt;
&lt;p&gt;It has made it much easier to see how much space is being used by the build folder and much easier to delete it if needed.
It also reduce the total size as multiple projects that required the same crates wouldn’t each need to have their own copy which sped up build times and saved space.&lt;&#x2F;p&gt;
&lt;p&gt;I’ve since heard of &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;cargo-sweep&quot;&gt;cargo sweep&lt;&#x2F;a&gt; from &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;conradludgate&quot;&gt;Conrad Ludgate&lt;&#x2F;a&gt;. I found this relevant &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;users.rust-lang.org&#x2F;t&#x2F;cleaning-target-folders-with-cargo-sweep&#x2F;84229&quot;&gt;post&lt;&#x2F;a&gt; while looking for the project’s crate.io page.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;&#x2F;details&gt;
&lt;p&gt;Cargo looks for a folder called &lt;code&gt;.cargo&lt;&#x2F;code&gt; in the project folder or a parent folder then a file called &lt;code&gt;config.toml&lt;&#x2F;code&gt; and inside of that &lt;code&gt;build.target-dir&lt;&#x2F;code&gt; to determine what build folder to use.
By default this is just &lt;code&gt;target&lt;&#x2F;code&gt; which uses a folder called &lt;code&gt;target&lt;&#x2F;code&gt; in the root of the project but instead you can create a shared &lt;code&gt;.cargo&lt;&#x2F;code&gt; folder above where you have your projects and set one folder for them all to share.&lt;&#x2F;p&gt;
&lt;p&gt;For example it could be something like below. Note comment is only there to show where file goes not actually needed in file.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# .cargo&#x2F;config.toml&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;build&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;target-dir =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&#x2F;home&#x2F;one&#x2F;build&#x2F;cargo&#x2F;target&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Push</title>
        <published>2024-02-04T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/push/"/>
        <id>https://dev.chester.wykies.com/git/push/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/push/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-push&quot;&gt;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-push&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;force-pushing&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#force-pushing&quot; aria-label=&quot;Anchor link for: force-pushing&quot;&gt;Force pushing&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;WARNING: The command given here doesn’t work well if fetch runs in background. See source for more notes.&lt;&#x2F;p&gt;
&lt;p&gt;If working on a project where you aren’t the only committer it’s better to use the with lease option so that if you check locally that you want to blow away the version you see of the remote branch on your machine then that is only what gets destroyed when you push.
If someone else pushing after what you have on your machine it won’t match and you’ll get notified.&lt;&#x2F;p&gt;
&lt;p&gt;From source above&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;--force-with-lease&lt;&#x2F;code&gt; alone, without specifying the details, will protect all remote refs that are going to be updated by requiring their current value to be the same as the remote-tracking branch we have for them.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; push&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --force-with-lease&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>CI</title>
        <published>2024-02-04T00:00:00+00:00</published>
        <updated>2025-09-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/github/ci/"/>
        <id>https://dev.chester.wykies.com/github/ci/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/github/ci/">&lt;h1 id=&quot;notes-on-github-actions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#notes-on-github-actions&quot; aria-label=&quot;Anchor link for: notes-on-github-actions&quot;&gt;Notes on github actions.&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;See https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;actions&#x2F;learn-github-actions&#x2F;variables#default-environment-variables &lt;del&gt;for environment variables set by github.&lt;&#x2F;del&gt; (Default values seem to have been removed from the page)&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Characters</title>
        <published>2024-02-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/characters/"/>
        <id>https://dev.chester.wykies.com/debian/characters/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/characters/">&lt;h1 id=&quot;frequently-used-codes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#frequently-used-codes&quot; aria-label=&quot;Anchor link for: frequently-used-codes&quot;&gt;Frequently used codes&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Press “ctrl + shift + u” then a ‘u’ should show up.
Then enter the unicode code point in hexadecimal for the character you want.
It is not case sensitive and leading 0’s are not required.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;è - e8&lt;&#x2F;li&gt;
&lt;li&gt;¢ - a2&lt;&#x2F;li&gt;
&lt;li&gt;€ - 20ac&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;typing-characters-not-on-the-keyboard&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#typing-characters-not-on-the-keyboard&quot; aria-label=&quot;Anchor link for: typing-characters-not-on-the-keyboard&quot;&gt;Typing characters not on the keyboard&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;help.ubuntu.com&#x2F;stable&#x2F;ubuntu-help&#x2F;tips-specialchars.html.en&quot;&gt;https:&#x2F;&#x2F;help.ubuntu.com&#x2F;stable&#x2F;ubuntu-help&#x2F;tips-specialchars.html.en&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Notes from testing:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;If you find the key in the character map program it will give you the unicode value (which is what the code some of the other methods are asking for)&lt;&#x2F;li&gt;
&lt;li&gt;The emoji option “ctrl+;” put me in an “e” kind of mode but couldn’t figure out how to make it work. No menu showed up as they said it would.&lt;&#x2F;li&gt;
&lt;li&gt;“ctrl + shift + u” is the only one that worked for me.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>rerere</title>
        <published>2024-02-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/rerere/"/>
        <id>https://dev.chester.wykies.com/git/rerere/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/rerere/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-rerere&quot;&gt;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-rerere&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;If you have long lived branches this is helpful to store how to resolve conflicts you’ve solved before.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;enable&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#enable&quot; aria-label=&quot;Anchor link for: enable&quot;&gt;Enable&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --global&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; rerere.enabled&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;clean-up&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#clean-up&quot; aria-label=&quot;Anchor link for: clean-up&quot;&gt;Clean Up&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; rerere gc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Crate Insta</title>
        <published>2024-02-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/crate-insta/"/>
        <id>https://dev.chester.wykies.com/rust/crate-insta/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/crate-insta/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;insta.rs&#x2F;docs&#x2F;quickstart&#x2F;&quot;&gt;https:&#x2F;&#x2F;insta.rs&#x2F;docs&#x2F;quickstart&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;asserting-in-a-loop&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#asserting-in-a-loop&quot; aria-label=&quot;Anchor link for: asserting-in-a-loop&quot;&gt;Asserting in a loop&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;If you are using the assert in a loop you’ll want to use &lt;code&gt;cargo insta test&lt;&#x2F;code&gt; instead of cargo test to get all snapshots created at the same time.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;using-rstest-or-test-case&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-rstest-or-test-case&quot; aria-label=&quot;Anchor link for: using-rstest-or-test-case&quot;&gt;Using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;rstest&#x2F;latest&#x2F;rstest&#x2F;&quot;&gt;rstest&lt;&#x2F;a&gt; or &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;test-case&#x2F;latest&#x2F;test_case&#x2F;&quot;&gt;test_case&lt;&#x2F;a&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Because these crates use macros to create separate test cases the execution order is not deterministic.
So ensure you set a snapshot name based on something that determines the output for example a string version of the input.
If you’d like the name to be based on the inputs see the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;insta.rs&#x2F;docs&#x2F;patterns&#x2F;#rstest&quot;&gt;macro&lt;&#x2F;a&gt; in insta’s docs.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;redactions-exclusions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#redactions-exclusions&quot; aria-label=&quot;Anchor link for: redactions-exclusions&quot;&gt;Redactions (exclusions)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;insta.rs&#x2F;docs&#x2F;redactions&#x2F;#selectors&quot;&gt;https:&#x2F;&#x2F;insta.rs&#x2F;docs&#x2F;redactions&#x2F;#selectors&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This is useful if there are parts that change and you do not want to include in your snapshot such as timestamps.&lt;&#x2F;p&gt;
&lt;p&gt;Tip: Use add &lt;code&gt;.*&lt;&#x2F;code&gt; one at a time to see what level you are at.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;cleanup-of-unreferenced-snapshots&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#cleanup-of-unreferenced-snapshots&quot; aria-label=&quot;Anchor link for: cleanup-of-unreferenced-snapshots&quot;&gt;Cleanup of unreferenced snapshots&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;If files are renamed or tests are renamed then snapshots can become no longer used.
To delete the stale ones you can use the following command.
More info can be found &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;insta.rs&#x2F;docs&#x2F;cli&#x2F;#test&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; insta test&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --unreferenced&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; delete&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;testing-private-functions-and-managing-snap-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#testing-private-functions-and-managing-snap-files&quot; aria-label=&quot;Anchor link for: testing-private-functions-and-managing-snap-files&quot;&gt;Testing private functions (and managing snap files)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;There are three ways to decide where to store snapshots.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;insta.rs&#x2F;docs&#x2F;quickstart&#x2F;#inline-snapshots&quot;&gt;Inline with the code&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;If you call the insta assert functions only once then inline is a available option to consider.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;In a folder called snapshots in a folder next to the file with your test.
&lt;ul&gt;
&lt;li&gt;This is the default if you don’t use inline.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Set a desired folder &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;insta&#x2F;latest&#x2F;insta&#x2F;struct.Settings.html#method.snapshot_path&quot;&gt;using settings&lt;&#x2F;a&gt;.
&lt;ul&gt;
&lt;li&gt;This is my preferred option if the assert must be called multiple times. See example below for how to use this option. Note that there are other ways to change the setting but I just chose this one as I intended to make use of the setting for multiple tests.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;pub&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;crate&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; insta_settings&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; insta&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Settings&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; insta&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Settings&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;clone_current&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; cwd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;current_dir&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;failed to get cwd&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; cwd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;join&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;tests&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;join&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;snapshots&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;set_snapshot_path&lt;&#x2F;span&gt;&lt;span&gt;(path);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    result&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; test_output&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; actual&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;bob&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    insta_settings&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;bind&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;||&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; insta&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;assert_snapshot!&lt;&#x2F;span&gt;&lt;span&gt;(actual));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;supporting-tooling&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#supporting-tooling&quot; aria-label=&quot;Anchor link for: supporting-tooling&quot;&gt;Supporting Tooling&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;For the best experience you’ll have to have &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;insta.rs&#x2F;docs&#x2F;cli&#x2F;&quot;&gt;cargo-insta&lt;&#x2F;a&gt; installed.
You can install it with &lt;code&gt;cargo install cargo-insta&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;If you use vscode you’ll also want to make use of the plugin for insta (see plugin page for more details).
See info for plugin below (from copy command in vscode).
To activate many of the options for the plugin you need to click on the snap file &lt;strong&gt;in the tree view&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Name: insta snapshots&lt;br &#x2F;&gt;
Id: mitsuhiko.insta&lt;br &#x2F;&gt;
Description: Syntax support for insta snapshots&lt;br &#x2F;&gt;
Version: 1.0.6&lt;br &#x2F;&gt;
Publisher: Armin Ronacher&lt;br &#x2F;&gt;
VS Marketplace Link: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=mitsuhiko.insta&quot;&gt;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=mitsuhiko.insta&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h1 id=&quot;setting-terminal-size&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setting-terminal-size&quot; aria-label=&quot;Anchor link for: setting-terminal-size&quot;&gt;Setting terminal size&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Some test like those of the output of a program might be sensitive to the terminal size and in particular the width.
Below is an example script to set the terminal width using crossterm.
Tested on Ubuntu 22.04.1 in the default terminal and it works.
It doesn’t work if the terminal is maximized.
Also doesn’t work in the vscode terminal.&lt;&#x2F;p&gt;
&lt;p&gt;NB: If unfamiliar with cargo scripts more info can be found &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;scripts&#x2F;&quot;&gt;here&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;!&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;usr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;bin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;S&lt;&#x2F;span&gt;&lt;span&gt; cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt;nightly&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zscript&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;```&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[package]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;edition&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;2021&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[dependencies]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;crossterm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;0.27.0&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;```&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    set_terminal_width&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F;&#x2F; Designed for use in testing and will panic if unable to set size in under 2 seconds&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; set_terminal_width&lt;&#x2F;span&gt;&lt;span&gt;(desired_width&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; u16&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    const&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; MAX_WAIT_TIME_SEC&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; u64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;mut&lt;&#x2F;span&gt;&lt;span&gt; curr_width,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; mut&lt;&#x2F;span&gt;&lt;span&gt; curr_height)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; crossterm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;terminal&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;size&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Current terminal size is {curr_width} x {curr_height}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; curr_width&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span&gt; desired_width {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;        &#x2F;&#x2F; Nothing required to be done&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Already at desired width of {desired_width}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        return&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; start_instant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Instant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    crossterm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;execute!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;stdout&lt;&#x2F;span&gt;&lt;span&gt;(),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        crossterm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;terminal&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;SetSize&lt;&#x2F;span&gt;&lt;span&gt;(desired_width, curr_height)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    while&lt;&#x2F;span&gt;&lt;span&gt; curr_width&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; !=&lt;&#x2F;span&gt;&lt;span&gt; desired_width {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Instant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;duration_since&lt;&#x2F;span&gt;&lt;span&gt;(start_instant)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_secs&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; MAX_WAIT_TIME_SEC&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            panic!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;failed to change terminal size to width of {desired_width} in under {MAX_WAIT_TIME_SEC} seconds&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;thread&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sleep&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Duration&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from_millis&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        (curr_width, curr_height)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; crossterm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;terminal&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;size&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;        &amp;quot;Successfully changed terminal size to {curr_width} x {curr_height} in {} mills&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Instant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;duration_since&lt;&#x2F;span&gt;&lt;span&gt;(start_instant)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_millis&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    );&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Crate Clap</title>
        <published>2024-01-30T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/crate-clap/"/>
        <id>https://dev.chester.wykies.com/rust/crate-clap/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/crate-clap/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;clap&#x2F;latest&#x2F;clap&#x2F;&quot;&gt;https:&#x2F;&#x2F;docs.rs&#x2F;clap&#x2F;latest&#x2F;clap&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;setup-steps&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setup-steps&quot; aria-label=&quot;Anchor link for: setup-steps&quot;&gt;Setup Steps&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;An example of project where this was used is &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;zola_chrono&quot;&gt;zola_chrono&lt;&#x2F;a&gt; but I want to stop including the logging level as part of it and defer to using environment variables as already supported by &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;env_logger&#x2F;latest&#x2F;env_logger&#x2F;&quot;&gt;env_logger&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Add dependency&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cargo add clap -F derive,cargo,wrap_help&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Copy &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;zola_chrono&#x2F;blob&#x2F;main&#x2F;src&#x2F;cli.rs&quot;&gt;cli.rs&lt;&#x2F;a&gt; and add and remove as needed&lt;&#x2F;li&gt;
&lt;li&gt;Copy from &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;zola_chrono&#x2F;blob&#x2F;main&#x2F;src&#x2F;main.rs&quot;&gt;main.rs&lt;&#x2F;a&gt; as needed&lt;&#x2F;li&gt;
&lt;li&gt;Testing&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[cfg(test)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;mod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; tests&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[test]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; verify_cli&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;        &#x2F;&#x2F; Source: https:&#x2F;&#x2F;docs.rs&#x2F;clap&#x2F;latest&#x2F;clap&#x2F;_derive&#x2F;_tutorial&#x2F;index.html#testing&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;        &#x2F;&#x2F; My understanding it reports most development errors without additional effort&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; clap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;CommandFactory&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        super&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Cli&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;command&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;debug_assert&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;example-of-cargo-subcommand&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-of-cargo-subcommand&quot; aria-label=&quot;Anchor link for: example-of-cargo-subcommand&quot;&gt;Example of cargo subcommand&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rust-practice&#x2F;cargo-leet&#x2F;&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;rust-practice&#x2F;cargo-leet&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;example-of-using-clap-derive&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-of-using-clap-derive&quot; aria-label=&quot;Anchor link for: example-of-using-clap-derive&quot;&gt;Example of using clap derive&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Full details can be found in the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;clap&#x2F;latest&#x2F;clap&#x2F;_derive&#x2F;&quot;&gt;clap docs&lt;&#x2F;a&gt;.
This is just an short example showing features I use more frequently.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;!&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;usr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;bin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;S&lt;&#x2F;span&gt;&lt;span&gt; cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt;nightly&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zscript&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;span&gt;cargo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;package&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;edition &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;2021&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; # &lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Desirable&lt;&#x2F;span&gt;&lt;span&gt; to stop warning but not needed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[dependencies]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;version&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt;control&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt;clean&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt;check&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; { version&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;0.1.4&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, features&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;clap&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;anyhow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;1.0.94&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;clap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; { version&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;4.5.23&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, features&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;derive&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;wrap_help&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; clap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Parser&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; ValueEnum&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;PathBuf&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; version_control_clean_check&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{check_version_control,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; CheckOptions&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F;&#x2F; Short about text goes here&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F;&#x2F; This part is only included in the long about text that shows when using --help&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[derive(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Parser&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Clone&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Eq&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PartialEq&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Ord&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PartialOrd&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Debug&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Default&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[command(author, version, about)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Cli&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F;&#x2F; Specify the root directory or uses current directory if not provided&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[arg(value_name &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;FOLDER&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, default_value &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;.&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    root&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PathBuf&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[clap(flatten)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    check_version_control&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; CheckOptions&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F;&#x2F; A boolean flag that is set to true if the argument is provided&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F;&#x2F; This line only shows in the long help mode and&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F;&#x2F; if you do not include `long` or `short` (both used below) on the argument&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F;&#x2F; then it becomes positional&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[arg(long, short)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    optional_flag&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; bool&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F;&#x2F; Included to give an example for an enum&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[arg(value_enum, long, default_value_t)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    mode&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Animal&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[derive(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ValueEnum&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Clone&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PartialEq&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Eq&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PartialOrd&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Ord&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Debug&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Default&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;enum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Animal&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Bird&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[default]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Cat&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Dog&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; anyhow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;()&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; cli&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Cli&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;parse&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    dbg!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;cli);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; cli&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;root&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;canonicalize&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    dbg!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;path);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    check_version_control&lt;&#x2F;span&gt;&lt;span&gt;(path,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;cli&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;check_version_control)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Program Ended&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example output:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;% .&#x2F;single_file_script.rs -h&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;     Running `&#x2F;home&#x2F;one&#x2F;.cargo&#x2F;target&#x2F;b1&#x2F;bdd0db958a601c&#x2F;debug&#x2F;single_file_script -h`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Short about text goes here&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Usage: single_file_script [OPTIONS] [FOLDER]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Arguments:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  [FOLDER]  Specify the root directory or uses current directory if not provided [default: .]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Options:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      --allow-dirty    Does not return an error for dirty files nor generate the list of said files&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      --allow-no-vcs   This option basically disables checking. If true no checks are done. (Not even if the `path`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                       exists)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      --allow-staged   Does not return an error for staged files nor generate the list of said files&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -o, --optional-flag  A boolean flag that is set to true if the argument is provided&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;      --mode &amp;lt;MODE&amp;gt;    Included to give an example for an enum [default: cat] [possible values: bird, cat, dog]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -h, --help           Print help (see more with &amp;#39;--help&amp;#39;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  -V, --version        Print version&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Crate Poll Promise</title>
        <published>2024-01-30T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/crate-poll-promise/"/>
        <id>https://dev.chester.wykies.com/rust/crate-poll-promise/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/crate-poll-promise/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;EmbarkStudios&#x2F;poll-promise&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;EmbarkStudios&#x2F;poll-promise&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Useful for applications that need to poll an async task instead of just awaiting it because you cannot block the current execution unit.
As per their readme not recommended for libraries.&lt;&#x2F;p&gt;
&lt;p&gt;See &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;EmbarkStudios&#x2F;poll-promise&#x2F;blob&#x2F;main&#x2F;examples&#x2F;example.rs&quot;&gt;simple example&lt;&#x2F;a&gt; that uses threads and no async runtime.&lt;&#x2F;p&gt;
&lt;p&gt;A more complete egui application can be found &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;egui_file_picker_poll_promise&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;The examples below use &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;scripts&#x2F;&quot;&gt;cargo script&lt;&#x2F;a&gt; so if you’re not familiar please see my short article on that first.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;example-of-how-to-use-with-tokio&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-of-how-to-use-with-tokio&quot; aria-label=&quot;Anchor link for: example-of-how-to-use-with-tokio&quot;&gt;Example of how to use with Tokio&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Put it here instead of in their examples folder because it would have prevented &lt;code&gt;cargo test&lt;&#x2F;code&gt; from passing because it needs non-default features.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;!&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;usr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;bin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;S&lt;&#x2F;span&gt;&lt;span&gt; cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt;nightly&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zscript&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;span&gt;cargo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;package&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;edition &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;2021&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[dependencies]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;poll&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt;promise&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; { version&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;0.3.0&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, features&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;tokio&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tokio&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;1.35.1&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;async fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; slow_operation&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;thread&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sleep&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Duration&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from_secs&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Hello from other thread!&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to_owned&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[tokio&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;main]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;async fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; promise&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; poll_promise&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Promise&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;spawn_async&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;async move&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; slow_operation&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.await&lt;&#x2F;span&gt;&lt;span&gt; });&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    eprint!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Waiting&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; This loop would normally be a game loop, or the executor of an immediate mode GUI.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    loop&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;        &#x2F;&#x2F; Poll the promise:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        if let&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Some&lt;&#x2F;span&gt;&lt;span&gt;(result)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; promise&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ready&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            eprintln!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;DONE: {:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, result);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            break&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; else&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            eprint!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;.&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; show that we are waiting&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;        &#x2F;&#x2F; Do other stuff, e.g. game logic or painting a UI&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;thread&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sleep&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Duration&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from_millis&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;notes-from-reading-documentation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#notes-from-reading-documentation&quot; aria-label=&quot;Anchor link for: notes-from-reading-documentation&quot;&gt;Notes from reading documentation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;NB: The following have not been tested yet but this is what I thought of when I read the docs&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;poll-promise&#x2F;latest&#x2F;poll_promise&#x2F;struct.Promise.html#method.new&quot;&gt;Promise::new&lt;&#x2F;a&gt; - Useful if you direct access to the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;poll-promise&#x2F;latest&#x2F;poll_promise&#x2F;struct.Sender.html&quot;&gt;Sender&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;poll-promise&#x2F;latest&#x2F;poll_promise&#x2F;struct.Promise.html#method.from_ready&quot;&gt;Promise::from_ready&lt;&#x2F;a&gt; - Useful if no work is needed to resolve the promise but a promise needs to be returned.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>sed</title>
        <published>2024-01-27T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/sed/"/>
        <id>https://dev.chester.wykies.com/debian/sed/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/sed/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.linux.org&#x2F;threads&#x2F;why-i-love-sed-and-a-clear-practical-beginners-guide-to-using-it.43651&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.linux.org&#x2F;threads&#x2F;why-i-love-sed-and-a-clear-practical-beginners-guide-to-using-it.43651&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Excerpt from man page&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Sed is a stream editor. A stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline).
While in some ways similar to an editor which permits scripted edits (such as ed), sed works by making only one pass over the input(s), and is consequently more efficient.
But it is sed’s ability to filter text in a pipeline which particularly distinguishes it from other types of editors.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h1 id=&quot;things-to-keep-in-mind&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#things-to-keep-in-mind&quot; aria-label=&quot;Anchor link for: things-to-keep-in-mind&quot;&gt;Things to keep in mind&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;sed&lt;&#x2F;code&gt; uses special characters differently from the shell so wrap the script part in single quotes&lt;&#x2F;li&gt;
&lt;li&gt;More info about said can be found on the man page &lt;code&gt;man sed&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Full manual using &lt;code&gt;info sed&lt;&#x2F;code&gt;
&lt;blockquote&gt;
&lt;p&gt;The full documentation for sed is maintained as a Texinfo manual. If the info and sed programs&lt;br &#x2F;&gt;
are properly installed at your site, the command&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
&lt;code&gt;info sed&lt;&#x2F;code&gt;&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
should give you access to the complete manual.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;examples&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#examples&quot; aria-label=&quot;Anchor link for: examples&quot;&gt;Examples&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;simple-word-replace&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#simple-word-replace&quot; aria-label=&quot;Anchor link for: simple-word-replace&quot;&gt;Simple word replace&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-i&lt;&#x2F;code&gt; - Says to edit the file instead of sending output to stdout&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;s&lt;&#x2F;code&gt; - At start is for substitution&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;g&lt;&#x2F;code&gt; - At end says to replace all not just first per line&lt;&#x2F;li&gt;
&lt;li&gt;If both &lt;code&gt;-i&lt;&#x2F;code&gt; and &lt;code&gt;source_file.txt&lt;&#x2F;code&gt; are left out it will read the “file” from stdin and output to stdout&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;s&#x2F;original_word&#x2F;replacement_word&#x2F;g&amp;#39; source_file.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Terminal</title>
        <published>2024-01-14T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/terminal/"/>
        <id>https://dev.chester.wykies.com/debian/terminal/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/terminal/">&lt;h1 id=&quot;changing-terminal-title&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#changing-terminal-title&quot; aria-label=&quot;Anchor link for: changing-terminal-title&quot;&gt;Changing terminal title&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;22413&#x2F;how-to-change-gnome-terminal-title&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;22413&#x2F;how-to-change-gnome-terminal-title&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I moved to zsh from bash and zsh doesn’t show the working directory in prompt (by default, I haven’t done any customizing yet).
It keeps it short which is cool but makes it harder to figure out what the terminal is for.
So looked up how to change the title and found the above post (listed as source).
It works without any issues in zsh but the posts speaks about disabling the changes in the default &lt;code&gt;.bashrc&lt;&#x2F;code&gt;. The line related to &lt;code&gt;PS1&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo -ne&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;\033]0;SOME TITLE HERE\007&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Added the following to my &lt;code&gt;.zshrc&lt;&#x2F;code&gt; so I can just type &lt;code&gt;title SOME TITLE HERE&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# To make it easy to set the terminal title&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;title&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; printf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;\033]0;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;$*&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;\007&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Today I Learned (TIL)</title>
        <published>2024-01-12T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/til/"/>
        <id>https://dev.chester.wykies.com/misc/til/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/til/">&lt;p&gt;&lt;strong&gt;Foreword&lt;&#x2F;strong&gt;: I didn’t always learn the thing at that time but that’s when something caused me to say you know what I should write this down.
That could be I’ve told it to people often so maybe writing it down will help someone.
And maybe that someone is me after a period of time when I forget it (or at least don’t have it in mind and am reminded, possibly after wasting a lot of time in the process).&lt;&#x2F;p&gt;
&lt;h1 id=&quot;function-length&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#function-length&quot; aria-label=&quot;Anchor link for: function-length&quot;&gt;Function length&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Keep your functions short.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;There are times violating this rule is the right thing to do but if the function is so long that all of the function can’t fit on your screen you better not be tired so you can remember the context of the part you can’t see.&lt;&#x2F;li&gt;
&lt;li&gt;It also makes coming back to the code later harder as you need to try work with a bigger context window.&lt;&#x2F;li&gt;
&lt;li&gt;It also tends to encourage functions that have more than one responsibility.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;deleting-files-on-linux&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#deleting-files-on-linux&quot; aria-label=&quot;Anchor link for: deleting-files-on-linux&quot;&gt;Deleting files on linux&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Deleting a folder does not kick out (close) any terminals in that folder.
Technically I didn’t learn that today but I experienced it for the first time today.
I think presenting this one as a narrative may prove more entertaining and less like random and somewhat useless knowledge.&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;Click to expand!&lt;&#x2F;summary&gt;
&lt;p&gt;It all started with me trying to create a new &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.egui.rs&#x2F;&quot;&gt;egui&lt;&#x2F;a&gt; project.
I decided to use &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;my_egui_template&#x2F;tree&#x2F;main&quot;&gt;my template&lt;&#x2F;a&gt; (Note sunset my version of the template wasn’t worth the maintenance costs) which I wrote a setup script for.
The sequence of events went like this:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;In vscode use &lt;code&gt;Open folder...&lt;&#x2F;code&gt; to create a folder (using the open dialog) and open that folder.&lt;&#x2F;li&gt;
&lt;li&gt;Open the built in terminal&lt;&#x2F;li&gt;
&lt;li&gt;Realize I would prefer use a separate terminal (Open one from vscode, because it opens in the correct folder)&lt;&#x2F;li&gt;
&lt;li&gt;Navigate up one folder and use the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;manpages.ubuntu.com&#x2F;manpages&#x2F;jammy&#x2F;en&#x2F;man1&#x2F;trash.1.html&quot;&gt;trash&lt;&#x2F;a&gt; program to remove the current folder.&lt;&#x2F;li&gt;
&lt;li&gt;Use the template setup tool to create a new folder.&lt;&#x2F;li&gt;
&lt;li&gt;In the built in terminal I saw no files when I did &lt;code&gt;ll&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Did a &lt;code&gt;cd ..&lt;&#x2F;code&gt; then went back in and &lt;code&gt;ll&lt;&#x2F;code&gt; now showed the files.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I’d done a few &lt;code&gt;pwd&lt;&#x2F;code&gt; in between to make sure I was in the folder I expected because zsh doesn’t show the folder in the prompt.
At first I couldn’t understand what had happened then realized I was still in the folder but that folder was in the trash and thus was still a “valid” folder but not the same as the one I wanted to use even though &lt;code&gt;pwd&lt;&#x2F;code&gt; had the same output.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;steps-to-reproduce&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#steps-to-reproduce&quot; aria-label=&quot;Anchor link for: steps-to-reproduce&quot;&gt;Steps to reproduce&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;To keep it simple, I’ll just demonstrate using two terminal windows&lt;&#x2F;p&gt;
&lt;h3 id=&quot;known-assumptions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#known-assumptions&quot; aria-label=&quot;Anchor link for: known-assumptions&quot;&gt;Known assumptions&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Both terminals in the same working director&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;ll&lt;&#x2F;code&gt; = &lt;code&gt;ls&lt;&#x2F;code&gt; with some args as is default on Ubuntu.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;trash&lt;&#x2F;code&gt; program is installed (&lt;code&gt;sudo apt install trash-cli&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;From Terminal 1&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; folder&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; folder&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; pwd&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; ll&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;touch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apple&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; ll&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;From Terminal 2&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;trash&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; folder&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; folder&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; pwd&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; ll&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;touch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; bob&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; ll&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;From Terminal 1 (now in the original &lt;code&gt;folder&lt;&#x2F;code&gt; that is in the trash still sees the same output for &lt;code&gt;pwd&lt;&#x2F;code&gt; and &lt;code&gt;ll&lt;&#x2F;code&gt;)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;touch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; charlie&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;pwd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ll&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;From Terminal 2 in the “new” &lt;code&gt;folder&lt;&#x2F;code&gt; shows the new contents (bob)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;pwd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ll&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you use &lt;code&gt;rm -r folder&lt;&#x2F;code&gt; instead of trash you can no longer add any files in terminal 1 after that command and the output of &lt;code&gt;ll&lt;&#x2F;code&gt; only shows &lt;code&gt;Total 0&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;h1 id=&quot;share-by-default&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#share-by-default&quot; aria-label=&quot;Anchor link for: share-by-default&quot;&gt;Share by default&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Often making something shared makes it easier for you to access from more places.
Not everything should be made public and once you do you can’t always take it back but double check before you assume it needs to be private.
Even if no one else uses it, you might be making it easier for yourself at least.
(Kinda what this site is about…)&lt;&#x2F;p&gt;
&lt;h1 id=&quot;ctrl-d-to-send-eof&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ctrl-d-to-send-eof&quot; aria-label=&quot;Anchor link for: ctrl-d-to-send-eof&quot;&gt;Ctrl + D to send EOF&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I was reading up &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;vi&#x2F;websocat&quot;&gt;websocat&lt;&#x2F;a&gt; while learning how to use websockets and they said I should use &lt;code&gt;Ctrl + D&lt;&#x2F;code&gt; to close.
So I decided to look it up as that wasn’t a key combination I was familiar with in the terminal.
Found info on it on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;superuser.com&#x2F;questions&#x2F;169051&#x2F;whats-the-difference-between-c-and-d-for-unix-mac-os-x-terminal&quot;&gt;superuser&lt;&#x2F;a&gt; and basically it sends EOF which closes stdin, which can signal to the program that you want to close.
When used on the terminal it is &lt;strong&gt;a faster way to close the terminal window&lt;&#x2F;strong&gt; than typing exit.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;diataxis&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#diataxis&quot; aria-label=&quot;Anchor link for: diataxis&quot;&gt;Diátaxis&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;blockquote&gt;
&lt;p&gt;A systematic approach to technical documentation authoring.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Mentioned to me by &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;robjtede&quot;&gt;robjtede @ Actix Web&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;Click to expand!&lt;&#x2F;summary&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;diataxis.fr&#x2F;&quot;&gt;https:&#x2F;&#x2F;diataxis.fr&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Diátaxis is a way of thinking about and doing documentation.&lt;&#x2F;p&gt;
&lt;p&gt;It prescribes approaches to content, architecture and form that emerge from a systematic approach to understanding the needs of documentation users.&lt;&#x2F;p&gt;
&lt;p&gt;Diátaxis identifies four distinct needs, and four corresponding forms of documentation - tutorials, how-to guides, technical reference and explanation. It places them in a systematic relationship, and proposes that documentation should itself be organised around the structures of those needs.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;diataxis.fr&#x2F;&quot;&gt;&lt;img src=&quot;https:&#x2F;&#x2F;diataxis.fr&#x2F;_images&#x2F;diataxis.png&quot; alt=&quot;Four Quadrant Image showing types&quot; &#x2F;&gt;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Image Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;diataxis.fr&#x2F;_images&#x2F;diataxis.png&quot;&gt;https:&#x2F;&#x2F;diataxis.fr&#x2F;_images&#x2F;diataxis.png&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;h1 id=&quot;importance-of-documentation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#importance-of-documentation&quot; aria-label=&quot;Anchor link for: importance-of-documentation&quot;&gt;Importance of Documentation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;It actually comes back to why are you working on the project being documented.
Is it just to experiment?
Is it to create a usable artifact that you expect to only be useful for a short period of time?
At the end of the day we have limited time and need to be conscious of how we choose to use that limited resource.
The next person (might be you) may be able to figure it out again by looking at the code but you could drastically cut down the time needed if you add documentation.
So really it’s more about do you expect someone to need to look at the code in the future (again this future might be you), is there any small thing you can do to help them out?
Sometimes you can re-derive a process but documenting processes I’ve found to be the most important because it’s not always trivial to come up with them again and may end up requiring making the same mistakes again what you’ve already made.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;github-ci-stdin-can-trick-programs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#github-ci-stdin-can-trick-programs&quot; aria-label=&quot;Anchor link for: github-ci-stdin-can-trick-programs&quot;&gt;Github CI stdin can trick programs&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;If you are using a program in GitHub CI be careful if the program takes a path or stdin because some “smart” programs detect CI as supplying stdin when really it’s not.
In my case it was ripgrep.
I needed to specify a path to get it to work eg &lt;code&gt;rg MY_REGEX .&lt;&#x2F;code&gt; where the dot specifies the current folder.
There is a very good explanation on the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;BurntSushi&#x2F;ripgrep&#x2F;discussions&#x2F;2241&quot;&gt;ripgrep repo&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Stack Overflow</title>
        <published>2024-01-12T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/stack-overflow/"/>
        <id>https://dev.chester.wykies.com/rust/stack-overflow/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/stack-overflow/">&lt;h1 id=&quot;drop-can-lead-to-stack-overflow&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#drop-can-lead-to-stack-overflow&quot; aria-label=&quot;Anchor link for: drop-can-lead-to-stack-overflow&quot;&gt;Drop can lead to stack overflow&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;strong&gt;TLDR&lt;&#x2F;strong&gt; - Large recursive data structures lead to recursive calls to drop them and can cause stack overflow depending on their size.&lt;&#x2F;p&gt;
&lt;p&gt;More information on how drop works can be found in the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;reference&#x2F;destructors.html&quot;&gt;rust reference&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;NB: On discord &lt;code&gt;arriven&lt;&#x2F;code&gt; pointed me to this &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;users.rust-lang.org&#x2F;t&#x2F;what-is-the-size-limit-of-threads-stack-in-rust&#x2F;11867&quot;&gt;link&lt;&#x2F;a&gt; that provides more information on the stack size.&lt;&#x2F;p&gt;
&lt;details&gt;
&lt;summary&gt;Click for details!&lt;&#x2F;summary&gt;
&lt;p&gt;In attempting to do a &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;leetcode.com&#x2F;problems&#x2F;amount-of-time-for-binary-tree-to-be-infected&#x2F;description&#x2F;&quot;&gt;leetcode problem&lt;&#x2F;a&gt; I tried a less optimal but &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;leetcode&#x2F;blob&#x2F;4069e79ead604e552ef297c67393c1424f742ad2&#x2F;rust&#x2F;src&#x2F;_2385_amount_of_time_for_binary_tree_to_be_infected.rs&quot;&gt;interesting approach&lt;&#x2F;a&gt; where I made the infected node the root of the tree and just checked the height.
It failed with runtime error.
I downloaded the test case from leetcode and it is a &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;leetcode&#x2F;tree&#x2F;4069e79ead604e552ef297c67393c1424f742ad2&#x2F;rust&#x2F;large_inputs&quot;&gt;1.1mb input&lt;&#x2F;a&gt;.
Running locally I was able to find out that I found out I was getting &lt;code&gt;fatal runtime error: stack overflow&lt;&#x2F;code&gt;.
After converting &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;leetcode&#x2F;blob&#x2F;4069e79ead604e552ef297c67393c1424f742ad2&#x2F;rust&#x2F;src&#x2F;_2385_amount_of_time_for_binary_tree_to_be_infected.rs&quot;&gt;my code&lt;&#x2F;a&gt; to be iterative instead of recursive I was still getting a stack overflow.
Turns out it was at the end of the function when drop was automatically called.
Once I leaked the memory it would run but took over 240 seconds.
I tried not cloning the large arrays of parent vecs but used a linked list and unsurprisingly that is also a problem.
Still working on it as I haven’t quite figured out how to solve that problem.
Doesn’t appear to be able to be solved using forget or more likely I need to track down where the drop is happening.&lt;&#x2F;p&gt;
&lt;p&gt;In the process of all that I produced a MRE that works as a test.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[test]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; drop_stack_overflow&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Node&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        next&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Option&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Box&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Node&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; linked_list&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Option&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Box&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Node&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; None&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; _&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;21_767&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; node&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Node&lt;&#x2F;span&gt;&lt;span&gt; { next&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt; linked_list };&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        linked_list&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Some&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Box&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(node));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    dbg!&lt;&#x2F;span&gt;&lt;span&gt;(linked_list&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_ref&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;next&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;is_some&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; std::mem::forget(linked_list);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Reducing to &lt;code&gt;21_766&lt;&#x2F;code&gt; or uncommenting the last line cause it not to crash anymore on my machine.
I tried similar code as a binary and realized I was getting non deterministic behaviour.
With the number of iterations set to &lt;code&gt;87_252&lt;&#x2F;code&gt; I was getting about 20% failure rate.
Meaning it would usually crash 2 out of 10 runs.
The non-determinism is likely due to one of two things&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;What is mentioned in the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;users.rust-lang.org&#x2F;t&#x2F;what-is-the-size-limit-of-threads-stack-in-rust&#x2F;11867&quot;&gt;post&lt;&#x2F;a&gt; and the OS is changing the “allowed” size.&lt;&#x2F;li&gt;
&lt;li&gt;Or in preparing to test that idea discovered in the docs for Function std::mem::&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;mem&#x2F;fn.size_of.html&quot;&gt;size_of&lt;&#x2F;a&gt;
&lt;blockquote&gt;
&lt;p&gt;In general, the size of a type is not stable across compilations, but specific types such as primitives are.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Based on testing on main it is the first option as each run appears to have a slight different amount of stack available.
Tested using &lt;code&gt;stacker::remaining_stack()&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I further found that running the tests in release mode &lt;code&gt;cargo test -r -- --nocapture drop_stack_overflow&lt;&#x2F;code&gt; increase the number before crashing to &lt;code&gt;65_320&lt;&#x2F;code&gt; on my machine.
On rust playground it seems to be at &lt;code&gt;21_768&lt;&#x2F;code&gt;.
The machine specific size is likely explained by what is in the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;users.rust-lang.org&#x2F;t&#x2F;what-is-the-size-limit-of-threads-stack-in-rust&#x2F;11867&quot;&gt;post&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;h1 id=&quot;checking-space-left-on-stack&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#checking-space-left-on-stack&quot; aria-label=&quot;Anchor link for: checking-space-left-on-stack&quot;&gt;Checking Space left on Stack&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;The &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;stacker&#x2F;latest&#x2F;stacker&#x2F;&quot;&gt;stacker&lt;&#x2F;a&gt; crate that is maintained by the rust compiler team provides an easy way to check how much space is left on the stack.&lt;&#x2F;p&gt;
&lt;details&gt;
&lt;summary&gt;Click for details!&lt;&#x2F;summary&gt;
&lt;p&gt;Function stacker::&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;stacker&#x2F;latest&#x2F;stacker&#x2F;fn.remaining_stack.html&quot;&gt;remaining_stack&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Queries the amount of remaining stack as interpreted by this library.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Function stacker::&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;stacker&#x2F;latest&#x2F;stacker&#x2F;fn.maybe_grow.html&quot;&gt;maybe_grow&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Grows the call stack if necessary.
This function is intended to be called at manually instrumented points in a program where recursion is known to happen quite a bit. This function will check to see if we’re within red_zone bytes of the end of the stack, and if so it will allocate a new stack of at least stack_size bytes.
The closure f is guaranteed to run on a stack with at least red_zone bytes, and it will be run on the current stack if there’s space available.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;&#x2F;details&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>VeraCrypt</title>
        <published>2024-01-11T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/veracrypt/"/>
        <id>https://dev.chester.wykies.com/misc/veracrypt/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/veracrypt/">&lt;h1 id=&quot;sizes-of-created-encrypted-file-containers&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#sizes-of-created-encrypted-file-containers&quot; aria-label=&quot;Anchor link for: sizes-of-created-encrypted-file-containers&quot;&gt;Sizes of Created Encrypted file containers&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Foreword: Created a file container and then tried to copy the files in and got informed the files couldn’t fit even though I’d left quite a bit of headroom.
Then noticed a lot of space from what I selected was missing.
This is the second time this happened to me and decided to write it down for next time.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;procedure&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#procedure&quot; aria-label=&quot;Anchor link for: procedure&quot;&gt;Procedure&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Objective create multiple containers all set to the same size to compare the container sizes produced&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Create an encrypted file container&lt;&#x2F;li&gt;
&lt;li&gt;Standard VeraCrypt volume&lt;&#x2F;li&gt;
&lt;li&gt;Volume Size
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;10 MiB&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;100 MiB&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;1000 MiB&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Select Format
2. Linux Ext4
&lt;ol&gt;
&lt;li&gt;FAT&lt;&#x2F;li&gt;
&lt;li&gt;NTFS&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h1 id=&quot;summary&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#summary&quot; aria-label=&quot;Anchor link for: summary&quot;&gt;Summary&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;Available taken from &lt;code&gt;df&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Percentages taken from Disk (Seems to be using full size)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Filesystem&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: right&quot;&gt;Avail at 10&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: right&quot;&gt;Avail at 100&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: right&quot;&gt;Avail at 1000&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Ext4&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;4.5M&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;83M&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;900M&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;FAT&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;&lt;strong&gt;9.7M&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;&lt;strong&gt;99M&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;&lt;strong&gt;998M&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;NTFS&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;7.4M&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;98M&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;995M&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h1 id=&quot;results&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#results&quot; aria-label=&quot;Anchor link for: results&quot;&gt;Results&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;All size in VeraCrypt UI: &lt;code&gt;9.8 MiB&lt;&#x2F;code&gt;, &lt;code&gt;99 MiB&lt;&#x2F;code&gt;, &lt;code&gt;999 MiB&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;All Size in &lt;code&gt;ls -l&lt;&#x2F;code&gt; 10,485,760 = 10, 104,857,600 = 100, 1,048,576,000 = 1000 (if divided by 1024 twice)&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Slot 1 = Ext4, 10 MiB&lt;&#x2F;li&gt;
&lt;li&gt;Slot 2 = FAT, 10 MiB&lt;&#x2F;li&gt;
&lt;li&gt;Slot 3 = NTFS, 10 MiB&lt;&#x2F;li&gt;
&lt;li&gt;Slot 4 = Ext4, 100 MiB&lt;&#x2F;li&gt;
&lt;li&gt;Slot 5 = FAT, 100 MiB&lt;&#x2F;li&gt;
&lt;li&gt;Slot 6 = NTFS, 100 MiB&lt;&#x2F;li&gt;
&lt;li&gt;Slot 7 = Ext4, 1000 MiB&lt;&#x2F;li&gt;
&lt;li&gt;Slot 8 = FAT, 1000 MiB&lt;&#x2F;li&gt;
&lt;li&gt;Slot 9 = NTFS, 1000 MiB&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ df -h&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Filesystem                   Size  Used Avail Use% Mounted on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt1       5.2M   24K  4.5M   1% &#x2F;media&#x2F;veracrypt1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt2       9.7M     0  9.7M   0% &#x2F;media&#x2F;veracrypt2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt3       9.8M  2.5M  7.4M  26% &#x2F;media&#x2F;veracrypt3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt4        90M   24K   83M   1% &#x2F;media&#x2F;veracrypt4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt5        99M  1.0K   99M   1% &#x2F;media&#x2F;veracrypt5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt6       100M  2.5M   98M   3% &#x2F;media&#x2F;veracrypt6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt7       966M   24K  900M   1% &#x2F;media&#x2F;veracrypt7&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt8       998M  4.0K  998M   1% &#x2F;media&#x2F;veracrypt8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt9      1000M  5.5M  995M   1% &#x2F;media&#x2F;veracrypt9&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ df -H&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Filesystem                   Size  Used Avail Use% Mounted on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt1       5.4M   25k  4.7M   1% &#x2F;media&#x2F;veracrypt1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt2        11M     0   11M   0% &#x2F;media&#x2F;veracrypt2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt3        11M  2.6M  7.7M  26% &#x2F;media&#x2F;veracrypt3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt4        94M   25k   87M   1% &#x2F;media&#x2F;veracrypt4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt5       104M  1.1k  104M   1% &#x2F;media&#x2F;veracrypt5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt6       105M  2.6M  103M   3% &#x2F;media&#x2F;veracrypt6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt7       1.1G   25k  944M   1% &#x2F;media&#x2F;veracrypt7&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt8       1.1G  4.1k  1.1G   1% &#x2F;media&#x2F;veracrypt8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt9       1.1G  5.8M  1.1G   1% &#x2F;media&#x2F;veracrypt9&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ df&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Filesystem                  1K-blocks      Used Available Use% Mounted on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt1           5244        24      4528   1% &#x2F;media&#x2F;veracrypt1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt2           9928         0      9928   0% &#x2F;media&#x2F;veracrypt2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt3           9980      2500      7480  26% &#x2F;media&#x2F;veracrypt3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt4          91600        24     84432   1% &#x2F;media&#x2F;veracrypt4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt5         101328         1    101327   1% &#x2F;media&#x2F;veracrypt5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt6         102140      2500     99640   3% &#x2F;media&#x2F;veracrypt6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt7         988776        24    921184   1% &#x2F;media&#x2F;veracrypt7&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt8        1021728         4   1021724   1% &#x2F;media&#x2F;veracrypt8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&#x2F;dev&#x2F;mapper&#x2F;veracrypt9        1023740      5596   1018144   1% &#x2F;media&#x2F;veracrypt9&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>VNC Ubuntu</title>
        <published>2024-01-07T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/vnc/"/>
        <id>https://dev.chester.wykies.com/misc/vnc/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/vnc/">&lt;p&gt;I’ve needed to do this three times now and each time I don’t know what happens but I get issues so writing it down this time.
The last time I think I got RDP working but I can’t figure out what’s wrong this time.&lt;&#x2F;p&gt;
&lt;p&gt;The &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;help.ubuntu.com&#x2F;stable&#x2F;ubuntu-help&#x2F;sharing-desktop.html.ro&quot;&gt;official docs&lt;&#x2F;a&gt; may work for you but I didn’t get through.
Linking here as I usually end up looking at them.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Use Case&lt;&#x2F;strong&gt;: Simple remote screen sharing on local network.
Screen stays visible on host computer and client is also able to view and interact.
This is &lt;strong&gt;NOT&lt;&#x2F;strong&gt; suitable for use on a network that is not private but is good enough for my use case on my local network.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;OS Tested on&lt;&#x2F;strong&gt;: Ubuntu 22.04 (Both sides) (I also have an older version of Ubuntu that I connect to, but don’t remember what I did on that one and the UI is different).&lt;&#x2F;p&gt;
&lt;h1 id=&quot;setup-host-side-to-connect-to&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setup-host-side-to-connect-to&quot; aria-label=&quot;Anchor link for: setup-host-side-to-connect-to&quot;&gt;Setup Host (Side to connect to)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;Go to Settings -&amp;gt; Sharing&lt;&#x2F;li&gt;
&lt;li&gt;Move the slider at the top to the right to enable&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;instructions-by-picture&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#instructions-by-picture&quot; aria-label=&quot;Anchor link for: instructions-by-picture&quot;&gt;Instructions by picture&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;vnc&#x2F;first_set.png&quot; alt=&quot;First Set&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;vnc&#x2F;second_set.png&quot; alt=&quot;Second Set&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;vnc&#x2F;authentication.png&quot; alt=&quot;Authentication&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;in-text&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#in-text&quot; aria-label=&quot;Anchor link for: in-text&quot;&gt;In Text&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Go to Remote Desktop&lt;&#x2F;li&gt;
&lt;li&gt;Enable &lt;code&gt;Remote Desktop&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Check &lt;code&gt;Enable Legacy VNC Protocol&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Enable &lt;code&gt;Remote Control&lt;&#x2F;code&gt; (If you want to do more than view only)&lt;&#x2F;li&gt;
&lt;li&gt;Optional - You may want to no require the user to be at the machine to approve access
&lt;ul&gt;
&lt;li&gt;Click the three dots next to &lt;code&gt;Enable Legacy VNC Protocol&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Select &lt;code&gt;Require a password&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Set username and password, under &lt;code&gt;Authentication&lt;&#x2F;code&gt; at the bottom (username doesn’t get used but I put it in anyway as I think it might be used for RDP)&lt;&#x2F;li&gt;
&lt;li&gt;Check your &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;useful-commands&#x2F;#show-ip-addresses&quot;&gt;IP&lt;&#x2F;a&gt; (You may want to set a reserved IP in your router if you plan to do this often)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;setup-client-side-to-connect-from&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setup-client-side-to-connect-from&quot; aria-label=&quot;Anchor link for: setup-client-side-to-connect-from&quot;&gt;Setup Client (Side to connect from)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;These instructions use &lt;strong&gt;Remmina&lt;&#x2F;strong&gt; because it comes installed with the distro.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;vnc&#x2F;remmina_config.png&quot; alt=&quot;Remmina Config&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Set &lt;code&gt;Name&lt;&#x2F;code&gt; to any name you want it is only for you to identify the profile&lt;&#x2F;li&gt;
&lt;li&gt;Change the protocol to &lt;code&gt;Remmina VNC Plugin&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Set &lt;code&gt;Server&lt;&#x2F;code&gt; to the IP of the Host computer&lt;&#x2F;li&gt;
&lt;li&gt;Leave &lt;code&gt;Username&lt;&#x2F;code&gt; &lt;strong&gt;blank&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Set the &lt;code&gt;User Password&lt;&#x2F;code&gt; to the password set on the host (IF THIS IS WRONG IT DOESN’T TELL YOU WRONG PASSWORD, IT JUST WON’T WORK SO DOUBLE CHECK THE PASSWORD)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Command Substitution</title>
        <published>2023-12-29T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/bash/command-substitution/"/>
        <id>https://dev.chester.wykies.com/bash/command-substitution/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/bash/command-substitution/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;mywiki.wooledge.org&#x2F;CommandSubstitution&quot;&gt;http:&#x2F;&#x2F;mywiki.wooledge.org&#x2F;CommandSubstitution&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Inserts the output of one command into another command.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span&gt; $(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;pwd&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example Output: &lt;code&gt;&#x2F;home&#x2F;user&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;NB: Older shells seemed to have only supported ` but &lt;code&gt;$()&lt;&#x2F;code&gt; is &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;mywiki.wooledge.org&#x2F;BashFAQ&#x2F;082&quot;&gt;preferred&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Running a Script</title>
        <published>2023-12-29T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/python/running-a-script/"/>
        <id>https://dev.chester.wykies.com/python/running-a-script/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/python/running-a-script/">&lt;h1 id=&quot;tldr&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tldr&quot; aria-label=&quot;Anchor link for: tldr&quot;&gt;TLDR&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Use the following (Sets &lt;code&gt;PYTHONPATH&lt;&#x2F;code&gt; in addition to normal run command)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PYTHONPATH&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;pwd&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; python&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; src&#x2F;main.py&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;background&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#background&quot; aria-label=&quot;Anchor link for: background&quot;&gt;Background&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;At first blush this seems obvious and very easy but…
I inherited a setup on my first big python project that had the code inside a src folder and data and other things in other folders at that level.
It expected all commands to be executed from that folder.
All paths in the code were relative from that working directory.
While it make the code harder to run from the command line it wasn’t any harder in PyCharm (other than setting the correct working directory).
Overall I liked the separation of data from code but co-location so carried it over to a few other projects.
But each time I need to run it from the command line I run into issues so documenting how to run it for future reference.
Running from the correct folder is not enough to make it work hence why I’m writing it down.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;example&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example&quot; aria-label=&quot;Anchor link for: example&quot;&gt;Example&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;example-folder-tree&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-folder-tree&quot; aria-label=&quot;Anchor link for: example-folder-tree&quot;&gt;Example folder tree&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ tree example&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;example&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;├── data&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   ├── file1.csv&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;│   └── file2.csv&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;└── src&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ├── helper.py&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    └── main.py&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;3 directories, 5 files&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;content-of-src-main-py&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#content-of-src-main-py&quot; aria-label=&quot;Anchor link for: content-of-src-main-py&quot;&gt;Content of &lt;code&gt;src&#x2F;main.py&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ cat src&#x2F;main.py &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;from src.helper import hello_again&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;print(&amp;quot;Hi from main&amp;quot;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;hello_again()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;content-of-src-helper-py&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#content-of-src-helper-py&quot; aria-label=&quot;Anchor link for: content-of-src-helper-py&quot;&gt;Content of &lt;code&gt;src&#x2F;helper.py&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ cat src&#x2F;helper.py &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;def hello_again():&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	print(&amp;quot;Well hello there&amp;quot;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;error-when-trying-from-inside-the-example-folder&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#error-when-trying-from-inside-the-example-folder&quot; aria-label=&quot;Anchor link for: error-when-trying-from-inside-the-example-folder&quot;&gt;Error when trying from inside the example folder&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ python src&#x2F;main.py&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Traceback (most recent call last):&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;File &amp;quot;&#x2F;home&#x2F;user&#x2F;example&#x2F;src&#x2F;main.py&amp;quot;, line 1, in &amp;lt;module&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;from src.helper import hello_again&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ModuleNotFoundError: No module named &amp;#39;src&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;successful-command-by-setting-pythonpath-to-current-directory&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#successful-command-by-setting-pythonpath-to-current-directory&quot; aria-label=&quot;Anchor link for: successful-command-by-setting-pythonpath-to-current-directory&quot;&gt;Successful command by setting &lt;code&gt;PYTHONPATH&lt;&#x2F;code&gt; to current directory&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ PYTHONPATH=$(pwd) python src&#x2F;main.py&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Hi from main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Well hello there&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Chromecast</title>
        <published>2023-12-27T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/chromecast/"/>
        <id>https://dev.chester.wykies.com/misc/chromecast/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/chromecast/">&lt;h1 id=&quot;mirror-phone-screen&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mirror-phone-screen&quot; aria-label=&quot;Anchor link for: mirror-phone-screen&quot;&gt;Mirror Phone Screen&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;NB: I only have one Chromecast so instructions my vary a bit with more than one device.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Observations&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Video freezes after a short while of watching YouTube&lt;&#x2F;li&gt;
&lt;li&gt;Video doesn’t play if watching Prime Video (Captions and settings screens show)&lt;&#x2F;li&gt;
&lt;li&gt;Audio continues to work when video freezes&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;instructions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#instructions&quot; aria-label=&quot;Anchor link for: instructions&quot;&gt;Instructions&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Open Google Home&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;chromecast&#x2F;app_icon.jpg&quot; alt=&quot;App Icon&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Go to devices&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;chromecast&#x2F;tab_select.png&quot; alt=&quot;Tab Selection&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Select applicable device&lt;&#x2F;li&gt;
&lt;li&gt;Stop current casting if needed (Includes content playing on device)&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;chromecast&#x2F;stop_casting.png&quot; alt=&quot;Stop Casting&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Select device&lt;&#x2F;li&gt;
&lt;li&gt;Mirror my screen&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;chromecast&#x2F;start_cast.png&quot; alt=&quot;Start Cast&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Hooks Examples</title>
        <published>2023-12-20T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/hooks/"/>
        <id>https://dev.chester.wykies.com/git/hooks/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/hooks/">&lt;h1 id=&quot;skip-commit-hooks&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#skip-commit-hooks&quot; aria-label=&quot;Anchor link for: skip-commit-hooks&quot;&gt;Skip commit hooks&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;7230820&#x2F;skip-git-commit-hooks&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;7230820&#x2F;skip-git-commit-hooks&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Add a &lt;code&gt;--no-verify&lt;&#x2F;code&gt; flag. Only tested on commit as below&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; commit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --no-verify&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;pre-commit-hook-to-prevent-changes-to-a-zola-project-base-url&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#pre-commit-hook-to-prevent-changes-to-a-zola-project-base-url&quot; aria-label=&quot;Anchor link for: pre-commit-hook-to-prevent-changes-to-a-zola-project-base-url&quot;&gt;pre-commit Hook to prevent changes to a zola project base_url&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;#!&#x2F;bin&#x2F;sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# Check if we see the line with the base_url being changed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; diff&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --cached&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; config.toml&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; grep&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;^-base_url&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; $?&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -eq&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt; ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Error: Change detected to base_url&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    exit 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;zola-chrono-pre-push-hook&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#zola-chrono-pre-push-hook&quot; aria-label=&quot;Anchor link for: zola-chrono-pre-push-hook&quot;&gt;zola_chrono pre-push hook&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;documentation-update&#x2F;#setting-up-a-pre-push-hook&quot;&gt;Link&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;conventional-commit-checking&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#conventional-commit-checking&quot; aria-label=&quot;Anchor link for: conventional-commit-checking&quot;&gt;Conventional Commit Checking&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Simple (not robust) &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.conventionalcommits.org&#x2F;en&#x2F;v1.0.0&#x2F;#summary&quot;&gt;conventional commit&lt;&#x2F;a&gt; checker.
Instead of copying code here that may go out of date here is a link to &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rust-practice&#x2F;cargo-leet&#x2F;blob&#x2F;develop&#x2F;scripts&#x2F;commit-msg&quot;&gt;one I have in&lt;&#x2F;a&gt; use in a project.
In that same &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rust-practice&#x2F;cargo-leet&#x2F;tree&#x2F;develop&#x2F;scripts&quot;&gt;folder&lt;&#x2F;a&gt; are scripts to set it up if you don’t already know how to do it.
If you are still running into issues please reach out via github issues (see link in footer).&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>MAN</title>
        <published>2023-12-17T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/man/"/>
        <id>https://dev.chester.wykies.com/debian/man/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/man/">&lt;p&gt;Man pages are great but sometimes you want to access it from outside of the terminal.
If you just pipe the output to a file it is very wide.
If it’s too wide for your use case pipe it to cat, that will cause the whole thing to be printed but still fit on your current terminal which might be a better width for your use case.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;example&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example&quot; aria-label=&quot;Anchor link for: example&quot;&gt;Example&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;NB: The example uses shows how to do it for &lt;code&gt;ufw&lt;&#x2F;code&gt;.
Just replace &lt;code&gt;ufw&lt;&#x2F;code&gt; with the program you want a man page for.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;man&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ufw&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; cat&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Wireshark</title>
        <published>2023-12-15T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/wireshark/"/>
        <id>https://dev.chester.wykies.com/misc/wireshark/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/wireshark/">&lt;h1 id=&quot;installation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#installation&quot; aria-label=&quot;Anchor link for: installation&quot;&gt;Installation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install wireshark&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;filters&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#filters&quot; aria-label=&quot;Anchor link for: filters&quot;&gt;Filters&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.alphr.com&#x2F;wireshark-filter-by-ip&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.alphr.com&#x2F;wireshark-filter-by-ip&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Source IP &lt;code&gt;ip.src == [IP address]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Destination IP &lt;code&gt;ip.dst == [IP address]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Crate Actix Web</title>
        <published>2023-12-15T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/crate-actix/"/>
        <id>https://dev.chester.wykies.com/rust/crate-actix/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/crate-actix/">&lt;p&gt;Website: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;actix.rs&#x2F;&quot;&gt;https:&#x2F;&#x2F;actix.rs&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;list-of-useful-doc-items&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#list-of-useful-doc-items&quot; aria-label=&quot;Anchor link for: list-of-useful-doc-items&quot;&gt;List of useful doc items&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;Errors
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;actix.rs&#x2F;docs&#x2F;errors#error-helpers&quot;&gt;Error Helpers&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;actix-web&#x2F;latest&#x2F;actix_web&#x2F;error&#x2F;index.html#functions&quot;&gt;Functions&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;actix-web&#x2F;latest&#x2F;actix_web&#x2F;middleware&#x2F;struct.Logger.html&quot;&gt;Logging Middleware&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;log-record-unmatched-routes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#log-record-unmatched-routes&quot; aria-label=&quot;Anchor link for: log-record-unmatched-routes&quot;&gt;Log (record) unmatched routes&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Add a &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;actix-web&#x2F;latest&#x2F;actix_web&#x2F;struct.App.html#method.default_service&quot;&gt;default service&lt;&#x2F;a&gt; and route (This example uses tracing to do the recording)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;default_service&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;route&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to&lt;&#x2F;span&gt;&lt;span&gt;(not_found));&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Added into config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[tracing&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;instrument]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;pub async fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; not_found&lt;&#x2F;span&gt;&lt;span&gt;(req&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; HttpRequest&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; actix_web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;HttpResponse&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    error!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Failed to match route&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;HttpResponse&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;NotFound&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;body&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;404 - Not found&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;graceful-shutdown&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#graceful-shutdown&quot; aria-label=&quot;Anchor link for: graceful-shutdown&quot;&gt;Graceful shutdown&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;There are multiple references I found and the appropriate one depends on your use case.
I’m collecting them here because I don’t want to have to search for them again.
I recommend also checking out &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;tokio.rs&#x2F;tokio&#x2F;topics&#x2F;shutdown&quot;&gt;Tokio Cancellation Tokens&lt;&#x2F;a&gt; as well as applicable to your use case.&lt;&#x2F;p&gt;
&lt;p&gt;Resources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;actix&#x2F;examples&#x2F;tree&#x2F;master&#x2F;shutdown-server&quot;&gt;Official example of shutdown&lt;&#x2F;a&gt; - It shows how to shutdown from an endpoint&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;actix&#x2F;actix-web&#x2F;issues&#x2F;2739#issuecomment-1107638674&quot;&gt;Example Response to issue&lt;&#x2F;a&gt; - Shows how to shutdown if there is another task running in parallel to actix_web. Both tasks get shutdown gracefully. To shutdown the second task I’d recommend using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;tokio.rs&#x2F;tokio&#x2F;topics&#x2F;shutdown&quot;&gt;Tokio Cancellation Tokens&lt;&#x2F;a&gt; instead.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;actix.rs&#x2F;docs&#x2F;server#graceful-shutdown&quot;&gt;Official Documentation website&lt;&#x2F;a&gt; - Explains the default behaviour&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>OnceLock</title>
        <published>2023-12-13T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/std-once/"/>
        <id>https://dev.chester.wykies.com/rust/std-once/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/std-once/">&lt;p&gt;If thread safety is not needed you can use &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;cell&#x2F;struct.OnceCell.html&quot;&gt;OnceCell&lt;&#x2F;a&gt; but &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;sync&#x2F;struct.OnceLock.html&quot;&gt;OnceLock&lt;&#x2F;a&gt; can be used in both and hence examples here focus on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;sync&#x2F;struct.OnceLock.html&quot;&gt;OnceLock&lt;&#x2F;a&gt; but the example in the docs for &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;cell&#x2F;struct.OnceCell.html&quot;&gt;OnceCell&lt;&#x2F;a&gt; is pretty good.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;example-on-how-to-use-oncelock&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-on-how-to-use-oncelock&quot; aria-label=&quot;Anchor link for: example-on-how-to-use-oncelock&quot;&gt;Example on how to use OnceLock&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;The important difference between the examples is where the initialization happens&lt;&#x2F;p&gt;
&lt;h2 id=&quot;initialized-at-point-of-use&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#initialized-at-point-of-use&quot; aria-label=&quot;Anchor link for: initialized-at-point-of-use&quot;&gt;Initialized at point of use&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Useful if used in same place it is created&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    foo&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Prints 1-1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    foo&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Prints 1-2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    foo&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;3&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Prints 1-3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    foo&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;4&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Prints 1-4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; foo&lt;&#x2F;span&gt;&lt;span&gt;(arg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; i32&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;OnceLock&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    static&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; VALUE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; OnceLock&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;i32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; OnceLock&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; VALUE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;get_or_init&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;||&lt;&#x2F;span&gt;&lt;span&gt; arg);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{value}-{arg}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;initialized-at-point-of-creation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#initialized-at-point-of-creation&quot; aria-label=&quot;Anchor link for: initialized-at-point-of-creation&quot;&gt;Initialized at point of creation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Useful if used in multiple places as it will already be initialized&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sync&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Arc&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Mutex&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; OnceLock&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    foo&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Prints [0]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    foo&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Prints [0,1]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    foo&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Prints [0,1,2]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    foo&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Prints [0,1,2,3]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; foo&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    static&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; VALUE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; OnceLock&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Arc&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Mutex&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;usize&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; OnceLock&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; VALUE&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;is_none&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        VALUE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Arc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Mutex&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;vec!&lt;&#x2F;span&gt;&lt;span&gt;[])))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Just checked that it was empty&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; my_vec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; VALUE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Just ensured it was set&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;lock&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Mutex is poisoned&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; my_vec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;len&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    my_vec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;push&lt;&#x2F;span&gt;&lt;span&gt;(n);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{my_vec:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Scripts</title>
        <published>2023-12-11T00:00:00+00:00</published>
        <updated>2025-05-14T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/bash/scripts/"/>
        <id>https://dev.chester.wykies.com/bash/scripts/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/bash/scripts/">&lt;h1 id=&quot;shebang-line&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#shebang-line&quot; aria-label=&quot;Anchor link for: shebang-line&quot;&gt;Shebang Line&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;codejunction.hashnode.dev&#x2F;the-advantage-of-using-usrbinenv-bash-over-binbash&quot;&gt;https:&#x2F;&#x2F;codejunction.hashnode.dev&#x2F;the-advantage-of-using-usrbinenv-bash-over-binbash&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This is the line that goes at the top of the script and tells the shell what to use to execute the script&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;#!&#x2F;usr&#x2F;bin&#x2F;env bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;if-statements&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#if-statements&quot; aria-label=&quot;Anchor link for: if-statements&quot;&gt;If statements&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;linuxize.com&#x2F;post&#x2F;bash-if-else-statement&#x2F;&quot;&gt;https:&#x2F;&#x2F;linuxize.com&#x2F;post&#x2F;bash-if-else-statement&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;WARNING!!&lt;&#x2F;strong&gt; I ran into syntax errors with &lt;code&gt;fi&lt;&#x2F;code&gt; if I put &lt;code&gt;then&lt;&#x2F;code&gt; on the same line with &lt;code&gt;if&lt;&#x2F;code&gt; (see error message below)&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;… syntax error near unexpected token `fi’&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; TEST-COMMAND1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;  STATEMENTS1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;elif&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; TEST-COMMAND2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;  STATEMENTS2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;  STATEMENTS3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;#!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo -n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Enter a number: &amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;read&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; VAR&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span&gt; [ $VAR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -gt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 10&lt;&#x2F;span&gt;&lt;span&gt; ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;  echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;The variable is greater than 10.&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;elif&lt;&#x2F;span&gt;&lt;span&gt; [ $VAR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -eq&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 10&lt;&#x2F;span&gt;&lt;span&gt; ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;  echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;The variable is equal to 10.&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;  echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;The variable is less than 10.&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;until&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#until&quot; aria-label=&quot;Anchor link for: until&quot;&gt;Until&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;#!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;counter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;until&lt;&#x2F;span&gt;&lt;span&gt; [ $counter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -gt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span&gt; ]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;  echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; Counter:&lt;&#x2F;span&gt;&lt;span&gt; $counter&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  ((counter&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;++&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;done&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;positional-arguments&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#positional-arguments&quot; aria-label=&quot;Anchor link for: positional-arguments&quot;&gt;Positional arguments&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.redhat.com&#x2F;en&#x2F;blog&#x2F;arguments-options-bash-scripts&quot;&gt;https:&#x2F;&#x2F;www.redhat.com&#x2F;en&#x2F;blog&#x2F;arguments-options-bash-scripts&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;$0 - the name of the running script and $1 to $9 are positional arguments.
The example if for a executable text file called &lt;code&gt;test_script&lt;&#x2F;code&gt; in your current directory.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;#!&#x2F;usr&#x2F;bin&#x2F;env bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; Running&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; \&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;$0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; With 1st argument in quotes is&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; \&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;$1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; And 2nd without quotes this time is: &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;$2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; And 3rd without quotes this time is:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt; $3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Run with &lt;code&gt;.&#x2F;test_script.sh first second third&lt;&#x2F;code&gt; and it outputs&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Running &amp;quot;.&#x2F;test_script.sh&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;With 1st argument in quotes is &amp;quot;first&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;And 2nd without quotes this time is: second&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;And 3rd without quotes this time is: third&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;case-statements&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#case-statements&quot; aria-label=&quot;Anchor link for: case-statements&quot;&gt;Case statements&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;linuxize.com&#x2F;post&#x2F;bash-case-statement&#x2F;&quot;&gt;https:&#x2F;&#x2F;linuxize.com&#x2F;post&#x2F;bash-case-statement&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;case&lt;&#x2F;span&gt;&lt;span&gt; EXPRESSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #DBEDFF;&quot;&gt;  PATTERN_1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    STATEMENTS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #DBEDFF;&quot;&gt;  PATTERN_2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    STATEMENTS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #DBEDFF;&quot;&gt;  PATTERN_N&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    STATEMENTS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;  *)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    STATEMENTS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;esac&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;#!&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo -n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Enter the name of a country: &amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;read&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; COUNTRY&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo -n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;The official language of &lt;&#x2F;span&gt;&lt;span&gt;$COUNTRY&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; is &amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;case&lt;&#x2F;span&gt;&lt;span&gt; $COUNTRY&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #DBEDFF;&quot;&gt;  Lithuania&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    echo -n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Lithuanian&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #DBEDFF;&quot;&gt;  Romania&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;&quot;&gt; Moldova&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    echo -n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Romanian&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #DBEDFF;&quot;&gt;  Italy&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;San Marino&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;&quot;&gt; Switzerland&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Vatican City&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    echo -n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Italian&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;  *)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    echo -n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;unknown&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    ;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;esac&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;comparing-strings&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#comparing-strings&quot; aria-label=&quot;Anchor link for: comparing-strings&quot;&gt;Comparing Strings&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;linuxize.com&#x2F;post&#x2F;how-to-compare-strings-in-bash&#x2F;&quot;&gt;https:&#x2F;&#x2F;linuxize.com&#x2F;post&#x2F;how-to-compare-strings-in-bash&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;See link for more info.
One note I wanted to add is to ensure you use quotes around your strings especially if they are coming from variables.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;directory-exits-test-and-negation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#directory-exits-test-and-negation&quot; aria-label=&quot;Anchor link for: directory-exits-test-and-negation&quot;&gt;Directory exits test (and negation)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;The example below does nothing in the positive case and exits on the negative case&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;if&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$SRC_DIR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; ] &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    :&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; # Do nothing (was getting trouble with negating the condition)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;else&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;  echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Error: Source directory does not exist&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;  exit 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;no-op&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#no-op&quot; aria-label=&quot;Anchor link for: no-op&quot;&gt;No-Op&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;12404661&#x2F;what-is-the-use-case-of-noop-in-bash&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;12404661&#x2F;what-is-the-use-case-of-noop-in-bash&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Simply use a &lt;code&gt;:&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;while&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; keep_waiting&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;  :&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; # do nothing&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;done&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;set-script-to-exit-on-errors&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-script-to-exit-on-errors&quot; aria-label=&quot;Anchor link for: set-script-to-exit-on-errors&quot;&gt;Set script to exit on errors&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;bash&#x2F;manual&#x2F;html_node&#x2F;The-Set-Builtin.html&quot;&gt;https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;bash&#x2F;manual&#x2F;html_node&#x2F;The-Set-Builtin.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;set -e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;set-script-to-echo-commands&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-script-to-echo-commands&quot; aria-label=&quot;Anchor link for: set-script-to-echo-commands&quot;&gt;Set script to echo commands&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;2853803&#x2F;how-to-echo-shell-commands-as-they-are-executed&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;2853803&#x2F;how-to-echo-shell-commands-as-they-are-executed&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;set -x&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;for-loops&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#for-loops&quot; aria-label=&quot;Anchor link for: for-loops&quot;&gt;For loops&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;opensource.com&#x2F;article&#x2F;18&#x2F;5&#x2F;you-dont-know-bash-intro-bash-arrays&quot;&gt;https:&#x2F;&#x2F;opensource.com&#x2F;article&#x2F;18&#x2F;5&#x2F;you-dont-know-bash-intro-bash-arrays&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Syntax&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Result&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;arr=()&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Create an empty array&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;${arr[2]}&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Retrieve third element&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;${!arr[@]}&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Retrieve array indices&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;arr[0]=3&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Overwrite 1st element&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;str=$(ls)&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Save ls output as a string&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;code&gt;${arr[@]:s:n}&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Retrieve n elements starting at index s&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h2 id=&quot;example-simple-application-call&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-simple-application-call&quot; aria-label=&quot;Anchor link for: example-simple-application-call&quot;&gt;Example simple application call&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;allThreads&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1 2 4 8 16 32 64 128&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;allRuntimes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;for&lt;&#x2F;span&gt;&lt;span&gt; t&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; ${allThreads[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;@&lt;&#x2F;span&gt;&lt;span&gt;]};&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  runtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;.&#x2F;pipeline&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --threads&lt;&#x2F;span&gt;&lt;span&gt; $t)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  allRuntimes&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;+=&lt;&#x2F;span&gt;&lt;span&gt;( $runtime )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;done&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;example-log-alerting&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-log-alerting&quot; aria-label=&quot;Anchor link for: example-log-alerting&quot;&gt;Example Log Alerting&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# List of logs and who should be notified of issues&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;logPaths&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;api.log&amp;quot; &amp;quot;auth.log&amp;quot; &amp;quot;jenkins.log&amp;quot; &amp;quot;data.log&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;logEmails&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;jay@email&amp;quot; &amp;quot;emma@email&amp;quot; &amp;quot;jon@email&amp;quot; &amp;quot;sophia@email&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# Look for signs of trouble in each log&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;for&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span&gt; ${&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;!&lt;&#x2F;span&gt;&lt;span&gt;logPaths[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;@&lt;&#x2F;span&gt;&lt;span&gt;]};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  log&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;${logPaths[$i]}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  stakeholder&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;${logEmails[$i]}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  numErrors&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; tail&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -n 100&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$log&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; grep&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;ERROR&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; wc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -l&lt;&#x2F;span&gt;&lt;span&gt; )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;  # Warn stakeholders if recently saw &amp;gt; 5 errors&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt; [[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$numErrors&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -gt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span&gt; ]];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;  then&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    emailRecipient&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$stakeholder&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    emailSubject&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;WARNING: ${&lt;&#x2F;span&gt;&lt;span&gt;log&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;} showing unusual levels of errors&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    emailBody&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;${&lt;&#x2F;span&gt;&lt;span&gt;numErrors&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;} errors found in log ${&lt;&#x2F;span&gt;&lt;span&gt;log&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;}&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$emailBody&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; mailx&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$emailSubject&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$emailRecipient&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;  fi&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;done&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>OpenVPN</title>
        <published>2023-12-06T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/open-vpn/"/>
        <id>https://dev.chester.wykies.com/debian/open-vpn/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/open-vpn/">&lt;p&gt;Saved link to official how to because it was a bit hard to find&lt;&#x2F;p&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;openvpn.net&#x2F;community-resources&#x2F;how-to&#x2F;&quot;&gt;Official How To&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>PPP logs</title>
        <published>2023-12-06T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/ppp-logs/"/>
        <id>https://dev.chester.wykies.com/debian/ppp-logs/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/ppp-logs/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;441900&#x2F;where-is-the-log-of-pppd-in-ubuntu-13-10&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;441900&#x2F;where-is-the-log-of-pppd-in-ubuntu-13-10&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;all-logs-related-to-ppp&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#all-logs-related-to-ppp&quot; aria-label=&quot;Anchor link for: all-logs-related-to-ppp&quot;&gt;All logs related to ppp&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;var&#x2F;log&#x2F;syslog&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; grep&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ppp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;line-with-duration-of-connection-before-reset&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#line-with-duration-of-connection-before-reset&quot; aria-label=&quot;Anchor link for: line-with-duration-of-connection-before-reset&quot;&gt;Line with duration of connection before reset&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;We were getting our connection reset periodically so this allowed us to check how long the period was&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;var&#x2F;log&#x2F;syslog&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; grep&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;ppp.* active_time&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>View Whitespace</title>
        <published>2023-12-01T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/view-whitespace/"/>
        <id>https://dev.chester.wykies.com/debian/view-whitespace/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/view-whitespace/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;3569997&#x2F;how-to-find-out-line-endings-in-a-text-file&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;3569997&#x2F;how-to-find-out-line-endings-in-a-text-file&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Using the &lt;code&gt;-A&lt;&#x2F;code&gt; flag with &lt;code&gt;cat&lt;&#x2F;code&gt; shows non-printing characters, including line endings.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -A&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; file.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;List of how some characters are represented:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;^I&lt;&#x2F;code&gt; - Tab (\t)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;^M&lt;&#x2F;code&gt; - Carriage Return (\r)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;$&lt;&#x2F;code&gt; - Line Feed (\n) (Comes at the end of a line and didn’t try a line without \n so they are the same for my use cases)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Firewall</title>
        <published>2023-11-22T00:00:00+00:00</published>
        <updated>2026-01-13T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/firewall/"/>
        <id>https://dev.chester.wykies.com/debian/firewall/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/firewall/">&lt;p&gt;Source: Used to be at https:&#x2F;&#x2F;ubuntu.com&#x2F;server&#x2F;docs&#x2F;security-firewall but it’s no longer there&lt;&#x2F;p&gt;
&lt;h1 id=&quot;man-page-extract&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#man-page-extract&quot; aria-label=&quot;Anchor link for: man-page-extract&quot;&gt;Man page extract&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;The man page is well written an easy to follow. See below for a copy of the full &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;firewall&#x2F;#man-page-copy&quot;&gt;man page&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;On installation, ufw is disabled with a default incoming policy of deny, a default forward
policy of deny, and a default outgoing policy of allow, with stateful tracking for NEW
connections for incoming and forwarded connections. In addition to the above, a default
rule-set is put in place that does the following…&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h1 id=&quot;frequent-commands&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#frequent-commands&quot; aria-label=&quot;Anchor link for: frequent-commands&quot;&gt;Frequent commands&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Collecting commands I came back here to lookup&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Enable Firewall - &lt;code&gt;sudo ufw enable&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Disable Firewall - &lt;code&gt;sudo ufw disable&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;firewall&#x2F;#view-rules-in-use-including-status-and-defaults&quot;&gt;View rules in use&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;firewall&#x2F;#logs&quot;&gt;See log&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;state-information&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#state-information&quot; aria-label=&quot;Anchor link for: state-information&quot;&gt;State Information&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;view-rules-in-use-including-status-and-defaults&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#view-rules-in-use-including-status-and-defaults&quot; aria-label=&quot;Anchor link for: view-rules-in-use-including-status-and-defaults&quot;&gt;View rules in use (including status and defaults)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ufw status verbose&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;view-rules-in-use-numbered&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#view-rules-in-use-numbered&quot; aria-label=&quot;Anchor link for: view-rules-in-use-numbered&quot;&gt;View rules in use (numbered)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Numbers make things like deleting rules easier&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ufw status numbered&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;logs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#logs&quot; aria-label=&quot;Anchor link for: logs&quot;&gt;Logs&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.cyberciti.biz&#x2F;faq&#x2F;ubuntu-22-04-lts-set-up-ufw-firewall-in-5-minutes&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.cyberciti.biz&#x2F;faq&#x2F;ubuntu-22-04-lts-set-up-ufw-firewall-in-5-minutes&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;tail&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;var&#x2F;log&#x2F;ufw.log&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;listening-programs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#listening-programs&quot; aria-label=&quot;Anchor link for: listening-programs&quot;&gt;Listening Programs&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Excerpt from man page&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;The listening report will display the ports on the live system in the listening state for tcp and the open state for udp, along with the address of the interface and the executable listening on the port. An ‘*’ is used in place of the address of the interface when the executable is bound to all interfaces on that port. Following this information is a list of rules which may affect connections on this port. The rules are listed in the order they are evaluated by the kernel, and the first match wins. Please note that the default policy is not listed and tcp6 and udp6 are shown only if IPV6 is enabled.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ufw show listening&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;services-port-number-mapping&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#services-port-number-mapping&quot; aria-label=&quot;Anchor link for: services-port-number-mapping&quot;&gt;Services port number mapping&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The named ports can be found in &lt;code&gt;&#x2F;etc&#x2F;services&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;block-outgoing-traffic&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#block-outgoing-traffic&quot; aria-label=&quot;Anchor link for: block-outgoing-traffic&quot;&gt;Block outgoing traffic&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;: Not tested yet&lt;&#x2F;p&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;448836&#x2F;how-do-i-with-ufw-deny-all-outgoing-ports-excepting-the-ones-i-need&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;448836&#x2F;how-do-i-with-ufw-deny-all-outgoing-ports-excepting-the-ones-i-need&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;man-page-copy&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#man-page-copy&quot; aria-label=&quot;Anchor link for: man-page-copy&quot;&gt;MAN Page (Copy)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;It was easier to view it here so left a copy here (also makes it easier to search)&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;Click for full man page!&lt;&#x2F;summary&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;UFW:(8)                                   September 2021                                   UFW:(8)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NAME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw - program for managing a netfilter firewall&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DESCRIPTION&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This  program is for managing a Linux firewall and aims to provide an easy to use interface&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       for the user.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;USAGE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw [--dry-run] enable|disable|reload&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw [--dry-run] default allow|deny|reject [incoming|outgoing|routed]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw [--dry-run] logging on|off|LEVEL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw [--dry-run] reset&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw [--dry-run] status [verbose|numbered]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw [--dry-run] show REPORT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw  [--dry-run]  [delete]  [insert   NUM]   [prepend]   allow|deny|reject|limit   [in|out]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       [log|log-all] [ PORT[&#x2F;PROTOCOL] | APPNAME ] [comment COMMENT]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw  [--dry-run] [rule] [delete] [insert NUM] [prepend] allow|deny|reject|limit [in|out [on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       INTERFACE]] [log|log-all] [proto PROTOCOL] [from ADDRESS [port PORT | app  APPNAME  ]]  [to&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ADDRESS [port PORT | app APPNAME ]] [comment COMMENT]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw  [--dry-run]  route  [delete] [insert NUM] [prepend] allow|deny|reject|limit [in|out on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       INTERFACE] [log|log-all] [proto PROTOCOL] [from ADDRESS [port PORT | app APPNAME]] [to  AD‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       DRESS [port PORT | app APPNAME]] [comment COMMENT]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw [--dry-run] [--force] delete NUM&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw [--dry-run] app list|info|default|update&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;OPTIONS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       --version&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              show program&amp;#39;s version number and exit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       -h, --help&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              show help message and exit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       --dry-run&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              don&amp;#39;t modify anything, just show the changes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       enable reloads firewall and enables firewall on boot.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       disable&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              unloads firewall and disables firewall on boot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       reload reloads firewall&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       default allow|deny|reject DIRECTION&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              change the default policy for traffic going DIRECTION, where DIRECTION is one of in‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              coming, outgoing or routed. Note that existing rules will have to be migrated  manu‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              ally when changing the default policy. See RULE SYNTAX for more on deny and reject.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       logging on|off|LEVEL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              toggle  logging. Logged packets use the LOG_KERN syslog facility. Systems configured&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              for rsyslog support may also log to &#x2F;var&#x2F;log&#x2F;ufw.log. Specifying a LEVEL turns  log‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              ging  on  for  the specified LEVEL. The default log level is &amp;#39;low&amp;#39;.  See LOGGING for&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              details.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       reset  Disables and resets firewall to installation defaults. Can also give the --force op‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              tion to perform the reset without confirmation.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       status show status of firewall and ufw managed rules. Use status verbose for extra informa‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              tion. In the status output, &amp;#39;Anywhere&amp;#39; is synonymous with  &amp;#39;any&amp;#39;,  0.0.0.0&#x2F;0  (IPv4)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              and  ::&#x2F;0 (IPv6). Note that when using status, there is a subtle difference when re‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              porting interfaces. For example, if the following rules are added:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                ufw allow in on eth0 from 192.168.0.0&#x2F;16&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                ufw allow out on eth1 to 10.0.0.0&#x2F;8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                ufw route allow in on eth0 out on eth1 to 10.0.0.0&#x2F;8 from 192.168.0.0&#x2F;16&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                ufw limit 2222&#x2F;tcp comment &amp;#39;SSH port&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              ufw status will output:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                To                         Action      From&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                --                         ------      ----&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                Anywhere on eth0           ALLOW       192.168.0.0&#x2F;16&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                10.0.0.0&#x2F;8                 ALLOW OUT   Anywhere on eth1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                10.0.0.0&#x2F;8 on eth1         ALLOW FWD   192.168.0.0&#x2F;16 on eth0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                Anywhere                   LIMIT       Anywhere                 # SSH port&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              For the input and output rules, the interface is reported relative to  the  firewall&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              system  as an endpoint, whereas with route rules, the interface is reported relative&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              to the direction packets flow through the firewall.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       show REPORT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              display information about the running firewall. See REPORTS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       allow ARGS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              add allow rule.  See RULE SYNTAX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       deny ARGS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              add deny rule.  See RULE SYNTAX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       reject ARGS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              add reject rule.  See RULE SYNTAX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       limit ARGS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              add limit rule.  See RULE SYNTAX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       delete RULE|NUM&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              deletes the corresponding RULE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       insert NUM RULE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              insert the corresponding RULE as rule number NUM&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       prepend RULE&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              prepend the corresponding RULE to the top of the ruleset&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;RULE SYNTAX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Users can specify rules using either a simple syntax or a full syntax.  The  simple  syntax&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       only specifies the port and optionally the protocol to be allowed or denied on the host.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Both  syntaxes  support specifying a comment for the rule. For existing rules, specifying a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       different comment updates the comment and specifying &amp;#39;&amp;#39; removes the comment.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Example rules using the simple syntax:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow 53&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This rule will allow tcp and udp port 53 to any address on this host. To specify  a  proto‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       col, append &amp;#39;&#x2F;protocol&amp;#39; to the port. For example:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow 25&#x2F;tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This  will allow tcp port 25 to any address on this host. ufw will also check &#x2F;etc&#x2F;services&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       for the port and protocol if specifying a service by name.  Eg:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow smtp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw supports both ingress and egress filtering and users may optionally specify a direction&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       of  either  in or out for either incoming or outgoing traffic. If no direction is supplied,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       the rule applies to incoming traffic. Eg:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow in http&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw reject out smtp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw reject telnet comment &amp;#39;telnet is unencrypted&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Users can also use a fuller syntax, specifying the source  and  destination  addresses  and&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ports. This syntax is loosely based on OpenBSD&amp;#39;s PF syntax. For example:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw deny proto tcp to any port 80&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This will deny all traffic to tcp port 80 on this host. Another example:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw deny proto tcp from 10.0.0.0&#x2F;8 to 192.168.0.1 port 25&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This will deny all traffic from the RFC1918 Class A network to tcp port 25 with the address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       192.168.0.1.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw deny proto tcp from 2001:db8::&#x2F;32 to any port 25&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This will deny all traffic from the IPv6 2001:db8::&#x2F;32 to tcp port 25 on  this  host.  IPv6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       must be enabled in &#x2F;etc&#x2F;default&#x2F;ufw for IPv6 firewalling to work.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw deny in on eth0 to 224.0.0.1 proto igmp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This will deny all igmp traffic to 224.0.0.1 on the eth0 interface.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow in on eth0 to 192.168.0.1 proto gre&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This will allow all gre traffic to 192.168.0.1 on the eth0 interface.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow proto tcp from any to any port 80,443,8080:8090 comment &amp;#39;web app&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       The  above  will  allow all traffic to tcp ports 80, 443 and 8080-8090 inclusive and adds a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       comment for the rule. When specifying multiple ports, the ports list must be numeric,  can‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       not  contain  spaces  and  must be modified as a whole. Eg, in the above example you cannot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       later try to delete just the &amp;#39;443&amp;#39; port. You cannot specify  more  than  15  ports  (ranges&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       count as 2 ports, so the port count in the above example is 4).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw  supports  several different protocols. The following are valid in any rule and enabled&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       when the protocol is not specified:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         udp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       The following have certain restrictions and are not enabled when the protocol is not speci‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       fied:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ah      valid without port number&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         esp     valid without port number&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         gre     valid without port number&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ipv6    valid for IPv4 addresses and without port number&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         igmp    valid for IPv4 addresses and without port number&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Rules  for  traffic not destined for the host itself but instead for traffic that should be&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       routed&#x2F;forwarded through the firewall should specify the  route  keyword  before  the  rule&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       (routing  rules differ significantly from PF syntax and instead take into account netfilter&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       FORWARD chain conventions). For example:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw route allow in on eth1 out on eth2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This will allow all traffic routed to eth2 and coming in on eth1 to traverse the firewall.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw route allow in on eth0 out on eth1 to 12.34.45.67 port 80 proto tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This rule allows any packets coming in on eth0 to traverse the firewall out on eth1 to  tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       port 80 on 12.34.45.67.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       In  addition  to  routing rules and policy, you must also setup IP forwarding.  This may be&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       done by setting the following in &#x2F;etc&#x2F;ufw&#x2F;sysctl.conf:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         net&#x2F;ipv4&#x2F;ip_forward=1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         net&#x2F;ipv6&#x2F;conf&#x2F;default&#x2F;forwarding=1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         net&#x2F;ipv6&#x2F;conf&#x2F;all&#x2F;forwarding=1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       then restarting the firewall:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw disable&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw enable&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Be aware that setting kernel tunables is operating system specific and ufw sysctl  settings&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       may be overridden. See the sysctl manual page for details.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw  supports  connection rate limiting, which is useful for protecting against brute-force&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       login attacks. When a limit rule is used, ufw will normally allow the connection  but  will&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       deny connections if an IP address attempts to initiate 6 or more connections within 30 sec‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       onds. See http:&#x2F;&#x2F;www.debian-administration.org&#x2F;articles&#x2F;187 for details. Typical usage is:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw limit ssh&#x2F;tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Sometimes it is desirable to let the sender know when traffic is being denied, rather  than&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       simply ignoring it. In these cases, use reject instead of deny.  For example:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw reject auth&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       By default, ufw will apply rules to all available interfaces. To limit this, specify DIREC‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       TION on INTERFACE, where DIRECTION is one of in or out  (interface  aliases  are  not  sup‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ported).  For example, to allow all new incoming http connections on eth0, use:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow in on eth0 to any port 80 proto tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       To delete a rule, simply prefix the original rule with delete with or without the rule com‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ment. For example, if the original rule was:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw deny 80&#x2F;tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Use this to delete it:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw delete deny 80&#x2F;tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       You may also specify the rule by NUM, as seen in the status numbered output.  For  example,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       if you want to delete rule number &amp;#39;3&amp;#39;, use:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw delete 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       If you have IPv6 enabled and are deleting a generic rule that applies to both IPv4 and IPv6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       (eg &amp;#39;ufw allow 22&#x2F;tcp&amp;#39;), deleting by rule number will delete only the  specified  rule.  To&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       delete both with one command, prefix the original rule with delete.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       To  insert a rule, specify the new rule as normal, but prefix the rule with the rule number&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       to insert. For example, if you have four rules, and you want to insert a new rule  as  rule&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       number three, use:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw insert 3 deny to any port 22 from 10.0.0.135 proto tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Similarly,  to  add  a  rule  before  all  other rules matching the rule&amp;#39;s IP type, use the&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       prepend rule:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw prepend deny from 1.2.3.4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This is particularly useful for dynamic firewalls as found in an IPS.  Importantly, if  the&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       specified  rule is an IPv4 rule, it will be prepended before all other IPv4 rules. If it is&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       an IPv6 rule, it will be prepended before any IPv6 rules.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       To see a list of numbered rules, use:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw status numbered&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw supports per rule logging. By default, no logging is performed when a packet matches  a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       rule.  Specifying  log will log all new connections matching the rule, and log-all will log&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       all packets matching the rule.  For example, to allow and log all new ssh connections, use:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow log 22&#x2F;tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       See LOGGING for more information on logging.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;EXAMPLES&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Deny all access to port 53:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw deny 53&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Allow all access to tcp port 80:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow 80&#x2F;tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Allow all access from RFC1918 networks to this host:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow from 10.0.0.0&#x2F;8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow from 172.16.0.0&#x2F;12&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow from 192.168.0.0&#x2F;16&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Deny access to udp port 514 from host 1.2.3.4:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw deny proto udp from 1.2.3.4 to any port 514&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Allow access to udp 1.2.3.4 port 5469 from 1.2.3.5 port 5469:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow proto udp from 1.2.3.5 port 5469 to 1.2.3.4 port 5469&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;REMOTE MANAGEMENT&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       When running ufw enable or starting ufw via its initscript, ufw will flush its chains. This&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       is  required  so  ufw can maintain a consistent state, but it may drop existing connections&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       (eg ssh). ufw does support adding rules before enabling the firewall, so administrators can&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       do:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow proto tcp from any to any port 22&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       before running &amp;#39;ufw enable&amp;#39;. The rules will still be flushed, but the ssh port will be open&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       after enabling the firewall. Please note that once ufw is &amp;#39;enabled&amp;#39;, ufw will not flush the&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       chains  when  adding  or removing rules (but will when modifying a rule or changing the de‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       fault policy). By default, ufw will prompt when enabling the firewall while  running  under&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ssh. This can be disabled by using &amp;#39;ufw --force enable&amp;#39;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;APPLICATION INTEGRATION&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw  supports  application  integration  by  reading  profiles located in &#x2F;etc&#x2F;ufw&#x2F;applica‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       tions.d. To list the names of application profiles known to ufw, use:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw app list&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Users can specify an application name when adding a rule (quoting any  profile  names  with&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       spaces). For example, when using the simple syntax, users can use:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow &amp;lt;name&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Or for the extended syntax:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow from 192.168.0.0&#x2F;16 to any app &amp;lt;name&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       You  should  not specify the protocol with either syntax, and with the extended syntax, use&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       app in place of the port clause.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Details on the firewall profile for a given application can be seen with:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw app info &amp;lt;name&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       where &amp;#39;&amp;lt;name&amp;gt;&amp;#39; is one of the applications seen with the app list command.  Users  may  also&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       specify all to see the profiles for all known applications.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Syntax for the application profiles is a simple .INI format:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         [&amp;lt;name&amp;gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         title=&amp;lt;title&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         description=&amp;lt;description&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ports=&amp;lt;ports&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       The &amp;#39;ports&amp;#39; field may specify a &amp;#39;|&amp;#39;-separated list of ports&#x2F;protocols where the protocol is&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       optional. A comma-separated list or a range (specified with &amp;#39;start:end&amp;#39;) may also  be  used&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       to specify multiple ports, in which case the protocol is required. For example:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         [SomeService]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         title=Some title&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         description=Some description&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ports=12&#x2F;udp|34|56,78:90&#x2F;tcp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       In  the above example, &amp;#39;SomeService&amp;#39; may be used in app rules and it specifies UDP port 12,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       TCP and UDP on port 34 and TCP ports 56 and 78-90 inclusive.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       After creating or editing an application profile, users can run:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw app update &amp;lt;name&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       This command will automatically update the firewall with updated  profile  information.  If&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       specify &amp;#39;all&amp;#39; for name, then all the profiles will be updated.  To update a profile and add&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       a new rule to the firewall automatically, users can run:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw app update --add-new &amp;lt;name&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       The behavior of the update --add-new command can be configured using:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw app default &amp;lt;policy&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       The default application policy is skip, which means that the update --add-new command  will&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       do  nothing.  Users may also specify a policy of allow or deny so the update --add-new com‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       mand may automatically update the firewall.  WARNING: it may be a security to risk to use a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       default  allow  policy  for application profiles. Carefully consider the security ramifica‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       tions before using a default allow policy.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;LOGGING&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw supports multiple logging levels. ufw defaults to a loglevel of &amp;#39;low&amp;#39; when  a  loglevel&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       is not specified. Users may specify a loglevel with:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw logging LEVEL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       LEVEL may be &amp;#39;off&amp;#39;, &amp;#39;low&amp;#39;, &amp;#39;medium&amp;#39;, &amp;#39;high&amp;#39; and &amp;#39;full&amp;#39;. Log levels are defined as:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       off    disables ufw managed logging&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       low    logs  all  blocked  packets not matching the defined policy (with rate limiting), as&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              well as packets matching logged rules&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       medium log level low, plus all allowed packets not matching the defined policy, all INVALID&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;              packets, and all new connections.  All logging is done with rate limiting.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       high   log level medium (without rate limiting), plus all packets with rate limiting&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       full   log level high without rate limiting&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Loglevels above medium generate a lot of logging output, and may quickly fill up your disk.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Loglevel medium may generate a lot of logging output on a busy system.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Specifying &amp;#39;on&amp;#39; simply enables logging at log level &amp;#39;low&amp;#39; if logging is currently  not  en‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       abled.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;REPORTS&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       The  following  reports are supported. Each is based on the live system and with the excep‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       tion of the listening report, is in raw iptables format:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         raw&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         builtins&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         before-rules&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         user-rules&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         after-rules&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         logging-rules&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         listening&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         added&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       The raw report shows the complete firewall, while the others show a subset of  what  is  in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       the raw report.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       The  listening  report will display the ports on the live system in the listening state for&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       tcp and the open state for udp, along with the address of the interface and the  executable&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       listening on the port. An &amp;#39;*&amp;#39; is used in place of the address of the interface when the ex‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ecutable is bound to all interfaces on that port. Following this information is a  list  of&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       rules which may affect connections on this port. The rules are listed in the order they are&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       evaluated by the kernel, and the first match wins. Please note that the default  policy  is&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       not listed and tcp6 and udp6 are shown only if IPV6 is enabled.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       The  added  report  displays the list of rules as they were added on the command-line. This&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       report does not show the status of the running firewall (use &amp;#39;ufw status&amp;#39; instead). Because&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       rules are normalized by ufw, rules may look different than the originally added rule. Also,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw does not record command ordering,  so  an  equivalent  ordering  is  used  which  lists&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       IPv6-only rules after other rules.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NOTES&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       On  installation, ufw is disabled with a default incoming policy of deny, a default forward&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       policy of deny, and a default outgoing policy of allow, with stateful tracking for NEW con‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       nections for incoming and forwarded connections.  In addition to the above, a default rule‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       set is put in place that does the following:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       - DROP packets with RH0 headers&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       - DROP INVALID packets&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       - ACCEPT certain icmp packets (INPUT and FORWARD): destination-unreachable,  source-quench,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       time-exceeded,  parameter-problem,  and  echo-request  for  IPv4.  destination-unreachable,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       packet-too-big, time-exceeded, parameter-problem, and echo-request for IPv6.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       - ACCEPT icmpv6 packets for stateless autoconfiguration (INPUT)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       - ACCEPT ping replies from IPv6 link-local (ffe8::&#x2F;10) addresses (INPUT)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       - ACCEPT DHCP client traffic (INPUT)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       - DROP non-local traffic (INPUT)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       - ACCEPT mDNS (zeroconf&#x2F;bonjour&#x2F;avahi 224.0.0.251 for IPv4 and ff02::fb for IPv6) for  ser‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       vice discovery (INPUT)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       - ACCEPT UPnP (239.255.255.250 for IPv4 and ff02::f for IPv6) for service discovery (INPUT)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       Rule  ordering  is important and the first match wins. Therefore when adding rules, add the&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       more specific rules first with more general rules later.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw is not intended to provide complete firewall functionality via its  command  interface,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       but instead provides an easy way to add or remove simple rules.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       The  status  command  shows  basic  information about the state of the firewall, as well as&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       rules managed via the ufw command. It does not show rules from the rules files in &#x2F;etc&#x2F;ufw.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       To  see the complete state of the firewall, users can ufw show raw.  This displays the fil‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ter, nat, mangle and raw tables using:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         iptables -n -L -v -x -t &amp;lt;table&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ip6tables -n -L -v -x -t &amp;lt;table&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       See the iptables and ip6tables documentation for more details.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       If the default policy is set to REJECT, ufw may interfere with rules added outside  of  the&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw framework. See README for details.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       IPV6  is  allowed  by  default.  To change this behavior to only accept IPv6 traffic on the&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       loopback interface, set IPV6 to &amp;#39;no&amp;#39; in &#x2F;etc&#x2F;default&#x2F;ufw and reload ufw. When IPv6  is  en‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       abled,  you may specify rules in the same way as for IPv4 rules, and they will be displayed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       with ufw status. Rules that match both IPv4 and IPv6 addresses apply to both  IP  versions.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       For example, when IPv6 is enabled, the following rule will allow access to port 22 for both&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       IPv4 and IPv6 traffic:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow 22&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       IPv6 over IPv4 tunnels and 6to4 are supported by using the  &amp;#39;ipv6&amp;#39;  protocol  (&amp;#39;41&amp;#39;).  This&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       protocol can only be used with the full syntax. For example:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow to 10.0.0.1 proto ipv6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow to 10.0.0.1 from 10.4.0.0&#x2F;16 proto ipv6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       IPSec is supported by using the &amp;#39;esp&amp;#39; (&amp;#39;50&amp;#39;) and &amp;#39;ah&amp;#39; (&amp;#39;51&amp;#39;) protocols. These protocols can&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       only be used with the full syntax. For example:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow to 10.0.0.1 proto esp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow to 10.0.0.1 from 10.4.0.0&#x2F;16 proto esp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow to 10.0.0.1 proto ah&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;         ufw allow to 10.0.0.1 from 10.4.0.0&#x2F;16 proto ah&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       In addition to the command-line interface, ufw also provides a framework which  allows  ad‐&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ministrators  to  modify  default behavior as well as take full advantage of netfilter. See&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       the ufw-framework manual page for more information.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SEE ALSO&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw-framework(8),  iptables(8),  ip6tables(8),  iptables-restore(8),  ip6tables-restore(8),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       sysctl(8), sysctl.conf(5)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;AUTHOR&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;       ufw is Copyright 2008-2021, Canonical Ltd.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;September 2021                                                                             UFW:(8)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;details&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Are we yet</title>
        <published>2023-11-22T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/areweyet/"/>
        <id>https://dev.chester.wykies.com/rust/areweyet/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/areweyet/">&lt;p&gt;There are several “Are we x yet?” websites for rust. Mozilla has a &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;wiki.mozilla.org&#x2F;Areweyet&quot;&gt;compilation of “areweyet”&lt;&#x2F;a&gt; sites but it’s not only rust. This github repo called &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;UgurcanAkkok&#x2F;AreWeRustYet&quot;&gt;AreWeRustYet&lt;&#x2F;a&gt; appears to be rust focused and has summaries not sure of how updated it is, but still found it faster to find the one I was looking for there.&lt;&#x2F;p&gt;
&lt;p&gt;I’m personally interested in the following:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;aerorust.org&#x2F;catalogue&#x2F;&quot;&gt;Aerospace&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;areweguiyet.com&#x2F;&quot;&gt;GUI&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.arewelearningyet.com&#x2F;&quot;&gt;Machine Learning&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Thoughts about rust</title>
        <published>2023-11-17T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/thoughts/"/>
        <id>https://dev.chester.wykies.com/rust/thoughts/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/thoughts/">&lt;h1 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I kept having thoughts &#x2F; observations that I wanted to write somewhere so putting them here.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;rust-isn-t-actually-hard&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#rust-isn-t-actually-hard&quot; aria-label=&quot;Anchor link for: rust-isn-t-actually-hard&quot;&gt;Rust isn’t actually hard&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Rust isn’t actually hard, giving up bad habits is hard.
I actually think if your first programming language is rust then it’s easier to pick up and become productive.
Happy to get some counter examples, if you have some please do create an issue on github and let me know. (Link below).&lt;&#x2F;p&gt;
&lt;h1 id=&quot;tooling-really-matters&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tooling-really-matters&quot; aria-label=&quot;Anchor link for: tooling-really-matters&quot;&gt;Tooling really matters&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;When I started with rust I was pleased with the tooling and that hasn’t changed but I acknowledge that it matters to how much I enjoy using the language.
The right IDE and other supporting tools drastically changes the experience one has with a language.
Don’t underestimate the value of a good editor, compiler, linter or formatter.
I personally do not like formatting code by hand seems like a waste of time and code completion is table stakes.
If it is context aware that’s all the better (but feels like table stakes, don’t think I can go back to manually narrowing down results).&lt;&#x2F;p&gt;
&lt;h1 id=&quot;types&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#types&quot; aria-label=&quot;Anchor link for: types&quot;&gt;Types&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Trying to write python today I realized why I like types in rust.
Types allow me specify my assumptions at compile time.
And get the compiler to check them for me.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;prototyping&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#prototyping&quot; aria-label=&quot;Anchor link for: prototyping&quot;&gt;Prototyping&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I’m not slower in rust than I am in other languages.
I can just unwrap and clone everywhere and go as fast as I want.
Then later it’s recorded where I need to go back and fix if the project does go forward.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;a-thousand-french-men-can-t-be-wrong&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#a-thousand-french-men-can-t-be-wrong&quot; aria-label=&quot;Anchor link for: a-thousand-french-men-can-t-be-wrong&quot;&gt;A thousand french men can’t be wrong&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Yes, yes they can.
Just because most people do something doesn’t make it right.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;no-network-access&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#no-network-access&quot; aria-label=&quot;Anchor link for: no-network-access&quot;&gt;No network access&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;If you don’t have network access rust still makes it easy to work on a program that uses network like a discord bot because testing is just a confirmation.
If it compiles a lot of the time it does what you wanted as well.
This works for more than just network code but requires minimizing panics and making impossible states unrepresentable so the compiler can check if the code is correct.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;unexpected-dangers-in-using-rust&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#unexpected-dangers-in-using-rust&quot; aria-label=&quot;Anchor link for: unexpected-dangers-in-using-rust&quot;&gt;Unexpected dangers in using rust&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I’d been programming for more than a decade before I started rust and I’ve realized an unexpected problem with starting rust is that it makes it harder to update old projects.
My ability to write python for example didn’t really atrophy but I find myself wanting easier ways to refactor for example and without much effort knowing I got all places that needed to be updated.
And being able to work “locally” with the types providing protection I can reason about a function without needing to see all call sites.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;takeaway&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#takeaway&quot; aria-label=&quot;Anchor link for: takeaway&quot;&gt;Takeaway&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;When starting a project I don’t always know how long a project will live and even if it’s a prototype it might be better to write it in rust.
I can usually do it almost as quickly, enjoy doing it more and later if it lives longer than expected I can more easily make changes.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Remote Desktop Protocol (RDP)</title>
        <published>2023-11-15T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/rdp/"/>
        <id>https://dev.chester.wykies.com/misc/rdp/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/rdp/">&lt;h1 id=&quot;crashing-shortly-after-connecting&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#crashing-shortly-after-connecting&quot; aria-label=&quot;Anchor link for: crashing-shortly-after-connecting&quot;&gt;Crashing shortly after connecting&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;discord.com&#x2F;channels&#x2F;720482228072874056&#x2F;720482228538179584&#x2F;1167810291317362738&quot;&gt;https:&#x2F;&#x2F;discord.com&#x2F;channels&#x2F;720482228072874056&#x2F;720482228538179584&#x2F;1167810291317362738&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Problem description&lt;&#x2F;strong&gt;: Connecting via remote desktop on windows would connect fine but shortly (only a few seconds) after connecting the connection would just close without error message.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Solution&lt;&#x2F;strong&gt;: Do not include printers when connecting.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Possible explanation&lt;&#x2F;strong&gt;: Something goes wrong when installing the printer in the RDP session and causes it to crash.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Links</title>
        <published>2023-11-09T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/links/"/>
        <id>https://dev.chester.wykies.com/misc/links/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/links/">&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.star.nesdis.noaa.gov&#x2F;GOES&#x2F;index.php&quot;&gt;NOAA GEOS Image Viewer&lt;&#x2F;a&gt; - Useful for tracking inclement weather (National Oceanic and Atmospheric Administration - Geostationary Operational Environmental Satellites).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>YouTube Reference Videos</title>
        <published>2023-11-09T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/youtube-ref-videos/"/>
        <id>https://dev.chester.wykies.com/misc/youtube-ref-videos/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/youtube-ref-videos/">&lt;h1 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I used to keep them in a playlist on youtube but that’s harder to maintain and I can’t add explanations of why I keep the video around.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;general-interest&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#general-interest&quot; aria-label=&quot;Anchor link for: general-interest&quot;&gt;General Interest&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;youtube.com&#x2F;shorts&#x2F;MjcLeWcoVgo?si=W_qU0wDr5x_6T_O8&quot;&gt;Magic Number&lt;&#x2F;a&gt; - spoiler… It’s 1089
&lt;ul&gt;
&lt;li&gt;Take any 3 digit number and subtract the reverse&lt;&#x2F;li&gt;
&lt;li&gt;Ignore any negative sign (use absolute value of answer)&lt;&#x2F;li&gt;
&lt;li&gt;Add the reverse of the number and you get…&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;rust&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#rust&quot; aria-label=&quot;Anchor link for: rust&quot;&gt;Rust&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=z-0-bbc80JM&quot;&gt;Rust Data Modelling WITHOUT CLASSES&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;I really appreciated the state machine example along with the fact that it so succinctly explains why I prefer rust enums over inheritance&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;to-be-updated&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#to-be-updated&quot; aria-label=&quot;Anchor link for: to-be-updated&quot;&gt;To be updated&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I’ll add the rest some other time (if you’re interested before I add them create an issue on github, see link below’).&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Hotkeys</title>
        <published>2023-11-09T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/vscode/hotkeys/"/>
        <id>https://dev.chester.wykies.com/vscode/hotkeys/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/vscode/hotkeys/">&lt;p&gt;Compilation of hotkeys I use and those I rarely use but really want and then have a hard time finding.
Might hide the frequency column in the future but kept to make them easy to sort.&lt;&#x2F;p&gt;
&lt;p&gt;Reference link: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;code.visualstudio.com&#x2F;docs&#x2F;getstarted&#x2F;keybindings&quot;&gt;https:&#x2F;&#x2F;code.visualstudio.com&#x2F;docs&#x2F;getstarted&#x2F;keybindings&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Freq&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Key Combination&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Description&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;High&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Ctrl+Shift+P&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Command Palette&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Med&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Ctrl+Shift+T&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Reopen Tab&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Formatting</title>
        <published>2023-11-06T00:00:00+00:00</published>
        <updated>2025-09-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/formatting/"/>
        <id>https://dev.chester.wykies.com/git/formatting/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/formatting/">&lt;h1 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;pretty-formats&#x2F;2.49.0#Documentation&#x2F;pretty-formats.txt-emnem&quot;&gt;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;pretty-formats&#x2F;2.49.0#Documentation&#x2F;pretty-formats.txt-emnem&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Used to control output for commands like &lt;code&gt;log&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;example&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example&quot; aria-label=&quot;Anchor link for: example&quot;&gt;Example&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;For example to see the last committed date of a file use the following. The &lt;code&gt;-1&lt;&#x2F;code&gt; means return only the most recent.&lt;br &#x2F;&gt;
NB: Your current directory should be within the repo. Command originally found on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;8611486&#x2F;how-to-get-the-last-commit-date-for-a-bunch-of-files-in-git&quot;&gt;SO&lt;&#x2F;a&gt; but link to formatting options was broken so hence this page.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; log&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -1 --format=%cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; filename.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;excerpt-from-placeholder-options&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#excerpt-from-placeholder-options&quot; aria-label=&quot;Anchor link for: excerpt-from-placeholder-options&quot;&gt;Excerpt from placeholder options&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;placeholder&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Description&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%n&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;newline&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%%&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;a raw %&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%H&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;commit hash&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%h&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;abbreviated commit hash&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%an&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;author name&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%cn&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;committer name&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%s&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;subject&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%b&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;body&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%cd&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;committer date (format respects –date= option)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%cD&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;committer date, RFC2822 style&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%cr&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;committer date, relative&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%ct&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;committer date, UNIX timestamp&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%ci&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;committer date, ISO 8601-like format&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%cI&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;committer date, strict ISO 8601 format&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%cs&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;committer date, short format (YYYY-MM-DD)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%ch&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;committer date, human style (like the –date=human option of git-rev-list[1])&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>SSH</title>
        <published>2023-11-06T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/github/ssh/"/>
        <id>https://dev.chester.wykies.com/github/ssh/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/github/ssh/">&lt;h1 id=&quot;creating-ssh-key-linux&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-ssh-key-linux&quot; aria-label=&quot;Anchor link for: creating-ssh-key-linux&quot;&gt;Creating SSH Key (Linux)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;authentication&#x2F;connecting-to-github-with-ssh&quot;&gt;https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;authentication&#x2F;connecting-to-github-with-ssh&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Open a terminal&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;ssh-keygen -t ed25519 -C &quot;&quot;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Save to the default location&lt;&#x2F;li&gt;
&lt;li&gt;Enter and confirm a suitable passphrase&lt;&#x2F;li&gt;
&lt;li&gt;Go to &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;settings&#x2F;ssh&#x2F;new&quot;&gt;GitHub new SSH key page&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Title&lt;&#x2F;code&gt; is not important it’s more like a note to remember where they key is used. So you could use for example
the last octet of the server’s IP.&lt;&#x2F;li&gt;
&lt;li&gt;Leave &lt;code&gt;Key type&lt;&#x2F;code&gt; on &lt;code&gt;Authentication Key&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;For &lt;code&gt;Key&lt;&#x2F;code&gt; copy the value from the public key you just generated
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cat ~&#x2F;.ssh&#x2F;id_ed25519.pub&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Copy the line that is output into the text box on GitHub&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Click &lt;code&gt;Add SSH Key&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>PHP</title>
        <published>2023-11-06T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/php/"/>
        <id>https://dev.chester.wykies.com/misc/php/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/php/">&lt;h1 id=&quot;check-current&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-current&quot; aria-label=&quot;Anchor link for: check-current&quot;&gt;Check current&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;php&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --version&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;install-current-version&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-current-version&quot; aria-label=&quot;Anchor link for: install-current-version&quot;&gt;Install current version&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;See &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;apache&#x2F;installation&#x2F;&quot;&gt;apache&lt;&#x2F;a&gt; install instructions to see how to install the current version that is in the
default repos.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;install-multiple-versions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-multiple-versions&quot; aria-label=&quot;Anchor link for: install-multiple-versions&quot;&gt;Install multiple versions&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=bHTv0FmvrTo&quot;&gt;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=bHTv0FmvrTo&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Before doing this process it is assumed that apache and the &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;php&#x2F;#install-current-version&quot;&gt;current version&lt;&#x2F;a&gt; of php is
already installed.&lt;&#x2F;li&gt;
&lt;li&gt;This approach only allows you to use one version at a time on the system.&lt;&#x2F;li&gt;
&lt;li&gt;Tested on Ubuntu 22.04&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;install-dependency&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-dependency&quot; aria-label=&quot;Anchor link for: install-dependency&quot;&gt;Install dependency&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;NB: Normally already installed&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install software-properties-common&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;add-ppa-for-other-versions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-ppa-for-other-versions&quot; aria-label=&quot;Anchor link for: add-ppa-for-other-versions&quot;&gt;Add ppa for other versions&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Previous step needed to ensure this command is available.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; add-apt-repository ppa:ondrej&#x2F;php&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;install-desired-version&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-desired-version&quot; aria-label=&quot;Anchor link for: install-desired-version&quot;&gt;Install desired version&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Replace 7.3 in the example with the version you are looking for&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install php7.3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;select-versions-of-php-that-are-installed-and-available&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#select-versions-of-php-that-are-installed-and-available&quot; aria-label=&quot;Anchor link for: select-versions-of-php-that-are-installed-and-available&quot;&gt;Select versions of PHP that are installed and available&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;for-apache&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#for-apache&quot; aria-label=&quot;Anchor link for: for-apache&quot;&gt;For Apache&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;serverfault.com&#x2F;questions&#x2F;149039&#x2F;how-to-change-what-version-of-php-apache2-uses&quot;&gt;https:&#x2F;&#x2F;serverfault.com&#x2F;questions&#x2F;149039&#x2F;how-to-change-what-version-of-php-apache2-uses&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Example commands switch from 8.1 to 7.3&lt;&#x2F;p&gt;
&lt;p&gt;NB: Use of &lt;code&gt;tab&lt;&#x2F;code&gt; to autocomplete commands works and helped in ensuring I got the version numbers right.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;disable-current-module&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#disable-current-module&quot; aria-label=&quot;Anchor link for: disable-current-module&quot;&gt;Disable current module&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; a2dismod php8.1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;enable-replacement-version&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#enable-replacement-version&quot; aria-label=&quot;Anchor link for: enable-replacement-version&quot;&gt;Enable replacement version&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; a2enmod php7.3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;install-mysql-module-for-php&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-mysql-module-for-php&quot; aria-label=&quot;Anchor link for: install-mysql-module-for-php&quot;&gt;Install MySQL Module for PHP&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;zoomadmin.com&#x2F;HowToInstall&#x2F;UbuntuPackage&#x2F;php-mysqli&quot;&gt;https:&#x2F;&#x2F;zoomadmin.com&#x2F;HowToInstall&#x2F;UbuntuPackage&#x2F;php-mysqli&lt;&#x2F;a&gt; (Link seems to be broken now)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install php7.3-mysql&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;restart-apache&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#restart-apache&quot; aria-label=&quot;Anchor link for: restart-apache&quot;&gt;Restart Apache&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;See instructions on restarting apache &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;apache&#x2F;installation&#x2F;#restart-server&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;for-cli&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#for-cli&quot; aria-label=&quot;Anchor link for: for-cli&quot;&gt;For CLI&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Will open a menu showing which are installed, and which one is active.&lt;&#x2F;p&gt;
&lt;p&gt;NB: &lt;code&gt;sudo&lt;&#x2F;code&gt; not needed to only view the list and see which is active.
&lt;code&gt;sudo&lt;&#x2F;code&gt; is only needed if you want to change the selection.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; update-alternatives&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; php&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Working with collections of bytes</title>
        <published>2023-11-06T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/byte-collections/"/>
        <id>https://dev.chester.wykies.com/rust/byte-collections/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/byte-collections/">&lt;h1 id=&quot;converting-to-string&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#converting-to-string&quot; aria-label=&quot;Anchor link for: converting-to-string&quot;&gt;Converting to String&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Some types use byte arrays instead of strings and you may want to convert them to strings based on your use case.
For example std::process::Output&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;process&#x2F;struct.Output.html&quot;&gt;Output&lt;&#x2F;a&gt; uses by &lt;code&gt;Vec&amp;lt;u8&amp;gt;&lt;&#x2F;code&gt; to store both &lt;code&gt;stdout&lt;&#x2F;code&gt; and &lt;code&gt;stderr&lt;&#x2F;code&gt;.
Use the following to convert them to strings.&lt;&#x2F;p&gt;
&lt;p&gt;Note that if you only want to print them to stdout it isn’t required to convert them as also shown in the example from &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;process&#x2F;struct.Command.html#method.output&quot;&gt;std&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;process&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Command&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Write&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; output&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&#x2F;bin&#x2F;cat&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;                     .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;arg&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;file.txt&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;                     .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;output&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;                     .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;failed to execute process&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;status: {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, output&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;status);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;stdout&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;write_all&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;output&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;stdout)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;stderr&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;write_all&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;output&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;stderr)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;assert!&lt;&#x2F;span&gt;&lt;span&gt;(output&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;status&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;success&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; = &amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;output&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;stdout;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;match&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;str&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from_utf8&lt;&#x2F;span&gt;&lt;span&gt;(data) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(s)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{s}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Err&lt;&#x2F;span&gt;&lt;span&gt;(e)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{e:?} - {data:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Codespaces</title>
        <published>2023-11-05T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/github/codespaces/"/>
        <id>https://dev.chester.wykies.com/github/codespaces/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/github/codespaces/">&lt;h1 id=&quot;setup-from-default-for-rust&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setup-from-default-for-rust&quot; aria-label=&quot;Anchor link for: setup-from-default-for-rust&quot;&gt;Setup from default for Rust&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;These are my custom setups if you just want rust only see the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.rust-lang.org&#x2F;tools&#x2F;install&quot;&gt;rust website&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Feel free to download the scripts to review to decide if you want to use them. They are pretty simple.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;install-rust-only&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-rust-only&quot; aria-label=&quot;Anchor link for: install-rust-only&quot;&gt;Install Rust only&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;github&#x2F;codespaces&#x2F;scripts&#x2F;setup_rust_only.sh&quot;&gt;Download Script&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --proto&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;=https&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --tlsv1.2 -sSf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;github&#x2F;codespaces&#x2F;scripts&#x2F;setup_rust_only.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;install-rust-with-trunk-usually-only-needed-if-your-developing-for-the-web&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-rust-with-trunk-usually-only-needed-if-your-developing-for-the-web&quot; aria-label=&quot;Anchor link for: install-rust-with-trunk-usually-only-needed-if-your-developing-for-the-web&quot;&gt;Install Rust with Trunk (Usually only needed if your developing for the web)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;WARNING:&lt;&#x2F;strong&gt; I’m aware of errors when using this version of the script but haven’t had the time to resolve them, for now I recommend using the rust only script and installing trunk separately&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;github&#x2F;codespaces&#x2F;scripts&#x2F;setup_with_trunk.sh&quot;&gt;Download Script&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --proto&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;=https&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --tlsv1.2 -sSf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;github&#x2F;codespaces&#x2F;scripts&#x2F;setup_with_trunk.sh&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;loading-rust-into-your-environment&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#loading-rust-into-your-environment&quot; aria-label=&quot;Anchor link for: loading-rust-into-your-environment&quot;&gt;Loading rust into your environment&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;At this point you’ll need to either restart you terminal or run one of the following commands recommended but the rust install script (note the leading DOT):&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&#x2F;.cargo&#x2F;env&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;            # For sh&#x2F;bash&#x2F;zsh&#x2F;ash&#x2F;dash&#x2F;pdksh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;source&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;$HOME&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&#x2F;.cargo&#x2F;env.fish&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;  # For fish&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;use-devcontainer&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#use-devcontainer&quot; aria-label=&quot;Anchor link for: use-devcontainer&quot;&gt;Use devcontainer&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I found &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;containers.dev&#x2F;guide&#x2F;dockerfile&quot;&gt;this post&lt;&#x2F;a&gt; helpful to get an idea of the options available.&lt;&#x2F;p&gt;
&lt;p&gt;I also found a repo microsoft with pre-configured dev containers &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;devcontainers&#x2F;images&#x2F;tree&#x2F;main&#x2F;src&#x2F;rust&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;devcontainers&#x2F;images&#x2F;tree&#x2F;main&#x2F;src&#x2F;rust&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Seems to work by copying all the files from &lt;code&gt;.devcontainer&lt;&#x2F;code&gt; into the root of your repo and then when a codespace is request to be created it uses those files.
It takes a lot longer with not much visual feedback but seems to have worked.
Would need to be customized to also install trunk when needed.
For now I will just work with my script as I have more control over it and I can see the progress as it goes.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;pricing&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#pricing&quot; aria-label=&quot;Anchor link for: pricing&quot;&gt;Pricing&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;By default you cannot perform actions that would result in billing according the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;codespaces&#x2F;overview#billing-for-codespaces&quot;&gt;GitHub Docs&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Go to &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;settings&#x2F;billing&#x2F;summary&quot;&gt;settings&lt;&#x2F;a&gt; to see your usage.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;see-list-of-your-code-spaces&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-list-of-your-code-spaces&quot; aria-label=&quot;Anchor link for: see-list-of-your-code-spaces&quot;&gt;See list of your code spaces&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;codespaces&#x2F;&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;codespaces&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Testing</title>
        <published>2023-11-05T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/testing/"/>
        <id>https://dev.chester.wykies.com/rust/testing/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/testing/">&lt;h1 id=&quot;frequently-used-links-and-commands&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#frequently-used-links-and-commands&quot; aria-label=&quot;Anchor link for: frequently-used-links-and-commands&quot;&gt;Frequently used links and commands&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Mostly self explanatory except that running test in release mode can increase limits for things like &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;testing&#x2F;rust&#x2F;stack_overflow.md#drop_can_cause_stack_overflow&quot;&gt;stack overflow&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;For more information about these commands see &lt;code&gt;cargo test -- --help&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; test&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -- --nocapture&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; test&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -- --show-output&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; # Seems to also show output that is not tied to a specific test (so needed sometimes)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; test&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -- --ignored&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; test&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -r&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; add&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --dev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; rstest&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; add&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --dev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; strum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -F&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; derive,strum_macros&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Readme for &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;la10736&#x2F;rstest&quot;&gt;rstest&lt;&#x2F;a&gt; - To see examples of how to use it. (Not extracting the ones I use because each time I go back I find more I want to use). Documented how to do names because I keep looking it up, the name in the example is &lt;code&gt;authorized_user&lt;&#x2F;code&gt; (For more context search their docs that’s where it is taken from).&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[case&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;authorized_user(alice())]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;docs.rs for &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;strum&#x2F;latest&#x2F;strum&#x2F;all.html&quot;&gt;strum&lt;&#x2F;a&gt; - To see list of things that can be done with enums by this crate&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;shared-module-for-integration-tests&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#shared-module-for-integration-tests&quot; aria-label=&quot;Anchor link for: shared-module-for-integration-tests&quot;&gt;Shared module for integration tests&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book&#x2F;ch11-03-test-organization.html#submodules-in-integration-tests&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book&#x2F;ch11-03-test-organization.html#submodules-in-integration-tests&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Do &lt;code&gt;tests&#x2F;common&#x2F;mod.rs&lt;&#x2F;code&gt; and not &lt;code&gt;tests&#x2F;common.rs&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;Click for details!&lt;&#x2F;summary&gt;
&lt;p&gt;They mainly focus the extra 0 test cases that show in the output, and yes that’s annoying but what annoyed me more was the warnings that functions are not used as each file is compiled separately.
So if warnings bother you too then you probably want to ensure you ensure you put it in &lt;code&gt;mod.rs&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;h1 id=&quot;testing-cli-applications-by-running-them&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#testing-cli-applications-by-running-them&quot; aria-label=&quot;Anchor link for: testing-cli-applications-by-running-them&quot;&gt;Testing CLI applications by running them&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-cli.github.io&#x2F;book&#x2F;tutorial&#x2F;testing.html#testing-cli-applications-by-running-them&quot;&gt;https:&#x2F;&#x2F;rust-cli.github.io&#x2F;book&#x2F;tutorial&#x2F;testing.html#testing-cli-applications-by-running-them&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Don’t have more detailed notes other than the link because I decided to not actually run the program but just test the lib instead as the compiler will guide me to where updates need to happen instead of needing to run the test to see where updates are needed.
But saving the link because I’ve looked it up quite a few times.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Pattern Builder</title>
        <published>2023-11-03T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/pattern-builder/"/>
        <id>https://dev.chester.wykies.com/rust/pattern-builder/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/pattern-builder/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-unofficial.github.io&#x2F;patterns&#x2F;patterns&#x2F;creational&#x2F;builder.html&quot;&gt;https:&#x2F;&#x2F;rust-unofficial.github.io&#x2F;patterns&#x2F;patterns&#x2F;creational&#x2F;builder.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;My use case went away so didn’t bother generate a snippet like I planned but kept the link so it’s easier to find if this comes up again.
Decided to let them create an object with default values and then change the fields as it suits them.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Merge Conflict</title>
        <published>2023-11-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/merge-conflict/"/>
        <id>https://dev.chester.wykies.com/git/merge-conflict/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/merge-conflict/">&lt;h1 id=&quot;accept-their-ours&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#accept-their-ours&quot; aria-label=&quot;Anchor link for: accept-their-ours&quot;&gt;Accept their&#x2F;ours&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;914939&#x2F;simple-tool-to-accept-theirs-or-accept-mine-on-a-whole-file-using-git&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;914939&#x2F;simple-tool-to-accept-theirs-or-accept-mine-on-a-whole-file-using-git&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;For conflicts it’s generally best to look at each and make a decision.
If you are a priori sure which one you want, here are the commands to do it without opening the file to see.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Warning!&lt;&#x2F;strong&gt;: If you are rebasing &lt;code&gt;--ours&lt;&#x2F;code&gt; and &lt;code&gt;--theirs&lt;&#x2F;code&gt; are swapped.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;take-ours&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#take-ours&quot; aria-label=&quot;Anchor link for: take-ours&quot;&gt;Take ours&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; checkout HEAD&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;filenam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;take-theirs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#take-theirs&quot; aria-label=&quot;Anchor link for: take-theirs&quot;&gt;Take theirs&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; checkout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --theirs --&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;filenam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Create New Crate</title>
        <published>2023-11-02T00:00:00+00:00</published>
        <updated>2026-04-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/create-new-crate/"/>
        <id>https://dev.chester.wykies.com/rust/create-new-crate/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/create-new-crate/">&lt;p&gt;Patterned on: &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;git&#x2F;new-repo&#x2F;&quot;&gt;New Repo Creation&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;notes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#notes&quot; aria-label=&quot;Anchor link for: notes&quot;&gt;Notes&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;These instructions assume github with ssh key auth but any would be similar&lt;&#x2F;li&gt;
&lt;li&gt;If creating a egui application see &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;create-new-egui-project&#x2F;&quot;&gt;Create New egui Project&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;instructions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#instructions&quot; aria-label=&quot;Anchor link for: instructions&quot;&gt;Instructions&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create empty repo in cloud&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Create folder on local machine with same name (same name is recommended not required)&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Open a command prompt in the folder and initialize the crate&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; init&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --lib&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Make initial commit&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Add remote repo connection (Can be copied from github)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; remote add origin git@github.com:wykies&#x2F;REPO_NAME.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Push branch to remote (Can be done from vscode UI) and set current branch as a tracking branch (-u sets current brach to tracking)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; push&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -u&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; origin main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Copy in and link to template (for updates). To see more explanation of these steps see &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;ci&#x2F;&quot;&gt;CI instructions&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; remote add template git@github.com:c-git&#x2F;rust-crate-template.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; fetch template&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; merge&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --allow-unrelated&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; template&#x2F;main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Resolve merge conflict&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; checkout template&#x2F;main&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; .gitignore&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; checkout template&#x2F;main&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; Cargo.toml&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; checkout template&#x2F;main&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; src&#x2F;lib.rs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Restore crate name (was lost during merge).&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Add &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;ci&#x2F;&quot;&gt;CI&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Documentation</title>
        <published>2023-11-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/documentation/"/>
        <id>https://dev.chester.wykies.com/rust/documentation/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/documentation/">&lt;h1 id=&quot;include-readme-md-in-rustdoc&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#include-readme-md-in-rustdoc&quot; aria-label=&quot;Anchor link for: include-readme-md-in-rustdoc&quot;&gt;Include Readme.md in rustdoc&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Instead of repeating what is in &lt;code&gt;README.md&lt;&#x2F;code&gt; in the rust doc.
Use this at the top of &lt;code&gt;lib.rs&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#![doc &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt; include_str&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;..&#x2F;README.md&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;document-optional-features&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#document-optional-features&quot; aria-label=&quot;Anchor link for: document-optional-features&quot;&gt;Document optional features&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;users.rust-lang.org&#x2F;t&#x2F;how-to-document-optional-features-in-api-docs&#x2F;64577&#x2F;2&quot;&gt;https:&#x2F;&#x2F;users.rust-lang.org&#x2F;t&#x2F;how-to-document-optional-features-in-api-docs&#x2F;64577&#x2F;2&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Add this to the top of &lt;code&gt;lib.rs&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#![cfg_attr(docsrs, feature(doc_cfg))]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>JSON</title>
        <published>2023-11-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/json/"/>
        <id>https://dev.chester.wykies.com/rust/json/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/json/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;hachyderm.io&#x2F;@predrag&#x2F;111336085323364834&quot;&gt;https:&#x2F;&#x2F;hachyderm.io&#x2F;@predrag&#x2F;111336085323364834&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;NB: Not tested yet.&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;If you have &lt;code&gt;json&lt;&#x2F;code&gt; that you want to generate serde definitions for then you can just copy the code into your editor and ask Rust Analyzer to generate it for you.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Site Definitions</title>
        <published>2023-10-29T00:00:00+00:00</published>
        <updated>2025-04-25T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/site-definitions/"/>
        <id>https://dev.chester.wykies.com/site-definitions/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/site-definitions/">&lt;h1 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Explains some words and what they mean on a site wide basis.
It mostly explains meta data and what it means, not necessarily related to the content of the pages.
This is meant to improve consistency so I can see what I meant the last time I used the word.
I think looking at a few examples from below should make the intention clear.
For example &lt;code&gt;Published&lt;&#x2F;code&gt; does not mean published in all possible contexts that it is used on this site but rather what the published date refers to.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;words&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#words&quot; aria-label=&quot;Anchor link for: words&quot;&gt;Words&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;published&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#published&quot; aria-label=&quot;Anchor link for: published&quot;&gt;Published&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Taken from &lt;code&gt;date&lt;&#x2F;code&gt; in the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;documentation&#x2F;content&#x2F;page&#x2F;#front-matter&quot;&gt;page front matter&lt;&#x2F;a&gt;.
This is the date the article was first published or last modified if it was from before the articles were made public.
See &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;documentation-update&#x2F;#must-include-a-date&quot;&gt;modification instructions&lt;&#x2F;a&gt; for more details on updating.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;updated&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#updated&quot; aria-label=&quot;Anchor link for: updated&quot;&gt;Updated&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Taken from &lt;code&gt;updated&lt;&#x2F;code&gt; in the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;documentation&#x2F;content&#x2F;page&#x2F;#front-matter&quot;&gt;page front matter&lt;&#x2F;a&gt;.
This is the date the article was last modified. Note: This doesn’t mean the entire article was updated nor retested.
It may be a trivial change but this date only reflects that it was changed.
You can think of it as a modified date for the page.
To see what actually change you’d need to check the git history.
If you have difficulty finding the information feel free to create an issue on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;c-git.github.io&#x2F;issues&quot;&gt;github&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>feed</title>
        <published>2023-10-28T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/feed/"/>
        <id>https://dev.chester.wykies.com/feed/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/feed/"></content>
        
    </entry>
    <entry xml:lang="en">
        <title>Branches</title>
        <published>2023-10-28T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/branches/"/>
        <id>https://dev.chester.wykies.com/git/branches/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/branches/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.nobledesktop.com&#x2F;learn&#x2F;git&#x2F;git-branches&quot;&gt;https:&#x2F;&#x2F;www.nobledesktop.com&#x2F;learn&#x2F;git&#x2F;git-branches&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;see-branches&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-branches&quot; aria-label=&quot;Anchor link for: see-branches&quot;&gt;See branches&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;NB: The current branch will have a &lt;code&gt;*&lt;&#x2F;code&gt; next to it.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;both-local-and-remote&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#both-local-and-remote&quot; aria-label=&quot;Anchor link for: both-local-and-remote&quot;&gt;Both local and remote&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; branch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;remote-only&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#remote-only&quot; aria-label=&quot;Anchor link for: remote-only&quot;&gt;Remote only&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; branch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -r&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;local-only&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#local-only&quot; aria-label=&quot;Anchor link for: local-only&quot;&gt;Local only&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; branch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;checkout-a-branch&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#checkout-a-branch&quot; aria-label=&quot;Anchor link for: checkout-a-branch&quot;&gt;Checkout a branch&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Use &lt;code&gt;git switch&lt;&#x2F;code&gt; or &lt;code&gt;git checkout&lt;&#x2F;code&gt; followed by the branch name.
Prefer &lt;code&gt;switch&lt;&#x2F;code&gt; as &lt;code&gt;checkout&lt;&#x2F;code&gt; has other functionality that it can do to restore files as per &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;57265785&#x2F;whats-the-difference-between-git-switch-and-git-checkout-branch&quot;&gt;SO&lt;&#x2F;a&gt; and &lt;code&gt;switch&lt;&#x2F;code&gt; was introduced to be used for changing branches.
Note do not include the &lt;code&gt;remote&#x2F;origin&lt;&#x2F;code&gt; in the command it will automatically create the local branch and set it up to track the remote branch.
Eg to check out develop use:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; switch develop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;create-a-branch&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-a-branch&quot; aria-label=&quot;Anchor link for: create-a-branch&quot;&gt;Create a branch&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.atlassian.com&#x2F;git&#x2F;tutorials&#x2F;using-branches&#x2F;git-checkout&quot;&gt;https:&#x2F;&#x2F;www.atlassian.com&#x2F;git&#x2F;tutorials&#x2F;using-branches&#x2F;git-checkout&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Create Only&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; branch new_branch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create and checkout&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; checkout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -b&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; new_branch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;delete-a-remote-tracking-branch-after-the-branch-has-been-deleted-on-the-remote&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#delete-a-remote-tracking-branch-after-the-branch-has-been-deleted-on-the-remote&quot; aria-label=&quot;Anchor link for: delete-a-remote-tracking-branch-after-the-branch-has-been-deleted-on-the-remote&quot;&gt;Delete a remote tracking branch after the branch has been deleted on the remote&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;r is for remote&lt;&#x2F;li&gt;
&lt;li&gt;d is for delete&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; branch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -rd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; origin&#x2F;TRACKING_BRANCH_NAME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Discord</title>
        <published>2023-10-27T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/discord/"/>
        <id>https://dev.chester.wykies.com/misc/discord/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/discord/">&lt;h1 id=&quot;timestamp-generator&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#timestamp-generator&quot; aria-label=&quot;Anchor link for: timestamp-generator&quot;&gt;Timestamp Generator&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;r.3v.fi&#x2F;discord-timestamps&#x2F;&quot;&gt;https:&#x2F;&#x2F;r.3v.fi&#x2F;discord-timestamps&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;style&gt;   
    .container {
        display: grid;
        grid-template-columns:1fr max-content;
        width: 50rem;
        margin: 0;
        border: 1px solid #ccc;
        padding: 1rem;
    }

    .container &gt; * {
        margin: 0.2rem;
    }

    #current {
        grid-column: span 2;
    }

    input, select, button {
        background: #383842;
        color: #fff;
        border: 1px solid #666;
    }

    #code {
        font-family: monospace
    }

    @media (max-width: 50rem) {
        div.container {
            display: flex;
            flex-direction: column;
            width: 90%
        }

        div.container &gt; * {
            margin: 1rem 0.2rem
        }
    }
&lt;&#x2F;style&gt;
&lt;div class=&quot;container&quot;&gt;
    &lt;p&gt;Get a dynamic date-time display in your Discord messages. Choose your time and copy the code below.&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;div class=&quot;container&quot;&gt;
    &lt;span&gt;Date&lt;&#x2F;span&gt;&lt;input type=&quot;date&quot; id=&quot;d&quot;&gt;
    &lt;span&gt;Time&lt;&#x2F;span&gt;&lt;input type=&quot;time&quot; id=&quot;hm&quot;&gt;
    &lt;span&gt;Type&lt;&#x2F;span&gt;
    &lt;select id=&quot;t&quot;&gt;
        &lt;option value=&quot;t&quot;&gt;short time&lt;&#x2F;option&gt;
        &lt;option value=&quot;T&quot;&gt;long time&lt;&#x2F;option&gt;
        &lt;option value=&quot;d&quot;&gt;short date&lt;&#x2F;option&gt;
        &lt;option value=&quot;D&quot;&gt;long date&lt;&#x2F;option&gt;
        &lt;option value=&quot;f&quot;&gt;long date with short time&lt;&#x2F;option&gt;
        &lt;option value=&quot;F&quot;&gt;long date with day of week and short time&lt;&#x2F;option&gt;
        &lt;option value=&quot;R&quot; selected&gt;relative&lt;&#x2F;option&gt;
    &lt;&#x2F;select&gt;
    &lt;span&gt;Output&lt;&#x2F;span&gt;&lt;span id=&quot;preview&quot;&gt;&lt;&#x2F;span&gt;
    &lt;input type=&quot;text&quot; readonly id=&quot;code&quot; title=&quot;Press Ctrl&#x2F;Cmd+C to copy&quot;&gt;
    &lt;button id=&quot;copy&quot;&gt;Copy to clipboard&lt;&#x2F;button&gt;
    &lt;button id=&quot;current&quot;&gt;Reset to current time&lt;&#x2F;button&gt;
&lt;&#x2F;div&gt;
&lt;script&gt;
    const dateInput = document.getElementById(&#x27;d&#x27;);
    const timeInput = document.getElementById(&#x27;hm&#x27;);
    const typeInput = document.getElementById(&#x27;t&#x27;);
    const output = document.getElementById(&#x27;code&#x27;);
    const copy = document.getElementById(&#x27;copy&#x27;);
    const current = document.getElementById(&#x27;current&#x27;);
    const preview = document.getElementById(&#x27;preview&#x27;);

    dateInput.onchange = updateOutput;
    timeInput.onchange = updateOutput;
    typeInput.onchange = updateOutput;
    output.onmouseover = function () {
        this.select();
    }
    copy.onclick = async () =&gt; {
        updateOutput();
        try {
            await navigator.clipboard.writeText(output.value);
            alert(&quot;Successfully copied&quot;);
        } catch (e) {
            alert(e);
        }
    }

    const onload = _ =&gt; {
        const now = new Date();
        dateInput.value = `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, &#x27;0&#x27;)}-${now.getDate().toString().padStart(2, &#x27;0&#x27;)}`;
        timeInput.value = `${now.getHours().toString().padStart(2, &#x27;0&#x27;)}:${now.getMinutes().toString().padStart(2, &#x27;0&#x27;)}`;
        updateOutput();
    }
    window.onload = onload;
    current.onclick = onload;

    const typeFormats = {
        &#x27;t&#x27;: {timeStyle: &#x27;short&#x27;},
        &#x27;T&#x27;: {timeStyle: &#x27;medium&#x27;},
        &#x27;d&#x27;: {dateStyle: &#x27;short&#x27;},
        &#x27;D&#x27;: {dateStyle: &#x27;long&#x27;},
        &#x27;f&#x27;: {dateStyle: &#x27;long&#x27;, timeStyle: &#x27;short&#x27;},
        &#x27;F&#x27;: {dateStyle: &#x27;full&#x27;, timeStyle: &#x27;short&#x27;},
        &#x27;R&#x27;: {style: &#x27;long&#x27;, numeric: &#x27;auto&#x27;},
    };

    function automaticRelativeDifference(d) {
        const diff = -((new Date().getTime() - d.getTime()) &#x2F; 1000) | 0;
        const absDiff = Math.abs(diff);
        console.log(diff);
        if (absDiff &gt; 86400 * 30 * 10) {
            return {duration: Math.round(diff &#x2F; (86400 * 365)), unit: &#x27;years&#x27;};
        }
        if (absDiff &gt; 86400 * 25) {
            return {duration: Math.round(diff &#x2F; (86400 * 30)), unit: &#x27;months&#x27;};
        }
        if (absDiff &gt; 3600 * 21) {
            return {duration: Math.round(diff &#x2F; 86400), unit: &#x27;days&#x27;};
        }
        if (absDiff &gt; 60 * 44) {
            return {duration: Math.round(diff &#x2F; 3600), unit: &#x27;hours&#x27;};
        }
        if (absDiff &gt; 30) {
            return {duration: Math.round(diff &#x2F; 60), unit: &#x27;minutes&#x27;};
        }
        return {duration: diff, unit: &#x27;seconds&#x27;};
    }

    function updateOutput() {
        const selectedDate = new Date(dateInput.valueAsNumber + timeInput.valueAsNumber + new Date().getTimezoneOffset() * 60000);
        console.log(selectedDate);
        const ts = selectedDate.getTime().toString();
        output.value = `&lt;t:${ts.substr(0, ts.length - 3)}:${typeInput.value}&gt;`;

        if ([&#x27;R&#x27;].includes(typeInput.value)) {
            const formatter = new Intl.RelativeTimeFormat(navigator.language || &#x27;en&#x27;, typeFormats[typeInput.value] || {});
            const format = automaticRelativeDifference(selectedDate);
            preview.textContent = formatter.format(format.duration, format.unit);
        } else {
            const formatter = new Intl.DateTimeFormat(navigator.language || &#x27;en&#x27;, typeFormats[typeInput.value] || {});
            preview.textContent = formatter.format(selectedDate);
        }
    }
&lt;&#x2F;script&gt;
&lt;h1 id=&quot;message-formatting&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#message-formatting&quot; aria-label=&quot;Anchor link for: message-formatting&quot;&gt;Message Formatting&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;discord.com&#x2F;developers&#x2F;docs&#x2F;reference#message-formatting&quot;&gt;https:&#x2F;&#x2F;discord.com&#x2F;developers&#x2F;docs&#x2F;reference#message-formatting&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Type&lt;&#x2F;th&gt;&lt;th&gt;Structure&lt;&#x2F;th&gt;&lt;th&gt;Example&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;User&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;@USER_ID&amp;gt;&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;@80351110224678912&amp;gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Channel&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;#CHANNEL_ID&amp;gt;&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;#103735883630395392&amp;gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Role&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;@&amp;amp;ROLE_ID&amp;gt;&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;@&amp;amp;165511591545143296&amp;gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Slash Command **&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;&#x2F;NAME:COMMAND_ID&amp;gt;&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;&#x2F;airhorn:816437322781949972&amp;gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Standard Emoji&lt;&#x2F;td&gt;&lt;td&gt;Unicode Characters&lt;&#x2F;td&gt;&lt;td&gt;💯&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Custom Emoji&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;:NAME:ID&amp;gt;&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;:mmLol:216154654256398347&amp;gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Custom Emoji (Animated)&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;a:NAME:ID&amp;gt;&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;a:b1nzy:392938283556143104&amp;gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Unix Timestamp&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;t:TIMESTAMP&amp;gt;&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;t:1618953630&amp;gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Unix Timestamp (Styled)&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;t:TIMESTAMP:STYLE&amp;gt;&lt;&#x2F;td&gt;&lt;td&gt;&amp;lt;t:1618953630:d&amp;gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;** Subcommands and subcommand groups can also be mentioned by using respectively &amp;lt;&#x2F;NAME SUBCOMMAND:ID&amp;gt; and &amp;lt;&#x2F;NAME
SUBCOMMAND_GROUP SUBCOMMAND:ID&amp;gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;markdown&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#markdown&quot; aria-label=&quot;Anchor link for: markdown&quot;&gt;Markdown&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Same as regular markdown see &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;markdown&#x2F;#styles-supported-in-discord-messages&quot;&gt;Markdown&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Documentation Update</title>
        <published>2023-10-27T00:00:00+00:00</published>
        <updated>2025-12-03T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/documentation-update/"/>
        <id>https://dev.chester.wykies.com/misc/documentation-update/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/documentation-update/">&lt;h1 id=&quot;overview&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#overview&quot; aria-label=&quot;Anchor link for: overview&quot;&gt;Overview&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;If you are looking for instructions on starting from scratch instead see &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;site-setup&#x2F;&quot;&gt;my notes&lt;&#x2F;a&gt; (WIP) on that.&lt;&#x2F;p&gt;
&lt;p&gt;Top level folders under &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;c-git.github.io&#x2F;tree&#x2F;main&#x2F;content&quot;&gt;content&lt;&#x2F;a&gt; are sections and each has a
&lt;code&gt;_index.md&lt;&#x2F;code&gt; that specifies the configuration parameters for that section.
Then inside each folder you will find the pages for that section.
I also mirror the section names as tag names to work with the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;jieiku&#x2F;abridge&#x2F;&quot;&gt;theme&lt;&#x2F;a&gt; I currently use.&lt;&#x2F;p&gt;
&lt;details&gt;
  &lt;summary&gt;Historic information about how and why I set weights on sections&lt;&#x2F;summary&gt;
&lt;p&gt;To ensure that sections stay in alphabetical order we use manually set incrementing weights for each section.
Initially the gap between the weights of sections is 50 and as sections are added in between we place them centered between their neighbours to reduce the frequency of needing to reweight.
This allows us to keep them in alphabetical order even though sorting by title is not available for top level sections.
We are using &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;zola&#x2F;&quot;&gt;zola&lt;&#x2F;a&gt;, for more info on how it works see that page.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;h1 id=&quot;creating-a-section&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-a-section&quot; aria-label=&quot;Anchor link for: creating-a-section&quot;&gt;Creating a section&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;As stated in the &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;documentation-update&#x2F;#overview&quot;&gt;overview&lt;&#x2F;a&gt; each section has a &lt;code&gt;_index.md&lt;&#x2F;code&gt;.
We only change the first two lines in that file and the other two always stay the same.
Namely, we set:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;title&lt;&#x2F;code&gt; to an appropriate string and&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;weight&lt;&#x2F;code&gt; we set so that is halfway between the one &lt;strong&gt;before&lt;&#x2F;strong&gt; it and the one &lt;strong&gt;after&lt;&#x2F;strong&gt; it. (Not needed at present but continued as it would be more work to do if needed in the future)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;creating-a-page&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-a-page&quot; aria-label=&quot;Anchor link for: creating-a-page&quot;&gt;Creating a page&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;no-co-located-resources&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#no-co-located-resources&quot; aria-label=&quot;Anchor link for: no-co-located-resources&quot;&gt;No co-located resources&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Pages with no resources needed to be stored (co-location) in the same folder as them are simple and only require creating a file in the correct folder for the section with the name of page and the extension &lt;code&gt;.md&lt;&#x2F;code&gt;.
At the top of the file you need to add the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;documentation&#x2F;content&#x2F;page&#x2F;#front-matter&quot;&gt;front matter&lt;&#x2F;a&gt;.
We use the simple TOML version which starts with &lt;code&gt;+++&lt;&#x2F;code&gt; and ends the same way.
The only variable that we use is &lt;code&gt;title&lt;&#x2F;code&gt; and this must be set.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;with-co-located-resources&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#with-co-located-resources&quot; aria-label=&quot;Anchor link for: with-co-located-resources&quot;&gt;With co-located resources&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Pages that need to link to resources that must be stored in the same location require a folder to be created with the name of the page.
The content of the page is then specified in &lt;code&gt;index.md&lt;&#x2F;code&gt; inside of that folder.
All the related content can then be placed in that same folder.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;must-include-a-date&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#must-include-a-date&quot; aria-label=&quot;Anchor link for: must-include-a-date&quot;&gt;Must include a date&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;If you want to make use of &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;documentation&#x2F;templates&#x2F;feeds&#x2F;&quot;&gt;feed generation&lt;&#x2F;a&gt; then the pages need to have dates on them.
&lt;code&gt;date&lt;&#x2F;code&gt; corresponds to &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;site-definitions&#x2F;#published&quot;&gt;published&lt;&#x2F;a&gt; and must be set.
&lt;code&gt;updated&lt;&#x2F;code&gt; corresponds to &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;site-definitions&#x2F;#updated&quot;&gt;updated&lt;&#x2F;a&gt; and is optional.
The values need to be set in the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;documentation&#x2F;content&#x2F;page&#x2F;#front-matter&quot;&gt;front matter&lt;&#x2F;a&gt; of the page.
Each value is explained in the comments below.
Note that the comments are not required to be copied.
All pages created before starting the public website did not have a date and as such all have been set to the last edit date as a proxy.&lt;&#x2F;p&gt;
&lt;p&gt;To simplify setting dates I created a tool called &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;zola_chrono&quot;&gt;zola_chrono&lt;&#x2F;a&gt; that automates the updating of &lt;code&gt;date&lt;&#x2F;code&gt; and &lt;code&gt;updated&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# The date of the post.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# Two formats are allowed: YYYY-MM-DD (2012-10-02) and RFC3339 (2002-10-02T15:00:00Z).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# Do not wrap dates in quotes; the line below only indicates that there is no default date.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# If the section variable `sort_by` is set to `date`, then any page that lacks a `date`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# will not be rendered.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# Setting this overrides a date set in the filename.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;date =&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# The last updated date of the post, if different from the date.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# Same format as `date`.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;updated =&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;rules-for-setting-date-and-updated&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#rules-for-setting-date-and-updated&quot; aria-label=&quot;Anchor link for: rules-for-setting-date-and-updated&quot;&gt;Rules for setting &lt;code&gt;date&lt;&#x2F;code&gt; and &lt;code&gt;updated&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;The fields should be set according to the following rules:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;date&lt;&#x2F;code&gt; should be the original publish date (Must exist and be today or earlier).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;updated&lt;&#x2F;code&gt; should only be set if &lt;code&gt;date&lt;&#x2F;code&gt; is not equal to the last commit date, if it needs to be set it should match the last commit date.
Which may mean setting it to todays date if you are about to commit that file.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Turns out with just these two simple rules it creates at least 42 interesting cases to consider.
Many of them are edge cases but all had to be accounted for in &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;zola_chrono&quot;&gt;zola_chrono&lt;&#x2F;a&gt;.
As a result the most authoritative answer on what should happen in a given case is documented in &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;zola_chrono&#x2F;blob&#x2F;710e6e84fe1ba788dd0c29ea77084aadcec01f0f&#x2F;src&#x2F;processing&#x2F;file_data.rs#L458-L507&quot;&gt;the tests&lt;&#x2F;a&gt;.
If you’re already familiar with &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;rstest&#x2F;latest&#x2F;rstest&#x2F;attr.rstest.html&quot;&gt;rstest&lt;&#x2F;a&gt; you can skip the following comment, the tests show several cases with the inputs on the left and expected values on the right. To see what each column represents look at the function definition below the cases the correspond to the function arguments.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;using-zola-chrono&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-zola-chrono&quot; aria-label=&quot;Anchor link for: using-zola-chrono&quot;&gt;Using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;zola_chrono&quot;&gt;zola_chrono&lt;&#x2F;a&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;install&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install&quot; aria-label=&quot;Anchor link for: install&quot;&gt;Install&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install zola_chrono&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;setting-up-a-pre-push-hook&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setting-up-a-pre-push-hook&quot; aria-label=&quot;Anchor link for: setting-up-a-pre-push-hook&quot;&gt;Setting up a pre-push hook&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Each line does the following respectively&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Create the hook file&lt;&#x2F;li&gt;
&lt;li&gt;Move the file into the hooks folder (it should already exist if git is setup)&lt;&#x2F;li&gt;
&lt;li&gt;Make the file executable&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo -e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;#!&#x2F;bin&#x2F;sh\nzola_chrono --check content&#x2F;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; pre-push&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;mv&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; pre-push .git&#x2F;hooks&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; +x .git&#x2F;hooks&#x2F;pre-push&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The hook should now be setup and working.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;screenshot-colors&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#screenshot-colors&quot; aria-label=&quot;Anchor link for: screenshot-colors&quot;&gt;Screenshot colors&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Documenting colors used for consistency going forward&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Use&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Color Code&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Screenshot boarders&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;p style=&quot;background-color:#797e9c;&quot;&gt;797e9c&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Highlights&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;p style=&quot;background-color:#4cac44;&quot;&gt;4cac44&lt;&#x2F;p&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Google Storage</title>
        <published>2023-10-27T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/google-storage/"/>
        <id>https://dev.chester.wykies.com/misc/google-storage/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/google-storage/">&lt;h1 id=&quot;suggestions-to-cleanup-space-used&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#suggestions-to-cleanup-space-used&quot; aria-label=&quot;Anchor link for: suggestions-to-cleanup-space-used&quot;&gt;Suggestions to cleanup space used&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;NB: Be sure to empty the trash after deleting files.&lt;&#x2F;p&gt;
&lt;p&gt;See &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;one.google.com&#x2F;storage&quot;&gt;breakdown&lt;&#x2F;a&gt; of space used to see where the most gains can come from.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;google-drive&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#google-drive&quot; aria-label=&quot;Anchor link for: google-drive&quot;&gt;Google Drive&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;For google drive if you click the link to the right of google drive (square with a diagonally up arrow), then it should take you to the list of largest files that you can start searching through.
Alternatively you can try this &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;drive.google.com&#x2F;drive&#x2F;quota&quot;&gt;quota link&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;gmail&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#gmail&quot; aria-label=&quot;Anchor link for: gmail&quot;&gt;Gmail&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;You want to search for larger emails.
To do that you can use the advanced search feature (right side of the search box) to get a search similar to &lt;code&gt;larger:20M&lt;&#x2F;code&gt;.
If there are several similar large emails and you want to remove all of them you can further refine the search but be careful not to delete emails you want to keep.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;orphaned-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#orphaned-files&quot; aria-label=&quot;Anchor link for: orphaned-files&quot;&gt;Orphaned files&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;The only person who can delete files that you own is you.
If someone else “deletes” one of your files from a folder that is shared with them then in the past it would just “disappear” but not be deleted and still show up in searches.
And while it’s great that it was still available it also meant that it still used from your quota.
The following was meant to make it easy for me to find and decide on what to do with these files (usually delete them).&lt;&#x2F;p&gt;
&lt;p&gt;Currently, Google treats all files not in a folder inside of the tree created from the root of your “My Drive” as unorganized.
Note that this does not include files in folders that you have shortcuts to.
Thus if a file is not in a folder that is in your tree even if there is a shortcut to the folder it is in, it will still be unorganized, so be careful with these files.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;drive.google.com&#x2F;drive&#x2F;search?q=is%3Aunorganized%20owner%3Ame&amp;amp;authuser=0&quot;&gt;https:&#x2F;&#x2F;drive.google.com&#x2F;drive&#x2F;search?q=is%3Aunorganized%20owner%3Ame&amp;amp;authuser=0&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Search term:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;is:unorganized owner:me&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Markdown &#x2F; HTML Guide</title>
        <published>2023-10-27T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/markdown/"/>
        <id>https://dev.chester.wykies.com/misc/markdown/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/markdown/">&lt;h1 id=&quot;official-docs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#official-docs&quot; aria-label=&quot;Anchor link for: official-docs&quot;&gt;Official Docs&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;commonmark.org&#x2F;help&quot;&gt;CommonMark&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.markdownguide.org&#x2F;extended-syntax&#x2F;&quot;&gt;Extended Syntax&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;styles-supported-in-discord-messages&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#styles-supported-in-discord-messages&quot; aria-label=&quot;Anchor link for: styles-supported-in-discord-messages&quot;&gt;Styles supported in discord messages&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;support.discord.com&#x2F;hc&#x2F;en-us&#x2F;articles&#x2F;210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-&quot;&gt;https:&#x2F;&#x2F;support.discord.com&#x2F;hc&#x2F;en-us&#x2F;articles&#x2F;210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Style&lt;&#x2F;th&gt;&lt;th&gt;Markdown&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;em&gt;Italics&lt;&#x2F;em&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;*italics* or _italics_&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Bold&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;**bold**&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;em&gt;&lt;strong&gt;Bold Italics&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;_**bold italics**_&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Underline &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;__underline__&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;&lt;em&gt;Underline italics&lt;&#x2F;em&gt;&lt;&#x2F;strong&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;**_underline italics_**&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Underline bold&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-2&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;__**underline bold**__&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;underline bold italics&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-3&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;__***underline bold italics***__&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;del&gt;Strikethrough&lt;&#x2F;del&gt;&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;~~Strikethrough~~&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;Spoiler &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-2-1&quot;&gt;&lt;a href=&quot;#fn-2&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;td&gt;&lt;td&gt;||Spoiler||&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;Discord also supports the following:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;`One line code blocks`&lt;&#x2F;li&gt;
&lt;li&gt;``` Multiline code blocks ```&lt;&#x2F;li&gt;
&lt;li&gt;&amp;gt; Block quotes&lt;&#x2F;li&gt;
&lt;li&gt;&amp;gt;&amp;gt;&amp;gt; Multiline block quotes &amp;gt;&amp;gt;&amp;gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;not-in-spec-but-needed-in-practice&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#not-in-spec-but-needed-in-practice&quot; aria-label=&quot;Anchor link for: not-in-spec-but-needed-in-practice&quot;&gt;Not in spec but needed in practice&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;newline&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#newline&quot; aria-label=&quot;Anchor link for: newline&quot;&gt;Newline&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Add a &lt;code&gt;\&lt;&#x2F;code&gt; at the end of the line to create a new line.
Note it must not have any characters after it including spaces.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;first line\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;second line&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;displayed-as&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#displayed-as&quot; aria-label=&quot;Anchor link for: displayed-as&quot;&gt;Displayed as&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;first line&lt;br &#x2F;&gt;
second line&lt;&#x2F;p&gt;
&lt;h1 id=&quot;alternate-explanations-for-quick-reference&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#alternate-explanations-for-quick-reference&quot; aria-label=&quot;Anchor link for: alternate-explanations-for-quick-reference&quot;&gt;Alternate explanations for quick reference&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;links&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#links&quot; aria-label=&quot;Anchor link for: links&quot;&gt;Links&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;single-use-on-page&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#single-use-on-page&quot; aria-label=&quot;Anchor link for: single-use-on-page&quot;&gt;Single use on page&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Normal Link: [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;DISPLAYED TEXT&lt;&#x2F;span&gt;&lt;span&gt;](&lt;&#x2F;span&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;https:&#x2F;&#x2F;link.com&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Image Link: ![&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;ALT TEXT&lt;&#x2F;span&gt;&lt;span&gt;](&lt;&#x2F;span&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;https:&#x2F;&#x2F;img_link.com&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;multiple-uses&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#multiple-uses&quot; aria-label=&quot;Anchor link for: multiple-uses&quot;&gt;Multiple Uses&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Prefer this style if a link is used multiple times as it would only need to be updated in one place.
The same works for image links just prefix with &lt;code&gt;!&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;To use the link you just put the display text and a reference to the link that will be defined later&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;DISPLAYED TEXT FIRST TIME&lt;&#x2F;span&gt;&lt;span&gt;][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;DISPLAYED TEXT SECOND TIME&lt;&#x2F;span&gt;&lt;span&gt;][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The later (preferably at the bottom of the section or page)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;]:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #000000;background-color: #FFFFFF;&quot;&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;https:&#x2F;&#x2F;link.com&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;checklist&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#checklist&quot; aria-label=&quot;Anchor link for: checklist&quot;&gt;Checklist&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;script type=&quot;text&#x2F;javascript&quot; src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;enable_checkboxes.js&quot; defer&gt;&lt;&#x2F;script&gt;
&lt;script type=&quot;text&#x2F;javascript&quot; src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;checkboxes_nesting_behaviour.js&quot; defer&gt;&lt;&#x2F;script&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Item 1&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Item 2&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Item 3 (Checked)
&lt;ul&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Sub Item 1&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Sub Item 2&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot; checked=&quot;&quot;&#x2F;&gt;
Sub Item 3&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt; [ ] Item 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt; [ ] Item 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;x&lt;&#x2F;span&gt;&lt;span&gt;] Item 3 (Checked)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;x&lt;&#x2F;span&gt;&lt;span&gt;] Sub Item 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;x&lt;&#x2F;span&gt;&lt;span&gt;] Sub Item 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;x&lt;&#x2F;span&gt;&lt;span&gt;] Sub Item 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;enabling-checkboxes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#enabling-checkboxes&quot; aria-label=&quot;Anchor link for: enabling-checkboxes&quot;&gt;Enabling Checkboxes&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;If you want the checkboxes enabled for use to be clickable then use the following snippet.
This will pull in the shortcode which will run a differed script that enables all the checkboxes on the page.
Because it is deferred it doesn’t matter where on the page it is placed it will still work.
It is also written such that it is idempotent and placing &#x2F; running it twice will not have any additional effect. This
has been executed on this page, hence why checkboxes above work.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{ enable_checkboxes() }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;enabling-expected-nested-checkbox-behaviour&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#enabling-expected-nested-checkbox-behaviour&quot; aria-label=&quot;Anchor link for: enabling-expected-nested-checkbox-behaviour&quot;&gt;Enabling Expected Nested Checkbox Behaviour&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;If you click a checkbox which has checkboxes listed under it, you expect them to become checked as well. And if you
uncheck a checkbox you expect all its ancestors to become unchecked as well. The following shortcode provides that
functionality. This has also been enabled on this page so functionality can be tested on the above checkboxes.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{ checkboxes_nesting_behaviour() }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;collapsable-sections&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#collapsable-sections&quot; aria-label=&quot;Anchor link for: collapsable-sections&quot;&gt;Collapsable sections&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;gist.github.com&#x2F;pierrejoubert73&#x2F;902cc94d79424356a8d20be2b382e1ab&quot;&gt;https:&#x2F;&#x2F;gist.github.com&#x2F;pierrejoubert73&#x2F;902cc94d79424356a8d20be2b382e1ab&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;warning&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#warning&quot; aria-label=&quot;Anchor link for: warning&quot;&gt;WARNING&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Be careful with &lt;strong&gt;indentation&lt;&#x2F;strong&gt; otherwise you can end up with a code block and hence raw markdown.&lt;&#x2F;li&gt;
&lt;li&gt;Empty line required after &lt;code&gt;&amp;lt;&#x2F;summary&amp;gt;&lt;&#x2F;code&gt; tag based on my test or again you get raw markdown.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;details&gt;
  &lt;summary&gt;Click to expand!&lt;&#x2F;summary&gt;
&lt;p&gt;Detailed body shows when you click.&lt;&#x2F;p&gt;
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum enim lorem, placerat sed vestibulum a, pellentesque
at leo. Vivamus tincidunt nisi massa, nec pellentesque diam mollis vel. Vestibulum turpis mauris, placerat id lectus ac,
varius imperdiet libero. Ut tortor lorem, scelerisque eu elit vitae, eleifend gravida justo. Cras risus est, maximus non
dapibus quis, placerat ullamcorper diam. Ut vitae justo purus. Donec enim dolor, sodales et tempor vehicula, rutrum
vitae eros. Praesent commodo urna vitae pretium venenatis. Praesent lectus est, finibus sed lobortis at, finibus sit
amet velit. Maecenas varius tincidunt neque, sed ultricies lectus cursus ut. Phasellus auctor fermentum venenatis.
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Phasellus eu velit consectetur,
pretium ipsum eget, pharetra massa. Duis sed posuere nisl. Proin a pharetra sapien, sit amet sollicitudin nisi. Nulla
dolor nunc, interdum id convallis vitae, maximus ac elit.&lt;&#x2F;p&gt;
&lt;p&gt;Proin ullamcorper lorem id dui commodo hendrerit. Etiam vitae commodo ipsum. Aliquam placerat ex sed dolor eleifend, id
pulvinar lorem dictum. Duis in massa tortor. Maecenas leo quam, luctus at egestas ac, tincidunt a odio. Pellentesque
cursus mi egestas leo viverra egestas. Nulla quis velit sit amet tellus aliquet mollis sed justo. Vivamus interdum
porta ultricies. Nulla quis ex in arcu consequat auctor quis et ligula. Phasellus pellentesque nibh quis risus pretium
malesuada.
&lt;strong&gt;Generated 2 paragraphs, 219 words, 1490 bytes of &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.lipsum.com&#x2F;&quot;&gt;Lorem Ipsum&lt;&#x2F;a&gt;&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;details&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  &amp;lt;summary&amp;gt;Click to expand!&amp;lt;&#x2F;summary&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  Must have an empty line before this line (based on my tests)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  Detailed body shows when you click.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&#x2F;details&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;footnotes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#footnotes&quot; aria-label=&quot;Anchor link for: footnotes&quot;&gt;Footnotes&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.markdownguide.org&#x2F;extended-syntax&#x2F;#footnotes&quot;&gt;https:&#x2F;&#x2F;www.markdownguide.org&#x2F;extended-syntax&#x2F;#footnotes&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The Markdown parser used by zola does not appear to support multiple paragraphs in footnotes.
Also, it is probably best to not use numbers as the identifier for a footnote because they are numbered by order of
appearance and using number may cause confusion.&lt;&#x2F;p&gt;
&lt;p&gt;See the following example and the code to generate it below.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;Here’s a simple footnote,&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-note_id-1&quot;&gt;&lt;a href=&quot;#fn-note_id&quot;&gt;3&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt; and here’s a longer one.&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-other_note_id-1&quot;&gt;&lt;a href=&quot;#fn-other_note_id&quot;&gt;4&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;Here&amp;#39;s a simple footnote,[^note_id] and here&amp;#39;s a another one.[^other_note_id]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;^note_id&lt;&#x2F;span&gt;&lt;span&gt;]:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; This is the first footnote.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;^other_note_id&lt;&#x2F;span&gt;&lt;span&gt;]:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; Other text.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;tables&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tables&quot; aria-label=&quot;Anchor link for: tables&quot;&gt;Tables&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.markdownguide.org&#x2F;extended-syntax&#x2F;#tables&quot;&gt;https:&#x2F;&#x2F;www.markdownguide.org&#x2F;extended-syntax&#x2F;#tables&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Tables are created by surrounding text with &lt;code&gt;|&lt;&#x2F;code&gt; and alignment is controlled by &lt;code&gt;:&lt;&#x2F;code&gt;. Note white space is still ignored, and white space alignment formatting was done by IDE and is not required.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;| Syntax                          |     Description     |                         Test Text |&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;| :------------------------------ | :-----------------: | --------------------------------: |&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;| Header                          | Title, a lil longer | Here&amp;#39;s this, a bit longer to show |&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;| Paragraph, a bit longer to show |        Text         |                          And more |&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Syntax&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Description&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: right&quot;&gt;Test Text&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Header&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Title, a lil longer&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;Here’s this, a bit longer to show&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;Paragraph, a bit longer to show&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Text&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: right&quot;&gt;And more&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;Not supported in &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;commonmark.org&#x2F;help&quot;&gt;CommonMark&lt;&#x2F;a&gt;. &lt;code&gt;__some text__&lt;&#x2F;code&gt; is treated as bold in common mark so all underline variants only get a bold added to them in addition to the other styling specified. &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt; &lt;a href=&quot;#fr-1-2&quot;&gt;↩2&lt;&#x2F;a&gt; &lt;a href=&quot;#fr-1-3&quot;&gt;↩3&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-2&quot;&gt;
&lt;p&gt;Not supported in &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;commonmark.org&#x2F;help&quot;&gt;CommonMark&lt;&#x2F;a&gt;. &lt;code&gt;|&lt;&#x2F;code&gt; is used for tables in the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.markdownguide.org&#x2F;extended-syntax&#x2F;&quot;&gt;Extended Syntax&lt;&#x2F;a&gt; &lt;a href=&quot;#fr-2-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-note_id&quot;&gt;
&lt;p&gt;This is the first footnote. &lt;a href=&quot;#fr-note_id-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-other_note_id&quot;&gt;
&lt;p&gt;Other text. &lt;a href=&quot;#fr-other_note_id-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Tera Guide</title>
        <published>2023-10-27T00:00:00+00:00</published>
        <updated>2026-02-19T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/tera/"/>
        <id>https://dev.chester.wykies.com/misc/tera/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/tera/">&lt;h2 id=&quot;get-everything-in-context&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-everything-in-context&quot; aria-label=&quot;Anchor link for: get-everything-in-context&quot;&gt;Get everything in context&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;This is useful for debugging.
But be warned it includes all the content of the site so on large sites it is VERY big.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{ __tera_context }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;example-for-loop&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-for-loop&quot; aria-label=&quot;Anchor link for: example-for-loop&quot;&gt;Example for loop&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;keats.github.io&#x2F;tera&#x2F;docs&#x2F;#functions&quot;&gt;https:&#x2F;&#x2F;keats.github.io&#x2F;tera&#x2F;docs&#x2F;#functions&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{% for i in range(end=5) -%}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{% endfor %}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;as-string&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#as-string&quot; aria-label=&quot;Anchor link for: as-string&quot;&gt;As String&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;keats.github.io&#x2F;tera&#x2F;docs&#x2F;#as-str&quot;&gt;https:&#x2F;&#x2F;keats.github.io&#x2F;tera&#x2F;docs&#x2F;#as-str&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{{ value | as_str }}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Zola</title>
        <published>2023-10-27T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/zola/"/>
        <id>https://dev.chester.wykies.com/misc/zola/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/zola/">&lt;h1 id=&quot;summary&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#summary&quot; aria-label=&quot;Anchor link for: summary&quot;&gt;Summary&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;We are using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;&quot;&gt;zola&lt;&#x2F;a&gt; to build the website.
Zola is a static site generator meaning it converts text files into formatted HTML files.
It uses Markdown as the source documents to be compiled into HTML (According to the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;commonmark.org&#x2F;help&quot;&gt;CommonMark&lt;&#x2F;a&gt; specification).
We have some relevant markdown documented &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;markdown&#x2F;&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;creating-links-to-other-pages&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#creating-links-to-other-pages&quot; aria-label=&quot;Anchor link for: creating-links-to-other-pages&quot;&gt;Creating links to other pages&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;documentation&#x2F;content&#x2F;linking&#x2F;#internal-links&quot;&gt;https:&#x2F;&#x2F;www.getzola.org&#x2F;documentation&#x2F;content&#x2F;linking&#x2F;#internal-links&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;A quick reference to links in markdown has been documented &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;markdown&#x2F;#links&quot;&gt;here&lt;&#x2F;a&gt;.
In addition zola supports a special type of link which is an internal link.
It works by specifying the markdown file of the page you want to link to.
For example the link in the first line of this paragraph is specified by &lt;code&gt;[here](@&#x2F;misc&#x2F;markdown.md#links)&lt;&#x2F;code&gt;.
These types of links are to be preferred because they are verified to be accurate by zola while relative links are not.
Links to external websites can also be verified with &lt;code&gt;zola check&lt;&#x2F;code&gt;.
However, it is noteworthy that relative links do provide the ability to include &lt;code&gt;index.html&lt;&#x2F;code&gt; and therefore work well
with websites meant to be used without a webserver.&lt;&#x2F;p&gt;
&lt;p&gt;For more information on sites meant to be used offline without a webserver see &lt;code&gt;easydocs_uglyurls&lt;&#x2F;code&gt; in the configuration options for &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;codeandmedia&#x2F;zola_easydocs_theme#provided-configurations-options&quot;&gt;zola_easydocs_theme&lt;&#x2F;a&gt;
This is not necessary if zola serve is used as that runs a basic webserver.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;renaming-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#renaming-files&quot; aria-label=&quot;Anchor link for: renaming-files&quot;&gt;Renaming files&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;If you publish your content but then realize you want to rename your files, you can setup aliases to redirect your pages instead of breaking links to your site.
This can be done at the page level using the &lt;code&gt;aliases&lt;&#x2F;code&gt; field in the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.getzola.org&#x2F;documentation&#x2F;content&#x2F;page&#x2F;#front-matter&quot;&gt;front matter&lt;&#x2F;a&gt;. See example &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;c-git.github.io&#x2F;blob&#x2F;main&#x2F;content&#x2F;rust&#x2F;pattern_typestate.md?plain=1&quot;&gt;source file&lt;&#x2F;a&gt; where site was moved from &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;c-git.github.io&#x2F;rust&#x2F;typestate&#x2F;&quot;&gt;old&lt;&#x2F;a&gt; to &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;c-git.github.io&#x2F;rust&#x2F;pattern-typestate&#x2F;&quot;&gt;new&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;aliases = [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&#x2F;rust&#x2F;typestate&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;messed-up-formatting&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#messed-up-formatting&quot; aria-label=&quot;Anchor link for: messed-up-formatting&quot;&gt;Messed up formatting&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I’ve come across two cases where I got strange formatting.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;case-with-checkboxes-in-list&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#case-with-checkboxes-in-list&quot; aria-label=&quot;Anchor link for: case-with-checkboxes-in-list&quot;&gt;Case with checkboxes in list&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I had two lists, with checkboxes separated by a space.
Without the comment the checkboxes were not next to their text.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt; [ ] 1st list Item 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt; [ ] 1st list Item 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt; [ ] 2nd list Item 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt; [ ] 2nd list Item 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&amp;lt;!-- Comment fixes problem for those below --&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt; [ ] 3rd list Item 1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt; [ ] 3rd list Item 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
1st list Item 1&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
1st list Item 2&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
2nd list Item 1&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
2nd list Item 1&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;!-- Comment fixes problem for those below --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
3rd list Item 1&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
3rd list Item 2&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;example-for-footer&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-for-footer&quot; aria-label=&quot;Anchor link for: example-for-footer&quot;&gt;Example for footer&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I hd a footer that started after in a new paragraph and had &lt;code&gt;:&lt;&#x2F;code&gt; after the superscript text.
Removing &lt;code&gt;:&lt;&#x2F;code&gt; or not starting a new paragraph fixed it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;markdown&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Some text [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;^1&lt;&#x2F;span&gt;&lt;span&gt;][&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;^2&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;^1&lt;&#x2F;span&gt;&lt;span&gt;]: Footer text\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #DBEDFF;text-decoration: underline;&quot;&gt;^2&lt;&#x2F;span&gt;&lt;span&gt;]: Footer text&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Some text &lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-2-1&quot;&gt;&lt;a href=&quot;#fn-2&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;&lt;&#x2F;p&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;Footer text\ &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-2&quot;&gt;
&lt;p&gt;Footer text &lt;a href=&quot;#fr-2-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Firefox Extensions</title>
        <published>2023-10-22T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/firefox-extensions/"/>
        <id>https://dev.chester.wykies.com/misc/firefox-extensions/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/firefox-extensions/">&lt;h1 id=&quot;reference-sources&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#reference-sources&quot; aria-label=&quot;Anchor link for: reference-sources&quot;&gt;Reference Sources&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;To get started see &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Mozilla&#x2F;Add-ons&#x2F;WebExtensions&#x2F;Your_first_WebExtension&quot;&gt;Your first extension&lt;&#x2F;a&gt; tutorial. Note must package and sign before it can be installed for more than just debugging.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;persistent-install&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#persistent-install&quot; aria-label=&quot;Anchor link for: persistent-install&quot;&gt;Persistent Install&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;extensionworkshop.com&#x2F;documentation&#x2F;develop&#x2F;getting-started-with-web-ext&#x2F;&quot;&gt;https:&#x2F;&#x2F;extensionworkshop.com&#x2F;documentation&#x2F;develop&#x2F;getting-started-with-web-ext&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;install-web-ext-tool&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-web-ext-tool&quot; aria-label=&quot;Anchor link for: install-web-ext-tool&quot;&gt;Install web-ext tool&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; npm install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --global&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; web-ext&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;test-web-ext-tool-works&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#test-web-ext-tool-works&quot; aria-label=&quot;Anchor link for: test-web-ext-tool-works&quot;&gt;Test web-ext tool works&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;web-ext&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --version&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;testing-an-extension&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#testing-an-extension&quot; aria-label=&quot;Anchor link for: testing-an-extension&quot;&gt;Testing an extension&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;By default it watches for changes and reloads your extension&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;web-ext&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; run&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;run-lints&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#run-lints&quot; aria-label=&quot;Anchor link for: run-lints&quot;&gt;Run lints&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;web-ext&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; lint&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;packaging-your-extension&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#packaging-your-extension&quot; aria-label=&quot;Anchor link for: packaging-your-extension&quot;&gt;Packaging your extension&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;web-ext&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;get-the-extension-signed-and-published&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-the-extension-signed-and-published&quot; aria-label=&quot;Anchor link for: get-the-extension-signed-and-published&quot;&gt;Get the extension signed and published&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;One option is to go via the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-CA&#x2F;developers&#x2F;&quot;&gt;Developer Hub&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>SCP</title>
        <published>2023-10-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/scp/"/>
        <id>https://dev.chester.wykies.com/debian/scp/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/scp/">&lt;h1 id=&quot;transfer-to-remote-server&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#transfer-to-remote-server&quot; aria-label=&quot;Anchor link for: transfer-to-remote-server&quot;&gt;Transfer to remote server&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;scp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; src_file administrator@192.168.1.5:&#x2F;home&#x2F;administrator&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;transfer-from-remote-server&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#transfer-from-remote-server&quot; aria-label=&quot;Anchor link for: transfer-from-remote-server&quot;&gt;Transfer from remote server&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Note: full stop at end is required to copy to your present directory&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;scp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; administrator@192.168.1.5:&#x2F;home&#x2F;administrator&#x2F;src_file .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;multiple-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#multiple-files&quot; aria-label=&quot;Anchor link for: multiple-files&quot;&gt;Multiple Files&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;16886179&#x2F;scp-or-sftp-copy-multiple-files-with-single-command&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;16886179&#x2F;scp-or-sftp-copy-multiple-files-with-single-command&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I kept getting &lt;code&gt;protocol error: filename does not match request&lt;&#x2F;code&gt; when I tried the option with spaces.
Only the option with &lt;code&gt;{}&lt;&#x2F;code&gt; worked for me but this is limited to bash on the end receiving it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;scp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; administrator@192.168.1.5:&amp;quot;{&#x2F;home&#x2F;administrator&#x2F;src_file1,&#x2F;home&#x2F;administrator&#x2F;src_file2}&amp;quot; .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>SSH</title>
        <published>2023-10-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/ssh/"/>
        <id>https://dev.chester.wykies.com/debian/ssh/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/ssh/">&lt;h1 id=&quot;install&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install&quot; aria-label=&quot;Anchor link for: install&quot;&gt;Install&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install ssh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;whitelisting-users&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#whitelisting-users&quot; aria-label=&quot;Anchor link for: whitelisting-users&quot;&gt;Whitelisting users&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;ostechnix.com&#x2F;allow-deny-ssh-access-particular-user-group-linux&#x2F;&quot;&gt;https:&#x2F;&#x2F;ostechnix.com&#x2F;allow-deny-ssh-access-particular-user-group-linux&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Open config&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; nano &#x2F;etc&#x2F;ssh&#x2F;sshd_config&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;At the bottom of the file add &lt;code&gt;AllowUsers&lt;&#x2F;code&gt; then a tab (or a space, based on my testing) then a list of users separated
by space
Other users will be blocked.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;AllowUsers  user1 user2 user3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then restart the service&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl restart sshd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;check-fingerprint-from-server&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-fingerprint-from-server&quot; aria-label=&quot;Anchor link for: check-fingerprint-from-server&quot;&gt;Check fingerprint from server&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;76337&#x2F;where-is-the-ssh-server-fingerprint-generated-stored&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;76337&#x2F;where-is-the-ssh-server-fingerprint-generated-stored&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;When connecting to the server you are asked to verify the fingerprint.
To get that fingerprint use the following command (may need to be modified if you are not using ED25519).&lt;&#x2F;p&gt;
&lt;p&gt;NB: Must be run on the server&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ssh-keygen&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -lf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;ssh&#x2F;ssh_host_ed25519_key.pub&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Updating</title>
        <published>2023-10-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/update/"/>
        <id>https://dev.chester.wykies.com/debian/update/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/update/">&lt;h1 id=&quot;update-and-upgrade&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#update-and-upgrade&quot; aria-label=&quot;Anchor link for: update-and-upgrade&quot;&gt;Update and Upgrade&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Useful when running on servers&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt update&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt upgrade&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;note-on-difference-between-apt-and-apt-get&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#note-on-difference-between-apt-and-apt-get&quot; aria-label=&quot;Anchor link for: note-on-difference-between-apt-and-apt-get&quot;&gt;Note on difference between &lt;code&gt;apt&lt;&#x2F;code&gt; and &lt;code&gt;apt-get&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Based on this page on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;itsfoss.com&#x2F;apt-vs-apt-get-difference&#x2F;&quot;&gt;IT’S FOSS&lt;&#x2F;a&gt; the apt versions of these are probably better.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;update-package-list&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#update-package-list&quot; aria-label=&quot;Anchor link for: update-package-list&quot;&gt;Update package list&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt update&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;update-packages-and-kernel&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#update-packages-and-kernel&quot; aria-label=&quot;Anchor link for: update-packages-and-kernel&quot;&gt;Update packages and kernel&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.cyberciti.biz&#x2F;faq&#x2F;upgrade-update-ubuntu-using-terminal&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.cyberciti.biz&#x2F;faq&#x2F;upgrade-update-ubuntu-using-terminal&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Tested and this command did do the update for the pending kernel update.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt upgrade&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;recommended-command-for-kernel-update&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#recommended-command-for-kernel-update&quot; aria-label=&quot;Anchor link for: recommended-command-for-kernel-update&quot;&gt;Recommended command for kernel update&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Tested and just &lt;code&gt;sudo apt upgrade&lt;&#x2F;code&gt; also updated the kernel&lt;&#x2F;p&gt;
&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;phoenixnap.com&#x2F;kb&#x2F;how-to-update-kernel-ubuntu&quot;&gt;https:&#x2F;&#x2F;phoenixnap.com&#x2F;kb&#x2F;how-to-update-kernel-ubuntu&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;itsfoss.com&#x2F;apt-vs-apt-get-difference&#x2F;&quot;&gt;FOSS Page on apt vs apt-get&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt full-upgrade&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Useful commands</title>
        <published>2023-10-19T00:00:00+00:00</published>
        <updated>2026-01-17T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/useful-commands/"/>
        <id>https://dev.chester.wykies.com/debian/useful-commands/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/useful-commands/">&lt;h2 id=&quot;find-which-package-contains-a-particular-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#find-which-package-contains-a-particular-file&quot; aria-label=&quot;Anchor link for: find-which-package-contains-a-particular-file&quot;&gt;Find which package contains a particular file&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;apt-file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;consume-cpu-resources&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#consume-cpu-resources&quot; aria-label=&quot;Anchor link for: consume-cpu-resources&quot;&gt;Consume CPU resources&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;dev&#x2F;zero&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;dev&#x2F;null&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;check-which-shells-are-available&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-which-shells-are-available&quot; aria-label=&quot;Anchor link for: check-which-shells-are-available&quot;&gt;Check which shells are available&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;shells&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;go-back-to-previous-directory&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#go-back-to-previous-directory&quot; aria-label=&quot;Anchor link for: go-back-to-previous-directory&quot;&gt;Go back to previous directory&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; -&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;show-largest-folder-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#show-largest-folder-files&quot; aria-label=&quot;Anchor link for: show-largest-folder-files&quot;&gt;Show largest folder&#x2F;files&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;du&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -a -BM&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; sort&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -n -r&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; head&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -n 30&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;set-environment-variables-in-bash&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-environment-variables-in-bash&quot; aria-label=&quot;Anchor link for: set-environment-variables-in-bash&quot;&gt;Set environment variables in bash&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;export&lt;&#x2F;span&gt;&lt;span&gt; VAR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span&gt;abc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;check-what-type-of-file-something-probably-is&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-what-type-of-file-something-probably-is&quot; aria-label=&quot;Anchor link for: check-what-type-of-file-something-probably-is&quot;&gt;Check what type of file something probably is&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;file&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;search-for-a-file-folder&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#search-for-a-file-folder&quot; aria-label=&quot;Anchor link for: search-for-a-file-folder&quot;&gt;Search for a file&#x2F;folder&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;find&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -name&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;PATTERN&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;show-command-history&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#show-command-history&quot; aria-label=&quot;Anchor link for: show-command-history&quot;&gt;Show command history&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;history&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;convert-a-folder-of-images-into-a-pdf&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#convert-a-folder-of-images-into-a-pdf&quot; aria-label=&quot;Anchor link for: convert-a-folder-of-images-into-a-pdf&quot;&gt;Convert a folder of images into a pdf&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;246647&#x2F;convert-a-directory-of-jpeg-files-to-a-single-pdf-document&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;246647&#x2F;convert-a-directory-of-jpeg-files-to-a-single-pdf-document&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;img2pdf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;.png&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --output&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; combined.pdf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;show-ip-addresses&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#show-ip-addresses&quot; aria-label=&quot;Anchor link for: show-ip-addresses&quot;&gt;Show IP Addresses&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -c&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;show-default-gateway-and-routes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#show-default-gateway-and-routes&quot; aria-label=&quot;Anchor link for: show-default-gateway-and-routes&quot;&gt;Show default gateway and routes&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.rootusers.com&#x2F;how-to-display-routing-table-in-linux&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.rootusers.com&#x2F;how-to-display-routing-table-in-linux&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -c&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; r&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;kill-a-running-process&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#kill-a-running-process&quot; aria-label=&quot;Anchor link for: kill-a-running-process&quot;&gt;Kill a running process&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Where &lt;code&gt;pid&lt;&#x2F;code&gt; is the process ID of the process to kill or&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;kill&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; pid&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;or where &lt;code&gt;program&lt;&#x2F;code&gt; is the name of the program to kill (see more on pidof &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;useful-commands&#x2F;#get-the-pid-s-of-a-process&quot;&gt;here&lt;&#x2F;a&gt;)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;kill&lt;&#x2F;span&gt;&lt;span&gt; $(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;pidof&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; program&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;set-static-route&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-static-route&quot; aria-label=&quot;Anchor link for: set-static-route&quot;&gt;Set static route&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Where &lt;code&gt;192.168.0.0&#x2F;16&lt;&#x2F;code&gt; is the network and mask you want to set the route for and &lt;code&gt;192.168.0.1&lt;&#x2F;code&gt; is the gateway (It auto detected the interface when I tried it.)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ip route add 192.168.0.0&#x2F;16 via&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 192.168.0.1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;check-route-that-will-be-used-for-address&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-route-that-will-be-used-for-address&quot; aria-label=&quot;Anchor link for: check-route-that-will-be-used-for-address&quot;&gt;Check route that will be used for address&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;jjKFXlFNR4E?si=ULJU9MzTkXQ3jcqg&amp;amp;t=235&quot;&gt;Faster than Lime&lt;&#x2F;a&gt; - Use &lt;code&gt;ip route help&lt;&#x2F;code&gt; to see more info.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; route get&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 8.8.8.8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;see-installed-kernels&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-installed-kernels&quot; aria-label=&quot;Anchor link for: see-installed-kernels&quot;&gt;See installed kernels&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;find&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;boot&#x2F;vmli&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;*&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;consumes-ram-and-cpu&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#consumes-ram-and-cpu&quot; aria-label=&quot;Anchor link for: consumes-ram-and-cpu&quot;&gt;Consumes RAM (And CPU)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;memtester&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;show-network-devices&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#show-network-devices&quot; aria-label=&quot;Anchor link for: show-network-devices&quot;&gt;Show network devices&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;nmcli&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; device status&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;get-the-pid-s-of-a-process&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-the-pid-s-of-a-process&quot; aria-label=&quot;Anchor link for: get-the-pid-s-of-a-process&quot;&gt;Get the PID(s) of a process&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Where &lt;code&gt;program&lt;&#x2F;code&gt; is the name of the command that started the process (what that shows in the System Monitor)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;pidof&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; program&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;check-which-shell-is-in-use&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-which-shell-is-in-use&quot; aria-label=&quot;Anchor link for: check-which-shell-is-in-use&quot;&gt;Check which shell is in use&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ps&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -p $$&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;get-sha1-hash-of-a-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-sha1-hash-of-a-file&quot; aria-label=&quot;Anchor link for: get-sha1-hash-of-a-file&quot;&gt;Get SHA1 hash of a file&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sha1sum&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;get-sha256-hash-of-a-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-sha256-hash-of-a-file&quot; aria-label=&quot;Anchor link for: get-sha256-hash-of-a-file&quot;&gt;Get SHA256 hash of a file&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sha256sum&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;start-discord-minimized&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#start-discord-minimized&quot; aria-label=&quot;Anchor link for: start-discord-minimized&quot;&gt;Start Discord Minimized&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;snap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; run discord&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --start-minimized&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;get-file-properties&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-file-properties&quot; aria-label=&quot;Anchor link for: get-file-properties&quot;&gt;Get file “properties”&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;stat&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;check-system-to-see-which-sensors-are-available&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-system-to-see-which-sensors-are-available&quot; aria-label=&quot;Anchor link for: check-system-to-see-which-sensors-are-available&quot;&gt;Check system to see which sensors are available&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; sensors-detect&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;see-bluetooth-logs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-bluetooth-logs&quot; aria-label=&quot;Anchor link for: see-bluetooth-logs&quot;&gt;See bluetooth logs&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl status bluetooth&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;get-a-checksum-for-a-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-a-checksum-for-a-file&quot; aria-label=&quot;Anchor link for: get-a-checksum-for-a-file&quot;&gt;Get a checksum for a file&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.baeldung.com&#x2F;linux&#x2F;sha-256-from-command-line&quot;&gt;https:&#x2F;&#x2F;www.baeldung.com&#x2F;linux&#x2F;sha-256-from-command-line&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The source also shows how to verify against the checksum file&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sha256sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; my_file.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sum&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; my_file.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;get-checksum-for-a-string&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-checksum-for-a-string&quot; aria-label=&quot;Anchor link for: get-checksum-for-a-string&quot;&gt;Get checksum for a string&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; string&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; sha256sum&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;manage-texlive-packages&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#manage-texlive-packages&quot; aria-label=&quot;Anchor link for: manage-texlive-packages&quot;&gt;Manage TexLive Packages&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Was already installed on my system not sure from where or when.
However it was a very old version and after I set it up for use using &lt;code&gt;tlmgr init-usertree&lt;&#x2F;code&gt; (required for debian).
I tested it using &lt;code&gt;tlmgr info algorithm&lt;&#x2F;code&gt; and got the following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tlmgr: Local TeX Live (2021) is older than remote repository (2024).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Cross release updates are only supported with&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  update-tlmgr-latest(.sh&#x2F;.exe) --update&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;See https:&#x2F;&#x2F;tug.org&#x2F;texlive&#x2F;upgrade.html for details.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Given than the new install was going to be over 7GB I abandoned this option.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;tlmgr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;move-files-to-trash-from-command-line&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#move-files-to-trash-from-command-line&quot; aria-label=&quot;Anchor link for: move-files-to-trash-from-command-line&quot;&gt;Move files to trash from command line&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;trash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;check-version-of-linux-in-use&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-version-of-linux-in-use&quot; aria-label=&quot;Anchor link for: check-version-of-linux-in-use&quot;&gt;Check version of linux in use&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;uname&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;see-power-status-for-connected-devices&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-power-status-for-connected-devices&quot; aria-label=&quot;Anchor link for: see-power-status-for-connected-devices&quot;&gt;See power status for connected devices&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;upower&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --dump&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;watch-the-sensor-stream&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#watch-the-sensor-stream&quot; aria-label=&quot;Anchor link for: watch-the-sensor-stream&quot;&gt;Watch the sensor stream&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;watch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; sensors&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>History</title>
        <published>2023-10-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/history/"/>
        <id>https://dev.chester.wykies.com/git/history/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/history/">&lt;h1 id=&quot;view-git-history&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#view-git-history&quot; aria-label=&quot;Anchor link for: view-git-history&quot;&gt;View git history&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Viewing-the-Commit-History&quot;&gt;https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-Basics-Viewing-the-Commit-History&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; log&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --pretty=format:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;%h %s&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --graph&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>WASM</title>
        <published>2023-10-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/wasm/"/>
        <id>https://dev.chester.wykies.com/rust/wasm/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/wasm/">&lt;h1 id=&quot;working-on-wasm-code&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#working-on-wasm-code&quot; aria-label=&quot;Anchor link for: working-on-wasm-code&quot;&gt;Working on WASM code&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Note: One thing to note is that not everything that compiles for WASM works on all WASM targets.
I no longer remember examples of what things don’t work but I know that things that were able to compile were not able to run in the browser as they were not supported.
And not everything can compile to WASM for example the blocking API of &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;reqwest&#x2F;latest&#x2F;reqwest&#x2F;&quot;&gt;reqwest&lt;&#x2F;a&gt; doesn’t compile to WASM (With good reason, you can’t block the only thread you have).&lt;&#x2F;p&gt;
&lt;p&gt;If you are using &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;conditional-compilation&#x2F;&quot;&gt;conditional compilation&lt;&#x2F;a&gt; (eg. &lt;code&gt;#[cfg(target_arch = &quot;wasm32&quot;)]&lt;&#x2F;code&gt;) to target both wasm and native,
then by default rust analyzer will only work on the code it is currently set to compile.
In vscode that can look like some code is “disabled” (a dim color compared to other code).
It doesn’t show up errors nor have code completion.
This is both good and bad.
It’s good in that you only get code completion for the target you are working on at the moment.
It’s bad because you might want to work on the WASM code sometimes.
Those times it’s desirable to switch it target WASM instead and highlight that code instead and give suitable completions for that code.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;switch-cargo-to-target-wasm&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#switch-cargo-to-target-wasm&quot; aria-label=&quot;Anchor link for: switch-cargo-to-target-wasm&quot;&gt;Switch cargo to target WASM&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;config.html#configuration-format&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;config.html#configuration-format&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The easiest way and what I’d recommend for most cases is to switch all of cargo to target WASM (and comment it out to switch back).&lt;&#x2F;p&gt;
&lt;p&gt;To do that go to &lt;code&gt;.cargo&#x2F;config.toml&lt;&#x2F;code&gt; and set &lt;code&gt;target&lt;&#x2F;code&gt; key in the &lt;code&gt;build&lt;&#x2F;code&gt; table to value &lt;code&gt;wasm32-unknown-unknown&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# .cargo&#x2F;config.toml&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;build&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;target =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;wasm32-unknown-unknown&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This will switch all of cargo (and rust-analyzer) to target WASM instead. So for example running &lt;code&gt;cargo check&lt;&#x2F;code&gt; will point out errors and warnings for your WASM code.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;switch-the-vscode-extension-to-target-wasm&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#switch-the-vscode-extension-to-target-wasm&quot; aria-label=&quot;Anchor link for: switch-the-vscode-extension-to-target-wasm&quot;&gt;Switch the vscode extension to target WASM&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Alternatively you can set only the vscode extension for rust-analyzer to target WASM.
To do that edit the json file that stores the vscode settings for the current project to add &lt;code&gt;&quot;rust-analyzer.cargo.target&quot;: &quot;wasm32-unknown-unknown&quot;&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; .vscode&#x2F;settings.json&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    &amp;quot;rust-analyzer.cargo.target&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;wasm32-unknown-unknown&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F;Uncomment to use rust-analyzer on wasm code instead&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Pattern Type State</title>
        <published>2023-10-12T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/pattern-typestate/"/>
        <id>https://dev.chester.wykies.com/rust/pattern-typestate/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/pattern-typestate/">&lt;h1 id=&quot;resource-list&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#resource-list&quot; aria-label=&quot;Anchor link for: resource-list&quot;&gt;Resource List&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;_ccDqRTx-JU?si=wh1ay1TnDhtJgz1_&amp;amp;t=28&quot;&gt;Video by LGR&lt;&#x2F;a&gt; [&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;letsgetrusty&#x2F;generics_and_zero_sized_types&#x2F;blob&#x2F;master&#x2F;src&#x2F;main.rs&quot;&gt;code&lt;&#x2F;a&gt;]&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rust-embedded.org&#x2F;book&#x2F;static-guarantees&#x2F;design-contracts.html&quot;&gt;Design Contracts in rust embedded book&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=k8kd22jNcps&amp;amp;t=1382s&quot;&gt;Video of presentation at Rust Linz&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;cliffle.com&#x2F;blog&#x2F;rust-typestate&#x2F;&quot;&gt;Blog post&lt;&#x2F;a&gt; not read yet but keeps coming up when searching for it&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;annotated-example&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#annotated-example&quot; aria-label=&quot;Anchor link for: annotated-example&quot;&gt;Annotated example&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;collections&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;HashMap&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;marker&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;PhantomData&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Locked&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Unlocked&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; Note that PasswordManager&amp;lt;Locked&amp;gt; != PasswordManager&amp;lt;Unlocked&amp;gt; because of the state field with doesn&amp;#39;t use space at runtime only a compile time check&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; Locked is the default state here&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PasswordManager&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;State&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Locked&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    master_pass&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    passwords&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; HashMap&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;String&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    state&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PhantomData&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;State&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; This doesn&amp;#39;t take up space at runtime&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; impl only available while &amp;quot;Locked&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PasswordManager&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Locked&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; unlock&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;, master_pass&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PasswordManager&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Unlocked&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        PasswordManager&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            master_pass&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;master_pass,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            passwords&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;passwords,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            state&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PhantomData&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; impl only available while &amp;quot;Unlocked&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PasswordManager&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Unlocked&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; lock&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PasswordManager&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Locked&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        PasswordManager&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            master_pass&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;master_pass,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            passwords&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;passwords,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            state&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PhantomData&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; list_passwords&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;HashMap&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;String&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;passwords&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; add_password&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;mut&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span&gt;, username&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;, password&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;passwords&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;insert&lt;&#x2F;span&gt;&lt;span&gt;(username, password);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; impl available in any State (Use T to guard against typos)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;T&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PasswordManager&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;T&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; encryption&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        todo!&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; version&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        todo!&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; impl available before a state is set (Only true static function)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PasswordManager&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; new&lt;&#x2F;span&gt;&lt;span&gt;(master_pass&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; Self&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        PasswordManager&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            master_pass,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            passwords&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Default&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;default&lt;&#x2F;span&gt;&lt;span&gt;(),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            state&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PhantomData&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; manager&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PasswordManager&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;password123&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to_owned&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; manager&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; manager&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unlock&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;password123&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to_owned&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    manager&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;list_passwords&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    manager&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;lock&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>services systemd (unit)</title>
        <published>2023-09-23T00:00:00+00:00</published>
        <updated>2026-02-04T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/services/"/>
        <id>https://dev.chester.wykies.com/debian/services/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/services/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;linuxhandbook.com&#x2F;create-systemd-services&quot;&gt;linuxhandbook&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;sending-output-to-a-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#sending-output-to-a-file&quot; aria-label=&quot;Anchor link for: sending-output-to-a-file&quot;&gt;Sending output to a file&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;unix.stackexchange.com&#x2F;questions&#x2F;245037&#x2F;saving-process-output-to-a-file-in-systemd-unit-file&quot;&gt;https:&#x2F;&#x2F;unix.stackexchange.com&#x2F;questions&#x2F;245037&#x2F;saving-process-output-to-a-file-in-systemd-unit-file&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Commands are not subject to shell parsing eg “&amp;lt; &amp;gt; &amp;lt;&amp;lt; &amp;gt;&amp;gt; and &amp;amp;” are not treated specially. Use &lt;code&gt;&#x2F;bin&#x2F;sh &#x27;script.sh &amp;gt; out&#x27;&lt;&#x2F;code&gt; to get around this.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;file-location&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#file-location&quot; aria-label=&quot;Anchor link for: file-location&quot;&gt;File location&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;if-running-as-root-user&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#if-running-as-root-user&quot; aria-label=&quot;Anchor link for: if-running-as-root-user&quot;&gt;If running as root user&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;File should be saved at &lt;code&gt;etc&#x2F;systemd&#x2F;system&#x2F;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; nano &#x2F;etc&#x2F;systemd&#x2F;system&#x2F;SERVICE_NAME.service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;if-running-as-non-root-user&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#if-running-as-non-root-user&quot; aria-label=&quot;Anchor link for: if-running-as-non-root-user&quot;&gt;If running as non-root user&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;File should be saved at &lt;code&gt;~&#x2F;.config&#x2F;systemd&#x2F;user&#x2F;&lt;&#x2F;code&gt; . Note that This folder usually won’t exist so create it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;.config&#x2F;systemd&#x2F;user&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;nano&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;.config&#x2F;systemd&#x2F;user&#x2F;SERVICE_NAME.service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;example-contents&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-contents&quot; aria-label=&quot;Anchor link for: example-contents&quot;&gt;Example Contents&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;This is the same for both (with a few exceptions).
See the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;linuxhandbook.com&#x2F;create-systemd-services&quot;&gt;linuxhandbook&lt;&#x2F;a&gt; for more info on what should be set in the file.&lt;&#x2F;li&gt;
&lt;li&gt;You can find a list of targets &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.freedesktop.org&#x2F;software&#x2F;systemd&#x2F;man&#x2F;latest&#x2F;systemd.special.html&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;You can also set the &lt;strong&gt;user&lt;&#x2F;strong&gt; to run as for system wide services (see &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.freedesktop.org&#x2F;software&#x2F;systemd&#x2F;man&#x2F;latest&#x2F;systemd.exec.html#User=&quot;&gt;here&lt;&#x2F;a&gt;).&lt;&#x2F;li&gt;
&lt;li&gt;You can set &lt;strong&gt;environment variables&lt;&#x2F;strong&gt; using &lt;code&gt;Environment=&lt;&#x2F;code&gt; (see &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.freedesktop.org&#x2F;software&#x2F;systemd&#x2F;man&#x2F;latest&#x2F;systemd.exec.html#Environment&quot;&gt;here&lt;&#x2F;a&gt; for more).&lt;&#x2F;li&gt;
&lt;li&gt;You can set &lt;strong&gt;working directory&lt;&#x2F;strong&gt; using &lt;code&gt;WorkingDirectory=&lt;&#x2F;code&gt; (see &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.freedesktop.org&#x2F;software&#x2F;systemd&#x2F;man&#x2F;latest&#x2F;systemd.exec.html#WorkingDirectory=&quot;&gt;here&lt;&#x2F;a&gt; for more).&lt;&#x2F;li&gt;
&lt;li&gt;You can set &lt;strong&gt;standard output&lt;&#x2F;strong&gt; using &lt;code&gt;StandardOutput=&lt;&#x2F;code&gt; (see &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.freedesktop.org&#x2F;software&#x2F;systemd&#x2F;man&#x2F;latest&#x2F;systemd.exec.html#StandardOutput=&quot;&gt;here&lt;&#x2F;a&gt; for more) Note: &lt;strong&gt;stderr&lt;&#x2F;strong&gt; defaults to use the same path (I think, not tested but based on the docs).&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[Unit]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Description=User Facing name of service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;After=network.target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[Service]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ExecStart=&#x2F;bin&#x2F;bash -c &amp;#39;&#x2F;usr&#x2F;bin&#x2F;my_awesome_program &amp;gt;&amp;gt; &#x2F;home&#x2F;user&#x2F;out.txt 2&amp;gt;&amp;amp;1&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;User=[Only allowed when running as root to set the user to use instead of root (see note above)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;WorkingDirectory=[relative to another option root but absolute paths work]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Environment=&amp;quot;VAR1=word1 word2&amp;quot; VAR2=word3 &amp;quot;VAR3=$word 5 6&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;StandardOutput=append:&#x2F;my_folder&#x2F;output.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type=simple&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Restart=always&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[Install]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;WantedBy=default.target&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;enabling-and-starting-the-service&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#enabling-and-starting-the-service&quot; aria-label=&quot;Anchor link for: enabling-and-starting-the-service&quot;&gt;Enabling and starting the service&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;if-running-as-root-user-1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#if-running-as-root-user-1&quot; aria-label=&quot;Anchor link for: if-running-as-root-user-1&quot;&gt;If running as root user&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl daemon-reload&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl enable SERVICE_NAME.service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl start SERVICE_NAME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;if-running-as-non-root-user-1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#if-running-as-non-root-user-1&quot; aria-label=&quot;Anchor link for: if-running-as-non-root-user-1&quot;&gt;If running as non-root user&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --user&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; daemon-reload&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --user&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; enable SERVICE_NAME.service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --user&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; start SERVICE_NAME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;updates-to-service-config&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#updates-to-service-config&quot; aria-label=&quot;Anchor link for: updates-to-service-config&quot;&gt;Updates to service config&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;This section applies if you’ve made changes to the service’s configuration and want to apply those changes&lt;&#x2F;p&gt;
&lt;h2 id=&quot;if-running-as-root-user-2&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#if-running-as-root-user-2&quot; aria-label=&quot;Anchor link for: if-running-as-root-user-2&quot;&gt;If running as root user&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl daemon-reload&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl restart SERVICE_NAME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;if-running-as-non-root-user-2&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#if-running-as-non-root-user-2&quot; aria-label=&quot;Anchor link for: if-running-as-non-root-user-2&quot;&gt;If running as non-root user&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --user&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; daemon-reload&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --user&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; restart SERVICE_NAME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;removing-services&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#removing-services&quot; aria-label=&quot;Anchor link for: removing-services&quot;&gt;Removing Services&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.baeldung.com&#x2F;linux&#x2F;create-remove-systemd-services#1-removing-custom-systemd-services&quot;&gt;https:&#x2F;&#x2F;www.baeldung.com&#x2F;linux&#x2F;create-remove-systemd-services#1-removing-custom-systemd-services&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;if-running-as-root-user-3&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#if-running-as-root-user-3&quot; aria-label=&quot;Anchor link for: if-running-as-root-user-3&quot;&gt;If running as root user&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl stop SERVICE_NAME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl disable SERVICE_NAME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; rm &#x2F;etc&#x2F;systemd&#x2F;system&#x2F;SERVICE_NAME.service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl daemon-reload&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;if-running-as-non-root-user-3&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#if-running-as-non-root-user-3&quot; aria-label=&quot;Anchor link for: if-running-as-non-root-user-3&quot;&gt;If running as non-root user&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --user&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; stop SERVICE_NAME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --user&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; disable SERVICE_NAME&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;.config&#x2F;systemd&#x2F;user&#x2F;SERVICE_NAME.service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --user&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; daemon-reload&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>CI</title>
        <published>2023-09-03T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/ci/"/>
        <id>https://dev.chester.wykies.com/rust/ci/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/ci/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;xUH-4y92jPg?si=3eY_i02onu60bVQ4&amp;amp;t=495&quot;&gt;https:&#x2F;&#x2F;youtu.be&#x2F;xUH-4y92jPg?si=3eY_i02onu60bVQ4&amp;amp;t=495&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Source GitRepo: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;jonhoo&#x2F;rust-ci-conf&#x2F;&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;jonhoo&#x2F;rust-ci-conf&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Our GitRepo: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;wykies&#x2F;rust-ci-conf&#x2F;&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;wykies&#x2F;rust-ci-conf&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;link-to-ci-repo&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#link-to-ci-repo&quot; aria-label=&quot;Anchor link for: link-to-ci-repo&quot;&gt;Link to CI Repo&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;To add to a repo with option to pull changes later&lt;&#x2F;p&gt;
&lt;p&gt;For SSH&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; remote add ci git@github.com:wykies&#x2F;rust-ci-conf.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For HTTPS (Not tested)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; remote add ci https:&#x2F;&#x2F;github.com&#x2F;wykies&#x2F;rust-ci-conf.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;fetch-from-ci-repo&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#fetch-from-ci-repo&quot; aria-label=&quot;Anchor link for: fetch-from-ci-repo&quot;&gt;Fetch from CI Repo&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; fetch ci&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;initially-merge-into-current-history&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#initially-merge-into-current-history&quot; aria-label=&quot;Anchor link for: initially-merge-into-current-history&quot;&gt;Initially merge into current history&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;strong&gt;Warning&lt;&#x2F;strong&gt;: If you are using gitflow, initialize it &lt;strong&gt;BEFORE&lt;&#x2F;strong&gt; doing this. See &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;ci&#x2F;#explanation-of-problem-situation&quot;&gt;reason &#x2F; case tested&lt;&#x2F;a&gt;.
And &lt;strong&gt;DON’T&lt;&#x2F;strong&gt; use the &lt;code&gt;sync&lt;&#x2F;code&gt; button in vscode until you do the &lt;code&gt;git push&lt;&#x2F;code&gt; at the end of the instructions.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; merge&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --allow-unrelated&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ci&#x2F;main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;push-changes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#push-changes&quot; aria-label=&quot;Anchor link for: push-changes&quot;&gt;Push Changes&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;strong&gt;NOTE&lt;&#x2F;strong&gt;: use the command line for this not the &lt;code&gt;sync&lt;&#x2F;code&gt; button in vscode.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; push&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;update-with-new-ci-config&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#update-with-new-ci-config&quot; aria-label=&quot;Anchor link for: update-with-new-ci-config&quot;&gt;Update with new CI config&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;When the CI has been updated and you want to pull in the updates use the following command.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; merge ci&#x2F;main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;explanation-of-problem-situation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#explanation-of-problem-situation&quot; aria-label=&quot;Anchor link for: explanation-of-problem-situation&quot;&gt;Explanation of problem situation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Problem is that I was using the &lt;code&gt;--allow-unrelated&lt;&#x2F;code&gt; each time. And it was copying in the entire remote history each time. But this only seemed to happen if I initialized gitflow after having done the initial time. See actual steps that caused this problem. This may not be the only possible reason, more testing was not done to disprove other solutions.&lt;&#x2F;p&gt;
&lt;p&gt;Discovered this by:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Running the &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;ci&#x2F;#initially-merge-into-current-history&quot;&gt;initial merge&lt;&#x2F;a&gt; command on main&lt;&#x2F;li&gt;
&lt;li&gt;Repeating the &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;ci&#x2F;#initially-merge-into-current-history&quot;&gt;initial merge&lt;&#x2F;a&gt; on main to confirm it says “Already up to date”&lt;&#x2F;li&gt;
&lt;li&gt;Initializing gitflow&lt;&#x2F;li&gt;
&lt;li&gt;Trying the &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;ci&#x2F;#initially-merge-into-current-history&quot;&gt;initial merge&lt;&#x2F;a&gt; command again on develop and noticing that it brought in all the history again.&lt;&#x2F;li&gt;
&lt;li&gt;Repeated several times and each time it brought in all the history again&lt;&#x2F;li&gt;
&lt;li&gt;After resting the history I did it on develop and repeated without issue.&lt;&#x2F;li&gt;
&lt;li&gt;Branched off develop and used the &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;ci&#x2F;#initially-merge-into-current-history&quot;&gt;initial merge&lt;&#x2F;a&gt; command again and it said up to date&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I also ended up in the problem situation after gitflow had been started, when I used the &lt;code&gt;sync&lt;&#x2F;code&gt; button in vscode.
Didn’t do more testing to figure it out but noted so avoid ending up in that problem again or for later testing.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>rustfmt</title>
        <published>2023-09-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/rustfmt/"/>
        <id>https://dev.chester.wykies.com/rust/rustfmt/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/rustfmt/">&lt;h1 id=&quot;run-rustfmt-using-nightly-compiler&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#run-rustfmt-using-nightly-compiler&quot; aria-label=&quot;Anchor link for: run-rustfmt-using-nightly-compiler&quot;&gt;Run rustfmt using nightly compiler&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;This might be needed if you want to use nighty only features&lt;&#x2F;p&gt;
&lt;h2 id=&quot;to-format-specific-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#to-format-specific-file&quot; aria-label=&quot;Anchor link for: to-format-specific-file&quot;&gt;To format specific file&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Does the whole file plus any files included in it like the rest of the library in this example&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rustfmt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; +nightly src&#x2F;lib.rs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;to-format-all-binary-and-library-targets-of-your-crate&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#to-format-all-binary-and-library-targets-of-your-crate&quot; aria-label=&quot;Anchor link for: to-format-all-binary-and-library-targets-of-your-crate&quot;&gt;To format all binary and library targets of your crate&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; +nightly fmt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;using-comment-wrapping-comment-width&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-comment-wrapping-comment-width&quot; aria-label=&quot;Anchor link for: using-comment-wrapping-comment-width&quot;&gt;Using comment wrapping (comment_width)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-lang.github.io&#x2F;rustfmt&#x2F;#comment_width&quot;&gt;https:&#x2F;&#x2F;rust-lang.github.io&#x2F;rustfmt&#x2F;#comment_width&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Needs this setting in the &lt;code&gt;rustfmt.toml&lt;&#x2F;code&gt; and must be uncommented to use but must tay commented when using the normal stable compiler as it hasn’t been standardized as yet.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# `wrap_comments` is unstable so to use you need to use nightly.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# Uncomment the line below then run `cargo +nightly fmt`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# wrap_comments = true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Single file script</title>
        <published>2023-09-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/scripts/"/>
        <id>https://dev.chester.wykies.com/rust/scripts/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/scripts/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;nightly&#x2F;cargo&#x2F;reference&#x2F;unstable.html#script&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;nightly&#x2F;cargo&#x2F;reference&#x2F;unstable.html#script&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Make file executable and then you can just run it.
Cargo will automatically deal with caching for you.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;without-dependencies&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#without-dependencies&quot; aria-label=&quot;Anchor link for: without-dependencies&quot;&gt;Without Dependencies&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;!&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;usr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;bin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;S&lt;&#x2F;span&gt;&lt;span&gt; cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt;nightly&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zscript&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Hello World!&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;with-dependencies&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#with-dependencies&quot; aria-label=&quot;Anchor link for: with-dependencies&quot;&gt;With Dependencies&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;!&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;usr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;bin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;S&lt;&#x2F;span&gt;&lt;span&gt; cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt;nightly&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zscript&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;span&gt;cargo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;package&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;edition &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;2021&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; # &lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Desirable&lt;&#x2F;span&gt;&lt;span&gt; to stop warning but not needed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[dependencies]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;clap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; { version&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;4.2&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, features&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;derive&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; clap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Parser&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[derive(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Parser&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Debug&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[clap(version)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Args&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[clap(short, long, help &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Path to config&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    config&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Option&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;PathBuf&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; args&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Args&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;parse&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, args);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Snippets</title>
        <published>2023-09-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/snippets/"/>
        <id>https://dev.chester.wykies.com/rust/snippets/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/snippets/">&lt;h1 id=&quot;library-candidates&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#library-candidates&quot; aria-label=&quot;Anchor link for: library-candidates&quot;&gt;Library Candidates&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;read-number-from-stdin&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#read-number-from-stdin&quot; aria-label=&quot;Anchor link for: read-number-from-stdin&quot;&gt;Read number from stdin&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book&#x2F;ch02-00-guessing-game-tutorial.html#handling-invalid-input&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book&#x2F;ch02-00-guessing-game-tutorial.html#handling-invalid-input&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;io;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Please input a number&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; user_input&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;stdin&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;read_line&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;mut&lt;&#x2F;span&gt;&lt;span&gt; user_input)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Failed to read line&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    if let&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Ok&lt;&#x2F;span&gt;&lt;span&gt;(num)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; user_input&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;trim&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;parse&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;u32&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;The number entered is {num}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;read-file-line-by-line&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#read-file-line-by-line&quot; aria-label=&quot;Anchor link for: read-file-line-by-line&quot;&gt;Read file (line by line)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;rust-by-example&#x2F;std_misc&#x2F;file&#x2F;read_lines.html&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;rust-by-example&#x2F;std_misc&#x2F;file&#x2F;read_lines.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;error&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Error&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;File&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; BufRead&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;(),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Box&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;dyn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Error&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; line&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; read_lines&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;filename&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; line&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; line&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{line}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; The output is wrapped in a Result to allow matching on errors&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; Returns an Iterator to the Reader of the lines of the file.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; read_lines&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;P&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; AsRef&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;(path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; P&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Lines&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;BufReader&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;File&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; File&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;open&lt;&#x2F;span&gt;&lt;span&gt;(path)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;BufReader&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(file)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;lines&lt;&#x2F;span&gt;&lt;span&gt;())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;read-file-to-string&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#read-file-to-string&quot; aria-label=&quot;Anchor link for: read-file-to-string&quot;&gt;Read file to string&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;(),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Box&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;dyn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Error&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; _&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;read_to_string&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;filename&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;write-string-to-a-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#write-string-to-a-file&quot; aria-label=&quot;Anchor link for: write-string-to-a-file&quot;&gt;Write string to a file&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;error&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Error&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Write&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;(),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Box&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;dyn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Error&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    write_to_path&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;filename.txt&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;text for file&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; write_to_path&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;P&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; AsRef&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;(path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; P&lt;&#x2F;span&gt;&lt;span&gt;, s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;: &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;str&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;(),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Box&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;dyn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Error&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;OpenOptions&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;write&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;create&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;truncate&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;open&lt;&#x2F;span&gt;&lt;span&gt;(path)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;write_all&lt;&#x2F;span&gt;&lt;span&gt;(s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_bytes&lt;&#x2F;span&gt;&lt;span&gt;())&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;OR with a trait (may not be great for a library as is because it’s very opinionated with regard to overwrite)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; anyhow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Context&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; _;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;pub trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; SaveToFile&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F;&#x2F; Writes the file replacing if it already exists&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; write_to_path&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;P&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; AsRef&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;, path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; P&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; anyhow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;()&amp;gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;T&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; AsRef&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;str&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; SaveToFile&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; T&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; write_to_path&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;P&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; AsRef&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;, path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; P&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; anyhow&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;()&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let mut&lt;&#x2F;span&gt;&lt;span&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;OpenOptions&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;truncate&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;write&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;create&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;true&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;open&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;path)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;with_context&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;||&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;                format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;                    &amp;quot;failed to open file for writing. Filename: {:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                    path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_ref&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                )&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            })&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;write_all&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_ref&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_bytes&lt;&#x2F;span&gt;&lt;span&gt;())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;with_context&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;||&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;failed to write contents to: {:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_ref&lt;&#x2F;span&gt;&lt;span&gt;()))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;print-without-new-line-and-flush&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#print-without-new-line-and-flush&quot; aria-label=&quot;Anchor link for: print-without-new-line-and-flush&quot;&gt;Print without new line (and flush)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Note: flush is required as &lt;code&gt;print!()&lt;&#x2F;code&gt; does not automatically flush like &lt;code&gt;println!()&lt;&#x2F;code&gt; does&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;print!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;This may not print when we want unless we flush&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;stdout&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;flush&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;add-an-extension-to-a-path&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-an-extension-to-a-path&quot; aria-label=&quot;Anchor link for: add-an-extension-to-a-path&quot;&gt;Add an extension to a path&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;users.rust-lang.org&#x2F;t&#x2F;append-an-additional-extension&#x2F;23586&#x2F;13&quot;&gt;https:&#x2F;&#x2F;users.rust-lang.org&#x2F;t&#x2F;append-an-additional-extension&#x2F;23586&#x2F;13&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;pub trait&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PathExtension&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F;&#x2F; Returns the result of set_extension with the appended extension&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; add_extension&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;P&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; AsRef&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;mut&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span&gt;, new_extension&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; P&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; bool&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PathExtension&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PathBuf&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; add_extension&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;P&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; AsRef&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Path&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;mut&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span&gt;, extension&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; P&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; bool&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        match&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;extension&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            Some&lt;&#x2F;span&gt;&lt;span&gt;(ext)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;                let mut&lt;&#x2F;span&gt;&lt;span&gt; ext&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; ext&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to_os_string&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                ext&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;push&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;.&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;                ext&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;push&lt;&#x2F;span&gt;&lt;span&gt;(extension&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_ref&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;                self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;set_extension&lt;&#x2F;span&gt;&lt;span&gt;(ext)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            None&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;set_extension&lt;&#x2F;span&gt;&lt;span&gt;(extension&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_ref&lt;&#x2F;span&gt;&lt;span&gt;()),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;add-commas-to-number-for-display&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-commas-to-number-for-display&quot; aria-label=&quot;Anchor link for: add-commas-to-number-for-display&quot;&gt;Add commas to number for display&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;NB: To the best of my recollection here is also a crate that provides a more robust implementation&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; as_string_with_separators&lt;&#x2F;span&gt;&lt;span&gt;(value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; usize&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    value&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to_string&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_bytes&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rchunks&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;3&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rev&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;str&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;from_utf8)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;collect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;str&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;, _&amp;gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;join&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;,&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;replace-escaped-special-characters-with-the-actual-special-characters&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#replace-escaped-special-characters-with-the-actual-special-characters&quot; aria-label=&quot;Anchor link for: replace-escaped-special-characters-with-the-actual-special-characters&quot;&gt;Replace escaped special characters with the actual special characters&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;This one feels like there should be a better way but I haven’t needed it so not sure but the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;aho-corasick&#x2F;latest&#x2F;aho_corasick&#x2F;&quot;&gt;aho_corasick&lt;&#x2F;a&gt; crate could do multiple find and replace simultaneously instead of sequentially if I recall correctly.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; clean_msg&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;S&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; AsRef&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;str&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt;(msg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; S&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    msg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_ref&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;replace&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;r&amp;quot;\n&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;replace&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;r#&amp;quot;\&amp;quot;&amp;quot;#&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;tests&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tests&quot; aria-label=&quot;Anchor link for: tests&quot;&gt;Tests&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;unit-tests&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#unit-tests&quot; aria-label=&quot;Anchor link for: unit-tests&quot;&gt;Unit tests&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[cfg(test)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;mod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; tests&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; super&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::*&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[test]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; it_works&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; result&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        assert_eq!&lt;&#x2F;span&gt;&lt;span&gt;(result,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;panic-expectation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#panic-expectation&quot; aria-label=&quot;Anchor link for: panic-expectation&quot;&gt;Panic expectation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[should_panic(expected &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;message seems to need to be on first line of text&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; it_should_panic&lt;&#x2F;span&gt;&lt;span&gt;() {}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;run-cli-app-to-test-it&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#run-cli-app-to-test-it&quot; aria-label=&quot;Anchor link for: run-cli-app-to-test-it&quot;&gt;Run CLI App to test it&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;NOTE: Only works from integration tests&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# Cargo.toml&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;dev-dependencies&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;assert_cmd =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;2.0.7&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;predicates =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;2.1.5&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; main.rs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;BufRead&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    for&lt;&#x2F;span&gt;&lt;span&gt; line&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; in&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;stdin&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;lock&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;lines&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, line&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Unable to read input line&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; tests&#x2F;integration_test.rs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; assert_cmd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;prelude&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::*&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Add methods on commands&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; predicates&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;prelude&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::*&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Used for writing assertions&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; File&lt;&#x2F;span&gt;&lt;span&gt;},&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    process&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Command&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[test]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; run_executable&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;(),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Box&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;dyn&lt;&#x2F;span&gt;&lt;span&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;error&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Error&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; You may want to include the calls to trim but depending on your use case you might not.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; They are optional but included as they are easier to remove than figure out where to add&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Note that input it not trimmed, only expected_output and output&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; input_file&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; File&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;open&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;input.txt&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; expected_output_filename&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;expected_output.txt&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; expected_output&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; fs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;read_to_string&lt;&#x2F;span&gt;&lt;span&gt;(expected_output_filename)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;map_err&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Failed to load output: {expected_output_filename} Error:{e}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;))&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;trim&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Trim expected output&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to_owned&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo_bin&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;myapp&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;stdin&lt;&#x2F;span&gt;&lt;span&gt;(input_file)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;assert&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;stdout&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            predicate&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;str&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;diff&lt;&#x2F;span&gt;&lt;span&gt;(expected_output)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;trim&lt;&#x2F;span&gt;&lt;span&gt;(),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Trims actual output&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        );&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;get-input-arguments-to-a-program&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-input-arguments-to-a-program&quot; aria-label=&quot;Anchor link for: get-input-arguments-to-a-program&quot;&gt;Get input arguments to a program&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book&#x2F;ch12-01-accepting-command-line-arguments.html#saving-the-argument-values-in-variables&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book&#x2F;ch12-01-accepting-command-line-arguments.html#saving-the-argument-values-in-variables&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;env;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; args&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;String&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;args&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;collect&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; query&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; = &amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;args[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; file_path&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; = &amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;args[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Searching for {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, query);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;In file {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, file_path);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;loop-nesting-and-labels&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#loop-nesting-and-labels&quot; aria-label=&quot;Anchor link for: loop-nesting-and-labels&quot;&gt;Loop nesting and labels&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;rust-by-example&#x2F;flow_control&#x2F;loop&#x2F;nested.html&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;rust-by-example&#x2F;flow_control&#x2F;loop&#x2F;nested.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;outer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;: loop&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Entered the outer loop&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;inner&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;: loop&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Entered the inner loop&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;            &#x2F;&#x2F; This would break only the inner loop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;            &#x2F;&#x2F;break;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;            &#x2F;&#x2F; This breaks the outer loop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            break&lt;&#x2F;span&gt;&lt;span&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;outer&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;This point will never be reached&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Exited the outer loop&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;float-eq-and-ord-wrapper&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#float-eq-and-ord-wrapper&quot; aria-label=&quot;Anchor link for: float-eq-and-ord-wrapper&quot;&gt;Float Eq and Ord Wrapper&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;This may be better served by using the crate float_ord. See &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;refs&#x2F;#useful-crates&quot;&gt;useful crate&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[derive(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Debug&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Clone&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Copy&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PartialEq&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F;&#x2F; Wraps a float and implements Ord but panics if value is NaN&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;struct&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; FloatNonNAN&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; FloatNonNAN&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F;&#x2F; Creates a new [Self] with constraint that value cannot be NAN or function panics&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    pub fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; new&lt;&#x2F;span&gt;&lt;span&gt;(value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; Self&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        assert!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            !&lt;&#x2F;span&gt;&lt;span&gt;value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;is_nan&lt;&#x2F;span&gt;&lt;span&gt;(),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;            &amp;quot;NAN is not allowed as it is not equal to itself and thus invalid for an impl of Ord&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        );&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        Self&lt;&#x2F;span&gt;&lt;span&gt;(value)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Eq&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; FloatNonNAN&lt;&#x2F;span&gt;&lt;span&gt; {}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Ord&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; FloatNonNAN&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; cmp&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;, other&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;: &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;Self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cmp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Ordering&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;partial_cmp&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;other&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;This should work unless one of them is NAN&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PartialOrd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; FloatNonNAN&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; partial_cmp&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;, other&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;: &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;Self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Option&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;cmp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Ordering&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;partial_cmp&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;other&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; AsRef&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; FloatNonNAN&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; as_ref&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; PartialEq&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; FloatNonNAN&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; eq&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;, other&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;: &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;f64&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; bool&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span&gt; other&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; From&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;FloatNonNAN&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; from&lt;&#x2F;span&gt;&lt;span&gt;(value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; FloatNonNAN&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; Self&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        value&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;impl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ops&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Mul&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; for&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; FloatNonNAN&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Output&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; Self&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; mul&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span&gt;, rhs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; Self&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; Self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Output&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        FloatNonNAN&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;self&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span&gt; rhs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;collect-into-a-result&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#collect-into-a-result&quot; aria-label=&quot;Anchor link for: collect-into-a-result&quot;&gt;Collect into a result&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;One fail means the first error is returned (Remember this from the rust book but couldn’t find it).
Mostly needed when I’m using iterators and need to do a map step that may fail.
Usual issue is not remembering to wrap the good option in Ok.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;(),&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Box&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;dyn&lt;&#x2F;span&gt;&lt;span&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;error&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Error&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; numbers&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;u8&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;..&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;10&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;step_by&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;collect&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; all_even&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;u8&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; numbers&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;iter&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cloned&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt;x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;            if&lt;&#x2F;span&gt;&lt;span&gt; x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; ==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;                Ok&lt;&#x2F;span&gt;&lt;span&gt;(x)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; else&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;                Err&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Oops we founds a odd number&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        })&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;collect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;u8&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;, _&amp;gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{all_even:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;get-number-of-seconds-until-midnight&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-number-of-seconds-until-midnight&quot; aria-label=&quot;Anchor link for: get-number-of-seconds-until-midnight&quot;&gt;Get number of seconds until midnight&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;47708305&#x2F;calculate-the-duration-between-now-and-the-next-midnight-using-chrono&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;47708305&#x2F;calculate-the-duration-between-now-and-the-next-midnight-using-chrono&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Requires the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;chrono&quot;&gt;chrono&lt;&#x2F;a&gt; crate.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; duration&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; seconds_to&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Duration until midnight {duration:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; seconds_to&lt;&#x2F;span&gt;&lt;span&gt;(days&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; i64&lt;&#x2F;span&gt;&lt;span&gt;, hour&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span&gt;, min&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span&gt;, sec&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; u32&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Option&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Duration&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; new_date_time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Duration&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;days&lt;&#x2F;span&gt;&lt;span&gt;(days))&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;date_naive&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;and_hms_opt&lt;&#x2F;span&gt;&lt;span&gt;(hour, min, sec)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    match&lt;&#x2F;span&gt;&lt;span&gt; new_date_time&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;signed_duration_since&lt;&#x2F;span&gt;&lt;span&gt;(now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;naive_local&lt;&#x2F;span&gt;&lt;span&gt;())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to_std&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        Ok&lt;&#x2F;span&gt;&lt;span&gt;(result)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Some&lt;&#x2F;span&gt;&lt;span&gt;(result),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        Err&lt;&#x2F;span&gt;&lt;span&gt;(e)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            dbg!&lt;&#x2F;span&gt;&lt;span&gt;(e);&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Might want to log this error or return a result as suitable to your application&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            None&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;random&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#random&quot; aria-label=&quot;Anchor link for: random&quot;&gt;Random&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-random.github.io&#x2F;book&#x2F;guide-values.html#the-rng-trait&quot;&gt;https:&#x2F;&#x2F;rust-random.github.io&#x2F;book&#x2F;guide-values.html#the-rng-trait&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Copied here for faster lookup without having to search for it again.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; add rand&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; rand&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Rng&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; rng&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; rand&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;thread_rng&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; an unbiased integer over the entire range:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; i32&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; rng&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;gen&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;i = {i}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; a uniformly distributed value between 0 and 1:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; f64&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; rng&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;gen&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;x = {x}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; simulate rolling a die:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;roll = {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, rng&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;gen_range&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;..=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;6&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;wrap-a-call-to-the-format-macro&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#wrap-a-call-to-the-format-macro&quot; aria-label=&quot;Anchor link for: wrap-a-call-to-the-format-macro&quot;&gt;Wrap a call to the format macro&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;32289605&#x2F;how-do-i-write-a-wrapper-for-a-macro-without-repeating-the-rules&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;32289605&#x2F;how-do-i-write-a-wrapper-for-a-macro-without-repeating-the-rules&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Useful when you want provide the same calling syntax as &lt;code&gt;format!()&lt;&#x2F;code&gt; but you want to perform additional steps.
In this example postfix the text with error and add the position it occurred in the code.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[macro_export]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;macro_rules! internal_error&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt;arg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span&gt;tt)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;*&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; {{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; res&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span&gt;arg)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;*&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        let&lt;&#x2F;span&gt;&lt;span&gt; internal_error_msg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;            &amp;quot;{}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;internal error: {}:{}:{}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            res,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            file!&lt;&#x2F;span&gt;&lt;span&gt;(),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            line!&lt;&#x2F;span&gt;&lt;span&gt;(),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;            column!&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        );&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        tracing&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;error!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;internal_error_msg);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        internal_error_msg&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Publish Crate</title>
        <published>2023-08-26T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/publish-crate/"/>
        <id>https://dev.chester.wykies.com/rust/publish-crate/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/publish-crate/">&lt;h1 id=&quot;steps-to-publish&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#steps-to-publish&quot; aria-label=&quot;Anchor link for: steps-to-publish&quot;&gt;Steps to publish&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;publishing.html&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;publishing.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;These instructions assume that you have signed up on crates.io and are logged in locally in cargo.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ensure version has been updated as the same version cannot be published twice&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Test packaging the crate&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cargo package&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;or&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cargo publish&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; --&lt;&#x2F;span&gt;&lt;span&gt;dry&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt;run&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Then publish&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cargo publish&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>VMware Tools</title>
        <published>2023-08-23T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/vmware/vmware-tools/"/>
        <id>https://dev.chester.wykies.com/vmware/vmware-tools/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/vmware/vmware-tools/">&lt;h1 id=&quot;install-from-repo&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-from-repo&quot; aria-label=&quot;Anchor link for: install-from-repo&quot;&gt;Install from Repo&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Tested on Ubuntu 18.04 (2022-12-02)&lt;&#x2F;p&gt;
&lt;p&gt;When trying the &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;vmware&#x2F;vmware-tools&#x2F;#install-from-vmware-cd&quot;&gt;other instructions&lt;&#x2F;a&gt; I got a message prompt encouraging me to use the package
for my OS. Which I did and it seems to have worked without issue (The message in the browser saying VMTools is not
installed went away). Only required one command as below.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install open-vm-tools&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;install-from-vmware-cd&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-from-vmware-cd&quot; aria-label=&quot;Anchor link for: install-from-vmware-cd&quot;&gt;Install From VMWare CD&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Tested on Ubuntu 22.04 (2022-09-20)&lt;&#x2F;p&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;knowledge.broadcom.com&#x2F;external&#x2F;article?legacyId=1022525&quot;&gt;https:&#x2F;&#x2F;knowledge.broadcom.com&#x2F;external&#x2F;article?legacyId=1022525&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;NB: Main thing reason for creating documentation was to note that the error message &lt;code&gt;Segmentation Fault (core dumped)&lt;&#x2F;code&gt;
is normal, and it should be ignored.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;mount-cd-image&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mount-cd-image&quot; aria-label=&quot;Anchor link for: mount-cd-image&quot;&gt;Mount CD Image&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;Virtual Machine&lt;&#x2F;strong&gt; &amp;gt; &lt;strong&gt;Install VMware Tools&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;extract-installation-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#extract-installation-files&quot; aria-label=&quot;Anchor link for: extract-installation-files&quot;&gt;Extract installation files&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Navigate to the CD&lt;&#x2F;li&gt;
&lt;li&gt;Copy the file similar to &lt;code&gt;VMwareTools.x.x.x-xxxx.tar.gz&lt;&#x2F;code&gt; to the desktop&lt;&#x2F;li&gt;
&lt;li&gt;Extract the contents of the &lt;code&gt;VMwareTools.x.x.x-xxxx.tar.gz&lt;&#x2F;code&gt; file&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;run-installation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#run-installation&quot; aria-label=&quot;Anchor link for: run-installation&quot;&gt;Run installation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Navigate into the extracted folder &lt;code&gt;vmware-tools-distrib&lt;&#x2F;code&gt; and run the installer:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; .&#x2F;vmware-install.pl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Take the defaults and ignore the error message about the &lt;code&gt;Segmentation Fault (core dumped)&lt;&#x2F;code&gt; it takes a while but the
installation continues.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Crate Tokio</title>
        <published>2023-08-21T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/crate-tokio/"/>
        <id>https://dev.chester.wykies.com/rust/crate-tokio/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/crate-tokio/">&lt;h1 id=&quot;setup-a-runtime-environment&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setup-a-runtime-environment&quot; aria-label=&quot;Anchor link for: setup-a-runtime-environment&quot;&gt;Setup a runtime environment&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;users.rust-lang.org&#x2F;t&#x2F;calling-async-function-from-main&#x2F;53314&quot;&gt;https:&#x2F;&#x2F;users.rust-lang.org&#x2F;t&#x2F;calling-async-function-from-main&#x2F;53314&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;use-macro-on-main&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#use-macro-on-main&quot; aria-label=&quot;Anchor link for: use-macro-on-main&quot;&gt;Use macro on main&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[tokio&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;main]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;async fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    do_thing&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.await&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;async fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; do_thing&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Yep I ran&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;manually-create-a-runtime&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#manually-create-a-runtime&quot; aria-label=&quot;Anchor link for: manually-create-a-runtime&quot;&gt;Manually create a runtime&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Note: It’s important that you use block_on as if there isn’t something that is being awaiting the runtime stops.
Can’t remember the source but I forgot to block on at least one thing and then I couldn’t spawn anything and have it run (wasted a lot of time).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; rt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; tokio&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;runtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Runtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    rt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;block_on&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;do_thing&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;async fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; do_thing&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Yep I ran&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Memory</title>
        <published>2023-08-16T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/python/memory/"/>
        <id>https://dev.chester.wykies.com/python/memory/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/python/memory/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;tracemalloc.html&quot;&gt;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;tracemalloc.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;See excerpt from introductory paragraph&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;To trace most memory blocks allocated by Python, the module should be started as early as possible by setting the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;using&#x2F;cmdline.html#envvar-PYTHONTRACEMALLOC&quot;&gt;PYTHONTRACEMALLOC&lt;&#x2F;a&gt; environment variable to 1, or by using &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;using&#x2F;cmdline.html#cmdoption-X&quot;&gt;-X&lt;&#x2F;a&gt; tracemalloc command line option. The &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;tracemalloc.html#tracemalloc.start&quot;&gt;tracemalloc.start()&lt;&#x2F;a&gt; function can be called at runtime to start tracing Python memory allocations.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;See &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;tracemalloc.html#record-the-current-and-peak-size-of-all-traced-memory-blocks&quot;&gt;docs&lt;&#x2F;a&gt; for full example&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;import&lt;&#x2F;span&gt;&lt;span&gt; tracemalloc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tracemalloc.start()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;size, peak&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; tracemalloc.get_traced_memory()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Attach File Inside PDF</title>
        <published>2023-08-15T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/latex/attachfile/"/>
        <id>https://dev.chester.wykies.com/latex/attachfile/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/latex/attachfile/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;tex.stackexchange.com&#x2F;questions&#x2F;18271&#x2F;include-binary-data&quot;&gt;https:&#x2F;&#x2F;tex.stackexchange.com&#x2F;questions&#x2F;18271&#x2F;include-binary-data&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This allows you to include (embed) a file in the output PDF like an attachment.
It is easy enough to get the base functionality.
You just add a use statement&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;tex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\usepackage&lt;&#x2F;span&gt;&lt;span&gt;{attachfile}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;then just add the attach command (in the example the file is called a.tar.xz)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;tex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\attachfile&lt;&#x2F;span&gt;&lt;span&gt;{a.tar.xz}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To get the file back out of the PDF I have found mixed support in readers but Firefox allows you to double click on the icon that is generated and opens a download dialog.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Time</title>
        <published>2023-08-15T00:00:00+00:00</published>
        <updated>2026-05-15T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/time/"/>
        <id>https://dev.chester.wykies.com/rust/time/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/time/">&lt;h1 id=&quot;standard-library&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#standard-library&quot; aria-label=&quot;Anchor link for: standard-library&quot;&gt;Standard Library&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Unless you’re only measuring duration you’re probably going to want to reach for a create for more full date&#x2F;time support. See example below of how to measure duration.&lt;&#x2F;p&gt;
&lt;p&gt;Chrono is now soft deprecated (See &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;chronotope&#x2F;chrono&#x2F;issues&#x2F;1301#issuecomment-4321773137&quot;&gt;message&lt;&#x2F;a&gt; from maintainer), I’m moving to &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;jiff&#x2F;latest&#x2F;&quot;&gt;jiff&lt;&#x2F;a&gt; as it’s very easy to use and fits well in all use cases I’ve wanted to use it.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;measure-duration&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#measure-duration&quot; aria-label=&quot;Anchor link for: measure-duration&quot;&gt;Measure duration&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;&#x2F;strong&gt;: duration does &lt;strong&gt;NOT&lt;&#x2F;strong&gt; keep counting if the computer goes to sleep (The time while the computer is suspended does not count).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Duration&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Instant&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;thread;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; expensive_function&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    thread&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sleep&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Duration&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from_secs&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Instant&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    expensive_function&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; duration&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; start&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;elapsed&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Time elapsed in expensive_function() is: {:?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, duration);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;get-duration-since-unix-epoch&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#get-duration-since-unix-epoch&quot; aria-label=&quot;Anchor link for: get-duration-since-unix-epoch&quot;&gt;Get duration since UNIX_EPOCH&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;time&#x2F;constant.UNIX_EPOCH.html&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;time&#x2F;constant.UNIX_EPOCH.html&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;26593387&#x2F;how-can-i-get-the-current-time-in-milliseconds&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;26593387&#x2F;how-can-i-get-the-current-time-in-milliseconds&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;SystemTime&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; UNIX_EPOCH&lt;&#x2F;span&gt;&lt;span&gt;};&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;match&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; SystemTime&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;duration_since&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;UNIX_EPOCH&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(n)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;1970-01-01 00:00:00 UTC was {} seconds ago!&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_secs&lt;&#x2F;span&gt;&lt;span&gt;()),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Err&lt;&#x2F;span&gt;&lt;span&gt;(_)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; panic!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;SystemTime before UNIX EPOCH!&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;match&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; UNIX_EPOCH&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;elapsed&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        Ok&lt;&#x2F;span&gt;&lt;span&gt;(n)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;1970-01-01 00:00:00 UTC was {} seconds ago!&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_secs&lt;&#x2F;span&gt;&lt;span&gt;()),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        Err&lt;&#x2F;span&gt;&lt;span&gt;(_)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; panic!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;SystemTime before UNIX EPOCH!&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;),&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;display-current-date-time&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#display-current-date-time&quot; aria-label=&quot;Anchor link for: display-current-date-time&quot;&gt;Display current date&#x2F;time&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;details&gt;
&lt;summary&gt;See previous example that used chrono&lt;&#x2F;summary&gt;
Source: &lt;https:&#x2F;&#x2F;rust-lang-nursery.github.io&#x2F;rust-cookbook&#x2F;datetime&#x2F;parse.html#display-formatted-date-and-time&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() { &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;DateTime&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Utc&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Utc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;UTC time now is: {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, now);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Local time now is: {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, now);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;&#x2F;details&gt;
&lt;p&gt;See &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;time&#x2F;#formatting-syntax&quot;&gt;Formatting Syntax&lt;&#x2F;a&gt; for more details on options regarding formatting.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now_zoned&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; jiff&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zoned&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Now in the detected timezone is: {now_zoned}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Prints something like:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Now in the detected timezone is: 2026-05-15T13:30:31.200583642-04:00[America&#x2F;New_York]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now_civil&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; now_zoned&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;datetime&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;civil::DateTime capture the date and time but not the timezone: {now_civil}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Prints something like:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; civil::DateTime capture the date and time but not the timezone: 2026-05-15T13:30:31.200583642&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;convert-between-timezones&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#convert-between-timezones&quot; aria-label=&quot;Anchor link for: convert-between-timezones&quot;&gt;Convert between timezones&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;details&gt;
&lt;summary&gt;See previous example that used chrono&lt;&#x2F;summary&gt;
Source: &lt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;28747694&#x2F;how-do-i-convert-a-chrono-datetimeutc-instance-to-datetimelocal&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; utc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;DateTime&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Utc&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Utc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;DateTime&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Local&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;DateTime&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span&gt;(utc);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;UTC time now is: {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, utc);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Local time now is: {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, local);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;&#x2F;details&gt;
&lt;p&gt;See the documentation on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;jiff&#x2F;latest&#x2F;jiff&#x2F;struct.Zoned.html#method.now&quot;&gt;jiff::Zoned::now()&lt;&#x2F;a&gt; if you don’t need to start off in the current timezone as you can start with just a timestamp and avoid the lookup for local.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;(), jiff&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Error&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; jiff&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zoned&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; utc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;in_tz&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;UTC&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Local time now is: {local}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;UTC time now is: {utc}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Prints something like&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Local time now is: 2026-05-15T13:39:41.211169613-04:00[America&#x2F;New_York]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; UTC time now is: 2026-05-15T17:39:41.211169613+00:00[UTC]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;in-wasm&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#in-wasm&quot; aria-label=&quot;Anchor link for: in-wasm&quot;&gt;In WASM&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;details&gt;
&lt;summary&gt;See previous example that used chrono&lt;&#x2F;summary&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;timclicks.dev&#x2F;tip&#x2F;convert-a-unix-timestamp-to-rust&quot;&gt;https:&#x2F;&#x2F;timclicks.dev&#x2F;tip&#x2F;convert-a-unix-timestamp-to-rust&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;!&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;usr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;bin&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;S&lt;&#x2F;span&gt;&lt;span&gt; cargo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; +&lt;&#x2F;span&gt;&lt;span&gt;nightly&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zscript&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;span&gt;cargo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;package&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;edition &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;2021&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; # &lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Desirable&lt;&#x2F;span&gt;&lt;span&gt; to stop warning but not needed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[dependencies]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; { version&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;0.4.34&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, default&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt;features&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; false&lt;&#x2F;span&gt;&lt;span&gt;, features&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;clock&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;] }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;web&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;1.0.0&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;---&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;The date and time now is {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; now_date_time_as_string&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;        &amp;quot;The date and time now is {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        now_date_time_as_string_native_only&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    );&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; now_date_time_as_string&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;TimeZone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; as&lt;&#x2F;span&gt;&lt;span&gt; _;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; time_stamp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; web_time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;SystemTime&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;UNIX_EPOCH&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;elapsed&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;expected date on system to be after the epoch&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_secs&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; time_stamp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; time_stamp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;try_into&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;expect&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;wow this program wasn&amp;#39;t meant to last that long&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; dt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;DateTime&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from_timestamp&lt;&#x2F;span&gt;&lt;span&gt;(time_stamp,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;with_timezone&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Local&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    dt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;%c&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to_string&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; Other version use web_time instead of std::time so it can work in WASM&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; If you don&amp;#39;t need WASM use this version&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; now_date_time_as_string_native_only&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;%c&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to_string&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;&#x2F;details&gt;
&lt;p&gt;If you are targeting the browser then you only need to enable the &lt;code&gt;js&lt;&#x2F;code&gt; feature in jiff and the same code works. If you don’t enable it you actually get a really good error message. I was pleasantly surprised. It wasn’t a stack trace from deep in the bowels of the standard library.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;The date and time now is {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; now_date_time_as_string&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; now_date_time_as_string&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; String&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; jiff&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zoned&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;strftime&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;%F %T&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to_string&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;formatting-syntax&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#formatting-syntax&quot; aria-label=&quot;Anchor link for: formatting-syntax&quot;&gt;Formatting syntax&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;details&gt;
&lt;summary&gt;See previous example that used chrono&lt;&#x2F;summary&gt;
&lt;p&gt;See &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;chrono&#x2F;latest&#x2F;chrono&#x2F;format&#x2F;strftime&#x2F;index.html#specifiers&quot;&gt;docs.rs&lt;&#x2F;a&gt; for full details&lt;&#x2F;p&gt;
&lt;p&gt;Excerpt from docs.rs&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Spec.&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Example&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Description&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%F&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;2001-07-08&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Year-month-day format (ISO 8601). Same as %Y-%m-%d.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%T&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;00:34:60&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Hour-minute-second format. Same as %H:%M:%S.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%c&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Sun Jul 8 00:34:60 2001&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Locale’s date and time (e.g., Thu Mar 3 23:05:25 2005).&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%a&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Sun&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Abbreviated weekday name. Always 3 letters.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%A&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Sunday&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Full weekday name. Also accepts corresponding abbreviation in parsing.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;hr &#x2F;&gt;
&lt;&#x2F;details&gt;
&lt;p&gt;See &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;jiff&#x2F;latest&#x2F;jiff&#x2F;fmt&#x2F;strtime&#x2F;index.html#conversion-specifications&quot;&gt;docs&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Excerpt from docs.rs&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Spec.&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: center&quot;&gt;Example&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Description&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%F&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;2024-07-14&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Equivalent to %Y-%m-%d.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%T&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;23:30:59&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Equivalent to %H:%M:%S.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%c&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;2024 M07 14, Sun 17:31:59&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;The date and clock time via &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;jiff&#x2F;latest&#x2F;jiff&#x2F;fmt&#x2F;strtime&#x2F;trait.Custom.html&quot;&gt;Custom&lt;&#x2F;a&gt;. Supported when formatting only.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;%A, %a&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: center&quot;&gt;Sunday, Sun&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;The full and abbreviated weekday, respectively.&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h2 id=&quot;example-usage&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-usage&quot; aria-label=&quot;Anchor link for: example-usage&quot;&gt;Example usage&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;details&gt;
&lt;summary&gt;See previous example that used chrono&lt;&#x2F;summary&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;chrono&#x2F;latest&#x2F;chrono&#x2F;offset&#x2F;struct.Local.html#method.now&quot;&gt;https:&#x2F;&#x2F;docs.rs&#x2F;chrono&#x2F;latest&#x2F;chrono&#x2F;offset&#x2F;struct.Local.html#method.now&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;DateTime&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;FixedOffset&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; chrono&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Local&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Current local time&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Formatted output: {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;format&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;now: {now}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Current local date&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; today&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;date_naive&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;today: {today}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Current local time, converted to `DateTime&amp;lt;FixedOffset&amp;gt;`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now_fixed_offset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;fixed_offset&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;now_fixed_offset: {now_fixed_offset}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; or&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now_fixed_offset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; DateTime&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;FixedOffset&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;into&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;now_fixed_offset: {now_fixed_offset}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Current time in some timezone (let&amp;#39;s use +05:00)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Note that it is usually more efficient to use `Utc::now` for this use case.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; offset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; FixedOffset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;east_opt&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;5&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 60&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 60&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;offset: {offset}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now_with_offset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Local&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;with_timezone&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt;offset);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;now_with_offset: {now_with_offset}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Output:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Formatted output: 2023-11-06 18:08:19&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;now: 2023-11-06 18:08:19.700476942 +00:00&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;today: 2023-11-06&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;now_fixed_offset: 2023-11-06 18:08:19.700581396 +00:00&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;now_fixed_offset: 2023-11-06 18:08:19.700585376 +00:00&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;offset: +05:00&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;now_with_offset: 2023-11-06 23:08:19.700591966 +05:00&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;&#x2F;details&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; -&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;(), jiff&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Error&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Current local time&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; jiff&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Zoned&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;now&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Formatted output: {}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;strftime&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;now: {now}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Current local date&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; today&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;date&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;today: {today}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Current time in some timezone (let&amp;#39;s use the time in Dominica)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; If you don&amp;#39;t need to start with the local time you can start with a timestamp (See section above called &amp;quot;Convert between timezones&amp;quot;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; dominica_time&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; now&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;in_tz&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;America&#x2F;Dominica&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;?&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Dominica Time: {dominica_time}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    Ok&lt;&#x2F;span&gt;&lt;span&gt;(())&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Output:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Formatted output: 2026-05-15 14:12:06&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;now: 2026-05-15T14:12:06.779365104-04:00[America&#x2F;New_York]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;today: 2026-05-15&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Dominica Time: 2026-05-15T14:12:06.779365104-04:00[America&#x2F;Dominica]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Compressed Files</title>
        <published>2023-07-28T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/compressed-files/"/>
        <id>https://dev.chester.wykies.com/debian/compressed-files/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/compressed-files/">&lt;h1 id=&quot;compressing-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#compressing-files&quot; aria-label=&quot;Anchor link for: compressing-files&quot;&gt;Compressing files&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;using-target-file-extension&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-target-file-extension&quot; aria-label=&quot;Anchor link for: using-target-file-extension&quot;&gt;Using target file extension&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Only tested and confirmed to work with:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.tar.xz&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;.tar.gz&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;tar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -caf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; archive.tar.xz file1 file2 file3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Can be used with * to include all files in folder&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;tar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -caf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; archive.tar.xz&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; *&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;specify-compression&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#specify-compression&quot; aria-label=&quot;Anchor link for: specify-compression&quot;&gt;Specify compression&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;compression-options&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#compression-options&quot; aria-label=&quot;Anchor link for: compression-options&quot;&gt;Compression options&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt; -a, --auto-compress        use archive suffix to determine the compression program&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;-j, --bzip2                filter the archive through bzip2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;-J, --xz                   filter the archive through xz&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    --lzip                 filter the archive through lzip&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    --lzma                 filter the archive through xz&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    --lzop                 filter the archive through lzop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    --zstd                 filter the archive through zstd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;-z, --gzip, --gunzip, --ungzip   filter the archive through gzip&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;example&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example&quot; aria-label=&quot;Anchor link for: example&quot;&gt;Example&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;tar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -cf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; archive.tar.xz file1 file2 file3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --xz&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;extracting-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#extracting-files&quot; aria-label=&quot;Anchor link for: extracting-files&quot;&gt;Extracting files&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;tar&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tar&quot; aria-label=&quot;Anchor link for: tar&quot;&gt;TAR&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;tar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -xf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; archive.tar.xz&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;tar-relevant-switches&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tar-relevant-switches&quot; aria-label=&quot;Anchor link for: tar-relevant-switches&quot;&gt;Tar relevant switches&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Taken from help message&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-x, --extract, --get       extract files from an archive&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-c, --create               create a new archive&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-f, --file=ARCHIVE         use archive file or device ARCHIVE&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-a, --auto-compress        use archive suffix to determine the compression program&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-z, --gzip, --gunzip, --ungzip   filter the archive through gzip&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-v, --verbose              verbosely list files processed&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;zip&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#zip&quot; aria-label=&quot;Anchor link for: zip&quot;&gt;Zip&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unzip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; archive.zip&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;uncompress-z-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#uncompress-z-files&quot; aria-label=&quot;Anchor link for: uncompress-z-files&quot;&gt;Uncompress .Z files&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.linuxfordevices.com&#x2F;tutorials&#x2F;linux&#x2F;uncompress-z-file&quot;&gt;https:&#x2F;&#x2F;www.linuxfordevices.com&#x2F;tutorials&#x2F;linux&#x2F;uncompress-z-file&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;uncompress&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; archive.z&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;or&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;gzip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; archive.z&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Create Bootable Flash Drive</title>
        <published>2023-07-27T00:00:00+00:00</published>
        <updated>2026-01-30T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/create-bootable-flash/"/>
        <id>https://dev.chester.wykies.com/debian/create-bootable-flash/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/create-bootable-flash/">&lt;h1 id=&quot;create-via-terminal&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-via-terminal&quot; aria-label=&quot;Anchor link for: create-via-terminal&quot;&gt;Create via terminal&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;display-list-of-hard-drives&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#display-list-of-hard-drives&quot; aria-label=&quot;Anchor link for: display-list-of-hard-drives&quot;&gt;Display List of Hard Drives&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;lsblk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;copy-iso-onto-a-flash-drive&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#copy-iso-onto-a-flash-drive&quot; aria-label=&quot;Anchor link for: copy-iso-onto-a-flash-drive&quot;&gt;Copy ISO onto a flash drive&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;TIP: Before executing the command below you may want to format the disk but not create a volume.
I didn’t format it once and it wrote to “cache” and I had a very hard time knowing when it was done actually writing to the drive.
I tried safely remove be eventually just gave up and pulled the drive out and then formatted it so the command returning would better sync with completion of copy.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;WARNING: Be very careful not to copy to root drive&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;em&gt;NB: Takes a while with no feedback, until fail&#x2F;pass&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; debian.iso &#x2F;dev&#x2F;sdX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;create-via-gui&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-via-gui&quot; aria-label=&quot;Anchor link for: create-via-gui&quot;&gt;Create via GUI&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Ubuntu has instructions on &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;documentation.ubuntu.com&#x2F;desktop&#x2F;en&#x2F;latest&#x2F;tutorial&#x2F;install-ubuntu-desktop&#x2F;&quot;&gt;their website&lt;&#x2F;a&gt;, which I’ve tried up to the part of loading onto the flash drive.&lt;&#x2F;p&gt;
&lt;p&gt;Relevant section copied below in case their site “goes away” (or gets relocated or reorganized or restructured or otherwise cannot be found anymore).&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Open the Disks application. You can find it in the applications menu or by searching for “Disks”.&lt;&#x2F;li&gt;
&lt;li&gt;Insert your USB stick. It appears in the sidebar. Select it there.&lt;br &#x2F;&gt;
&lt;strong&gt;WARNING: Make sure to select the USB stick and not the disk with your running system. Both are listed.&lt;&#x2F;strong&gt;&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;documentation.ubuntu.com&#x2F;desktop&#x2F;en&#x2F;latest&#x2F;_images&#x2F;usb-in-gnome-disks.png&quot; alt=&quot;Screenshot of disk application&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Close all applications that access files or folders on the USB stick, including the file browser.&lt;&#x2F;li&gt;
&lt;li&gt;In the Disks window header, click &lt;code&gt;Drive Options (⋮)&lt;&#x2F;code&gt; and select &lt;code&gt;Restore Disk Image…&lt;&#x2F;code&gt;&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;documentation.ubuntu.com&#x2F;desktop&#x2F;en&#x2F;latest&#x2F;_images&#x2F;restore-disk-image-menu.png&quot; alt=&quot;Screenshot of menu with “Restore Disk Image”&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Next to &lt;code&gt;Image to Restore&lt;&#x2F;code&gt;, select the downloaded Ubuntu image file.&lt;&#x2F;li&gt;
&lt;li&gt;Click &lt;code&gt;Start Restoring…&lt;&#x2F;code&gt; and confirm. The application asks for your password.&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;documentation.ubuntu.com&#x2F;desktop&#x2F;en&#x2F;latest&#x2F;_images&#x2F;restore-disk-image-dialog.png&quot; alt=&quot;Screenshot of prompt for starting restoration&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;A progress bar appears while Disks is writing the image.&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;documentation.ubuntu.com&#x2F;desktop&#x2F;en&#x2F;latest&#x2F;_images&#x2F;gnome-disks-restoring-image.png&quot; alt=&quot;Screenshot of progress bar&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;When the progress bar finishes, click &lt;code&gt;Eject this disk (⏏)&lt;&#x2F;code&gt;.&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;documentation.ubuntu.com&#x2F;desktop&#x2F;en&#x2F;latest&#x2F;_images&#x2F;gnome-disks-finished-writing.png&quot; alt=&quot;Screenshot with eject highlighted&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;blockquote&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Extensions General</title>
        <published>2023-07-27T00:00:00+00:00</published>
        <updated>2026-01-13T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/vscode/extensions-general/"/>
        <id>https://dev.chester.wykies.com/vscode/extensions-general/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/vscode/extensions-general/">&lt;p&gt;Some may come installed by default (not sure where I got all of these and haven’t had time to test)&lt;&#x2F;p&gt;
&lt;h1 id=&quot;current&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#current&quot; aria-label=&quot;Anchor link for: current&quot;&gt;Current&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Name&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;ID&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Reason&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=streetsidesoftware.code-spell-checker&quot;&gt;Code Spell Checker&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;streetsidesoftware.code-spell-checker&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Spelling checker for source code&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=usernamehw.errorlens&quot;&gt;Error Lens&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;usernamehw.errorlens&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Makes errors overlay next to code&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=mhutchie.git-graph&quot;&gt;Git Graph&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;mhutchie.git-graph&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;View a Git Graph of your repository, and perform Git actions from the graph&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=donjayamanne.githistory&quot;&gt;Git History&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;donjayamanne.githistory&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Provides additional git commands and more file specific info&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=vector-of-bool.gitflow&quot;&gt;gitflow&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;vector-of-bool.gitflow&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Gitflow integration&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=GitHub.vscode-github-actions&quot;&gt;GitHub Actions&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;github.vscode-github-actions&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;GitHub Actions workflows and runs&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=GitHub.vscode-pull-request-github&quot;&gt;GitHub Pull Requests and Issues&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;GitHub.vscode-pull-request-github&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Pull Request and Issues&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=eamodio.gitlens&quot;&gt;GitLens — Git supercharged&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;eamodio.gitlens&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Provides more advanced git commands like rebase interactive&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=ms-vscode.live-server&quot;&gt;Live Preview&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;ms-vscode.live-server&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Lets you preview pages (like markdown)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=MS-vsliveshare.vsliveshare&quot;&gt;Live Share&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;ms-vsliveshare.vsliveshare&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Real-time collaborative development&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=alefragnani.numbered-bookmarks&quot;&gt;Numbered Bookmarks&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;alefragnani.numbered-bookmarks&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Mark lines and jump to them, in Delphi style&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=Gruntfuggly.todo-tree&quot;&gt;Todo Tree&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Gruntfuggly.todo-tree&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Show TODO, FIXME, etc. comment tags in a tree view&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h1 id=&quot;previous&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#previous&quot; aria-label=&quot;Anchor link for: previous&quot;&gt;Previous&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Name&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;ID&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Reason&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=easterapps.script-runner&quot;&gt;cmd exec&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;easterapps.script-runner&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Execute commands using a key combination (Wasn’t being used)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=ms-vscode.remote-repositories&quot;&gt;Remote Repositories&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;ms-vscode.remote-repositories&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Remotely browse and edit git repositories (Mostly using code spaces now)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Extensions Rust</title>
        <published>2023-07-27T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/vscode/extensions-rust/"/>
        <id>https://dev.chester.wykies.com/vscode/extensions-rust/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/vscode/extensions-rust/">&lt;h1 id=&quot;must-haves&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#must-haves&quot; aria-label=&quot;Anchor link for: must-haves&quot;&gt;Must haves&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Name&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;ID&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Reason&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=vadimcn.vscode-lldb&quot;&gt;CodeLLDB&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;vadimcn.vscode-lldb&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Allows debugging rust code&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=rust-lang.rust-analyzer&quot;&gt;rust-analyzer&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;rust-lang.rust-analyzer&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Provides realtime feedback on code&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h1 id=&quot;useful&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#useful&quot; aria-label=&quot;Anchor link for: useful&quot;&gt;Useful&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Name&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;ID&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Reason&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=fill-labs.dependi&quot;&gt;Dependi&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;fill-labs.dependi&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Adds icons to cargo.toml to tell you dependency status&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h1 id=&quot;might-be-useful&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#might-be-useful&quot; aria-label=&quot;Anchor link for: might-be-useful&quot;&gt;Might be useful&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Name&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;ID&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Reason&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=mitsuhiko.insta&quot;&gt;insta snapshots&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;mitsuhiko.insta&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Makes working with insta more convenient&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;h1 id=&quot;previously-used&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#previously-used&quot; aria-label=&quot;Anchor link for: previously-used&quot;&gt;Previously used&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align: left&quot;&gt;Name&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;ID&lt;&#x2F;th&gt;&lt;th style=&quot;text-align: left&quot;&gt;Reason&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=jedeop.crates-completer&quot;&gt;Crates Completer&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;jedeop.crates-completer&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Auto complete for creates if you edit &lt;code&gt;cargo.toml&lt;&#x2F;code&gt; manually (using &lt;code&gt;cargo add&lt;&#x2F;code&gt; cli now instead)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=tamasfe.even-better-toml&quot;&gt;Even Better TOML&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;tamasfe.even-better-toml&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Add TOML support (using dprint now instead)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=swellaby.vscode-rust-test-adapter&quot;&gt;Rust Test Explorer&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Swellaby.vscode-rust-test-adapter&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;View and run your Rust tests in the Sidebar (Didn’t always work so stopped using it)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: left&quot;&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=a5huynh.vscode-ron&quot;&gt;vscode-ron&lt;&#x2F;a&gt;&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;a5huynh.vscode-ron&lt;&#x2F;td&gt;&lt;td style=&quot;text-align: left&quot;&gt;Adds support for RON (Rusty object notation) - Wasn’t using it&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>View Whitespace (Non printing characters)</title>
        <published>2023-07-27T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/vscode/whitespace/"/>
        <id>https://dev.chester.wykies.com/vscode/whitespace/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/vscode/whitespace/">&lt;p&gt;To view white space or non printable characters, use &lt;code&gt;Toggle Render Whitespace&lt;&#x2F;code&gt; from the command palette.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Remotes</title>
        <published>2023-07-21T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/remotes/"/>
        <id>https://dev.chester.wykies.com/git/remotes/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/remotes/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;get-started&#x2F;getting-started-with-git&#x2F;managing-remote-repositories&quot;&gt;https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;get-started&#x2F;getting-started-with-git&#x2F;managing-remote-repositories&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;list-remotes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#list-remotes&quot; aria-label=&quot;Anchor link for: list-remotes&quot;&gt;List remotes&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; remote&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -v&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;change-remote-url&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#change-remote-url&quot; aria-label=&quot;Anchor link for: change-remote-url&quot;&gt;Change remote URL&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; remote set-url origin git@github.com:OWNER&#x2F;REPOSITORY.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;add-remote&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-remote&quot; aria-label=&quot;Anchor link for: add-remote&quot;&gt;Add remote&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: New github repo&lt;&#x2F;p&gt;
&lt;p&gt;Usually when a new repo is created this command is provided, and this is generally the easiest way to add it as no modification is needed just copy and paste.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; remote add origin git@github.com:OWNER&#x2F;REPOSITORY.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;clear-out-remotes-that-no-longer-exist&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#clear-out-remotes-that-no-longer-exist&quot; aria-label=&quot;Anchor link for: clear-out-remotes-that-no-longer-exist&quot;&gt;Clear out remotes that no longer exist&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; fetch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --prune&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>String Formatting</title>
        <published>2023-07-12T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/string-formatting/"/>
        <id>https://dev.chester.wykies.com/rust/string-formatting/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/string-formatting/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;fmt&#x2F;&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;fmt&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;precision&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#precision&quot; aria-label=&quot;Anchor link for: precision&quot;&gt;Precision&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;fmt&#x2F;#precision&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;fmt&#x2F;#precision&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0.01&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Hello x is {x:.5}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Prints: “Hello x is 0.01000”&lt;&#x2F;p&gt;
&lt;h1 id=&quot;fill-alignment&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#fill-alignment&quot; aria-label=&quot;Anchor link for: fill-alignment&quot;&gt;Fill&#x2F;Alignment&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;fmt&#x2F;#fillalignment&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;fmt&#x2F;#fillalignment&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;let&lt;&#x2F;span&gt;&lt;span&gt; hours&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{hours:0&amp;gt;2}:25&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Prints: “03:25”&lt;&#x2F;p&gt;
&lt;h1 id=&quot;pretty-printing&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#pretty-printing&quot; aria-label=&quot;Anchor link for: pretty-printing&quot;&gt;Pretty Printing&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;fmt&#x2F;#sign0&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;fmt&#x2F;#sign0&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;‘#?’ - pretty-print the Debug formatting (adds line breaks and indentation)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{:#?}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;100&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 200&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;     &#x2F;&#x2F; =&amp;gt; &amp;quot;(&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;                                  &#x2F;&#x2F;       100,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;                                  &#x2F;&#x2F;       200,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;                                  &#x2F;&#x2F;     )&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;separators-in-number&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#separators-in-number&quot; aria-label=&quot;Anchor link for: separators-in-number&quot;&gt;Separators in number&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;26998485&#x2F;is-it-possible-to-print-a-number-formatted-with-thousand-separator-in-rust&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;26998485&#x2F;is-it-possible-to-print-a-number-formatted-with-thousand-separator-in-rust&lt;&#x2F;a&gt;
Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;play.rust-lang.org&#x2F;?version=stable&amp;amp;mode=release&amp;amp;edition=2021&amp;amp;gist=2e4916721f625988d9a4f9a5cdb635ae&quot;&gt;https:&#x2F;&#x2F;play.rust-lang.org&#x2F;?version=stable&amp;amp;mode=release&amp;amp;edition=2021&amp;amp;gist=2e4916721f625988d9a4f9a5cdb635ae&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;There are crates that do this but this snippet is simple and adds no dependencies&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; val&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 10_000_000&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;i32&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; val&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;abs&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;to_string&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;as_bytes&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rchunks&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;3&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rev&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;map&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;str&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;from_utf8)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;collect&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Result&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Vec&lt;&#x2F;span&gt;&lt;span&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;str&lt;&#x2F;span&gt;&lt;span&gt;&amp;gt;, _&amp;gt;&amp;gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        .&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;join&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;,&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; separator&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span&gt; val&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        num&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; format!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;-{num}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{num}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Prints &amp;quot;10,000,000&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Show Seconds on Clock Display</title>
        <published>2023-07-03T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/seconds-clock/"/>
        <id>https://dev.chester.wykies.com/debian/seconds-clock/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/seconds-clock/">&lt;ol&gt;
&lt;li&gt;Open &lt;code&gt;dconf Editor&lt;&#x2F;code&gt; (May need to be installed, not included by default)&lt;&#x2F;li&gt;
&lt;li&gt;See screenshot for option to toggle. NB: Screenshot includes the clock in the center at the top of the screen with the seconds on.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;seconds-clock&#x2F;screenshot.png&quot; alt=&quot;Screenshot&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Toolchain (Nightly)</title>
        <published>2023-06-29T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/toolchain/"/>
        <id>https://dev.chester.wykies.com/rust/toolchain/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/toolchain/">&lt;h1 id=&quot;per-command-override-shorthand&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#per-command-override-shorthand&quot; aria-label=&quot;Anchor link for: per-command-override-shorthand&quot;&gt;Per command override (shorthand)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-lang.github.io&#x2F;rustup&#x2F;overrides.html#toolchain-override-shorthand&quot;&gt;https:&#x2F;&#x2F;rust-lang.github.io&#x2F;rustup&#x2F;overrides.html#toolchain-override-shorthand&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;If the first argument to cargo, rustc or other tools in the toolchain begins with +, it will be interpreted as a rustup toolchain name&lt;&#x2F;p&gt;
&lt;p&gt;Example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rustfmt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; +nightly src&#x2F;lib.rs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;override-to-set-nightly-for-a-specific-folder&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#override-to-set-nightly-for-a-specific-folder&quot; aria-label=&quot;Anchor link for: override-to-set-nightly-for-a-specific-folder&quot;&gt;Override to set nightly for a specific folder&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-lang.github.io&#x2F;rustup&#x2F;overrides.html#directory-overrides&quot;&gt;https:&#x2F;&#x2F;rust-lang.github.io&#x2F;rustup&#x2F;overrides.html#directory-overrides&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Set Nightly&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rustup&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; override set nightly&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Unset override&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rustup&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; override unset&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Show version in use&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rustup&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; show&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Extensions</title>
        <published>2023-06-28T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/extension/"/>
        <id>https://dev.chester.wykies.com/debian/extension/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/extension/">&lt;h1 id=&quot;list-of-useful-extensions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#list-of-useful-extensions&quot; aria-label=&quot;Anchor link for: list-of-useful-extensions&quot;&gt;List of useful extensions&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;extensions.gnome.org&#x2F;extension&#x2F;1238&#x2F;time&#x2F;&quot;&gt;Timer++&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;extensions.gnome.org&#x2F;extension&#x2F;28&#x2F;gtile&#x2F;&quot;&gt;gTile&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;extensions.gnome.org&#x2F;extension&#x2F;906&#x2F;sound-output-device-chooser&#x2F;&quot;&gt;Sound Input &amp;amp; Output Device Chooser&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;extensions.gnome.org&#x2F;extension&#x2F;841&#x2F;freon&#x2F;&quot;&gt;Freon&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;manual-install-process&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#manual-install-process&quot; aria-label=&quot;Anchor link for: manual-install-process&quot;&gt;Manual install process&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.debugpoint.com&#x2F;2021&#x2F;10&#x2F;manual-installation-gnome-extension&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.debugpoint.com&#x2F;2021&#x2F;10&#x2F;manual-installation-gnome-extension&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;install-gnome-shell-extensions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-gnome-shell-extensions&quot; aria-label=&quot;Anchor link for: install-gnome-shell-extensions&quot;&gt;Install gnome-shell-extensions&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Required to manage and activate the new extensions&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install gnome-shell-extensions&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;steps&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#steps&quot; aria-label=&quot;Anchor link for: steps&quot;&gt;Steps&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ol&gt;
&lt;li&gt;Go to official GNOME Extension website &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;extensions.gnome.org&#x2F;&quot;&gt;https:&#x2F;&#x2F;extensions.gnome.org&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Choose your extension, then download for your GNOME version.&lt;&#x2F;li&gt;
&lt;li&gt;Extract&#x2F;unzip the files.&lt;&#x2F;li&gt;
&lt;li&gt;Copy the entire folder to&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;~&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;.local&#x2F;share&#x2F;gnome-shell&#x2F;extensions&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;Open the &lt;code&gt;metadata.json&lt;&#x2F;code&gt; using a text editor (found inside the folder you just copied).&lt;&#x2F;li&gt;
&lt;li&gt;Copy the &lt;strong&gt;uuid&lt;&#x2F;strong&gt; field and rename the extension folder with this &lt;strong&gt;uuid&lt;&#x2F;strong&gt;.
This is required to GNOME to identify the Extension.&lt;&#x2F;li&gt;
&lt;li&gt;The restart gnome, log off and back on is enough.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Ubuntu Software</title>
        <published>2023-06-28T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/ubuntu-software/"/>
        <id>https://dev.chester.wykies.com/debian/ubuntu-software/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/ubuntu-software/">&lt;p&gt;This page covers program that were found through the “Ubuntu Software” program, which is link a store where you can search for programs that you want.&lt;&#x2F;p&gt;
&lt;p&gt;There are currently no programs listed here. Hardware Sensor that used to be here has been removed as it stopped working and was replaced with an extension.
See &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;extension&#x2F;&quot;&gt;extensions&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Rebase</title>
        <published>2023-06-28T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/rebase/"/>
        <id>https://dev.chester.wykies.com/git/rebase/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/rebase/">&lt;h1 id=&quot;rebase-onto-develop&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#rebase-onto-develop&quot; aria-label=&quot;Anchor link for: rebase-onto-develop&quot;&gt;Rebase onto develop&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; rebase develop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you’d already pushed the branch before you’ll need to do a force push&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; push&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -f&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;rebase-interactive&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#rebase-interactive&quot; aria-label=&quot;Anchor link for: rebase-interactive&quot;&gt;Rebase interactive&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-rebase&quot;&gt;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-rebase&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;unpushed&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#unpushed&quot; aria-label=&quot;Anchor link for: unpushed&quot;&gt;Unpushed&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Observation: Only seems to rebase unpushed commits.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; rebase&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -i&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;including-pushed&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#including-pushed&quot; aria-label=&quot;Anchor link for: including-pushed&quot;&gt;Including Pushed&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; rebase&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -i --onto&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; develop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;rebase-your-branch-after-someone-else-force-pushes-to-it&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#rebase-your-branch-after-someone-else-force-pushes-to-it&quot; aria-label=&quot;Anchor link for: rebase-your-branch-after-someone-else-force-pushes-to-it&quot;&gt;Rebase your branch after someone else force pushes to it&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;These erase what you have locally with the info from remote&lt;&#x2F;p&gt;
&lt;h2 id=&quot;this-works-for-me-but-saw-it-didn-t-work-for-others&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#this-works-for-me-but-saw-it-didn-t-work-for-others&quot; aria-label=&quot;Anchor link for: this-works-for-me-but-saw-it-didn-t-work-for-others&quot;&gt;This works for me (but saw it didn’t work for others)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;git pull -f&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;this-one-worked-when-the-one-above-didn-t-work&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#this-one-worked-when-the-one-above-didn-t-work&quot; aria-label=&quot;Anchor link for: this-one-worked-when-the-one-above-didn-t-work&quot;&gt;This one worked when the one above didn’t work&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: Trippy Maintainers Chat (Included a link to &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;1628088&#x2F;reset-local-repository-branch-to-be-just-like-remote-repository-head&quot;&gt;guidance&lt;&#x2F;a&gt;)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; fetch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; reset origin&#x2F;my-branch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --hard&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Live Share</title>
        <published>2023-06-24T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/vscode/liveshare/"/>
        <id>https://dev.chester.wykies.com/vscode/liveshare/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/vscode/liveshare/">&lt;h1 id=&quot;controlling-files-shared&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#controlling-files-shared&quot; aria-label=&quot;Anchor link for: controlling-files-shared&quot;&gt;Controlling files shared&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.digitalocean.com&#x2F;community&#x2F;tutorials&#x2F;how-to-use-live-share-with-visual-studio-code&quot;&gt;https:&#x2F;&#x2F;www.digitalocean.com&#x2F;community&#x2F;tutorials&#x2F;how-to-use-live-share-with-visual-studio-code&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Filename: &lt;code&gt;.vsls.json&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    &amp;quot;$schema&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;http:&#x2F;&#x2F;json.schemastore.org&#x2F;vsls&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    &amp;quot;gitignore&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;none&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    &amp;quot;excludeFiles&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: [],&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    &amp;quot;hideFiles&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: []&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>LaTex Frequently used commands</title>
        <published>2023-06-23T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/latex/latex-freq/"/>
        <id>https://dev.chester.wykies.com/latex/latex-freq/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/latex/latex-freq/">&lt;h2 id=&quot;symbol-list&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#symbol-list&quot; aria-label=&quot;Anchor link for: symbol-list&quot;&gt;Symbol List&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;math.uoregon.edu&#x2F;wp-content&#x2F;uploads&#x2F;2014&#x2F;12&#x2F;compsymb-1qyb3zd.pdf&quot;&gt;University of Oregon Symbol List&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;latex&#x2F;latex-freq&#x2F;University%20of%20Oregon%20Symbol%20List%20-%20compsymb-1qyb3zd.pdf&quot;&gt;Local Copy&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;aligned-math-environment&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#aligned-math-environment&quot; aria-label=&quot;Anchor link for: aligned-math-environment&quot;&gt;Aligned Math Environment&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\begin&lt;&#x2F;span&gt;&lt;span&gt;{equation*}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \begin{&lt;&#x2F;span&gt;&lt;span&gt;aligned&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        x + y &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;= 5&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; \\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        x &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;= 5 - y &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \end{&lt;&#x2F;span&gt;&lt;span&gt;aligned&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\end&lt;&#x2F;span&gt;&lt;span&gt;{equation*}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;center-each-line-individually&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#center-each-line-individually&quot; aria-label=&quot;Anchor link for: center-each-line-individually&quot;&gt;Center each line individually&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\begin&lt;&#x2F;span&gt;&lt;span&gt;{center}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\end&lt;&#x2F;span&gt;&lt;span&gt;{center}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;centers-everything-in-its-argument&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#centers-everything-in-its-argument&quot; aria-label=&quot;Anchor link for: centers-everything-in-its-argument&quot;&gt;Centers everything in its argument&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\centerline&lt;&#x2F;span&gt;&lt;span&gt;{}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;bold&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#bold&quot; aria-label=&quot;Anchor link for: bold&quot;&gt;Bold&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\textbf&lt;&#x2F;span&gt;&lt;span&gt;{}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;underline&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#underline&quot; aria-label=&quot;Anchor link for: underline&quot;&gt;Underline&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\underline&lt;&#x2F;span&gt;&lt;span&gt;{}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;italic&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#italic&quot; aria-label=&quot;Anchor link for: italic&quot;&gt;Italic&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\textit&lt;&#x2F;span&gt;&lt;span&gt;{}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;summation-with-super-and-subscript&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#summation-with-super-and-subscript&quot; aria-label=&quot;Anchor link for: summation-with-super-and-subscript&quot;&gt;Summation with super and subscript&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\sum_{i=1}^{n} i&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;binomial-coefficient-or-all-combinations&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#binomial-coefficient-or-all-combinations&quot; aria-label=&quot;Anchor link for: binomial-coefficient-or-all-combinations&quot;&gt;Binomial coefficient or all combinations&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;N Choose K&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;{n &lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\choose&lt;&#x2F;span&gt;&lt;span&gt; k}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;table&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#table&quot; aria-label=&quot;Anchor link for: table&quot;&gt;Table&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\begin&lt;&#x2F;span&gt;&lt;span&gt;{center}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \begin&lt;&#x2F;span&gt;&lt;span&gt;{tabular}{ | m{8em} | m{8em}| m{8em} | m{8em} | }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        \hline&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        \textbf&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Operation&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; \textbf&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Actual cost&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; \textbf&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Amortized cost&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; \textbf&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Change in bank account&lt;&#x2F;span&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        \\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        \hline&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        1st &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt; 2nd &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt; 3rd &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;&lt;&#x2F;span&gt;&lt;span&gt; 4th &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        \hline&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \end&lt;&#x2F;span&gt;&lt;span&gt;{tabular}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\end&lt;&#x2F;span&gt;&lt;span&gt;{center}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;enumerated-document-list-alternate-counting-types&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#enumerated-document-list-alternate-counting-types&quot; aria-label=&quot;Anchor link for: enumerated-document-list-alternate-counting-types&quot;&gt;Enumerated Document List (Alternate counting types)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\begin&lt;&#x2F;span&gt;&lt;span&gt;{enumerate}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    [label=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\alph&lt;&#x2F;span&gt;&lt;span&gt;*)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \begin&lt;&#x2F;span&gt;&lt;span&gt;{enumerate}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        [label=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\roman&lt;&#x2F;span&gt;&lt;span&gt;*)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        \begin&lt;&#x2F;span&gt;&lt;span&gt;{enumerate}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            [label=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\arabic&lt;&#x2F;span&gt;&lt;span&gt;*)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;        \end&lt;&#x2F;span&gt;&lt;span&gt;{enumerate}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \end&lt;&#x2F;span&gt;&lt;span&gt;{enumerate}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\end&lt;&#x2F;span&gt;&lt;span&gt;{enumerate}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;dots&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#dots&quot; aria-label=&quot;Anchor link for: dots&quot;&gt;Dots&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;writing-line-like-multiple-full-stops&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#writing-line-like-multiple-full-stops&quot; aria-label=&quot;Anchor link for: writing-line-like-multiple-full-stops&quot;&gt;Writing line (like multiple full stops)&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\ldots&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;vertically-centered-like-multiple-cdot&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#vertically-centered-like-multiple-cdot&quot; aria-label=&quot;Anchor link for: vertically-centered-like-multiple-cdot&quot;&gt;Vertically centered like multiple &lt;code&gt;\cdot&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\cdots&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;vertical-dots&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#vertical-dots&quot; aria-label=&quot;Anchor link for: vertical-dots&quot;&gt;Vertical dots&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\vdots&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;diagonal-dots&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#diagonal-dots&quot; aria-label=&quot;Anchor link for: diagonal-dots&quot;&gt;Diagonal dots&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\ddots&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;links&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#links&quot; aria-label=&quot;Anchor link for: links&quot;&gt;Links&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;url&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#url&quot; aria-label=&quot;Anchor link for: url&quot;&gt;URL&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.overleaf.com&#x2F;learn&#x2F;latex&#x2F;Hyperlinks&quot;&gt;https:&#x2F;&#x2F;www.overleaf.com&#x2F;learn&#x2F;latex&#x2F;Hyperlinks&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Requires &lt;code&gt;\usepackage{hyperref}&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\url&lt;&#x2F;span&gt;&lt;span&gt;{}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\href&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;URL&lt;&#x2F;span&gt;&lt;span&gt;}{DISPLAYED TEXT}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;vertically-stacked-things&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#vertically-stacked-things&quot; aria-label=&quot;Anchor link for: vertically-stacked-things&quot;&gt;Vertically stacked things&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Puts one thing on top of the other without a line between&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\underset&lt;&#x2F;span&gt;&lt;span&gt;{bottom}{top}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;brackets&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#brackets&quot; aria-label=&quot;Anchor link for: brackets&quot;&gt;Brackets&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\lbrace \rbrace&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\langle \rangle&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\lfloor \rfloor&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;arg-min-max&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#arg-min-max&quot; aria-label=&quot;Anchor link for: arg-min-max&quot;&gt;ARG MIN &#x2F; MAX&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\DeclareMathOperator&lt;&#x2F;span&gt;&lt;span&gt;*{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\argmax&lt;&#x2F;span&gt;&lt;span&gt;}{arg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\,&lt;&#x2F;span&gt;&lt;span&gt;max}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\DeclareMathOperator&lt;&#x2F;span&gt;&lt;span&gt;*{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\argmin&lt;&#x2F;span&gt;&lt;span&gt;}{arg&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\,&lt;&#x2F;span&gt;&lt;span&gt;min}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;horizontal-rule&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#horizontal-rule&quot; aria-label=&quot;Anchor link for: horizontal-rule&quot;&gt;Horizontal Rule&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;tex.stackexchange.com&#x2F;questions&#x2F;19579&#x2F;horizontal-line-spanning-the-entire-document-in-latex&#x2F;19582&quot;&gt;https:&#x2F;&#x2F;tex.stackexchange.com&#x2F;questions&#x2F;19579&#x2F;horizontal-line-spanning-the-entire-document-in-latex&#x2F;19582&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;entire-width-of-the-page&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#entire-width-of-the-page&quot; aria-label=&quot;Anchor link for: entire-width-of-the-page&quot;&gt;Entire width of the page&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\noindent\makebox&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\linewidth&lt;&#x2F;span&gt;&lt;span&gt;]{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\rule&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\paperwidth&lt;&#x2F;span&gt;&lt;span&gt;}{0.4pt}}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;2cm-long-line&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#2cm-long-line&quot; aria-label=&quot;Anchor link for: 2cm-long-line&quot;&gt;2cm long line&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\noindent\rule&lt;&#x2F;span&gt;&lt;span&gt;{2cm}{0.4pt}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;text-width&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#text-width&quot; aria-label=&quot;Anchor link for: text-width&quot;&gt;Text width&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\makebox&lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\linewidth&lt;&#x2F;span&gt;&lt;span&gt;]{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\rule&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\textwidth&lt;&#x2F;span&gt;&lt;span&gt;}{0.4pt}}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;special-chars&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#special-chars&quot; aria-label=&quot;Anchor link for: special-chars&quot;&gt;Special Chars&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;lower-case-cursive-l&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#lower-case-cursive-l&quot; aria-label=&quot;Anchor link for: lower-case-cursive-l&quot;&gt;Lower case cursive L&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\ell&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;$&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;figure&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#figure&quot; aria-label=&quot;Anchor link for: figure&quot;&gt;Figure&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\begin&lt;&#x2F;span&gt;&lt;span&gt;{figure}[!htb]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \centering&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \includegraphics&lt;&#x2F;span&gt;&lt;span&gt;[width=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\textwidth&lt;&#x2F;span&gt;&lt;span&gt;]{filename}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \caption&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;\label&lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;fig:my-label&lt;&#x2F;span&gt;&lt;span&gt;} Caption Here}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\end&lt;&#x2F;span&gt;&lt;span&gt;{figure}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;include-a-pdf-in-document&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#include-a-pdf-in-document&quot; aria-label=&quot;Anchor link for: include-a-pdf-in-document&quot;&gt;Include a PDF in document&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\includepdf&lt;&#x2F;span&gt;&lt;span&gt;[pages=-,pagecommand={}]{file.pdf}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;start-numbering-from-page-after-title&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#start-numbering-from-page-after-title&quot; aria-label=&quot;Anchor link for: start-numbering-from-page-after-title&quot;&gt;Start numbering from page after title&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;latex&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\begin&lt;&#x2F;span&gt;&lt;span&gt;{document}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \maketitle&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \thispagestyle&lt;&#x2F;span&gt;&lt;span&gt;{empty}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    \clearpage&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;    \pagenumbering&lt;&#x2F;span&gt;&lt;span&gt;{arabic}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\end&lt;&#x2F;span&gt;&lt;span&gt;{document}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Redirecting stderr</title>
        <published>2023-06-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/redirect-stderr/"/>
        <id>https://dev.chester.wykies.com/debian/redirect-stderr/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/redirect-stderr/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;625224&#x2F;how-to-redirect-stderr-to-a-file&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;625224&#x2F;how-to-redirect-stderr-to-a-file&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;redirect-both-stdout-and-stderr&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#redirect-both-stdout-and-stderr&quot; aria-label=&quot;Anchor link for: redirect-both-stdout-and-stderr&quot;&gt;Redirect both stdout and stderr&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;NB: Only supported in some shells including bash&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;command&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; out.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;redirect-stderr-to-stdout&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#redirect-stderr-to-stdout&quot; aria-label=&quot;Anchor link for: redirect-stderr-to-stdout&quot;&gt;Redirect stderr to stdout&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;out&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; 2&amp;gt;&amp;amp;1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;redirect-stderr-to-separate-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#redirect-stderr-to-separate-file&quot; aria-label=&quot;Anchor link for: redirect-stderr-to-separate-file&quot;&gt;Redirect stderr to separate file&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;command&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; out.txt&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; 2&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;error.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Cargo</title>
        <published>2023-06-16T00:00:00+00:00</published>
        <updated>2025-05-11T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/cargo/"/>
        <id>https://dev.chester.wykies.com/rust/cargo/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/cargo/">&lt;h1 id=&quot;configuring-cargo&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#configuring-cargo&quot; aria-label=&quot;Anchor link for: configuring-cargo&quot;&gt;Configuring Cargo&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;See the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;config.html#configuration-format&quot;&gt;Cargo Reference&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;frequently-used-commands-and-arguments&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#frequently-used-commands-and-arguments&quot; aria-label=&quot;Anchor link for: frequently-used-commands-and-arguments&quot;&gt;Frequently Used Commands and arguments&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;commands&#x2F;index.html&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;commands&#x2F;index.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;commands&#x2F;cargo-doc.html&quot;&gt;doc&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--document-private-items&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--no-deps&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--target-dir&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--open&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;commands&#x2F;cargo-run.html&quot;&gt;run&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--release&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;--bin name&lt;&#x2F;code&gt; (Works with multiple binaries see &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;cargo-targets.html?highlight=bin#binaries&quot;&gt;Additional Binaries&lt;&#x2F;a&gt;)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;commands&#x2F;cargo-test.html&quot;&gt;test&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-- --ignored&lt;&#x2F;code&gt; (Works with &lt;code&gt;#[ignore]&lt;&#x2F;code&gt;
see &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;reference&#x2F;attributes&#x2F;testing.html#the-ignore-attribute&quot;&gt;rust reference&lt;&#x2F;a&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-- --test-threads 1&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;features.html#inspecting-resolved-features&quot;&gt;tree&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-e features&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-f &quot;{p} {f}&quot;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-e features -i foo&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;cargo-environment-variables&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#cargo-environment-variables&quot; aria-label=&quot;Anchor link for: cargo-environment-variables&quot;&gt;Cargo Environment Variables&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;for-crates&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#for-crates&quot; aria-label=&quot;Anchor link for: for-crates&quot;&gt;For Crates&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;environment-variables.html#environment-variables-cargo-sets-for-crates&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;environment-variables.html#environment-variables-cargo-sets-for-crates&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;To use environment variables provided by cargo use &lt;code&gt;env!()&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Example&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; env!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;CARGO_PKG_NAME&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;{}&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; env!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;CARGO_PKG_VERSION&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;CARGO_PKG_NAME&lt;&#x2F;li&gt;
&lt;li&gt;CARGO_PKG_VERSION (As an alternative you may use the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;version&quot;&gt;Version Crate&lt;&#x2F;a&gt;)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;specifying-dependencies&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#specifying-dependencies&quot; aria-label=&quot;Anchor link for: specifying-dependencies&quot;&gt;Specifying dependencies&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;using-git&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-git&quot; aria-label=&quot;Anchor link for: using-git&quot;&gt;Using Git&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;specifying-dependencies.html#specifying-dependencies-from-git-repositories&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;specifying-dependencies.html#specifying-dependencies-from-git-repositories&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Example&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;dependencies&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;regex = { git =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;https:&#x2F;&#x2F;github.com&#x2F;rust-lang&#x2F;regex.git&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, branch =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;next&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;adding-feature-flag-to-a-library&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#adding-feature-flag-to-a-library&quot; aria-label=&quot;Anchor link for: adding-feature-flag-to-a-library&quot;&gt;Adding Feature flag to a library&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;features.html&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;features.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Example of defining a feature&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;features&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;default = [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;ico&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;webp&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;avif = [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;dep:ravif&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;dep:rgb&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;bmp = []&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gif = [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;dep:gif&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;png = []&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ico = [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;bmp&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;png&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# Defines a feature named `webp` that does not enable any other features.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;webp = []&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Optional dependency&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;toml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;dependencies&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gif = { version =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;0.11.1&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, optional =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ravif = { version =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;0.6.3&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, optional =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;rgb = { version =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;0.8.25&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, optional =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; true&lt;&#x2F;span&gt;&lt;span&gt; }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Example of conditionally compiling based on feature&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; This conditionally includes a module which implements WEBP support.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[cfg(feature &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;webp&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;pub mod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; webp&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;mutually-exclusive-feature-flags&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mutually-exclusive-feature-flags&quot; aria-label=&quot;Anchor link for: mutually-exclusive-feature-flags&quot;&gt;Mutually Exclusive Feature Flags&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;features.html#mutually-exclusive-features&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;features.html#mutually-exclusive-features&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;TLDR&lt;&#x2F;strong&gt;: Avoid using mutually exclusive features see source above for options to work around it otherwise detect it at compile time and provide an error message instead of waiting for duplicated functions to stop the compile.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[cfg(all(feature &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;foo&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, feature &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;bar&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;))]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;compile_error!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;feature &lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;foo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; and feature &lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;bar&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;\&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; cannot be enabled at the same time&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;patch-a-crate&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#patch-a-crate&quot; aria-label=&quot;Anchor link for: patch-a-crate&quot;&gt;Patch a crate&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;overriding-dependencies.html#testing-a-bugfix&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;overriding-dependencies.html#testing-a-bugfix&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The source is sufficiently terse that I don’t find value in extracting relevant parts here other than pointing out the following:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;The way [patch] works is that it’ll load the dependency at ..&#x2F;path&#x2F;to&#x2F;uuid and then whenever crates.io is queried for versions of uuid it’ll &lt;em&gt;also&lt;&#x2F;em&gt; return the local version.&lt;&#x2F;p&gt;
&lt;p&gt;This means that the &lt;strong&gt;version number of the local checkout is significant&lt;&#x2F;strong&gt; and will affect whether the patch is used. Our manifest declared uuid = “1.0” which means we’ll only resolve to &amp;gt;= 1.0.0, &amp;lt; 2.0.0, and Cargo’s greedy resolution algorithm also means that we’ll resolve to the maximum version within that range. Typically this doesn’t matter as the version of the git repository will already be greater or match the maximum version published on crates.io, but it’s important to keep this in mind!&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Bolding applied is my own.&lt;&#x2F;p&gt;
&lt;p&gt;If you need to patch often it is worthwhile looking into &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;cargo-override&quot;&gt;cargo-override&lt;&#x2F;a&gt; which automates overriding crates.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>New Repo Creation</title>
        <published>2023-06-15T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/new-repo/"/>
        <id>https://dev.chester.wykies.com/git/new-repo/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/new-repo/">&lt;p&gt;NB: These instructions assume github with ssh key auth but any would be similar&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Create empty repo in cloud&lt;&#x2F;li&gt;
&lt;li&gt;Create folder on local machine with same name (same name is recommended not required)&lt;&#x2F;li&gt;
&lt;li&gt;Open a command prompt in the folder and initialize git&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; init&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;Create &lt;code&gt;.gitignore&lt;&#x2F;code&gt; file&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;touch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; .gitignore&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;
&lt;p&gt;Add file and commit&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Add remote repo connection (Can be copied from github)&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; remote add origin git@github.com:wykies&#x2F;REPO_NAME.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;6&quot;&gt;
&lt;li&gt;(Skippable) Move to main branch (-M is a shortcut for &lt;code&gt;--move --force&lt;&#x2F;code&gt;.) This step can usually be skipped in a new repo&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; branch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -M&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;7&quot;&gt;
&lt;li&gt;Push branch to remote and set current branch as a tracking branch (-u sets current brach to tracking)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; push&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -u&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; origin main&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Reset window</title>
        <published>2023-06-05T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/gimp/reset-window/"/>
        <id>https://dev.chester.wykies.com/gimp/reset-window/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/gimp/reset-window/">&lt;h1 id=&quot;reset-window&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#reset-window&quot; aria-label=&quot;Anchor link for: reset-window&quot;&gt;Reset window&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;033byQ9c-Nw?t=44&quot;&gt;https:&#x2F;&#x2F;youtu.be&#x2F;033byQ9c-Nw?t=44&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Test on Ubuntu 22.04&lt;&#x2F;p&gt;
&lt;p&gt;The video also includes how to reset other parts.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Go to &lt;code&gt;Edit&lt;&#x2F;code&gt; -&amp;gt; &lt;code&gt;Preferences&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Then &lt;code&gt;Interface&lt;&#x2F;code&gt; -&amp;gt; &lt;code&gt;Window Management&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Click button at bottom that says &lt;code&gt;Reset Saved Window Positions to Default Values&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Transparent background</title>
        <published>2023-06-05T00:00:00+00:00</published>
        <updated>2025-10-09T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/gimp/transparent/"/>
        <id>https://dev.chester.wykies.com/gimp/transparent/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/gimp/transparent/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;nl2uqKqbryo&quot;&gt;https:&#x2F;&#x2F;youtu.be&#x2F;nl2uqKqbryo&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Right click the channel on the right and click &lt;code&gt;Add alpha channel&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Select the area (&lt;strong&gt;See note below&lt;&#x2F;strong&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;Press Delete&lt;&#x2F;li&gt;
&lt;li&gt;Save in supported format like png&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;&lt;strong&gt;How to do selection&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;gimp&#x2F;transparent&#x2F;scrshot.png&quot; alt=&quot;Screenshot&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;If the background is not contiguous but is the same color it goes &lt;strong&gt;A LOT&lt;&#x2F;strong&gt; faster to use &lt;code&gt;Select by Colour Tool&lt;&#x2F;code&gt; instead of &lt;code&gt;Fuzzy Select&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;NB: There is an alternative approach with manual selection of parts to be removed that can be found here &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;C0tg2mRroSY&quot;&gt;https:&#x2F;&#x2F;youtu.be&#x2F;C0tg2mRroSY&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>References</title>
        <published>2023-05-29T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/refs/"/>
        <id>https://dev.chester.wykies.com/rust/refs/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/refs/">&lt;p&gt;This page serves as a place to collect link to rust content I either want to be able to find again or to content I want to easily be able to reference in bulk instead of on a per link basis.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;introductory-material&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#introductory-material&quot; aria-label=&quot;Anchor link for: introductory-material&quot;&gt;Introductory Material&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;new-to-rust-not-to-programming&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#new-to-rust-not-to-programming&quot; aria-label=&quot;Anchor link for: new-to-rust-not-to-programming&quot;&gt;New to Rust not to programming&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;There is a lot of material on the Internet to learn rust, this is just a selection of material I’ve used or tested personally.
If you were like me and don’t know if you even want to learn rust yet and don’t mind passively listening to a podcast (deductible from my “unfocused time” budget) to see if it’s something you want to invest “focus time” on, then I personally used the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;newrustacean.com&#x2F;&quot;&gt;New Rustacean&lt;&#x2F;a&gt; podcast to get a sense of the language without much opportunity cost. (A bit more explanation in the &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;refs&#x2F;#podcasts&quot;&gt;Podcast section&lt;&#x2F;a&gt;).&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Courses&lt;&#x2F;strong&gt; - The best course I’ve done on rust is &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-exercises.com&#x2F;&quot;&gt;100 Exercises To Learn Rust&lt;&#x2F;a&gt; by &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;mainmatter.com&#x2F;&quot;&gt;Mainmatter&lt;&#x2F;a&gt;.
The principle author is &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.lpalmieri.com&#x2F;&quot;&gt;Luca Palmieri&lt;&#x2F;a&gt; who wrote Zero To Production In Rust, referenced in the bullet point on books.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Books&lt;&#x2F;strong&gt; - It would be remiss of me not to lead with &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;book&#x2F;&quot;&gt;The Rust Book&lt;&#x2F;a&gt; that many people start with.
It’s pretty good and easy to follow.
This is what I started with after the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;newrustacean.com&#x2F;&quot;&gt;New Rustacean&lt;&#x2F;a&gt; podcast.
There is also an experimental &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-book.cs.brown.edu&#x2F;&quot;&gt;interactive version&lt;&#x2F;a&gt; hosted by the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;cel.cs.brown.edu&#x2F;&quot;&gt;Cognitive Engineering Lab&lt;&#x2F;a&gt; at Brown University.
There is also a repository of rust book on github you can have a look at for other book options &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;sger&#x2F;RustBooks&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;sger&#x2F;RustBooks&lt;&#x2F;a&gt;.
If you intend to write a RESTful back end in Rust I can strongly recommend &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.zero2prod.com&#x2F;&quot;&gt;Zero To Production In Rust&lt;&#x2F;a&gt; which I used personally and found tremendous value in.
I really appreciated practical approach that was used to deliver the content that &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.lpalmieri.com&#x2F;&quot;&gt;Luca&lt;&#x2F;a&gt; used.
He not only covers the recommended approach but covers other approaches one may “intuitively” come up with and explains the trade offs.
This along with the full source code from the project, which makes great starter code for a project, and a discord for book owners where you can ask questions makes this a invaluable resource in my opinion.
I think you will get more out of the book if you develop the example project along with the book but you can also just read it if you don’t feel like getting hands on and referring back to it after.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;new-to-programming&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#new-to-programming&quot; aria-label=&quot;Anchor link for: new-to-programming&quot;&gt;New to programming&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I’ve started of teaching a few people to program from scratch using rust but due to changes in life circumstances I’ve never actually finished covering all the material I wanted to so I can’t vouch for this process working yet.
I actually think rust isn’t that much harder to learn to program in, and it saves you from learning bad habits that you need to then later go back and fix.
I personally suspect that people find rust hard because it’s different and I think going from rust to many other imperative languages is easier than the reverse.&lt;&#x2F;p&gt;
&lt;p&gt;Thus far I’ve found starting off people with the book &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.beginrust.com&#x2F;&quot;&gt;Begin Rust&lt;&#x2F;a&gt; which is designed for high school students seem to work well.
The first 3 chapters are available for free on their website which allows me to start with new students and see if&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;they like the content and&lt;&#x2F;li&gt;
&lt;li&gt;if this is the right book to use with them.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;It provides structure and exercise to work though.
I’ve tried it with a few students ranging in age from 7 to 40 years.
For the younger students I’ve had to cover a bit of the math but it didn’t seem like too much for them.
They got it and were able to do some of the practice problems.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;official&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#official&quot; aria-label=&quot;Anchor link for: official&quot;&gt;Official&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-lang-nursery.github.io&#x2F;rust-cookbook&#x2F;intro.html&quot;&gt;Rust Cookbook&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-lang.github.io&#x2F;api-guidelines&#x2F;checklist.html&quot;&gt;API Guidelines Checklist&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Naming conventions - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-lang.github.io&#x2F;api-guidelines&#x2F;naming.html&quot;&gt;API Guide&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Documentation - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-lang.github.io&#x2F;api-guidelines&#x2F;documentation.html&quot;&gt;API Guide&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Implement From not Into - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;convert&#x2F;trait.Into.html&quot;&gt;Trait std::convert::Into&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Selecting a collection - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;collections&#x2F;index.html&quot;&gt;Module std::collections&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Setting up defaults - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;default&#x2F;trait.Default.html&quot;&gt;Trait std::default::Default&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Attributes - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;reference&#x2F;attributes.html&quot;&gt;The Rust Reference&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;Code like &lt;code&gt;#![]&lt;&#x2F;code&gt; and &lt;code&gt;#[]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Minimal Reproducible Example tips - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;tags&#x2F;rust&#x2F;info&quot;&gt;Stack Overflow Rust Info&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Conditional Compilation
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;reference&#x2F;conditional-compilation.html#debug_assertions&quot;&gt;The Rust Reference&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;conditional-compilation&#x2F;&quot;&gt;Internal Notes&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Managing External Processes - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-lang-nursery.github.io&#x2F;rust-cookbook&#x2F;os&#x2F;external.html&quot;&gt;Rust Cookbook&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Testing CLI Applications by running them
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-cli.github.io&#x2F;book&#x2F;tutorial&#x2F;testing.html#testing-cli-applications-by-running-them&quot;&gt;CLI Book&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;snippets&#x2F;#run-cli-app-to-test-it&quot;&gt;Example Snippet&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;Filing reports of unclear error messages (Choose Diagnostic) - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rust-lang&#x2F;rust&#x2F;issues&#x2F;new&#x2F;choose&quot;&gt;Rust Issues&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Crate.io and Docs.rs issue status - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;status.crates.io&#x2F;&quot;&gt;https:&#x2F;&#x2F;status.crates.io&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Build Queue for Docs.rs - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;releases&#x2F;queue&quot;&gt;docs.rs&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Raw Pointers - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;std&#x2F;primitive.pointer.html&quot;&gt;std docs&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Magic Completions - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-analyzer.github.io&#x2F;book&#x2F;features.html#magic-completions&quot;&gt;Rust Analyzer User Manual&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Directory Traversal - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-lang-nursery.github.io&#x2F;rust-cookbook&#x2F;file&#x2F;dir.html&quot;&gt;Rust Cookbook&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Recommended way to write &lt;code&gt;expect&lt;&#x2F;code&gt; messages - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;core&#x2F;result&#x2F;enum.Result.html#recommended-message-style&quot;&gt;std docs&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Types of enum variants - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;rust-by-example&#x2F;custom_types&#x2F;enum.html&quot;&gt;Rust by Example&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Using a your fork of a crate while developing a feature - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;cargo&#x2F;reference&#x2F;overriding-dependencies.html#testing-a-bugfix&quot;&gt;The Cargo Book - Testing a bugfix&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;reference-books-also-see-official&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#reference-books-also-see-official&quot; aria-label=&quot;Anchor link for: reference-books-also-see-official&quot;&gt;Reference Books (Also see &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;rust&#x2F;refs&#x2F;#official&quot;&gt;Official&lt;&#x2F;a&gt;)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;Collection patters, idioms and anti-patterns - &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust-unofficial.github.io&#x2F;patterns&#x2F;&quot;&gt;Rust design patterns&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;blog-posts&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#blog-posts&quot; aria-label=&quot;Anchor link for: blog-posts&quot;&gt;Blog Posts&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rust.code-maven.com&#x2F;default-arguments-for-functions&quot;&gt;Default arguments for functions in Rust using macros&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;hegdenu.net&#x2F;posts&#x2F;debugging-tokio-instrumentation&#x2F;&quot;&gt;Explanation of Tracing Subscribers&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;podcasts&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#podcasts&quot; aria-label=&quot;Anchor link for: podcasts&quot;&gt;Podcasts&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;rustacean-station.org&#x2F;&quot;&gt;Rustacean Station&lt;&#x2F;a&gt; - Current community run podcast&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;corrode.dev&#x2F;podcast&#x2F;&quot;&gt;Rust in Production&lt;&#x2F;a&gt; - Interviews with companies using rust in production.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.marcoieni.com&#x2F;tags&#x2F;rustship&#x2F;&quot;&gt;RustShip&lt;&#x2F;a&gt; - Interviews with companies that ship rust software.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;sdr-podcast.com&#x2F;&quot;&gt;Self-Directed Research Podcast (SDR)&lt;&#x2F;a&gt; - “Every week, a new presentation on what Amos or James has been up to. Usually: Rust, embedded, web servers, but anything is fair game.”, is what the top of their site says. Tracks with what I’ve heard so far (although no episodes for the year yet).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;oxide-and-friends.transistor.fm&#x2F;&quot;&gt;Oxide and Friends&lt;&#x2F;a&gt; - Not specifically a rust podcast but it’s from a company that uses rust and, as a result, rust comes up frequently.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;newrustacean.com&#x2F;&quot;&gt;New Rustacean&lt;&#x2F;a&gt; - Stopped but it’s where I started. This podcast introduced me to rust and got me excited before I read the book and actually tried it myself (was able to use commute time to see if I like this “rust thing” I kept hearing people talking about). I think the main reason it got me excited is that the author, &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.chriskrycho.com&#x2F;&quot;&gt;Chris Krycho&lt;&#x2F;a&gt;, spoke about the parts of rust that I was interested in and maybe contributed to making it easier to learn rust. I found learning rust easy but that’s not a sentiment I’ve heard from many other people so maybe this podcast played into what made it easy for me.
Don’t have a counterfactual so I’ll never know.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;video&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#video&quot; aria-label=&quot;Anchor link for: video&quot;&gt;Video&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;See &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;youtube-ref-videos&#x2F;#rust&quot;&gt;here&lt;&#x2F;a&gt; for youtube videos.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;useful-crates&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#useful-crates&quot; aria-label=&quot;Anchor link for: useful-crates&quot;&gt;Useful crates&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;For some crates I have more detailed notes.
For those their page title starts with “Crate “.
And for ease of maintenance they are not duplicated here.
So please do see the &lt;a href=&quot;..&#x2F;index.html&quot;&gt;section page&lt;&#x2F;a&gt; for rust to see the list.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;log&#x2F;&quot;&gt;log&lt;&#x2F;a&gt; - A lightweight logging facade&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;log4rs&#x2F;&quot;&gt;log4rs&lt;&#x2F;a&gt; - a highly configurable logging framework modeled after Java’s Logback and log4j libraries.
&lt;ul&gt;
&lt;li&gt;Logging patterns &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;log4rs&#x2F;*&#x2F;log4rs&#x2F;encode&#x2F;pattern&#x2F;index.html&quot;&gt;patterns&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;tracing&#x2F;latest&#x2F;tracing&#x2F;index.html&quot;&gt;tracing&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;tracing&#x2F;latest&#x2F;tracing&#x2F;#shorthand-macros&quot;&gt;Shorthand Macros&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;float_eq&#x2F;&quot;&gt;float_eq&lt;&#x2F;a&gt; - Compare IEEE floating point primitives, structs and collections for equality&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;float-ord&#x2F;latest&#x2F;float_ord&#x2F;&quot;&gt;float_ord&lt;&#x2F;a&gt; - Add Ord for floats (used as &lt;code&gt;FloatOrd(1.0)&lt;&#x2F;code&gt;)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;inventory&#x2F;&quot;&gt;inventory&lt;&#x2F;a&gt; - Typed distributed plugin registration.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;dirs&quot;&gt;dirs&lt;&#x2F;a&gt; - Helps you find the suitable directory to use in a cross platform way&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;secrecy&quot;&gt;secrecy&lt;&#x2F;a&gt; - Simple secret keeping library. Small API surface and reasonable protection from mistakes.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;version&#x2F;latest&#x2F;version&#x2F;&quot;&gt;version&lt;&#x2F;a&gt; - Provides the version information for your crate already parsed into the three components&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.rs&#x2F;document-features&#x2F;latest&#x2F;document_features&#x2F;&quot;&gt;document_features&lt;&#x2F;a&gt; - provides a macro that extracts “documentation” comments from Cargo.toml&lt;&#x2F;li&gt;
&lt;li&gt;List of &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crates.io&#x2F;users&#x2F;c-git?sort=downloads&quot;&gt;my crates&lt;&#x2F;a&gt; on crates.io&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;github-actions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#github-actions&quot; aria-label=&quot;Anchor link for: github-actions&quot;&gt;GitHub Actions&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;actions-rs&#x2F;toolchain&quot;&gt;Toolchain&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;lints&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#lints&quot; aria-label=&quot;Anchor link for: lints&quot;&gt;Lints&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;rustdoc&#x2F;lints.html&quot;&gt;The rustdoc book&lt;&#x2F;a&gt;
&lt;ul&gt;
&lt;li&gt;In particular see the one for warning about &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;rustc&#x2F;lints&#x2F;listing&#x2F;allowed-by-default.html#unused-crate-dependencies&quot;&gt;unused dependencies&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Frequently looked up functions</title>
        <published>2023-05-16T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/python/freq-lookup/"/>
        <id>https://dev.chester.wykies.com/python/freq-lookup/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/python/freq-lookup/">&lt;h1 id=&quot;compare-two-floats-as-approximately-equal&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#compare-two-floats-as-approximately-equal&quot; aria-label=&quot;Anchor link for: compare-two-floats-as-approximately-equal&quot;&gt;Compare two floats as approximately equal&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;math.html#math.isclose&quot;&gt;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;math.html#math.isclose&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;math.isclose(a, b)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Modify Existing Commits</title>
        <published>2023-05-05T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/modify-existing-commits/"/>
        <id>https://dev.chester.wykies.com/git/modify-existing-commits/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/modify-existing-commits/">&lt;h1 id=&quot;modify-last-commit-message&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#modify-last-commit-message&quot; aria-label=&quot;Anchor link for: modify-last-commit-message&quot;&gt;Modify last commit message&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Opens the last message in your editor&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; commit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --amend&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Stash</title>
        <published>2023-04-27T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/stash/"/>
        <id>https://dev.chester.wykies.com/git/stash/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/stash/">&lt;p&gt;Source: &lt;code&gt;git stash --help&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;move-to-stash&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#move-to-stash&quot; aria-label=&quot;Anchor link for: move-to-stash&quot;&gt;Move to stash&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; stash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;apply&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#apply&quot; aria-label=&quot;Anchor link for: apply&quot;&gt;Apply&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Restores most recent without dropping it&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; stash apply&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;pop&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#pop&quot; aria-label=&quot;Anchor link for: pop&quot;&gt;Pop&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Apply and drop the most recent stash&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; stash pop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Merge</title>
        <published>2023-04-17T00:00:00+00:00</published>
        <updated>2026-04-23T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/merge/"/>
        <id>https://dev.chester.wykies.com/git/merge/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/merge/">&lt;h1 id=&quot;aborting-a-merge&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#aborting-a-merge&quot; aria-label=&quot;Anchor link for: aborting-a-merge&quot;&gt;Aborting a merge&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;It is sometimes possible to abort a merge for example if there is a conflict and the merge is not completed.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; merge&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --abort&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;merge-conflicts&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#merge-conflicts&quot; aria-label=&quot;Anchor link for: merge-conflicts&quot;&gt;Merge conflicts&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;taking-all-of-one-side&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#taking-all-of-one-side&quot; aria-label=&quot;Anchor link for: taking-all-of-one-side&quot;&gt;Taking all of one side&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;WARNING: This literally just takes all of one side it’s not selective&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Note: If you are unclear what &lt;code&gt;theirs&lt;&#x2F;code&gt; and &lt;code&gt;ours&lt;&#x2F;code&gt; refers to it’s best to consult &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;git-checkout#Documentation&#x2F;git-checkout.txt---theirs&quot;&gt;the docs&lt;&#x2F;a&gt; before issuing any commands.&lt;&#x2F;p&gt;
&lt;details&gt;
&lt;summary&gt;Old approach&lt;&#x2F;summary&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;10697463&#x2F;resolve-git-merge-conflicts-in-favor-of-their-changes-during-a-pull&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;10697463&#x2F;resolve-git-merge-conflicts-in-favor-of-their-changes-during-a-pull&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I am keeping this version for reference but I no longer think it’s a good approach because it is not exactly what I think of as take theirs.
It will for example give errors for files that exist in &lt;code&gt;ours&lt;&#x2F;code&gt; but not in &lt;code&gt;theirs&lt;&#x2F;code&gt;, which kinda isn’t what I want.
If you are already in the merging state and have conflicts and want to take all of ours or theirs you can use one of following.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; checkout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --theirs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you want to do the opposite:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; checkout&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --ours&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; .&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You can mark all the conflicts resolved after by using &lt;code&gt;git add .&lt;&#x2F;code&gt; or &lt;code&gt;git add -u&lt;&#x2F;code&gt; to only stage tracked files.&lt;&#x2F;p&gt;
&lt;&#x2F;details&gt;
&lt;p&gt;When issuing the checkout command specify if you want &lt;code&gt;ours&lt;&#x2F;code&gt; or &lt;code&gt;theirs&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; merge&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -X&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; theirs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;branch-nam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>CLASP</title>
        <published>2023-04-17T00:00:00+00:00</published>
        <updated>2026-05-11T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/clasp/"/>
        <id>https://dev.chester.wykies.com/misc/clasp/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/clasp/">&lt;script type=&quot;text&#x2F;javascript&quot; src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;enable_checkboxes.js&quot; defer&gt;&lt;&#x2F;script&gt;&lt;h1 id=&quot;setup&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#setup&quot; aria-label=&quot;Anchor link for: setup&quot;&gt;Setup&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;If this is your first time using clasp or first time on a new computer the best instructions to get started can be found in the Readme of the project it self at &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;clasp&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;clasp&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;In particular you will need:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;To install &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;nodejs.org&#x2F;en&#x2F;download&#x2F;&quot;&gt;Node.js&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;To install clasp&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;npm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -g&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; @google&#x2F;clasp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;And the enable the to use the Google Apps Script API: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;script.google.com&#x2F;home&#x2F;usersettings&quot;&gt;https:&#x2F;&#x2F;script.google.com&#x2F;home&#x2F;usersettings&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;how-to-use&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#how-to-use&quot; aria-label=&quot;Anchor link for: how-to-use&quot;&gt;How to use&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;Once everything has been setup (ie. both &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;clasp&#x2F;#setup&quot;&gt;Setup&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;clasp&#x2F;#new-project-setup&quot;&gt;New project setup&lt;&#x2F;a&gt; are completed)&lt;&#x2F;li&gt;
&lt;li&gt;Edit your code inside of the &lt;code&gt;src&lt;&#x2F;code&gt; folder then use &lt;code&gt;npm run deploy&lt;&#x2F;code&gt; to upload to the cloud&lt;&#x2F;li&gt;
&lt;li&gt;See other commands in &lt;code&gt;package.json&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;You can use clasp normally as the &lt;code&gt;rootDir&lt;&#x2F;code&gt; is set but you need to bundle the typescript first so you would need to use &lt;code&gt;npm run build&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;new-project-setup&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#new-project-setup&quot; aria-label=&quot;Anchor link for: new-project-setup&quot;&gt;New project setup&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Create new git repo from the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;clasp_minimal_typescript&quot;&gt;template repo&lt;&#x2F;a&gt; (big green button on top right)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Create Google Apps Script project (On Standalone, Sheets, etc.)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Clone Scripts Project into an &lt;strong&gt;EMPTY FOLDER&lt;&#x2F;strong&gt; using clasp (We won’t be keeping this folder we just need two files from the clone)&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;clasp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; clone&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;scriptI&lt;&#x2F;span&gt;&lt;span&gt;D&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Copy&#x2F;Move &lt;code&gt;.clasp.json&lt;&#x2F;code&gt; and &lt;code&gt;appsscript.json&lt;&#x2F;code&gt; into the root of the repo created from the template.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
You may delete the temporary folder at this point&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Edit &lt;code&gt;.clasp.json&lt;&#x2F;code&gt; to set the &lt;code&gt;rootDir&lt;&#x2F;code&gt; to &lt;code&gt;dist&lt;&#x2F;code&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;json&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;rootDir&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;: &lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;dist&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Install npm dependencies&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;npm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;additional-steps-for-wykies-library&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#additional-steps-for-wykies-library&quot; aria-label=&quot;Anchor link for: additional-steps-for-wykies-library&quot;&gt;Additional Steps for Wykies Library&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Add ts_lib
&lt;ul&gt;
&lt;li&gt;Part of wykies&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; submodule add ..&#x2F;ts_lib.git src&#x2F;ts_lib&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Outside of wykies&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; submodule add git@github.com:wykies&#x2F;ts_lib.git src&#x2F;ts_lib&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;converting-an-existing-javascript-js-project-to-typescript-ts&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#converting-an-existing-javascript-js-project-to-typescript-ts&quot; aria-label=&quot;Anchor link for: converting-an-existing-javascript-js-project-to-typescript-ts&quot;&gt;Converting an existing Javascript (JS) project to TypeScript (TS)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Move files into a directory called &lt;code&gt;src&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Remove &lt;code&gt;js_lib&lt;&#x2F;code&gt; if in use see &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;git&#x2F;submodules&#x2F;#remove-a-submodule&quot;&gt;removal instructions for submodule&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Change all &lt;code&gt;.js&lt;&#x2F;code&gt; files to &lt;code&gt;.ts&lt;&#x2F;code&gt; files&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Download&lt;&#x2F;li&gt;
&lt;li&gt;&lt;input disabled=&quot;&quot; type=&quot;checkbox&quot;&#x2F;&gt;
Follow normal instructions from &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;clasp&#x2F;#&quot;&gt;New TS project&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;ignore-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ignore-files&quot; aria-label=&quot;Anchor link for: ignore-files&quot;&gt;Ignore files&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;file-location&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#file-location&quot; aria-label=&quot;Anchor link for: file-location&quot;&gt;File location&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;clasp#ignore-file-claspignore&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;clasp#ignore-file-claspignore&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Put a &lt;code&gt;.claspignore&lt;&#x2F;code&gt; in the root of the project’s directory.
All paths are relative to root.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;format&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#format&quot; aria-label=&quot;Anchor link for: format&quot;&gt;Format&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Uses &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;multimatch&quot;&gt;multimatch&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;sindresorhus&#x2F;multimatch#globbing-patterns&quot;&gt;Glob Pattern&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*&lt;&#x2F;code&gt; matches any number of characters, but not &#x2F;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;?&lt;&#x2F;code&gt; matches a single character, but not &#x2F;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;**&lt;&#x2F;code&gt; matches any number of characters, including &#x2F;, as long as it’s the only thing in a path part&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;{}&lt;&#x2F;code&gt; allows for a comma-separated list of “or” expressions&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;!&lt;&#x2F;code&gt; at the beginning of a pattern will negate the match&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;example&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example&quot; aria-label=&quot;Anchor link for: example&quot;&gt;Example&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;js_lib&#x2F;**&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Snippets</title>
        <published>2023-04-17T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/typescript/snippets/"/>
        <id>https://dev.chester.wykies.com/typescript/snippets/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/typescript/snippets/">&lt;p&gt;Includes Google App Script (gscript)&lt;&#x2F;p&gt;
&lt;h1 id=&quot;exhaustive-matching&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#exhaustive-matching&quot; aria-label=&quot;Anchor link for: exhaustive-matching&quot;&gt;Exhaustive Matching&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.typescriptlang.org&#x2F;docs&#x2F;handbook&#x2F;2&#x2F;narrowing.html#exhaustiveness-checking&quot;&gt;https:&#x2F;&#x2F;www.typescriptlang.org&#x2F;docs&#x2F;handbook&#x2F;2&#x2F;narrowing.html#exhaustiveness-checking&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;typescript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Shape&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Circle&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Square&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; getArea&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;shape&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; Shape&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;  switch&lt;&#x2F;span&gt;&lt;span&gt; (shape.kind) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    case&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;circle&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;      return&lt;&#x2F;span&gt;&lt;span&gt; Math.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;PI&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; *&lt;&#x2F;span&gt;&lt;span&gt; shape.radius&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; **&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    case&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;square&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;      return&lt;&#x2F;span&gt;&lt;span&gt; shape.sideLength&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; **&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    default&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;      const&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; _exhaustiveCheck&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; never&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; shape;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;      return&lt;&#x2F;span&gt;&lt;span&gt; _exhaustiveCheck;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;sleep-in-google-app-script-gscript&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#sleep-in-google-app-script-gscript&quot; aria-label=&quot;Anchor link for: sleep-in-google-app-script-gscript&quot;&gt;Sleep in Google App Script (gscript)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;developers.google.com&#x2F;apps-script&#x2F;reference&#x2F;utilities&#x2F;utilities#sleepmilliseconds&quot;&gt;https:&#x2F;&#x2F;developers.google.com&#x2F;apps-script&#x2F;reference&#x2F;utilities&#x2F;utilities#sleepmilliseconds&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;typescript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Utilities.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sleep&lt;&#x2F;span&gt;&lt;span&gt;(milliseconds);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;google-script-simple-trigger&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#google-script-simple-trigger&quot; aria-label=&quot;Anchor link for: google-script-simple-trigger&quot;&gt;Google Script Simple Trigger&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;on-open&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#on-open&quot; aria-label=&quot;Anchor link for: on-open&quot;&gt;On Open&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Putting it at the top outside of the namespace in &lt;code&gt;shared.ts&lt;&#x2F;code&gt; is the convention in use&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;typescript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; onOpen&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    const&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; menu&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; SpreadsheetApp.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;getUi&lt;&#x2F;span&gt;&lt;span&gt;().&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;createMenu&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Scripts&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    menu.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;addItem&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Displayed Text&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;functionName&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;addToUi&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    menu.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;addItem&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;Button 2&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;functionName2&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;).&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;addToUi&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;on-edit&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#on-edit&quot; aria-label=&quot;Anchor link for: on-edit&quot;&gt;On Edit&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;typescript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; onEditBody&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; GoogleAppsScript&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Events&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;SheetsOnEdit&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;        if&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            (e.range.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;getColumn&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; !==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; OUTPUT_COL_DATE&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            (e.range.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;getColumn&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; !==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; OUTPUT_COL_TIME_START&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            (e.range.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;getColumn&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; !==&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; OUTPUT_COL_TIME_END&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            (e.range.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;getWidth&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; ===&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;            (e.range.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;getHeight&lt;&#x2F;span&gt;&lt;span&gt;()&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; ===&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;)) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;            &#x2F;&#x2F; Do the needful (note variables on rhs above are not automatically defined)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;        }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Submodules</title>
        <published>2023-04-14T00:00:00+00:00</published>
        <updated>2026-01-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/submodules/"/>
        <id>https://dev.chester.wykies.com/git/submodules/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/submodules/">&lt;h1 id=&quot;add-a-new-submodule&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-a-new-submodule&quot; aria-label=&quot;Anchor link for: add-a-new-submodule&quot;&gt;Add a new submodule&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;For path prefer relative paths (See example below)&lt;&#x2F;p&gt;
&lt;h2 id=&quot;for-placing-in-current-folder-use&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#for-placing-in-current-folder-use&quot; aria-label=&quot;Anchor link for: for-placing-in-current-folder-use&quot;&gt;For placing in current folder use&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; submodule add ..&#x2F;ts_lib.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;for-placing-in-a-subfolder-or-with-a-specific-name-use&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#for-placing-in-a-subfolder-or-with-a-specific-name-use&quot; aria-label=&quot;Anchor link for: for-placing-in-a-subfolder-or-with-a-specific-name-use&quot;&gt;For placing in a subfolder (or with a specific name) use&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; submodule add ..&#x2F;ts_lib.git path_to_place_module&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;using-already-setup-submodules&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-already-setup-submodules&quot; aria-label=&quot;Anchor link for: using-already-setup-submodules&quot;&gt;Using already setup submodules&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;1030169&#x2F;pull-latest-changes-for-all-git-submodules&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;1030169&#x2F;pull-latest-changes-for-all-git-submodules&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;initialize&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#initialize&quot; aria-label=&quot;Anchor link for: initialize&quot;&gt;Initialize&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; submodule update&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --init --recursive&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;update&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#update&quot; aria-label=&quot;Anchor link for: update&quot;&gt;Update&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; pull&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --recurse-submodules&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.damirscorner.com&#x2F;blog&#x2F;posts&#x2F;20210423-ChangingUrlsOfGitSubmodules.html&quot;&gt;https:&#x2F;&#x2F;www.damirscorner.com&#x2F;blog&#x2F;posts&#x2F;20210423-ChangingUrlsOfGitSubmodules.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;problem-with-absolute-links&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#problem-with-absolute-links&quot; aria-label=&quot;Anchor link for: problem-with-absolute-links&quot;&gt;Problem with absolute links&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Uses using HTTPS need one format while users using SSH need a different format&lt;&#x2F;p&gt;
&lt;h2 id=&quot;https-format&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#https-format&quot; aria-label=&quot;Anchor link for: https-format&quot;&gt;HTTPS Format&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[submodule &amp;quot;modules&#x2F;mySubmodule&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    path = modules&#x2F;mySubmodule&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    url = https:&#x2F;&#x2F;github.com&#x2F;damirarh&#x2F;mySubmodule.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;ssh-format&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ssh-format&quot; aria-label=&quot;Anchor link for: ssh-format&quot;&gt;SSH Format&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[submodule &amp;quot;modules&#x2F;mySubmodule&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    path = modules&#x2F;mySubmodule&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    url = git@github.com:damirarh&#x2F;mySubmodule.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;how-relative-links-work&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#how-relative-links-work&quot; aria-label=&quot;Anchor link for: how-relative-links-work&quot;&gt;How relative links work&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;They relate the submodule link to the link of the parent module, so it omits what protocol to use for the connection and
therefore works for both.
This means it will only work if both repos are hosted on the same service. If not in the same top level account just use
the appropriate number of &lt;code&gt;..&#x2F;&lt;&#x2F;code&gt;. So if in the same account you would use &lt;code&gt;..&#x2F;&lt;&#x2F;code&gt; whereas if they were in different ones
you would use &lt;code&gt;..&#x2F;..&#x2F;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;relative-format&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#relative-format&quot; aria-label=&quot;Anchor link for: relative-format&quot;&gt;Relative Format&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[submodule &amp;quot;modules&#x2F;mySubmodule&amp;quot;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    path = modules&#x2F;mySubmodule&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    url = ..&#x2F;mySubmodule.git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;steps-to-change-from-absolute-to-relative-links&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#steps-to-change-from-absolute-to-relative-links&quot; aria-label=&quot;Anchor link for: steps-to-change-from-absolute-to-relative-links&quot;&gt;Steps to change from absolute to relative links&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;em&gt;NB: Not tested&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Modify the URL value in the &lt;code&gt;.gitmodules&lt;&#x2F;code&gt; file to make it relative. Then commit this file to Git.&lt;&#x2F;li&gt;
&lt;li&gt;Force submodules to resynchronize with the modified file using the following command in the folder with the
modified &lt;code&gt;.gitmodules&lt;&#x2F;code&gt; file (not necessarily the repository root if its submodules contain other nested submodules)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; submodule update&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --init --recursive --remote&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;remove-a-submodule&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#remove-a-submodule&quot; aria-label=&quot;Anchor link for: remove-a-submodule&quot;&gt;Remove a submodule&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; rm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;path-to-submodul&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;impacts-on-github-workflows&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#impacts-on-github-workflows&quot; aria-label=&quot;Anchor link for: impacts-on-github-workflows&quot;&gt;Impacts on github workflows&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;If your code depends on the submodule being there then you’ll need to ensure it gets checked out.
You’ll need to add with &lt;code&gt;submodules: recursive&lt;&#x2F;code&gt; to your checkout step (See example below).
Also used in CI for &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;c-git.github.io&#x2F;tree&#x2F;main&#x2F;.github&#x2F;workflows&quot;&gt;this repo&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt; name&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; Checkout repo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;    uses&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; actions&#x2F;checkout@v4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;    with&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #85E89D;&quot;&gt;        submodules&lt;&#x2F;span&gt;&lt;span&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; recursive&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Error Suppression</title>
        <published>2023-04-14T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/typescript/error-suppression/"/>
        <id>https://dev.chester.wykies.com/typescript/error-suppression/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/typescript/error-suppression/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;bobbyhadz.com&#x2F;blog&#x2F;typescript-ignore-error&quot;&gt;https:&#x2F;&#x2F;bobbyhadz.com&#x2F;blog&#x2F;typescript-ignore-error&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Use &lt;code&gt;&#x2F;&#x2F; @ts-expect-error&lt;&#x2F;code&gt; on the previous line to suppress errors. This is to be preferred over &lt;code&gt;&#x2F;&#x2F; @ts-nocheck&lt;&#x2F;code&gt; (which is for a whole file) and &lt;code&gt;&#x2F;&#x2F; @ts-ignore&lt;&#x2F;code&gt; which gives no warning if the error is no longer present.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Strange Problems and Fixes</title>
        <published>2023-04-13T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/strange-problems/"/>
        <id>https://dev.chester.wykies.com/debian/strange-problems/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/strange-problems/">&lt;h1 id=&quot;ctrl&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ctrl&quot; aria-label=&quot;Anchor link for: ctrl&quot;&gt;Ctrl + .&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Seemingly randomly (probably from an update) &lt;code&gt;Ctrl + .&lt;&#x2F;code&gt; just stopped working and started producing an e and some weird behaviour. Found &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;unix.stackexchange.com&#x2F;questions&#x2F;692237&#x2F;ctrl-displays-e-character-and-captures-the-keyboard-shortcut&quot;&gt;this&lt;&#x2F;a&gt; article that explained a fix but no idea why it started. To fix run &lt;code&gt;ibus-setup&lt;&#x2F;code&gt; then under Emoji’s remove &lt;code&gt;\&amp;lt;Control\&amp;gt; + Period&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Set Icon for Application</title>
        <published>2023-04-03T00:00:00+00:00</published>
        <updated>2025-10-09T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/icons/"/>
        <id>https://dev.chester.wykies.com/debian/icons/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/icons/">&lt;p&gt;Source: https:&#x2F;&#x2F;www.solvetechnow.com&#x2F;post&#x2F;how-to-change-app-icon-in-ubuntu (Link does not appear to work anymore)&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Get a preferably square image with a transparent background.Save it somewhere to be used. NB: png supports transparent backgrounds. See &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;gimp&#x2F;transparent&#x2F;&quot;&gt;instructions&lt;&#x2F;a&gt; if you need to make one from a screen shot.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Check if the .desktop file already exists&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ll&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;usr&#x2F;share&#x2F;applications&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; grep&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;program-nam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Create or edit the file (requires root)&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;If the file does not exist the copy one of the other files in that folder to create it (will need to edit more than just the icon in this case).&lt;&#x2F;li&gt;
&lt;li&gt;Open file in for editing&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; gedit &#x2F;usr&#x2F;share&#x2F;applications&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;program-nam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;.desktop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Edit that line that starts with &lt;code&gt;Icon=&lt;&#x2F;code&gt; to point to the file you saved&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Manually Removing Old Kernels</title>
        <published>2023-03-30T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/manual-kernel-remove/"/>
        <id>https://dev.chester.wykies.com/debian/manual-kernel-remove/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/manual-kernel-remove/">&lt;h1 id=&quot;tldr&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tldr&quot; aria-label=&quot;Anchor link for: tldr&quot;&gt;TLDR&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;manual-kernel-remove&#x2F;#check-current-kernel-version-in-use&quot;&gt;Check current&lt;&#x2F;a&gt; to know which not to remove. &lt;code&gt;uname -r&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;manual-kernel-remove&#x2F;#mark-kernels-for-removal&quot;&gt;Search keys&lt;&#x2F;a&gt; to remove the backup kernel manually&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;linux-image&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;linux-header&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;background&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#background&quot; aria-label=&quot;Anchor link for: background&quot;&gt;Background&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;My &lt;code&gt;&#x2F;boot&lt;&#x2F;code&gt; partition is 1GB because that seemed like plenty enough space but turns out well it’s not. When there is a new kernel sometimes I’ll need to manually remove the old one to make space for the new one. This isn’t the biggest of problems in the world but it’s less than desirable. From my understanding in addition to the currently running kernel one older kernel is kept as a backup but seems I only have space for 2 so when a new one comes out I need to remove the old one.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;using-synaptic&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#using-synaptic&quot; aria-label=&quot;Anchor link for: using-synaptic&quot;&gt;Using Synaptic&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;2793&#x2F;how-do-i-remove-old-kernel-versions-to-clean-up-the-boot-menu&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;2793&#x2F;how-do-i-remove-old-kernel-versions-to-clean-up-the-boot-menu&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;warning&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#warning&quot; aria-label=&quot;Anchor link for: warning&quot;&gt;WARNING!!!&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;If you remove your current kernel then you won’t be able to boot.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;install-synaptic&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-synaptic&quot; aria-label=&quot;Anchor link for: install-synaptic&quot;&gt;Install Synaptic&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;I typically install it from the Ubuntu Store and it comes preinstalled on Debian. In the Ubuntu store it is listed as “Synaptic Package Manager”. Or it can be installed with the following command&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install synaptic&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;check-current-kernel-version-in-use&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-current-kernel-version-in-use&quot; aria-label=&quot;Anchor link for: check-current-kernel-version-in-use&quot;&gt;Check current kernel version in use&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Use the following command to check your current kernel version in use and ensure you do NOT remove this version.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;uname&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -r&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;mark-kernels-for-removal&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mark-kernels-for-removal&quot; aria-label=&quot;Anchor link for: mark-kernels-for-removal&quot;&gt;Mark kernels for removal&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Search for the following search terms and remove the kernels that you want to remove.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;linux-image&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;linux-header&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;manual-kernel-remove&#x2F;scrshot.png&quot; alt=&quot;ScreenShot&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Paths to remember</title>
        <published>2023-02-26T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/paths-to-rem/"/>
        <id>https://dev.chester.wykies.com/debian/paths-to-rem/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/paths-to-rem/">&lt;h1 id=&quot;lampp&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#lampp&quot; aria-label=&quot;Anchor link for: lampp&quot;&gt;LAMPP&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;localhost root dir - &lt;code&gt;&#x2F;opt&#x2F;lampp&#x2F;htdocs&#x2F;&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Crate Serde</title>
        <published>2023-01-06T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/crate-serde/"/>
        <id>https://dev.chester.wykies.com/rust/crate-serde/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/crate-serde/">&lt;p&gt;Tips and Tricks for working with &lt;code&gt;Serde&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;attributes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#attributes&quot; aria-label=&quot;Anchor link for: attributes&quot;&gt;Attributes&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Website: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;serde.rs&#x2F;attributes.html&quot;&gt;https:&#x2F;&#x2F;serde.rs&#x2F;attributes.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;specially-noted-container-attributes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#specially-noted-container-attributes&quot; aria-label=&quot;Anchor link for: specially-noted-container-attributes&quot;&gt;Specially noted Container attributes&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;serde.rs&#x2F;container-attrs.html#rename_all&quot;&gt;Rename All&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[serde(rename_all = &amp;quot;lowercase&amp;quot;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;serde.rs&#x2F;container-attrs.html#default&quot;&gt;Default&lt;&#x2F;a&gt; - Use default for any missing fields&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[serde(default)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;specially-noted-field-attributes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#specially-noted-field-attributes&quot; aria-label=&quot;Anchor link for: specially-noted-field-attributes&quot;&gt;Specially noted Field attributes&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;serde.rs&#x2F;field-attrs.html#rename&quot;&gt;Rename&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[serde(rename = &amp;quot;name&amp;quot;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;serde.rs&#x2F;field-attrs.html#alias&quot;&gt;Alias&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[serde(alias = &amp;quot;name&amp;quot;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;serde.rs&#x2F;field-attrs.html#default--path&quot;&gt;Path&lt;&#x2F;a&gt; - Use callable to set default value if field not found. This may
also be a trait method.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[serde(default = &amp;quot;path&amp;quot;)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;serde.rs&#x2F;field-attrs.html#default&quot;&gt;Default&lt;&#x2F;a&gt; - Use &lt;code&gt;Default::default()&lt;&#x2F;code&gt; if not present. See
also &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;serde.rs&#x2F;attr-default.html&quot;&gt;default value for a field&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[serde(default)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;enums-and-toml&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#enums-and-toml&quot; aria-label=&quot;Anchor link for: enums-and-toml&quot;&gt;Enums and TOML&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;57560593&#x2F;why-do-i-get-an-unsupportedtype-error-when-serializing-to-toml-with-a-manually-i&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;57560593&#x2F;why-do-i-get-an-unsupportedtype-error-when-serializing-to-toml-with-a-manually-i&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Using &lt;code&gt;#[serde(tag = &quot;type&quot;)]&lt;&#x2F;code&gt; can sometimes resolve &lt;code&gt;Err value: UnsupportedType&lt;&#x2F;code&gt; errors&lt;&#x2F;p&gt;
&lt;h1 id=&quot;transcoding&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#transcoding&quot; aria-label=&quot;Anchor link for: transcoding&quot;&gt;Transcoding&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;serde.rs&#x2F;transcode.html&quot;&gt;https:&#x2F;&#x2F;serde.rs&#x2F;transcode.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Going from any self describing format to any other self describing format (Not tested yet, but wanted to be able to find it next time)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; std&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span&gt;io;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; A JSON input with plenty of whitespace.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let&lt;&#x2F;span&gt;&lt;span&gt; input&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; r#&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;      {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;        &amp;quot;a boolean&amp;quot;: true,&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;        &amp;quot;an array&amp;quot;: [3, 2, 1]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;      }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;    &amp;quot;#&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; A JSON deserializer. You can use any Serde Deserializer here.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; deserializer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; serde_json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Deserializer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;from_str&lt;&#x2F;span&gt;&lt;span&gt;(input);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; A compacted JSON serializer. You can use any Serde Serializer here.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    let mut&lt;&#x2F;span&gt;&lt;span&gt; serializer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; serde_json&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;Serializer&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;new&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;io&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;stdout&lt;&#x2F;span&gt;&lt;span&gt;());&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; Prints `{&amp;quot;a boolean&amp;quot;:true,&amp;quot;an array&amp;quot;:[3,2,1]}` to stdout.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;    &#x2F;&#x2F; This line works with any self-describing Deserializer and any Serializer.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    serde_transcode&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;transcode&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;amp;mut&lt;&#x2F;span&gt;&lt;span&gt; deserializer,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;amp;mut&lt;&#x2F;span&gt;&lt;span&gt; serializer)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;unwrap&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Cron</title>
        <published>2022-12-07T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/cron/"/>
        <id>https://dev.chester.wykies.com/debian/cron/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/cron/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.cyberciti.biz&#x2F;faq&#x2F;how-do-i-add-jobs-to-cron-under-linux-or-unix-oses&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.cyberciti.biz&#x2F;faq&#x2F;how-do-i-add-jobs-to-cron-under-linux-or-unix-oses&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;open-file-to-edit&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#open-file-to-edit&quot; aria-label=&quot;Anchor link for: open-file-to-edit&quot;&gt;Open file to edit&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;crontab&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;format&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#format&quot; aria-label=&quot;Anchor link for: format&quot;&gt;Format&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;a b c d e &#x2F;path&#x2F;command&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;a&lt;&#x2F;code&gt;: Minute (0-59)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;b&lt;&#x2F;code&gt;: Hours (0-23)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;c&lt;&#x2F;code&gt;: Day (0-31)&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;d&lt;&#x2F;code&gt;: Month (0-12 [12 == December])&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;e&lt;&#x2F;code&gt;: Day of the week(0-7 [7 or 0 == sunday])&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;&#x2F;path&#x2F;command&lt;&#x2F;code&gt; – Script or command name to schedule&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;options-other-than-number&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#options-other-than-number&quot; aria-label=&quot;Anchor link for: options-other-than-number&quot;&gt;Options other than number&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;crontab.guru&#x2F;every-5-minutes&quot;&gt;https:&#x2F;&#x2F;crontab.guru&#x2F;every-5-minutes&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;*&lt;&#x2F;code&gt; :	any value&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;,&lt;&#x2F;code&gt; :	value list separator&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;-&lt;&#x2F;code&gt; :	range of values&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;&#x2F;&lt;&#x2F;code&gt; :	step values&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Example every 5 minutes&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;*&#x2F;5 * * * * date &amp;gt;&amp;gt; ~&#x2F;date.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;special-shortcuts&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#special-shortcuts&quot; aria-label=&quot;Anchor link for: special-shortcuts&quot;&gt;Special @ shortcuts&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.linode.com&#x2F;docs&#x2F;guides&#x2F;schedule-tasks-with-cron&#x2F;#special-cron-syntaxes&quot;&gt;https:&#x2F;&#x2F;www.linode.com&#x2F;docs&#x2F;guides&#x2F;schedule-tasks-with-cron&#x2F;#special-cron-syntaxes&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;@reboot&lt;&#x2F;code&gt; statement runs the specified command once, at start up.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;@yearly&lt;&#x2F;code&gt; and &lt;code&gt;@annually&lt;&#x2F;code&gt; both run the specified task every year at 12:00am on the 1st of January. This is equivalent
to specifying &lt;code&gt;0 0 1 1 *&lt;&#x2F;code&gt; in the crontab line.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;@daily&lt;&#x2F;code&gt; and &lt;code&gt;@midnight&lt;&#x2F;code&gt; both run the cronjob every day at 12:00am. This is equivalent to the following cron
syntax: &lt;code&gt;0 0 * * *&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;@monthly&lt;&#x2F;code&gt; runs the job once a month, on the 1st, at 12:00am. In standard cron syntax this is equivalent to: &lt;code&gt;0 0 1 * *&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;@weekly&lt;&#x2F;code&gt; runs the job once a week at 12:00am on Sunday. This is the same as specifying &lt;code&gt;0 0 * * 0&lt;&#x2F;code&gt; on the crontab
line.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;@hourly&lt;&#x2F;code&gt; runs the job at the top of every hour. In standard cron syntax this is equivalent to: &lt;code&gt;0 * * * *&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Example Usage&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;@reboot date &amp;gt;&amp;gt; ~&#x2F;test_cron.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;test-cron&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#test-cron&quot; aria-label=&quot;Anchor link for: test-cron&quot;&gt;Test Cron&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;simple-test&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#simple-test&quot; aria-label=&quot;Anchor link for: simple-test&quot;&gt;Simple Test&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Open Crontab&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;crontab&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add line to bottom and save (Ensure there is a new line at the end of the line)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;* * * * * date &amp;gt;&amp;gt; ~&#x2F;date.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Wait one minute and confirm that it works&lt;&#x2F;p&gt;
&lt;h2 id=&quot;more-involved-test-that-uses-a-script&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#more-involved-test-that-uses-a-script&quot; aria-label=&quot;Anchor link for: more-involved-test-that-uses-a-script&quot;&gt;More involved test that uses a script&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;Overview&lt;&#x2F;strong&gt;: Create test script and set cron to run script&lt;&#x2F;p&gt;
&lt;p&gt;Create temp folder&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;tmp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Create test script&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;date &amp;gt;&amp;gt; ~&#x2F;tmp&#x2F;cron_result.txt&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;tmp&#x2F;cron_test.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 700&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;tmp&#x2F;cron_test.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -l&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;tmp&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Open Crontab&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;crontab&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add line to bottom and save (Ensure there is a new line at the end of the line)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;* * * * * ~&#x2F;tmp&#x2F;cron_test.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Wait one minute and confirm that it works&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;tmp&#x2F;cron_result.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Startup</title>
        <published>2022-12-07T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/startup/"/>
        <id>https://dev.chester.wykies.com/debian/startup/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/startup/">&lt;p&gt;Making programs run on startup can be archived a few different ways. The ones documented here are the ones that have
been tested and confirmed to work.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;gui-startup&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#gui-startup&quot; aria-label=&quot;Anchor link for: gui-startup&quot;&gt;GUI Startup&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;help.ubuntu.com&#x2F;community&#x2F;AddingProgramToSessionStartup&quot;&gt;https:&#x2F;&#x2F;help.ubuntu.com&#x2F;community&#x2F;AddingProgramToSessionStartup&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Go to activities at the top left (Or press Windows key)&lt;&#x2F;li&gt;
&lt;li&gt;Then type &lt;code&gt;startup&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Launch &lt;code&gt;Startup Applications Prefernces&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Click &lt;code&gt;Add&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Supply any suitable name&lt;&#x2F;li&gt;
&lt;li&gt;Use the &lt;code&gt;Browse...&lt;&#x2F;code&gt; button to find the executable that you want to run&lt;&#x2F;li&gt;
&lt;li&gt;Click &lt;code&gt;Add&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;cron&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#cron&quot; aria-label=&quot;Anchor link for: cron&quot;&gt;Cron&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;See the &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;cron&#x2F;&quot;&gt;Cron&lt;&#x2F;a&gt; page.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;other-options&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#other-options&quot; aria-label=&quot;Anchor link for: other-options&quot;&gt;Other options&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.baeldung.com&#x2F;linux&#x2F;run-command-start-up&quot;&gt;https:&#x2F;&#x2F;www.baeldung.com&#x2F;linux&#x2F;run-command-start-up&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Not tested other than the Cron option, but they look promising so saving for future reference.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Users and Groups</title>
        <published>2022-12-07T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/users-and-groups/"/>
        <id>https://dev.chester.wykies.com/debian/users-and-groups/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/users-and-groups/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.howtogeek.com&#x2F;50787&#x2F;add-a-user-to-a-group-or-second-group-on-linux&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.howtogeek.com&#x2F;50787&#x2F;add-a-user-to-a-group-or-second-group-on-linux&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;users&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#users&quot; aria-label=&quot;Anchor link for: users&quot;&gt;Users&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;create-a-new-user&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-a-new-user&quot; aria-label=&quot;Anchor link for: create-a-new-user&quot;&gt;Create a new user&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; adduser username&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;make-a-user-admin&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#make-a-user-admin&quot; aria-label=&quot;Anchor link for: make-a-user-admin&quot;&gt;Make a user admin&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; usermod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -a -G&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; sudo username&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;list-all-users&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#list-all-users&quot; aria-label=&quot;Anchor link for: list-all-users&quot;&gt;List all users&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;id&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;passwd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;delete-user&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#delete-user&quot; aria-label=&quot;Anchor link for: delete-user&quot;&gt;Delete user&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; userdel username&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;prevent-a-user-from-showing-in-the-list-of-users-at-the-gui-logon-prompt&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#prevent-a-user-from-showing-in-the-list-of-users-at-the-gui-logon-prompt&quot; aria-label=&quot;Anchor link for: prevent-a-user-from-showing-in-the-list-of-users-at-the-gui-logon-prompt&quot;&gt;Prevent a user from showing in the list of users at the GUI logon prompt&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;linuxconfig.org&#x2F;disabling-user-logins-to-linux-system&quot;&gt;https:&#x2F;&#x2F;linuxconfig.org&#x2F;disabling-user-logins-to-linux-system&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Based on how the other system user that didn’t show up worked and matched with the command found in the source link.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; usermod username&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -s&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;sbin&#x2F;nologin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;groups&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#groups&quot; aria-label=&quot;Anchor link for: groups&quot;&gt;Groups&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;create-a-group&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-a-group&quot; aria-label=&quot;Anchor link for: create-a-group&quot;&gt;Create a group&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; groupadd groupname&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;add-user-to-a-group&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-user-to-a-group&quot; aria-label=&quot;Anchor link for: add-user-to-a-group&quot;&gt;Add user to a group&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; usermod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -a -G&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; groupname username&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;list-all-groups&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#list-all-groups&quot; aria-label=&quot;Anchor link for: list-all-groups&quot;&gt;List all groups&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;groups&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;group&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Event Handlers</title>
        <published>2022-12-07T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/javascript/event-handlers/"/>
        <id>https://dev.chester.wykies.com/javascript/event-handlers/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/javascript/event-handlers/">&lt;h1 id=&quot;onclick&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#onclick&quot; aria-label=&quot;Anchor link for: onclick&quot;&gt;OnClick&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;Event&#x2F;target&quot;&gt;https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;Event&#x2F;target&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;See source for more details but my understanding of it is given a function&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;function&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; myOnClick&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;event&lt;&#x2F;span&gt;&lt;span&gt;) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    const&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; elementClicked&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; evt.target;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;then that function can be set on any element and will fire for that element and all it’s children and the target will
tell you which element (might be a child) that was clicked.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Install</title>
        <published>2022-12-07T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/install/"/>
        <id>https://dev.chester.wykies.com/rust/install/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/install/">&lt;h1 id=&quot;linux-debian&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#linux-debian&quot; aria-label=&quot;Anchor link for: linux-debian&quot;&gt;Linux (Debian)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Tested on Ubuntu 18.04 (2022-12-02)&lt;&#x2F;p&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.rust-lang.org&#x2F;tools&#x2F;install&quot;&gt;rust-lang&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;NB: It has come to my attention that cargo can also be installed from
the &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;installati.one&#x2F;debian&#x2F;11&#x2F;cargo&#x2F;&quot;&gt;debian repos&lt;&#x2F;a&gt;, however I have still decided to document the approach using
the script because it provides more flexibility to choose where cargo is installed.
Further it is recommended by &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.rust-lang.org&#x2F;tools&#x2F;install&quot;&gt;rust-lang&lt;&#x2F;a&gt; to use rustup and I did not find a package for rustup in the debian repos.
I’ve also become aware the cargo from the debian repos is usually outdated.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;installation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#installation&quot; aria-label=&quot;Anchor link for: installation&quot;&gt;Installation&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Optional installations to make things go more smoothly (Maybe needed later). If these are done you shouldn’t need to
install anything else after the command to install rust. (Not needed in GitHub Code Spaces)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install curl build-essential pkg-config libssl-dev git&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Install Rustup, cargo, rustc, etc… (Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.rust-lang.org&#x2F;tools&#x2F;install&quot;&gt;https:&#x2F;&#x2F;www.rust-lang.org&#x2F;tools&#x2F;install&lt;&#x2F;a&gt;)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --proto&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;=https&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --tlsv1.2 -sSf&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; https:&#x2F;&#x2F;sh.rustup.rs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;packages-needed-to-compile-some-of-our-programs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#packages-needed-to-compile-some-of-our-programs&quot; aria-label=&quot;Anchor link for: packages-needed-to-compile-some-of-our-programs&quot;&gt;Packages Needed to compile some of our programs&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Below is a list of errors and the package that fixes the error. Use as needed.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;Error:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Could not find directory of OpenSSL installation, and this `-sys` crate cannot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;  proceed without this knowledge.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Solution:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install pkg-config libssl-dev&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;uninstall&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#uninstall&quot; aria-label=&quot;Anchor link for: uninstall&quot;&gt;Uninstall&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rustup&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; self uninstall&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Install MySQL</title>
        <published>2022-12-07T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/sql/mysql/"/>
        <id>https://dev.chester.wykies.com/sql/mysql/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/sql/mysql/">&lt;h1 id=&quot;client-install&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#client-install&quot; aria-label=&quot;Anchor link for: client-install&quot;&gt;Client Install&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;This is also what is needed if you want to use mysqldump&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install mysql-client&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;docker-environment-variables&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#docker-environment-variables&quot; aria-label=&quot;Anchor link for: docker-environment-variables&quot;&gt;Docker Environment Variables&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;mysql-installation-excerpt&#x2F;8.2&#x2F;en&#x2F;docker-mysql-more-topics.html#docker-environment-variables&quot;&gt;https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;mysql-installation-excerpt&#x2F;8.2&#x2F;en&#x2F;docker-mysql-more-topics.html#docker-environment-variables&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Mounting Drives</title>
        <published>2022-12-03T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/mounting/"/>
        <id>https://dev.chester.wykies.com/debian/mounting/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/mounting/">&lt;h1 id=&quot;mounting-a-second-hard-drive&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#mounting-a-second-hard-drive&quot; aria-label=&quot;Anchor link for: mounting-a-second-hard-drive&quot;&gt;Mounting a second hard drive&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;help.ubuntu.com&#x2F;community&#x2F;Fstab&quot;&gt;https:&#x2F;&#x2F;help.ubuntu.com&#x2F;community&#x2F;Fstab&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Identify the drive. You’re typically looking for sdb but try to also use the size to confirm you found the one that
you are looking for.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;lsblk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Then get the UUID for the drive, using of the two following commands. I prefer the 2nd&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; blkid&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -l&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;dev&#x2F;disk&#x2F;by-uuid&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Backup fstab&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;fstab ~&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Open fstab to edit&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; nano &#x2F;etc&#x2F;fstab&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Add a line similar to the following replacing the UUID as needed&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;UUID=893bbb49-460a-469d-ae61-0ecf1a88c54e &#x2F;home&#x2F;administrator&#x2F;data&#x2F;    ext4    auto    0       2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Drive should mount automatically next reboot. To mount right away use the following command&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; mount&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;To verify if the drive is mounted you can use &lt;code&gt;lsblk&lt;&#x2F;code&gt; again and look at the right column&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Setup Network Shares</title>
        <published>2022-12-03T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/setup-network-shares/"/>
        <id>https://dev.chester.wykies.com/debian/setup-network-shares/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/setup-network-shares/">&lt;h1 id=&quot;install-samba&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-samba&quot; aria-label=&quot;Anchor link for: install-samba&quot;&gt;Install Samba&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install samba&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;configure-samba&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#configure-samba&quot; aria-label=&quot;Anchor link for: configure-samba&quot;&gt;Configure Samba&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;Backup Samba Config&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; cp &#x2F;etc&#x2F;samba&#x2F;smb.conf ~&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Create folder for share&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;mkdir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;folder_to_share&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Edit config see pattern below of config file after you open it&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; nano &#x2F;etc&#x2F;samba&#x2F;smb.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ul&gt;
&lt;li&gt;Restart samba for changes to take effect&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; service smbd restart&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;permissions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#permissions&quot; aria-label=&quot;Anchor link for: permissions&quot;&gt;Permissions&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;strong&gt;IMPORTANT&lt;&#x2F;strong&gt;: ENSURE THE USER HAS PERMISSIONS TO ALL PARENT FOLDERS LEADING TO THE SHARED FOLDER.&lt;&#x2F;p&gt;
&lt;p&gt;Permissions are controlled using OS Users and Groups see &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;users-and-groups&#x2F;&quot;&gt;User and Groups&lt;&#x2F;a&gt; for
how to add
users and put them into groups. Typically, you’ll want to use special purpose users that are &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;users-and-groups&#x2F;#prevent-a-user-from-showing-in-the-list-of-users-at-the-gui-logon-prompt&quot;&gt;not able to log in locally&lt;&#x2F;a&gt;.
Also you probably want to set their logon password to something unusable like a random string of characters.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;set-samba-password-for-a-user&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-samba-password-for-a-user&quot; aria-label=&quot;Anchor link for: set-samba-password-for-a-user&quot;&gt;Set samba password for a user&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; smbpasswd&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; user&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;see-users-configured-to-use-samba&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-users-configured-to-use-samba&quot; aria-label=&quot;Anchor link for: see-users-configured-to-use-samba&quot;&gt;See users configured to use samba&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Leave off &lt;code&gt;-v&lt;&#x2F;code&gt; if you do not want verbose output&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; pdbedit&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -L -v&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>DNS</title>
        <published>2022-12-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/dns/"/>
        <id>https://dev.chester.wykies.com/debian/dns/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/dns/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.howtouselinux.com&#x2F;post&#x2F;linux-command-use-dig-to-query-dns&quot;&gt;https:&#x2F;&#x2F;www.howtouselinux.com&#x2F;post&#x2F;linux-command-use-dig-to-query-dns&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;see-dns-server-set&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-dns-server-set&quot; aria-label=&quot;Anchor link for: see-dns-server-set&quot;&gt;See DNS Server set&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Tested on Ubuntu 22.04 (Did not work on Ubuntu 18.04)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;resolvectl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; status&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;clear-dns-cache&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#clear-dns-cache&quot; aria-label=&quot;Anchor link for: clear-dns-cache&quot;&gt;Clear DNS Cache&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; resolvectl flush-caches&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;dig-notes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#dig-notes&quot; aria-label=&quot;Anchor link for: dig-notes&quot;&gt;Dig notes&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;source-of-nameserver&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#source-of-nameserver&quot; aria-label=&quot;Anchor link for: source-of-nameserver&quot;&gt;Source of nameserver&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Dig seems to get the default nameserver to use from &lt;code&gt;&#x2F;etc&#x2F;resolv.conf&lt;&#x2F;code&gt;.
This file in turn seems to default to the localhost.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;dig-from-a-specific-name-server&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#dig-from-a-specific-name-server&quot; aria-label=&quot;Anchor link for: dig-from-a-specific-name-server&quot;&gt;Dig from a specific name server&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Use:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;dig&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; host @local-server&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Where:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;host: is the host to look up&lt;&#x2F;li&gt;
&lt;li&gt;local-server is the place to do the lookup&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Conditional Compilation</title>
        <published>2022-11-12T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/rust/conditional-compilation/"/>
        <id>https://dev.chester.wykies.com/rust/conditional-compilation/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/rust/conditional-compilation/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;39204908&#x2F;how-to-check-release-debug-builds-using-cfg-in-rust&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;39204908&#x2F;how-to-check-release-debug-builds-using-cfg-in-rust&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;reference&#x2F;conditional-compilation.html#debug_assertions&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;reference&#x2F;conditional-compilation.html#debug_assertions&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;reference&#x2F;conditional-compilation.html#the-cfg_attr-attribute&quot;&gt;https:&#x2F;&#x2F;doc.rust-lang.org&#x2F;reference&#x2F;conditional-compilation.html#the-cfg_attr-attribute&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Allows to have different code compile under different circumstances.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;example&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example&quot; aria-label=&quot;Anchor link for: example&quot;&gt;Example&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;rust&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[cfg(debug_assertions)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; example&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Debugging enabled&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[cfg(not(debug_assertions))]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; example&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Debugging disabled&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;#[cfg_attr(target_arch &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;wasm32&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;, allow(dead_code))]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; not_used_in_wasm&lt;&#x2F;span&gt;&lt;span&gt;(){&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;I&amp;#39;m only used outside of WASM)&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;fn&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; main&lt;&#x2F;span&gt;&lt;span&gt;() {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;    if&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; cfg!&lt;&#x2F;span&gt;&lt;span&gt;(debug_assertions) {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Debugging enabled&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; else&lt;&#x2F;span&gt;&lt;span&gt; {&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;        println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Debugging disabled&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    }&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[cfg(debug_assertions)]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Debugging enabled&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[cfg(not(debug_assertions))]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    println!&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Debugging disabled&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;    #[cfg(not(target_arch &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;wasm32&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;))]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    not_used_in_wasm&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;    example&lt;&#x2F;span&gt;&lt;span&gt;();&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>CSS Display Reference</title>
        <published>2022-11-09T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/css-display-ref/"/>
        <id>https://dev.chester.wykies.com/misc/css-display-ref/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/css-display-ref/">&lt;p&gt;Meant to be a place to quickly view many elements generated from markdown to see CSS formatting applied on this site.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;h1&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#h1&quot; aria-label=&quot;Anchor link for: h1&quot;&gt;H1&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;h2&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#h2&quot; aria-label=&quot;Anchor link for: h2&quot;&gt;H2&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;h3&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#h3&quot; aria-label=&quot;Anchor link for: h3&quot;&gt;H3&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;h4 id=&quot;h4&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#h4&quot; aria-label=&quot;Anchor link for: h4&quot;&gt;H4&lt;&#x2F;a&gt;&lt;&#x2F;h4&gt;
&lt;h5 id=&quot;h5&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#h5&quot; aria-label=&quot;Anchor link for: h5&quot;&gt;H5&lt;&#x2F;a&gt;&lt;&#x2F;h5&gt;
&lt;h6 id=&quot;h6&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#h6&quot; aria-label=&quot;Anchor link for: h6&quot;&gt;H6&lt;&#x2F;a&gt;&lt;&#x2F;h6&gt;
&lt;p&gt;This is a sentence with &lt;code&gt;inline code&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Code Block:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Code in a code block&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;x = 5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;x += 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;print(x)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;em&gt;Italic&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Bold&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Blockquote&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Multiline block quote&lt;br &#x2F;&gt;
Next line&lt;br &#x2F;&gt;
3rd line&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;List&lt;&#x2F;li&gt;
&lt;li&gt;List&lt;&#x2F;li&gt;
&lt;li&gt;List&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol&gt;
&lt;li&gt;One&lt;&#x2F;li&gt;
&lt;li&gt;Two&lt;&#x2F;li&gt;
&lt;li&gt;Three&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Horizontal rule:&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Copy Source</title>
        <published>2022-10-26T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/copy-source/"/>
        <id>https://dev.chester.wykies.com/misc/copy-source/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/copy-source/">&lt;h1 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;I needed to copy a &lt;code&gt;horizontal rule&lt;&#x2F;code&gt; to paste into an email and this decided to just keep this page here&lt;&#x2F;p&gt;
&lt;h1 id=&quot;horizontal-rule&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#horizontal-rule&quot; aria-label=&quot;Anchor link for: horizontal-rule&quot;&gt;Horizontal rule&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;hr &#x2F;&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Anydesk</title>
        <published>2022-10-22T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/anydesk/"/>
        <id>https://dev.chester.wykies.com/misc/anydesk/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/anydesk/">&lt;h1 id=&quot;disable-auto-start&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#disable-auto-start&quot; aria-label=&quot;Anchor link for: disable-auto-start&quot;&gt;Disable auto start&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;1305405&#x2F;how-to-disable-anydesk-autostart-in-ubuntu&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;1305405&#x2F;how-to-disable-anydesk-autostart-in-ubuntu&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;systemctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; disable anydesk.service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>OBS</title>
        <published>2022-10-22T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/obs/"/>
        <id>https://dev.chester.wykies.com/misc/obs/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/obs/">&lt;h1 id=&quot;desktop-audio&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#desktop-audio&quot; aria-label=&quot;Anchor link for: desktop-audio&quot;&gt;Desktop Audio&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;strong&gt;WARNING:&lt;&#x2F;strong&gt; When trying to record audio note that if you change the set audio output while recording is ongoing then it
will not record the new source it will continue to record the now silent source.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;resize-preview&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#resize-preview&quot; aria-label=&quot;Anchor link for: resize-preview&quot;&gt;Resize Preview&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;When using different size previews you need to resize the preview to the new source to get a faithful preview.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;obs&#x2F;preview_resize.png&quot; alt=&quot;screenshot&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Right-click the preview and click &lt;code&gt;Resize output (source size)&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Guest Additions</title>
        <published>2022-10-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/virtual_box/guest-additions/"/>
        <id>https://dev.chester.wykies.com/virtual_box/guest-additions/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/virtual_box/guest-additions/">&lt;p&gt;Steps recorded on VM running Ubuntu 18.04.6&lt;&#x2F;p&gt;
&lt;h1 id=&quot;features-observed-missing-without-install&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#features-observed-missing-without-install&quot; aria-label=&quot;Anchor link for: features-observed-missing-without-install&quot;&gt;Features observed missing without install&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;ul&gt;
&lt;li&gt;Copy and paste in both directions not working&lt;&#x2F;li&gt;
&lt;li&gt;Drag and drop in both directions not working (From guest to Host still not working after)&lt;&#x2F;li&gt;
&lt;li&gt;Resolution resize with window size&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h1 id=&quot;install-steps&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-steps&quot; aria-label=&quot;Anchor link for: install-steps&quot;&gt;Install Steps&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Use the menu and Click on &lt;code&gt;Insert Guest Additions CD Image...&lt;&#x2F;code&gt; from &lt;code&gt;Devices&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;virtual_box&#x2F;guest-additions&#x2F;mount_image.png&quot; alt=&quot;Insert Guest Additions CD Image&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Navigate to the mounted image in terminal (Can use GUI then right click and &lt;code&gt;Open in Terminal&lt;&#x2F;code&gt;) then issue the following
commands&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install build-essential&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; .&#x2F;VBoxLinuxAdditions.run&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then just &lt;strong&gt;restart&lt;&#x2F;strong&gt; to complete the installation. (Remember to enabled copy and paste from sub menu under &lt;code&gt;Devices&lt;&#x2F;code&gt;).&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;NB: Drag and drop worked fine from Host to Guest but from Guest to Host would cause the application I was dragging
from to freeze.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Shortcuts (Important)</title>
        <published>2022-10-16T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/shortcuts-important/"/>
        <id>https://dev.chester.wykies.com/debian/shortcuts-important/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/shortcuts-important/">&lt;h1 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Some shortcuts are more like things you might not be able to do another way and those are documented here.
These are generally ones you only need if you have problems or like what they do.
But I started this because it was to be able to &lt;em&gt;UNDO&lt;&#x2F;em&gt; things I didn’t want to happen.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;switch-between-user-interfaces&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#switch-between-user-interfaces&quot; aria-label=&quot;Anchor link for: switch-between-user-interfaces&quot;&gt;Switch Between User Interfaces&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;123493&#x2F;screen-went-black&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;123493&#x2F;screen-went-black&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;Ctrl + Alt + Fx&lt;&#x2F;code&gt; where &lt;code&gt;Fx&lt;&#x2F;code&gt; is &lt;code&gt;F1&lt;&#x2F;code&gt; through &lt;code&gt;F6&lt;&#x2F;code&gt; on Ubuntu 22.04.1&lt;&#x2F;p&gt;
&lt;p&gt;What they did:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;F1&lt;&#x2F;code&gt; - Took me to a logon prompt but did not log me out on the other “Interface”&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;F2&lt;&#x2F;code&gt; - Took me back to my “Normal” UI&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;F3&lt;&#x2F;code&gt; - tty3&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;F4&lt;&#x2F;code&gt; - tty4&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;F5&lt;&#x2F;code&gt; - tty5&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;F6&lt;&#x2F;code&gt; - tty6&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Found out about these when I accidentally ended up on a text screen and didn’t know how to get out.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Live Templates</title>
        <published>2022-10-15T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/pycharm/live-templates/"/>
        <id>https://dev.chester.wykies.com/pycharm/live-templates/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/pycharm/live-templates/">&lt;h1 id=&quot;create-new&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-new&quot; aria-label=&quot;Anchor link for: create-new&quot;&gt;Create new&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.jetbrains.com&#x2F;help&#x2F;pycharm&#x2F;creating-and-editing-live-templates.html&quot;&gt;https:&#x2F;&#x2F;www.jetbrains.com&#x2F;help&#x2F;pycharm&#x2F;creating-and-editing-live-templates.html&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;tldr&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tldr&quot; aria-label=&quot;Anchor link for: tldr&quot;&gt;TLDR&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Go to &lt;code&gt;Settings&lt;&#x2F;code&gt; -&amp;gt; &lt;code&gt;Editor&lt;&#x2F;code&gt; -&amp;gt; &lt;code&gt;Live Templates&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Copy a similar one and paste it (ensure to define contexts in which it can be used)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;details&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#details&quot; aria-label=&quot;Anchor link for: details&quot;&gt;Details&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;For details see instructions from source.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Audio</title>
        <published>2022-10-12T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/audio/"/>
        <id>https://dev.chester.wykies.com/debian/audio/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/audio/">&lt;h1 id=&quot;multiple-outputs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#multiple-outputs&quot; aria-label=&quot;Anchor link for: multiple-outputs&quot;&gt;Multiple Outputs&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;linuxconfig.org&#x2F;how-to-enable-multiple-simultaneous-audio-outputs-on-pulseaudio-in-linux&quot;&gt;https:&#x2F;&#x2F;linuxconfig.org&#x2F;how-to-enable-multiple-simultaneous-audio-outputs-on-pulseaudio-in-linux&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Output audio to more than one device at a time&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install paprefs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;paprefs&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;pulseaudio&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -k&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;pulseaudio&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -D&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;noise-cancellation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#noise-cancellation&quot; aria-label=&quot;Anchor link for: noise-cancellation&quot;&gt;Noise Cancellation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;youtu.be&#x2F;lTodCeVAfpI&quot;&gt;https:&#x2F;&#x2F;youtu.be&#x2F;lTodCeVAfpI&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;edit-pulse-config&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#edit-pulse-config&quot; aria-label=&quot;Anchor link for: edit-pulse-config&quot;&gt;Edit pulse config&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo nano &#x2F;etc&#x2F;pulse&#x2F;default.pa&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;add-the-following-text-at-the-bottom&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-the-following-text-at-the-bottom&quot; aria-label=&quot;Anchor link for: add-the-following-text-at-the-bottom&quot;&gt;Add the following text at the bottom&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;load-module module-echo-cancel source_name=noechosource sink_name=noechosink&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set-default-source noechosource&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The article video also recommended setting the default sink but wasn’t appropriate for me&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;set-default-sink noechosink&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;then-restart-pulse-audio&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#then-restart-pulse-audio&quot; aria-label=&quot;Anchor link for: then-restart-pulse-audio&quot;&gt;Then restart pulse audio&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;pulseaudio&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -k&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Acrobat Reader</title>
        <published>2022-09-30T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/acrobat-reader/"/>
        <id>https://dev.chester.wykies.com/debian/acrobat-reader/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/acrobat-reader/">&lt;h1 id=&quot;saving-issues&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#saving-issues&quot; aria-label=&quot;Anchor link for: saving-issues&quot;&gt;Saving Issues&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Sometimes when you try to save a file you get an error saying:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;The document could not be saved. The disk you were saving to or the disk used for temporary files is full.
Free some space on the disk and try again, or save to a different disk.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;acrobat-reader&#x2F;scrshot_save_err.png&quot; alt=&quot;Screenshot of Error&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;It will then open the save as dialog. Save to my documents.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;acrobat-reader&#x2F;save_as.png&quot; alt=&quot;Save as dialog&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;File will be able to be found in the &lt;code&gt;Documents&lt;&#x2F;code&gt; folder in your home folder.
It actually goes to &lt;code&gt;&#x2F;home&#x2F;one&#x2F;snap&#x2F;acrordrdc&#x2F;common&#x2F;.wine&#x2F;drive_c&#x2F;users&#x2F;one&#x2F;My Documents&#x2F;&lt;&#x2F;code&gt; but that is appears to be
symlinked to your Documents folder.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;printing&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#printing&quot; aria-label=&quot;Anchor link for: printing&quot;&gt;Printing&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;forum.snapcraft.io&#x2F;t&#x2F;solved-acrordrdc-adobe-acrobat-reader-wine-no-printer&#x2F;19110&#x2F;2&quot;&gt;https:&#x2F;&#x2F;forum.snapcraft.io&#x2F;t&#x2F;solved-acrordrdc-adobe-acrobat-reader-wine-no-printer&#x2F;19110&#x2F;2&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;If no printers show up, or you get an error saying to install printers, then use the following commands to enable them
in this snap&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;snap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; connect acrordrdc:removable-media&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;snap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; connect acrordrdc:cups-control&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Installation</title>
        <published>2022-09-21T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/apache/installation/"/>
        <id>https://dev.chester.wykies.com/apache/installation/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/apache/installation/">&lt;h1 id=&quot;install&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install&quot; aria-label=&quot;Anchor link for: install&quot;&gt;Install&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Install apache with php and required mods&#x2F;plugins&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install apache2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install php php-mysql libapache2-mod-php&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;restart-server&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#restart-server&quot; aria-label=&quot;Anchor link for: restart-server&quot;&gt;Restart Server&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Restart is required to reload config, enable and disable modules&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl restart apache2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;NB: After testing don’t forget to remove the default &lt;code&gt;index.html&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Add New User to Database</title>
        <published>2022-09-21T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/sql/add-new-user/"/>
        <id>https://dev.chester.wykies.com/sql/add-new-user/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/sql/add-new-user/">&lt;p&gt;(See sample log below)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt;u &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;root -&lt;&#x2F;span&gt;&lt;span&gt;p&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;CREATE USER&lt;&#x2F;span&gt;&lt;span&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;newuser&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;%&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; IDENTIFIED &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;BY&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;password&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;GRANT&lt;&#x2F;span&gt;&lt;span&gt; ALL PRIVILEGES &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;ON database_name&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;* TO&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;newuser&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;%&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;flush privileges;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Log 1&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;admin@mysqlserver:&#x2F;etc&#x2F;mysql&#x2F;mysql.conf.d$ mysql -uroot -p&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Enter password:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Your MySQL connection id is 6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Server version: 5.7.27-0ubuntu0.18.04.1 (Ubuntu)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Copyright (c) 2000, 2019, Oracle and&#x2F;or its affiliates. All rights reserved.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Oracle is a registered trademark of Oracle Corporation and&#x2F;or its&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;affiliates. Other names may be trademarks of their respective&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;owners.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type &amp;#39;help;&amp;#39; or &amp;#39;\h&amp;#39; for help. Type &amp;#39;\c&amp;#39; to clear the current input statement.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt; CREATE USER &amp;#39;newuser&amp;#39;@&amp;#39;192.168.1.5&amp;#39; IDENTIFIED BY &amp;#39;password_here&amp;#39;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Query OK, 0 rows affected (0.00 sec)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt; GRANT ALL PRIVILEGES ON newuser.* TO &amp;#39;myuser&amp;#39;@&amp;#39;192.168.1.5&amp;#39;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Query OK, 0 rows affected (0.00 sec)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt; flush privileges;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Query OK, 0 rows affected (0.00 sec)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Log 2&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt; CREATE USER &amp;#39;newuser&amp;#39;@&amp;#39;192.168.1.5&amp;#39; IDENTIFIED BY &amp;#39;password_here&amp;#39;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Query OK, 0 rows affected (0.08 sec)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt; GRANT SELECT ON fa.* TO &amp;#39;newuser&amp;#39;@&amp;#39;192.168.1.5&amp;#39;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Query OK, 0 rows affected (0.00 sec)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt; GRANT SELECT ON parts.* TO &amp;#39;newuser&amp;#39;@&amp;#39;192.168.1.5&amp;#39;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Query OK, 0 rows affected (0.00 sec)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Install and Setup</title>
        <published>2022-09-21T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/sql/install-setup/"/>
        <id>https://dev.chester.wykies.com/sql/install-setup/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/sql/install-setup/">&lt;h1 id=&quot;tested-os&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#tested-os&quot; aria-label=&quot;Anchor link for: tested-os&quot;&gt;Tested OS&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;This setup was done and tested on Ubuntu 22.04&lt;&#x2F;p&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.digitalocean.com&#x2F;community&#x2F;tutorials&#x2F;how-to-install-mysql-on-ubuntu-22-04&quot;&gt;https:&#x2F;&#x2F;www.digitalocean.com&#x2F;community&#x2F;tutorials&#x2F;how-to-install-mysql-on-ubuntu-22-04&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;install-mariadb&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-mariadb&quot; aria-label=&quot;Anchor link for: install-mariadb&quot;&gt;Install MariaDB&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install mariadb-server&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;start&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#start&quot; aria-label=&quot;Anchor link for: start&quot;&gt;Start&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl start mysql.service&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;configure&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#configure&quot; aria-label=&quot;Anchor link for: configure&quot;&gt;Configure&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;As of July 2022 &lt;code&gt;mysql_secure_installation&lt;&#x2F;code&gt; will produce an error due how it
attempts connection. This error results in a loop.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;open-sql-command-prompt&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#open-sql-command-prompt&quot; aria-label=&quot;Anchor link for: open-sql-command-prompt&quot;&gt;Open SQL command prompt&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;See instructions &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;sql&#x2F;misc&#x2F;#without-password&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;set-root-password&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-root-password&quot; aria-label=&quot;Anchor link for: set-root-password&quot;&gt;Set root password&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Replace &lt;code&gt;p@s$w0rD&lt;&#x2F;code&gt; by a suitable strong password.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;ALTER USER &amp;#39;root&amp;#39;@&amp;#39;localhost&amp;#39; IDENTIFIED BY &amp;#39;p@s$w0rD&amp;#39;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;close-sql-command-prompt&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#close-sql-command-prompt&quot; aria-label=&quot;Anchor link for: close-sql-command-prompt&quot;&gt;Close SQL command prompt&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;exit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You will no longer be able to access mysql using &lt;code&gt;sudo mysql&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;run-command-to-secure-installation&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#run-command-to-secure-installation&quot; aria-label=&quot;Anchor link for: run-command-to-secure-installation&quot;&gt;Run command to secure installation&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Now secure the setup.
Run the command and follow the steps as appropriate.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; mysql_secure_installation&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>View List Of Users</title>
        <published>2022-09-21T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/sql/list-users/"/>
        <id>https://dev.chester.wykies.com/sql/list-users/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/sql/list-users/">&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt; select&lt;&#x2F;span&gt;&lt;span&gt; host, user &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; mysql&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;user&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;host&lt;&#x2F;th&gt;&lt;th&gt;user&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;%&lt;&#x2F;td&gt;&lt;td&gt;inventory&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;192.168.1.5&lt;&#x2F;td&gt;&lt;td&gt;newuser&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;localhost&lt;&#x2F;td&gt;&lt;td&gt;debian-sys-maint&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;localhost&lt;&#x2F;td&gt;&lt;td&gt;mysql.session&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;localhost&lt;&#x2F;td&gt;&lt;td&gt;mysql.sys&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;localhost&lt;&#x2F;td&gt;&lt;td&gt;root&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;———––&lt;&#x2F;td&gt;&lt;td&gt;——————&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
&lt;p&gt;6 rows in set (0.00 sec)&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Misc</title>
        <published>2022-09-21T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/sql/misc/"/>
        <id>https://dev.chester.wykies.com/sql/misc/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/sql/misc/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.digitalocean.com&#x2F;community&#x2F;tutorials&#x2F;how-to-allow-remote-access-to-mysql&quot;&gt;https:&#x2F;&#x2F;www.digitalocean.com&#x2F;community&#x2F;tutorials&#x2F;how-to-allow-remote-access-to-mysql&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;open-command-prompt&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#open-command-prompt&quot; aria-label=&quot;Anchor link for: open-command-prompt&quot;&gt;Open Command Prompt&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;with-password&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#with-password&quot; aria-label=&quot;Anchor link for: with-password&quot;&gt;With password&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;mysql&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -u&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; root&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -p&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;without-password&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#without-password&quot; aria-label=&quot;Anchor link for: without-password&quot;&gt;Without password&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; mysql&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;create-database&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-database&quot; aria-label=&quot;Anchor link for: create-database&quot;&gt;Create Database&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CREATE DATABASE database_name;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;create-user-and-grant-all-permissions-on-database&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-user-and-grant-all-permissions-on-database&quot; aria-label=&quot;Anchor link for: create-user-and-grant-all-permissions-on-database&quot;&gt;Create user and grant all permissions on database&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;GRANT ALL PRIVILEGES ON database_name.* TO &amp;#39;USERNAME&amp;#39;@&amp;#39;HOSTNAME&amp;#39; IDENTIFIED BY &amp;quot;Str0ngDBP@ssw0rd&amp;quot;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;create-new-user&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-new-user&quot; aria-label=&quot;Anchor link for: create-new-user&quot;&gt;Create New User&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;CREATE USER &amp;#39;USERNAME&amp;#39;@&amp;#39;HOSTNAME&amp;#39; IDENTIFIED BY &amp;#39;Str0ngDBP@ssw0rd&amp;#39;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;rename-or-change-users-host-address&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#rename-or-change-users-host-address&quot; aria-label=&quot;Anchor link for: rename-or-change-users-host-address&quot;&gt;Rename or change users host address&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;RENAME USER &amp;#39;USERNAME&amp;#39;@&amp;#39;localhost&amp;#39; TO &amp;#39;USERNAME&amp;#39;@&amp;#39;HOSTNAME&amp;#39;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;flush-frees-memory-and-makes-changes-take-immediate-effect&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#flush-frees-memory-and-makes-changes-take-immediate-effect&quot; aria-label=&quot;Anchor link for: flush-frees-memory-and-makes-changes-take-immediate-effect&quot;&gt;Flush (Frees memory and makes changes take immediate effect)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;FLUSH PRIVILEGES;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;close-sql-command-prompt&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#close-sql-command-prompt&quot; aria-label=&quot;Anchor link for: close-sql-command-prompt&quot;&gt;Close sql command prompt&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;exit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>View User Permissions</title>
        <published>2022-09-21T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/sql/permissions/"/>
        <id>https://dev.chester.wykies.com/sql/permissions/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/sql/permissions/">&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;select&lt;&#x2F;span&gt;&lt;span&gt; user, host &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;from&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; mysql&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;user&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SHOW GRANTS &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;FOR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;newuser&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SHOW GRANTS &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;FOR&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;newuser&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;192.168.1.5&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Reset Root Password</title>
        <published>2022-09-21T00:00:00+00:00</published>
        <updated>2025-05-14T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/sql/reset-root-password/"/>
        <id>https://dev.chester.wykies.com/sql/reset-root-password/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/sql/reset-root-password/">&lt;p&gt;The following are the commands, followed by the log;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;cd &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;etc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;mysql&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;mysql&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;conf&lt;&#x2F;span&gt;&lt;span&gt;.d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo cp &lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;mysqld&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;cnf mysqld&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;cnf&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;20191103&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;under [mysqld] add skip-grant-tables&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;etc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;init&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;mysql &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;stop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;etc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;init&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;mysql &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;start&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;use&lt;&#x2F;span&gt;&lt;span&gt; mysql;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;flush privileges;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;SET PASSWORD FOR root&lt;&#x2F;span&gt;&lt;span&gt;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;localhost&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; = PASSWORD&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;newpwd&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;quit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;remove line added&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;etc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;init&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;mysql &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;stop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;sudo &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;etc&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;init&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;mysql &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;start&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt;uroot &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt;p&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Full Log&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;admin@mysqlserver:~$ cd &#x2F;etc&#x2F;mysql&#x2F;mysql.conf.d&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;admin@mysqlserver:&#x2F;etc&#x2F;mysql&#x2F;mysql.conf.d$ sudo cp mysqld.cnf mysqld.cnf.20191103&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;admin@mysqlserver:&#x2F;etc&#x2F;mysql&#x2F;mysql.conf.d$ sudo cp mysqld.cnf mysqld.cnf.20191103&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;admin@mysqlserver:&#x2F;etc&#x2F;mysql&#x2F;mysql.conf.d$ sudo &#x2F;etc&#x2F;init.d&#x2F;mysql stop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[ ok ] Stopping mysql (via systemctl): mysql.service.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;admin@mysqlserver:&#x2F;etc&#x2F;mysql&#x2F;mysql.conf.d$ sudo &#x2F;etc&#x2F;init.d&#x2F;mysql start&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[ ok ] Starting mysql (via systemctl): mysql.service.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;admin@mysqlserver:&#x2F;etc&#x2F;mysql&#x2F;mysql.conf.d$ mysql&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Your MySQL connection id is 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Server version: 5.7.27-0ubuntu0.18.04.1 (Ubuntu)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Copyright (c) 2000, 2019, Oracle and&#x2F;or its affiliates. All rights reserved.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Oracle is a registered trademark of Oracle Corporation and&#x2F;or its&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;affiliates. Other names may be trademarks of their respective&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;owners.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type &amp;#39;help;&amp;#39; or &amp;#39;\h&amp;#39; for help. Type &amp;#39;\c&amp;#39; to clear the current input statement.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt; use mysql;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Reading table information for completion of table and column names&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;You can turn off this feature to get a quicker startup with -A&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Database changed&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt; flush privileges;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Query OK, 0 rows affected (0.00 sec)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt; SET PASSWORD FOR root@&amp;#39;localhost&amp;#39; = PASSWORD(&amp;#39;newpwd&amp;#39;);&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Query OK, 0 rows affected, 1 warning (0.00 sec)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt; quit&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Bye&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;admin@mysqlserver:&#x2F;etc&#x2F;mysql&#x2F;mysql.conf.d$ sudo nano mysqld.cnf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;admin@mysqlserver:&#x2F;etc&#x2F;mysql&#x2F;mysql.conf.d$ sudo &#x2F;etc&#x2F;init.d&#x2F;mysql stop&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[ ok ] Stopping mysql (via systemctl): mysql.service.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;admin@mysqlserver:&#x2F;etc&#x2F;mysql&#x2F;mysql.conf.d$ sudo &#x2F;etc&#x2F;init.d&#x2F;mysql start&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[ ok ] Starting mysql (via systemctl): mysql.service.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;admin@mysqlserver:&#x2F;etc&#x2F;mysql&#x2F;mysql.conf.d$ mysql -uroot -p&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Enter password:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Welcome to the MySQL monitor.  Commands end with ; or \g.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Your MySQL connection id is 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Server version: 5.7.27-0ubuntu0.18.04.1 (Ubuntu)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Copyright (c) 2000, 2019, Oracle and&#x2F;or its affiliates. All rights reserved.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Oracle is a registered trademark of Oracle Corporation and&#x2F;or its&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;affiliates. Other names may be trademarks of their respective&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;owners.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type &amp;#39;help;&amp;#39; or &amp;#39;\h&amp;#39; for help. Type &amp;#39;\c&amp;#39; to clear the current input statement.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Temp Admin</title>
        <published>2022-09-21T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/sql/temp-admin/"/>
        <id>https://dev.chester.wykies.com/sql/temp-admin/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/sql/temp-admin/">&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;sql&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mysql &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;-&lt;&#x2F;span&gt;&lt;span&gt;u &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;root -&lt;&#x2F;span&gt;&lt;span&gt;p&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;CREATE USER&lt;&#x2F;span&gt;&lt;span&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;tempadmin&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;%&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt; IDENTIFIED &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;BY&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;password&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;GRANT&lt;&#x2F;span&gt;&lt;span&gt; ALL PRIVILEGES &lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;ON *&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;* TO&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;tempadmin&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;%&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;flush privileges;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;DROP USER&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;#39;tempadmin&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;@&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;%&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Publish Library</title>
        <published>2022-09-14T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/python/publish-lib/"/>
        <id>https://dev.chester.wykies.com/python/publish-lib/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/python/publish-lib/">&lt;h1 id=&quot;editable-install-local-project-install&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#editable-install-local-project-install&quot; aria-label=&quot;Anchor link for: editable-install-local-project-install&quot;&gt;Editable Install (Local Project Install)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Allows you to run the library before publishing it for external or use case testing.&lt;&#x2F;p&gt;
&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;23075397&#x2F;python-how-to-edit-an-installed-package&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;23075397&#x2F;python-how-to-edit-an-installed-package&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;pip.pypa.io&#x2F;en&#x2F;stable&#x2F;topics&#x2F;local-project-installs&#x2F;#editable-installs&quot;&gt;https:&#x2F;&#x2F;pip.pypa.io&#x2F;en&#x2F;stable&#x2F;topics&#x2F;local-project-installs&#x2F;#editable-installs&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;run-from-local-path-source&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#run-from-local-path-source&quot; aria-label=&quot;Anchor link for: run-from-local-path-source&quot;&gt;Run from local path source&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;pip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; path&#x2F;to&#x2F;SomeProject&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;run-from-git-source&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#run-from-git-source&quot; aria-label=&quot;Anchor link for: run-from-git-source&quot;&gt;Run from git source&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;pip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; git+https:&#x2F;&#x2F;github.com&#x2F;c-git&#x2F;opylib.git#egg=opylib&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;publish-a-version&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#publish-a-version&quot; aria-label=&quot;Anchor link for: publish-a-version&quot;&gt;Publish a version&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;packaging.python.org&#x2F;en&#x2F;latest&#x2F;tutorials&#x2F;packaging-projects&#x2F;&quot;&gt;https:&#x2F;&#x2F;packaging.python.org&#x2F;en&#x2F;latest&#x2F;tutorials&#x2F;packaging-projects&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;upload-specific-version&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#upload-specific-version&quot; aria-label=&quot;Anchor link for: upload-specific-version&quot;&gt;Upload specific version&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Replace &lt;code&gt;x.x.x&lt;&#x2F;code&gt; with the version number e.g. &lt;code&gt;1.0.0&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;python3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -m&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;twine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; upload dist&#x2F;opylib-x.x.x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;*&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;upload-all&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#upload-all&quot; aria-label=&quot;Anchor link for: upload-all&quot;&gt;Upload all&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;python3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -m&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;twine&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; upload dist&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;*&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;initial-setup-for-publishing&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#initial-setup-for-publishing&quot; aria-label=&quot;Anchor link for: initial-setup-for-publishing&quot;&gt;Initial Setup for Publishing&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Last command appears to be python version specific.
Got it from an error message generated when I tried to use build.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;python3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -m&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; pip install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --upgrade&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; pip&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;python3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -m&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; pip install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --upgrade&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; build&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;python3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -m&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; pip install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --upgrade&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; twine&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install python3.10-venv&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>HTTPS Setup</title>
        <published>2022-09-10T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/apache/https-setup/"/>
        <id>https://dev.chester.wykies.com/apache/https-setup/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/apache/https-setup/">&lt;h1 id=&quot;generate-keys&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#generate-keys&quot; aria-label=&quot;Anchor link for: generate-keys&quot;&gt;GENERATE KEYS&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Preferably run these steps in a temp folder so file cleanup at the end will be easy.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;create-rsa-key&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-rsa-key&quot; aria-label=&quot;Anchor link for: create-rsa-key&quot;&gt;Create RSA key&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;openssl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; genrsa&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -out&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; localhost.key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 4096&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;create-signing-request&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-signing-request&quot; aria-label=&quot;Anchor link for: create-signing-request&quot;&gt;Create signing request&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;openssl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; req&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -new -key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; localhost.key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -out&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; localhost.csr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;use-the-following-as-a-guide-to-answer-the-questions-asked&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#use-the-following-as-a-guide-to-answer-the-questions-asked&quot; aria-label=&quot;Anchor link for: use-the-following-as-a-guide-to-answer-the-questions-asked&quot;&gt;Use the following as a guide to answer the questions asked:&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;strong&gt;Usage Notes&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;This section is very use case dependent these just match my needs.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Replace &lt;code&gt;&amp;lt;&amp;lt;SERVER-NAME&amp;gt;&amp;gt;&lt;&#x2F;code&gt; with the name of the server.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;You are about to be asked to enter information that will be incorporated into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;For some fields there will be a default value,&lt;br &#x2F;&gt;
If you enter ‘.’, the field will be left blank.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;—–&lt;br &#x2F;&gt;
Country Name (2 letter code) [AU]:&lt;code&gt;DM&lt;&#x2F;code&gt;&lt;br &#x2F;&gt;
State or Province Name (full name) [Some-State]:&lt;br &#x2F;&gt;
Locality Name (eg, city) []:&lt;br &#x2F;&gt;
Organization Name (eg, company) [Internet Widgits Pty Ltd]:&lt;br &#x2F;&gt;
Organizational Unit Name (eg, section) []:&lt;br &#x2F;&gt;
Common Name (e.g. server FQDN or YOUR name) []:&lt;code&gt;&amp;lt;&amp;lt;SERVER-NAME&amp;gt;&amp;gt;&lt;&#x2F;code&gt;&lt;br &#x2F;&gt;
Email Address []:&lt;br &#x2F;&gt;
&lt;br &#x2F;&gt;
Please enter the following ‘extra’ attributes&lt;br &#x2F;&gt;
to be sent with your certificate request&lt;br &#x2F;&gt;
A challenge password []:&lt;br &#x2F;&gt;
An optional company name []:&lt;&#x2F;p&gt;
&lt;h2 id=&quot;self-sign-certificate&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#self-sign-certificate&quot; aria-label=&quot;Anchor link for: self-sign-certificate&quot;&gt;Self sign certificate&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;openssl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; x509&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -req -days 9999 -in&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; localhost.csr&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -signkey&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; localhost.key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -out&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; localhost.crt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;enable-ssl-on-server&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#enable-ssl-on-server&quot; aria-label=&quot;Anchor link for: enable-ssl-on-server&quot;&gt;ENABLE SSL on server&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; a2enmod ssl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;update-config-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#update-config-file&quot; aria-label=&quot;Anchor link for: update-config-file&quot;&gt;UPDATE CONFIG FILE&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Note these instruction assume that you are using the default configuration file named &lt;code&gt;000-default.conf&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; nano &#x2F;etc&#x2F;apache2&#x2F;sites-enabled&#x2F;000-default.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;expected-default-file-before-changes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#expected-default-file-before-changes&quot; aria-label=&quot;Anchor link for: expected-default-file-before-changes&quot;&gt;Expected default file before changes&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;See file linked &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;apache&#x2F;https-setup&#x2F;org&#x2F;000-default.conf&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;example-of-final-output&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example-of-final-output&quot; aria-label=&quot;Anchor link for: example-of-final-output&quot;&gt;Example of final output&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;See example of updated file &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;apache&#x2F;https-setup&#x2F;after&#x2F;000-default.conf&quot;&gt;here&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;change-port-to-443-from-80&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#change-port-to-443-from-80&quot; aria-label=&quot;Anchor link for: change-port-to-443-from-80&quot;&gt;Change port to 443 from 80&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Change the line that looks like &lt;code&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;&#x2F;code&gt; to &lt;code&gt;&amp;lt;VirtualHost *:443&amp;gt;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;add-ssl-configs&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-ssl-configs&quot; aria-label=&quot;Anchor link for: add-ssl-configs&quot;&gt;Add SSL configs&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Add the following lines between the opening &lt;code&gt;&amp;lt;VirtualHost *:443&amp;gt;&lt;&#x2F;code&gt; and closing &lt;code&gt;&amp;lt;&#x2F;VirtualHost&amp;gt;&lt;&#x2F;code&gt; tags.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SSLEngine on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SSLCertificateFile	&#x2F;etc&#x2F;ssl&#x2F;certs&#x2F;localhost.crt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;SSLCertificateKeyFile	&#x2F;etc&#x2F;ssl&#x2F;private&#x2F;localhost.key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;add-redirect-from-http&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-redirect-from-http&quot; aria-label=&quot;Anchor link for: add-redirect-from-http&quot;&gt;Add redirect from HTTP&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Add the following lines putting in the correct URL instead of &lt;code&gt;x.x.x.x&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	Redirect permanent &#x2F; https:&#x2F;&#x2F;x.x.x.x&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&#x2F;VirtualHost&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;place-keys-at-path-specified-in-config&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#place-keys-at-path-specified-in-config&quot; aria-label=&quot;Anchor link for: place-keys-at-path-specified-in-config&quot;&gt;Place keys at path specified in config&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; mv localhost.crt &#x2F;etc&#x2F;ssl&#x2F;certs&#x2F;localhost.crt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; mv localhost.key &#x2F;etc&#x2F;ssl&#x2F;private&#x2F;localhost.key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;delete-signing-request&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#delete-signing-request&quot; aria-label=&quot;Anchor link for: delete-signing-request&quot;&gt;Delete signing request&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;It is no longer needed as the key has already been signed&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;rm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; localhost.csr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;set-permissions-to-protect-key&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-permissions-to-protect-key&quot; aria-label=&quot;Anchor link for: set-permissions-to-protect-key&quot;&gt;Set permissions to protect key&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; chown root:root &#x2F;etc&#x2F;ssl&#x2F;private&#x2F;localhost.key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; chown root:root &#x2F;etc&#x2F;ssl&#x2F;certs&#x2F;localhost.crt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 400&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;ssl&#x2F;private&#x2F;localhost.key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 444&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;ssl&#x2F;certs&#x2F;localhost.crt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;verify-ports-conf-matches&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#verify-ports-conf-matches&quot; aria-label=&quot;Anchor link for: verify-ports-conf-matches&quot;&gt;Verify &lt;code&gt;ports.conf&lt;&#x2F;code&gt; matches&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Open the current &lt;code&gt;ports.conf&lt;&#x2F;code&gt; on the server you are working on.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;apache2&#x2F;ports.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Compare against the one below which can be found as a text file &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;apache&#x2F;https-setup&#x2F;ports.conf&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# If you just change the port or add more ports here, you will likely also&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# have to change the VirtualHost statement in&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# &#x2F;etc&#x2F;apache2&#x2F;sites-enabled&#x2F;000-default.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Listen 80&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;IfModule ssl_module&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	Listen 443&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&#x2F;IfModule&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;IfModule mod_gnutls.c&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	Listen 443&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;lt;&#x2F;IfModule&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# vim: syntax=apache ts=4 sw=4 sts=4 sr noet&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;restart-apache&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#restart-apache&quot; aria-label=&quot;Anchor link for: restart-apache&quot;&gt;Restart Apache&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;etc&#x2F;init.d&#x2F;apache2 restart&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Global Ignore</title>
        <published>2022-09-10T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/global-ignore/"/>
        <id>https://dev.chester.wykies.com/git/global-ignore/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/global-ignore/">&lt;h1 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Instructions written for linux (not tested on Windows)&lt;&#x2F;p&gt;
&lt;h1 id=&quot;specify-global-ignore-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#specify-global-ignore-file&quot; aria-label=&quot;Anchor link for: specify-global-ignore-file&quot;&gt;Specify global ignore file&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h3 id=&quot;open-git-config-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#open-git-config-file&quot; aria-label=&quot;Anchor link for: open-git-config-file&quot;&gt;Open git config file&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;It’s ok if the file does not exist.
You can just create it.&lt;&#x2F;p&gt;
&lt;p&gt;Note: It is unlikely that the file does not exist
because mandatory settings like your name and email address go in the &lt;code&gt;user&lt;&#x2F;code&gt; section of that file.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;nano&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;.gitconfig&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;create-or-find-core-section&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#create-or-find-core-section&quot; aria-label=&quot;Anchor link for: create-or-find-core-section&quot;&gt;Create or find &lt;code&gt;core&lt;&#x2F;code&gt; section&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;It starts with the text &lt;code&gt;[core]&lt;&#x2F;code&gt;.
If section did not exist (or the file did not exist) then simply add that text.&lt;&#x2F;p&gt;
&lt;p&gt;Under that section add the following&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;excludesFile = ~&#x2F;.gitignore_global&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Final content (ignoring other settings) should look like&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[core]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;	excludesFile = ~&#x2F;.gitignore_global&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;add-entries-to-file&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-entries-to-file&quot; aria-label=&quot;Anchor link for: add-entries-to-file&quot;&gt;Add entries to file&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Use the normal git ignore format. More info on that can be found &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;gitignore#_pattern_format&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Add them to the file specified in the last step&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;nano&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;.gitignore_global&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>PyTorch</title>
        <published>2022-09-10T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/python/pytorch/"/>
        <id>https://dev.chester.wykies.com/python/pytorch/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/python/pytorch/">&lt;h1 id=&quot;install-pytorch&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-pytorch&quot; aria-label=&quot;Anchor link for: install-pytorch&quot;&gt;Install PyTorch&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;pytorch.org&#x2F;&quot;&gt;https:&#x2F;&#x2F;pytorch.org&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Instructions from the website are:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;pip3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install torch torchvision torchaudio&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;(NOT TESTED) But I suspect just the command below would be enough if all you want to do is test to see if your card is working&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;pip3&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install torch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;how-to-test-if-your-cuda-device-is-working&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#how-to-test-if-your-cuda-device-is-working&quot; aria-label=&quot;Anchor link for: how-to-test-if-your-cuda-device-is-working&quot;&gt;How to test if your cuda device is working&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;If it’s working you should see &lt;code&gt;true&lt;&#x2F;code&gt; and the second command should tell you the recognized device name&lt;&#x2F;p&gt;
&lt;p&gt;NB: Requires that torch is already installed&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ python&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Python 3.9.10 (main, Mar 19 2022, 20:19:04) &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;[GCC 11.2.0] on linux&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Type &amp;quot;help&amp;quot;, &amp;quot;copyright&amp;quot;, &amp;quot;credits&amp;quot; or &amp;quot;license&amp;quot; for more information.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;gt;&amp;gt;&amp;gt; import torch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;gt;&amp;gt;&amp;gt; torch.cuda.is_available()&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;True&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;gt;&amp;gt;&amp;gt; torch.cuda.get_device_name(0)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;&amp;#39;NVIDIA T500&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Snapcraft</title>
        <published>2022-09-07T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/snapcraft/"/>
        <id>https://dev.chester.wykies.com/debian/snapcraft/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/snapcraft/">&lt;h1 id=&quot;snap-setup&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#snap-setup&quot; aria-label=&quot;Anchor link for: snap-setup&quot;&gt;Snap Setup&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;install-snap&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-snap&quot; aria-label=&quot;Anchor link for: install-snap&quot;&gt;Install snap&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install snapd&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; snap install core&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;add-snap-bin-to-path&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-snap-bin-to-path&quot; aria-label=&quot;Anchor link for: add-snap-bin-to-path&quot;&gt;Add snap bin to path&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Open &lt;code&gt;~&#x2F;.bashrc&lt;&#x2F;code&gt; for editing&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;nano&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ~&#x2F;.bashrc&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Add the following lines to &lt;code&gt;.bashrc&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export PATH=$PATH:&#x2F;snap&#x2F;bin&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;reverting-a-bad-upgrade&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#reverting-a-bad-upgrade&quot; aria-label=&quot;Anchor link for: reverting-a-bad-upgrade&quot;&gt;Reverting a bad upgrade&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;1268615&#x2F;snap-install-specific-old-version&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;1268615&#x2F;snap-install-specific-old-version&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;NB: Example commands use discord because that is one of the programs I was having the problem with at the time.
Short summary of problem is:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Had issues with Notepad++&lt;&#x2F;li&gt;
&lt;li&gt;Found out there were updates for 4 apps.
&lt;ul&gt;
&lt;li&gt;Notepad++&lt;&#x2F;li&gt;
&lt;li&gt;Discord&lt;&#x2F;li&gt;
&lt;li&gt;Firefox&lt;&#x2F;li&gt;
&lt;li&gt;Indicator-sensors&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;When I tried to update them Notepad++ told me that it was already updated&lt;&#x2F;li&gt;
&lt;li&gt;After the update discord wouldn’t run anymore&lt;&#x2F;li&gt;
&lt;li&gt;Ran it from the command line and got 3 errors
&lt;ul&gt;
&lt;li&gt;First two where &lt;code&gt;Failed to load module &quot;canberra-gtk-module&quot;&lt;&#x2F;code&gt; but this happens even when it works&lt;&#x2F;li&gt;
&lt;li&gt;The other one was &lt;code&gt;Failed to generate minidump.Illegal instruction (core dumped)&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;After revert, it still gave the same errors&lt;&#x2F;li&gt;
&lt;li&gt;Restarted and then it worked&lt;&#x2F;li&gt;
&lt;li&gt;Tried to revert to 141 to recreate the problem to file a report but… It works now.. IDK.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;see-versions-available-locally&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-versions-available-locally&quot; aria-label=&quot;Anchor link for: see-versions-available-locally&quot;&gt;See versions available locally&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;snap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; list discord&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --all&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Don’t have the output from before I fixed it but this is what it shows after:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Name     Version  Rev  Tracking       Publisher     Notes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;discord  0.0.19   138  latest&#x2F;stable  snapcrafters  -&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;discord  0.0.19   141  latest&#x2F;stable  snapcrafters  disabled&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;do-revert&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#do-revert&quot; aria-label=&quot;Anchor link for: do-revert&quot;&gt;Do revert&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;snap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; revert discord&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;to-go-back-to-the-version-i-reverted-from&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#to-go-back-to-the-version-i-reverted-from&quot; aria-label=&quot;Anchor link for: to-go-back-to-the-version-i-reverted-from&quot;&gt;To go back to the version I reverted from&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Search key: unrevert&lt;&#x2F;p&gt;
&lt;p&gt;Wanted to file an issue on the discord repo and wanted to report it while it was not working.
Note 141 is the version that I had reverted from. PS It worked after the revert even after a restart.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;snap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; revert&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --revision=141&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; discord&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;snap-uninstall-remove&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#snap-uninstall-remove&quot; aria-label=&quot;Anchor link for: snap-uninstall-remove&quot;&gt;Snap uninstall (remove)&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Example on notepad++&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; snap remove notepad-plus-plus&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;snap-help&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#snap-help&quot; aria-label=&quot;Anchor link for: snap-help&quot;&gt;Snap help&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;snap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; help&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;install-snap-applications&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-snap-applications&quot; aria-label=&quot;Anchor link for: install-snap-applications&quot;&gt;Install snap applications&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;discord&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#discord&quot; aria-label=&quot;Anchor link for: discord&quot;&gt;Discord&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; snap install discord&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;var&#x2F;lib&#x2F;snapd&#x2F;desktop&#x2F;applications&#x2F;discord_discord.desktop ~&#x2F;.local&#x2F;share&#x2F;applications&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;pdf-mix-tool&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#pdf-mix-tool&quot; aria-label=&quot;Anchor link for: pdf-mix-tool&quot;&gt;PDF Mix Tool&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; snap install pdfmixtool&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;var&#x2F;lib&#x2F;snapd&#x2F;desktop&#x2F;applications&#x2F;pdfmixtool_pdfmixtool.desktop ~&#x2F;.local&#x2F;share&#x2F;applications&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;notepad&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#notepad&quot; aria-label=&quot;Anchor link for: notepad&quot;&gt;Notepad++&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;snap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install notepad-plus-plus&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;cp&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;var&#x2F;lib&#x2F;snapd&#x2F;desktop&#x2F;applications&#x2F;notepad-plus-plus_notepad-plus-plus.desktop  ~&#x2F;.local&#x2F;share&#x2F;applications&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;snap-permissions&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#snap-permissions&quot; aria-label=&quot;Anchor link for: snap-permissions&quot;&gt;Snap permissions&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;snapcraft.io&#x2F;docs&#x2F;interface-management&quot;&gt;https:&#x2F;&#x2F;snapcraft.io&#x2F;docs&#x2F;interface-management&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Video Cards</title>
        <published>2022-08-31T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/video-cards/"/>
        <id>https://dev.chester.wykies.com/debian/video-cards/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/video-cards/">&lt;p&gt;See &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;python&#x2F;pytorch&#x2F;&quot;&gt;python torch&lt;&#x2F;a&gt; section.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>CSS</title>
        <published>2022-08-31T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/web_design/css/"/>
        <id>https://dev.chester.wykies.com/web_design/css/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/web_design/css/">&lt;h1 id=&quot;css-selectors&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#css-selectors&quot; aria-label=&quot;Anchor link for: css-selectors&quot;&gt;CSS Selectors&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.w3schools.com&#x2F;cssref&#x2F;css_selectors.asp&quot;&gt;https:&#x2F;&#x2F;www.w3schools.com&#x2F;cssref&#x2F;css_selectors.asp&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Material Design</title>
        <published>2022-08-31T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/web_design/material-design/"/>
        <id>https://dev.chester.wykies.com/web_design/material-design/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/web_design/material-design/">&lt;h1 id=&quot;icons&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#icons&quot; aria-label=&quot;Anchor link for: icons&quot;&gt;Icons&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;materialdesignicons.com&#x2F;&quot;&gt;https:&#x2F;&#x2F;materialdesignicons.com&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Reset</title>
        <published>2022-08-26T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/git/reset/"/>
        <id>https://dev.chester.wykies.com/git/reset/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/git/reset/">&lt;h1 id=&quot;reset-to-current-head-and-discard-all-including-stash&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#reset-to-current-head-and-discard-all-including-stash&quot; aria-label=&quot;Anchor link for: reset-to-current-head-and-discard-all-including-stash&quot;&gt;Reset to current head and discard all including stash&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; reset&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --hard&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;undo-accidental-reset&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#undo-accidental-reset&quot; aria-label=&quot;Anchor link for: undo-accidental-reset&quot;&gt;Undo accidental reset&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;5788037&#x2F;recover-from-losing-uncommitted-changes-by-git-reset-hard&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;5788037&#x2F;recover-from-losing-uncommitted-changes-by-git-reset-hard&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; reflog show&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;then use the &lt;code&gt;HEAD@{?}&lt;&#x2F;code&gt; and replace the question mark like&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;git&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; reset HEAD@{&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Bash Aliases</title>
        <published>2022-08-22T00:00:00+00:00</published>
        <updated>2025-05-14T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/bash/bash-aliases/"/>
        <id>https://dev.chester.wykies.com/bash/bash-aliases/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/bash/bash-aliases/">&lt;p&gt;In a bash shell there is a special file provided for creating aliases to avoid directly editing your &lt;code&gt;.bashrc&lt;&#x2F;code&gt; logon script.
This file is called &lt;code&gt;.bash_aliases&lt;&#x2F;code&gt; and is automatically imported in &lt;code&gt;.bashrc&lt;&#x2F;code&gt; on startup of a new shell.&lt;&#x2F;p&gt;
&lt;p&gt;The format of an alias is:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;alias&lt;&#x2F;span&gt;&lt;span&gt; text_to_be_typed&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;command to be executed&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;&#x27;&lt;&#x2F;code&gt; are only needed if the command has spaces.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;see-command-that-will-execute-when-alias-is-used&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#see-command-that-will-execute-when-alias-is-used&quot; aria-label=&quot;Anchor link for: see-command-that-will-execute-when-alias-is-used&quot;&gt;See command that will execute when alias is used&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;102093&#x2F;how-to-see-the-command-attached-to-a-bash-alias&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;102093&#x2F;how-to-see-the-command-attached-to-a-bash-alias&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;type -a&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;cm&lt;&#x2F;span&gt;&lt;span&gt;d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;-a&lt;&#x2F;code&gt; display all locations containing an executable named NAME; includes aliases, builtins, and functions.&lt;&#x2F;p&gt;
&lt;p&gt;where &lt;code&gt;&amp;lt;cmd&amp;gt;&lt;&#x2F;code&gt; is the command or alias you want information on&lt;&#x2F;p&gt;
&lt;p&gt;If using zsh you can also use the following&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;which&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;cm&lt;&#x2F;span&gt;&lt;span&gt;d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Return Code</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/bash/return-code/"/>
        <id>https://dev.chester.wykies.com/bash/return-code/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/bash/return-code/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;linuxhint.com&#x2F;bash-exit-code-of-last-command&#x2F;&quot;&gt;https:&#x2F;&#x2F;linuxhint.com&#x2F;bash-exit-code-of-last-command&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;To check the return code of the last command use&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; Last command return code was&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; $?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Android Apps on Linux</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/android-on-linux/"/>
        <id>https://dev.chester.wykies.com/debian/android-on-linux/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/android-on-linux/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.howtogeek.com&#x2F;760044&#x2F;how-to-run-android-apps-on-linux&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.howtogeek.com&#x2F;760044&#x2F;how-to-run-android-apps-on-linux&#x2F;&lt;&#x2F;a&gt;&lt;br &#x2F;&gt;
Supplemented by: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;anbox&#x2F;anbox&#x2F;blob&#x2F;master&#x2F;docs&#x2F;install.md&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;anbox&#x2F;anbox&#x2F;blob&#x2F;master&#x2F;docs&#x2F;install.md&lt;&#x2F;a&gt; (proper install command)&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;snap&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --devmode --edge&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; anbox&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install wget curl lzip tar unzip squashfs-tools&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;geeks-r-us&#x2F;anbox-playstore-installer&#x2F;master&#x2F;install-playstore.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; chmod +x install-playstore.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;.&#x2F;install-playstore.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then give “Google Play Service” and “Google Play Store” permissions&lt;&#x2F;p&gt;
&lt;p&gt;NB: A copy of the playstore install has been stored at &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;android-on-linux&#x2F;install-playstore.sh&quot;&gt;here&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Blacklist Module</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/blacklist-module/"/>
        <id>https://dev.chester.wykies.com/debian/blacklist-module/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/blacklist-module/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;superuser.com&#x2F;questions&#x2F;575887&#x2F;how-to-disable-device-in-linux-debian-wheezy&quot;&gt;https:&#x2F;&#x2F;superuser.com&#x2F;questions&#x2F;575887&#x2F;how-to-disable-device-in-linux-debian-wheezy&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;In all commands replace &lt;code&gt;&amp;lt;modulename&amp;gt;&lt;&#x2F;code&gt; with the actual module name&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Create a file&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; nano &#x2F;etc&#x2F;modprobe.d&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;modulenam&lt;&#x2F;span&gt;&lt;span&gt;e&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;containing the following&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;blacklist &amp;lt;modulename&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;Run&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; depmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -ae&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Recreate your initrd&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;update-initramfs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -u&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Calender Notifications Popup Disable</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/calender-notifications-popup-disable/"/>
        <id>https://dev.chester.wykies.com/debian/calender-notifications-popup-disable/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/calender-notifications-popup-disable/">&lt;p&gt;Source: https:&#x2F;&#x2F;newbedev.com&#x2F;turn-off-calendar-notifications-ubuntu-20-04 (Changed from link as it is timing out now)&lt;&#x2F;p&gt;
&lt;h3 id=&quot;install-dconf-editor&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-dconf-editor&quot; aria-label=&quot;Anchor link for: install-dconf-editor&quot;&gt;Install dconf Editor&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install dconf-editor&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;launch-dconf-editor&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#launch-dconf-editor&quot; aria-label=&quot;Anchor link for: launch-dconf-editor&quot;&gt;Launch dconf Editor&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;calender-notifications-popup-disable&#x2F;dconf.png&quot; alt=&quot;Search Bar&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;change-setting&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#change-setting&quot; aria-label=&quot;Anchor link for: change-setting&quot;&gt;Change setting&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;Navigate to &lt;code&gt;&#x2F;org&#x2F;gnome&#x2F;evolution-data-server&#x2F;calendar&lt;&#x2F;code&gt; and set &lt;code&gt;notify-with-tray&lt;&#x2F;code&gt; to “on”.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;calender-notifications-popup-disable&#x2F;setting.png&quot; alt=&quot;Setting&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>CUPS PDF Printer</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/cups-pdf-printer/"/>
        <id>https://dev.chester.wykies.com/debian/cups-pdf-printer/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/cups-pdf-printer/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;81817&#x2F;how-to-install-a-pdf-printer&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;81817&#x2F;how-to-install-a-pdf-printer&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install printer-driver-cups-pdf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Output can be found in &lt;code&gt;PDF&lt;&#x2F;code&gt; folder in home directory&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>gping</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/gping/"/>
        <id>https://dev.chester.wykies.com/debian/gping/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/gping/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;orf&#x2F;gping&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;orf&#x2F;gping&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;deb http:&#x2F;&#x2F;packages.azlux.fr&#x2F;debian&#x2F; buster main&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; tee &#x2F;etc&#x2F;apt&#x2F;sources.list.d&#x2F;azlux.list&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -qO&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; - https:&#x2F;&#x2F;azlux.fr&#x2F;repo.gpg.key&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt-key add -&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt update&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install gping&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Hide Mounts</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/hide-mounts/"/>
        <id>https://dev.chester.wykies.com/debian/hide-mounts/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/hide-mounts/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;1263625&#x2F;remove-hdd-icon-from-dock-in-20-04&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;1263625&#x2F;remove-hdd-icon-from-dock-in-20-04&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;To remove mounts from always showing on dock use dconf see screenshot.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;hide-mounts&#x2F;show-mounts.png&quot; alt=&quot;screenshot&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Search Terms: Remove HDD from dock&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Nautilus</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/nautilus/"/>
        <id>https://dev.chester.wykies.com/debian/nautilus/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/nautilus/">&lt;p&gt;Many useful shortcuts for Nautilus can be found in the menu under shortcuts,
but I highlight my more frequently used ones here.&lt;&#x2F;p&gt;
&lt;p&gt;Shortcuts can also be accessed using &lt;code&gt;Ctrl + ?&lt;&#x2F;code&gt; (Requires you to press &lt;code&gt;Ctrl + Shift + ?&lt;&#x2F;code&gt; on most keyboards as ? is a
key that requires shift)&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Navigate to folder using path on clipboard &lt;code&gt;Ctrl + L&lt;&#x2F;code&gt; (see three options at bottom)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;nautilus&#x2F;navigation.png&quot; alt=&quot;screenshot of shortcuts&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Power</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/power/"/>
        <id>https://dev.chester.wykies.com/debian/power/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/power/">&lt;h1 id=&quot;set-low-battery-notifications-percentage&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-low-battery-notifications-percentage&quot; aria-label=&quot;Anchor link for: set-low-battery-notifications-percentage&quot;&gt;Set low battery notifications percentage&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;1405846&#x2F;set-low-battery-percentage-to-15-in-22-04&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;1405846&#x2F;set-low-battery-percentage-to-15-in-22-04&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Open the config&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; nano &#x2F;etc&#x2F;UPower&#x2F;UPower.conf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Change the following lines as needed&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PercentageLow=20&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PercentageCritical=5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;PercentageAction=2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Restart the service&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; systemctl restart upower&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Smartgit</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/smartgit/"/>
        <id>https://dev.chester.wykies.com/debian/smartgit/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/smartgit/">&lt;h2 id=&quot;ssh-setup&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ssh-setup&quot; aria-label=&quot;Anchor link for: ssh-setup&quot;&gt;SSH Setup&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ol&gt;
&lt;li&gt;Ensure key is created and stored in &lt;code&gt;~&#x2F;.ssh&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Use git clone from the command line to add the target to the known hosts&lt;&#x2F;li&gt;
&lt;li&gt;Then smartgit should work without issue&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;add-menu-item&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#add-menu-item&quot; aria-label=&quot;Anchor link for: add-menu-item&quot;&gt;Add Menu Item&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;tutorialforlinux.com&#x2F;2019&#x2F;06&#x2F;09&#x2F;how-to-create-a-smartgit-linux-desktop-menu-launcher-easy-guide-2&#x2F;&quot;&gt;https:&#x2F;&#x2F;tutorialforlinux.com&#x2F;2019&#x2F;06&#x2F;09&#x2F;how-to-create-a-smartgit-linux-desktop-menu-launcher-easy-guide-2&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; bin&#x2F;smartgit&#x2F;bin&#x2F;add-menuitem.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Arrays</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/javascript/arrays/"/>
        <id>https://dev.chester.wykies.com/javascript/arrays/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/javascript/arrays/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;JavaScript&#x2F;Reference&#x2F;Global_Objects&#x2F;Array&quot;&gt;https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;JavaScript&#x2F;Reference&#x2F;Global_Objects&#x2F;Array&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;includes&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#includes&quot; aria-label=&quot;Anchor link for: includes&quot;&gt;includes&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.w3schools.com&#x2F;jsref&#x2F;jsref_includes_array.asp&quot;&gt;https:&#x2F;&#x2F;www.w3schools.com&#x2F;jsref&#x2F;jsref_includes_array.asp&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Checks if the input is contained in the array&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; fruits&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Banana&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Orange&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Apple&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot;Mango&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;fruits.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;includes&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;quot;Mango&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;);&lt;&#x2F;span&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt; &#x2F;&#x2F; Returns true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;some&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#some&quot; aria-label=&quot;Anchor link for: some&quot;&gt;some&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;The &lt;code&gt;some()&lt;&#x2F;code&gt; method tests whether at least one element in the array passes the test implemented by the provided
function.
It returns true if, in the array, it finds an element for which the provided function returns true;
otherwise it returns false.
It doesn’t modify the array.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; array&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span&gt;];&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; checks whether an element is even&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;const&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; even&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FFAB70;&quot;&gt;element&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; element&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; ===&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 0&lt;&#x2F;span&gt;&lt;span&gt;;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;console.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;log&lt;&#x2F;span&gt;&lt;span&gt;(array.&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;some&lt;&#x2F;span&gt;&lt;span&gt;(even));&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;&#x2F; expected output: true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Linting Suppression</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/javascript/linting/"/>
        <id>https://dev.chester.wykies.com/javascript/linting/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/javascript/linting/">&lt;h1 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;These techniques are tested on PyCharm but some like the global variables one are known to work on NetBeans as well.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;global-variable&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#global-variable&quot; aria-label=&quot;Anchor link for: global-variable&quot;&gt;Global variable&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;intellij-support.jetbrains.com&#x2F;hc&#x2F;en-us&#x2F;community&#x2F;posts&#x2F;207070365-Configuring-inspection-Unresolved-JavaScript-variable-to-recognize-global-variables-from-external-files&quot;&gt;https:&#x2F;&#x2F;intellij-support.jetbrains.com&#x2F;hc&#x2F;en-us&#x2F;community&#x2F;posts&#x2F;207070365-Configuring-inspection-Unresolved-JavaScript-variable-to-recognize-global-variables-from-external-files&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Notice: Superseded by using &lt;code&gt;js_lib&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Use a comma separated list of the global variables in a comment.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;&#x2F;* global SpreadsheetApp, Logger, DriveApp, GmailApp, Session *&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h1 id=&quot;default-types-supported-in-docstrings&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#default-types-supported-in-docstrings&quot; aria-label=&quot;Anchor link for: default-types-supported-in-docstrings&quot;&gt;Default Types supported in docstrings&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;medium.com&#x2F;@trukrs&#x2F;type-safe-javascript-with-jsdoc-7a2a63209b76&quot;&gt;https:&#x2F;&#x2F;medium.com&#x2F;@trukrs&#x2F;type-safe-javascript-with-jsdoc-7a2a63209b76&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;null&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;undefined&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;boolean&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;number&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;string&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;Array&lt;&#x2F;code&gt; or &lt;code&gt;[]&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;Object&lt;&#x2F;code&gt; or &lt;code&gt;{}&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;any&lt;&#x2F;code&gt; (Added by me because it makes sense)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;You can have a typed array: &lt;code&gt;any[]&lt;&#x2F;code&gt;, &lt;code&gt;number[]&lt;&#x2F;code&gt;, &lt;code&gt;string[]&lt;&#x2F;code&gt;. You could also have an array of object types: &lt;code&gt;Employee[]&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>PDF Garbled (Fix)</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/pdf-garbled/"/>
        <id>https://dev.chester.wykies.com/misc/pdf-garbled/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/pdf-garbled/">&lt;h1 id=&quot;background&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#background&quot; aria-label=&quot;Anchor link for: background&quot;&gt;Background&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Got a PDF that would display on the screen fine for reading but would produce garbled text when trying to copy and
paste.
Main motivation for addressing the issue is to be able to use text to speech on the pdf to read it.
This page is meant to document the options found to address this issue.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;convert-pdf-to-images-instead-of-garbled-text&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#convert-pdf-to-images-instead-of-garbled-text&quot; aria-label=&quot;Anchor link for: convert-pdf-to-images-instead-of-garbled-text&quot;&gt;Convert pdf to images instead of garbled text&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Two methods were found for this with varied pros and cons&lt;&#x2F;p&gt;
&lt;h2 id=&quot;use-acrobat-reader-to-convert&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#use-acrobat-reader-to-convert&quot; aria-label=&quot;Anchor link for: use-acrobat-reader-to-convert&quot;&gt;Use Acrobat Reader to convert&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Pros: Produced smaller file (On example pdf was by a factor of 2)&lt;&#x2F;li&gt;
&lt;li&gt;Cons: Took a bit more effort&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol&gt;
&lt;li&gt;Open the file in Acrobat Reader&lt;&#x2F;li&gt;
&lt;li&gt;Ctrl + P to print&lt;&#x2F;li&gt;
&lt;li&gt;Go to Advanced&lt;&#x2F;li&gt;
&lt;li&gt;Check &lt;code&gt;Print As Image&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;pdf-garbled&#x2F;acrobat_reader_to_img.png&quot; alt=&quot;Acrobat Reader Screenshot&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;use-okular-to-convert&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#use-okular-to-convert&quot; aria-label=&quot;Anchor link for: use-okular-to-convert&quot;&gt;Use Okular to convert&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Pros: Faster to do with somewhat less effort especially as it is the default app to open PDFs&lt;&#x2F;li&gt;
&lt;li&gt;Cons: Produce a larger file (On example pdf was by a factor of 2)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;ol&gt;
&lt;li&gt;Open file in Okular&lt;&#x2F;li&gt;
&lt;li&gt;Ctrl + P to print&lt;&#x2F;li&gt;
&lt;li&gt;Expand Options at the bottom&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;PDF Options&lt;&#x2F;code&gt; tab&lt;&#x2F;li&gt;
&lt;li&gt;Check &lt;code&gt;Force rasterization&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;pdf-garbled&#x2F;okular_to_img.png&quot; alt=&quot;Okular Screenshot&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;ocr-the-image-pdf&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#ocr-the-image-pdf&quot; aria-label=&quot;Anchor link for: ocr-the-image-pdf&quot;&gt;OCR the image PDF&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;use-voice-aloud-reader&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#use-voice-aloud-reader&quot; aria-label=&quot;Anchor link for: use-voice-aloud-reader&quot;&gt;Use &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;play.google.com&#x2F;store&#x2F;apps&#x2F;details?id=com.hyperionics.avar&quot;&gt;@Voice Aloud Reader&lt;&#x2F;a&gt;&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Pros: Directly does text to speech once completed&lt;&#x2F;li&gt;
&lt;li&gt;Cons:
&lt;ul&gt;
&lt;li&gt;Must plug into to charger to do multiple pages&lt;&#x2F;li&gt;
&lt;li&gt;Must use mobile device&lt;&#x2F;li&gt;
&lt;li&gt;Not easily able to copy and paste&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;use-online-service&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#use-online-service&quot; aria-label=&quot;Anchor link for: use-online-service&quot;&gt;Use online service&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Online service: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.sejda.com&#x2F;ocr-pdf&quot;&gt;https:&#x2F;&#x2F;www.sejda.com&#x2F;ocr-pdf&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Pros: Gives you a new version of the PDF you can use on any device&lt;&#x2F;li&gt;
&lt;li&gt;Cons: Not local program (Small amounts free)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Replit</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/replit/"/>
        <id>https://dev.chester.wykies.com/misc/replit/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/replit/">&lt;h2 id=&quot;reboot-environment&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#reboot-environment&quot; aria-label=&quot;Anchor link for: reboot-environment&quot;&gt;Reboot environment&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Original Source was: https:&#x2F;&#x2F;replit.com&#x2F;talk&#x2F;ask&#x2F;Any-way-to-reboot-a-Repl&#x2F;46731 but it’s gone 404 now.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;busybox reboot&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Disable Formatter on parts of Code</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/pycharm/disable-formatter-on-part-of-code/"/>
        <id>https://dev.chester.wykies.com/pycharm/disable-formatter-on-part-of-code/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/pycharm/disable-formatter-on-part-of-code/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;14020200&#x2F;how-to-config-intellij-idea-not-format-some-part-of-the-code&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;14020200&#x2F;how-to-config-intellij-idea-not-format-some-part-of-the-code&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-to-use&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#how-to-use&quot; aria-label=&quot;Anchor link for: how-to-use&quot;&gt;How to use&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# @formatter:off&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #6A737D;&quot;&gt;# @formatter:on&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;required-settings&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#required-settings&quot; aria-label=&quot;Anchor link for: required-settings&quot;&gt;Required Settings&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Ensure it is enabled in settings&lt;&#x2F;p&gt;
&lt;p&gt;Search String: “formatter markers”&lt;&#x2F;p&gt;
&lt;p&gt;Editor -&amp;gt; Code Style: Formatter : Turn formatter on&#x2F;off with markers in code comments&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;pycharm&#x2F;disable-formatter-on-part-of-code&#x2F;scrshot.png&quot; alt=&quot;Screen Shot&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>JavaScript</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/pycharm/javascript/"/>
        <id>https://dev.chester.wykies.com/pycharm/javascript/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/pycharm/javascript/">&lt;p&gt;See &lt;a href=&quot;..&#x2F;..&#x2F;javascript&#x2F;linting&#x2F;index.html&quot;&gt;linting&lt;&#x2F;a&gt; under javascript.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Launcher Shortcut</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/pycharm/launcher/"/>
        <id>https://dev.chester.wykies.com/pycharm/launcher/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/pycharm/launcher/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;391439&#x2F;how-can-i-set-up-pycharm-to-launch-from-the-launcher&quot;&gt;https:&#x2F;&#x2F;askubuntu.com&#x2F;questions&#x2F;391439&#x2F;how-can-i-set-up-pycharm-to-launch-from-the-launcher&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Open pycharm (See instructions that come in folder)&lt;&#x2F;li&gt;
&lt;li&gt;Once you’ve opened PyCharm then go to &lt;code&gt;Tools&lt;&#x2F;code&gt; -&amp;gt; &lt;code&gt;Create Desktop Entry...&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>RegExp Editor</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/pycharm/regex/"/>
        <id>https://dev.chester.wykies.com/pycharm/regex/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/pycharm/regex/">&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;pycharm&#x2F;regex&#x2F;scrshot.png&quot; alt=&quot;Screen Shot&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Also see my page on &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;regex&#x2F;&quot;&gt;regex&lt;&#x2F;a&gt; where I have a cookbook of regexes I wrote or found and think I may use again.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>pyenv</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-09-01T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/python/pyenv/"/>
        <id>https://dev.chester.wykies.com/python/pyenv/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/python/pyenv/">&lt;h2 id=&quot;check-version-of-linux&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#check-version-of-linux&quot; aria-label=&quot;Anchor link for: check-version-of-linux&quot;&gt;Check version of linux&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;uname&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;install-prerequisites&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-prerequisites&quot; aria-label=&quot;Anchor link for: install-prerequisites&quot;&gt;Install prerequisites&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;pyenv&#x2F;pyenv&#x2F;wiki&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;pyenv&#x2F;pyenv&#x2F;wiki&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt update&lt;&#x2F;span&gt;&lt;span&gt; &amp;amp;&amp;amp;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; apt install make build-essential libssl-dev zlib1g-dev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;libbz2-dev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; libreadline-dev libsqlite3-dev wget curl llvm&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;libncursesw5-dev&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;run-installer&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#run-installer&quot; aria-label=&quot;Anchor link for: run-installer&quot;&gt;Run installer&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;pyenv&#x2F;pyenv-installer&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;pyenv&#x2F;pyenv-installer&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; https:&#x2F;&#x2F;pyenv.run&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;update-bashrc&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#update-bashrc&quot; aria-label=&quot;Anchor link for: update-bashrc&quot;&gt;Update bashrc&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Add the following lines to bashrc&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;export PATH=&amp;quot;$HOME&#x2F;.pyenv&#x2F;bin:$PATH&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;eval &amp;quot;$(pyenv init --path)&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;eval &amp;quot;$(pyenv virtualenv-init -)&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;list-versions-available-for-install&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#list-versions-available-for-install&quot; aria-label=&quot;Anchor link for: list-versions-available-for-install&quot;&gt;List versions available for install&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;realpython.com&#x2F;intro-to-pyenv&#x2F;#installing-python-versions-install&quot;&gt;https:&#x2F;&#x2F;realpython.com&#x2F;intro-to-pyenv&#x2F;#installing-python-versions-install&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Can also be filtered with grep like in the example&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;pyenv&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; --list&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; grep&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &amp;quot; 3\.[678]&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;install-new-version&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#install-new-version&quot; aria-label=&quot;Anchor link for: install-new-version&quot;&gt;Install new version&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;pyenv&#x2F;pyenv#usage&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;pyenv&#x2F;pyenv#usage&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;pyenv&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; install&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;versio&lt;&#x2F;span&gt;&lt;span&gt;n&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>String Formatting</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/python/string-formatting/"/>
        <id>https://dev.chester.wykies.com/python/string-formatting/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/python/string-formatting/">&lt;h1 id=&quot;f-strings&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#f-strings&quot; aria-label=&quot;Anchor link for: f-strings&quot;&gt;F-Strings&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;fixed-floats&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#fixed-floats&quot; aria-label=&quot;Anchor link for: fixed-floats&quot;&gt;Fixed floats&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;string.html#format-specification-mini-language&quot;&gt;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;string.html#format-specification-mini-language&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 3.1415926535&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span&gt;x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;:.2f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Outputs 3.14&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Optical Disks Management</title>
        <published>2022-08-19T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/virtual_box/optical-disks-management/"/>
        <id>https://dev.chester.wykies.com/virtual_box/optical-disks-management/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/virtual_box/optical-disks-management/">&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;virtual_box&#x2F;optical-disks-management&#x2F;menu_display.png&quot; alt=&quot;Menu Display&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Optical disks can be managed by:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Clicking on the menu button next to &lt;code&gt;Tools&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Then clicking media (not shown in screenshot)&lt;&#x2F;li&gt;
&lt;li&gt;Then the &lt;code&gt;Optical disks&lt;&#x2F;code&gt; tab
&lt;ol&gt;
&lt;li&gt;Then remove and other useful options become available&lt;&#x2F;li&gt;
&lt;li&gt;As well as properties which can be used to see where the iso is expected to be&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>MAC Address Change</title>
        <published>2022-06-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/mac-address-change/"/>
        <id>https://dev.chester.wykies.com/debian/mac-address-change/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/mac-address-change/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;itsfoss.com&#x2F;change-mac-address-linux&#x2F;&quot;&gt;https:&#x2F;&#x2F;itsfoss.com&#x2F;change-mac-address-linux&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;NB: Not tested&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;p&gt;In the instructions &lt;code&gt;enp0s31f6&lt;&#x2F;code&gt; is the adapter name&lt;&#x2F;p&gt;
&lt;h2 id=&quot;record-the-current-mac-address&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#record-the-current-mac-address&quot; aria-label=&quot;Anchor link for: record-the-current-mac-address&quot;&gt;Record the current mac address&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Use the following command to document the current mac address&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; link show enp0s31f6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;set-new-mac-address-and-verify&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#set-new-mac-address-and-verify&quot; aria-label=&quot;Anchor link for: set-new-mac-address-and-verify&quot;&gt;Set new mac address and verify&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Be sure to replace &lt;code&gt;XX:XX:XX:XX:XX:XX&lt;&#x2F;code&gt; with the new mac address&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ip link set dev enp0s31f6 down&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ip link set dev enp0s31f6 address XX:XX:XX:XX:XX:XX&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; ip link set dev enp0s31f6 up&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; link show enp0s31f6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Set permissions recursively on directory structure</title>
        <published>2022-06-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/permissions-recusively-on-dir/"/>
        <id>https://dev.chester.wykies.com/debian/permissions-recusively-on-dir/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/permissions-recusively-on-dir/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;superuser.com&#x2F;questions&#x2F;91935&#x2F;how-to-recursively-chmod-all-directories-except-files&quot;&gt;https:&#x2F;&#x2F;superuser.com&#x2F;questions&#x2F;91935&#x2F;how-to-recursively-chmod-all-directories-except-files&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;for-directories&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#for-directories&quot; aria-label=&quot;Anchor link for: for-directories&quot;&gt;For directories&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;find&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;path&#x2F;to&#x2F;base&#x2F;dir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; d&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -print0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; xargs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 755&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;for-files&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#for-files&quot; aria-label=&quot;Anchor link for: for-files&quot;&gt;For Files&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;find&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; &#x2F;path&#x2F;to&#x2F;base&#x2F;dir&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -type&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; f&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -print0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #F97583;&quot;&gt; |&lt;&#x2F;span&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt; xargs&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -0&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; 644&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Touch (Set file modified date)</title>
        <published>2022-06-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/debian/touch/"/>
        <id>https://dev.chester.wykies.com/debian/touch/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/debian/touch/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.thegeekstuff.com&#x2F;2012&#x2F;11&#x2F;linux-touch-command&#x2F;&quot;&gt;https:&#x2F;&#x2F;www.thegeekstuff.com&#x2F;2012&#x2F;11&#x2F;linux-touch-command&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;command&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#command&quot; aria-label=&quot;Anchor link for: command&quot;&gt;Command&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;touch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -t&lt;&#x2F;span&gt;&lt;span&gt; [[CC]YY]MMDDhhmm[.SS]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The following explains the above format:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;CC – Specifies the first two digits of the year&lt;&#x2F;li&gt;
&lt;li&gt;YY – Specifies the last two digits of the year.
See &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;debian&#x2F;touch&#x2F;#2-digit-year-defaults&quot;&gt;2-Digit year defaults&lt;&#x2F;a&gt; for details, if CC is omitted.&lt;&#x2F;li&gt;
&lt;li&gt;MM – Specifies the month&lt;&#x2F;li&gt;
&lt;li&gt;DD – Specifies the date&lt;&#x2F;li&gt;
&lt;li&gt;hh – Specifies the hour&lt;&#x2F;li&gt;
&lt;li&gt;mm – Specifies the minute&lt;&#x2F;li&gt;
&lt;li&gt;SS – Specifies the seconds&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;example&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#example&quot; aria-label=&quot;Anchor link for: example&quot;&gt;Example&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #B392F0;&quot;&gt;touch&lt;&#x2F;span&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt; -t 202101291605.09&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; foo.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #79B8FF;&quot;&gt;stat&lt;&#x2F;span&gt;&lt;span style=&quot;color: #9ECBFF;&quot;&gt; foo.txt&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;2-digit-year-defaults&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#2-digit-year-defaults&quot; aria-label=&quot;Anchor link for: 2-digit-year-defaults&quot;&gt;2 Digit year defaults&lt;&#x2F;a&gt;&lt;&#x2F;h3&gt;
&lt;p&gt;If the value of the YY is between 70 and 99,
then value of the CC digits is assumed to be 19.&lt;&#x2F;p&gt;
&lt;p&gt;If the value of the YY is between 00 and 37,
then value of the CC digits is assumed to be 20.&lt;&#x2F;p&gt;
&lt;p&gt;NB: It is not possible to set the date beyond January 18, 2038.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Get the current function&#x27;s name</title>
        <published>2022-06-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/python/get-func-name/"/>
        <id>https://dev.chester.wykies.com/python/get-func-name/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/python/get-func-name/">&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;5067604&#x2F;determine-function-name-from-within-that-function-without-using-traceback&quot;&gt;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;5067604&#x2F;determine-function-name-from-within-that-function-without-using-traceback&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;inspect.currentframe().f_code.co_name&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>IPython Built-in magic commands</title>
        <published>2022-06-02T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/python/ipython-built-in-magic-commands/"/>
        <id>https://dev.chester.wykies.com/python/ipython-built-in-magic-commands/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/python/ipython-built-in-magic-commands/">&lt;p&gt;Source: https:&#x2F;&#x2F;ipython.readthedocs.io&#x2F;en&#x2F;stable&#x2F;interactive&#x2F;magics.html&lt;&#x2F;p&gt;
&lt;h2 id=&quot;defined-variables-with-types&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#defined-variables-with-types&quot; aria-label=&quot;Anchor link for: defined-variables-with-types&quot;&gt;Defined Variables (with types)&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span&gt;whos&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;defined-variables&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#defined-variables&quot; aria-label=&quot;Anchor link for: defined-variables&quot;&gt;Defined Variables&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #E1E4E8; background-color: #24292E;&quot;&gt;&lt;code data-lang=&quot;python&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #F97583;&quot;&gt;%&lt;&#x2F;span&gt;&lt;span&gt;who&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Cannon MG3600</title>
        <published>2022-06-01T00:00:00+00:00</published>
        <updated>2026-01-13T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/cannon-mg3600/"/>
        <id>https://dev.chester.wykies.com/misc/cannon-mg3600/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/cannon-mg3600/">&lt;h1 id=&quot;connecting-the-printer-to-the-wifi-using-wps&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#connecting-the-printer-to-the-wifi-using-wps&quot; aria-label=&quot;Anchor link for: connecting-the-printer-to-the-wifi-using-wps&quot;&gt;Connecting the printer to the WiFi using WPS&lt;&#x2F;a&gt;&lt;&#x2F;h1&gt;
&lt;p&gt;Source: &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=TWZ-tDtonYI&quot;&gt;Cannon Europe Support Video on YouTube&lt;&#x2F;a&gt; and a Cannon Canada Support Page which used to be at https:&#x2F;&#x2F;canoncanada.custhelp.com&#x2F;app&#x2F;answers&#x2F;answer_view&#x2F;a_id&#x2F;1036193&#x2F;session&#x2F;L2F2LzEvdGltZS8xNzM0Mzc3Mzg4L2dlbi8xNzM0Mzc3Mzg4L3NpZC9mVWNkT0ZiVzUlN0VtaWxhb3NSbnJXczFxQ0ozOEpzdlVoMHJJbktRQXl5aXdGV0dYWERwV1oya29aVkU4dzdQcFZ1YkZWX0dLJTdFYl9ocVN1dmxRUGN5Slc5MkpNTUxoN1lEZjFsRDdXUjZDNEE5MzVqbFFsQUVGUTdnJTIxJTIx but is no longer online&lt;&#x2F;p&gt;
&lt;h2 id=&quot;foreword&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#foreword&quot; aria-label=&quot;Anchor link for: foreword&quot;&gt;Foreword&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;Before you can connect to Wi-Fi the current settings must be reset (see &lt;a href=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;cannon-mg3600&#x2F;#wifi-reset&quot;&gt;reset instructions&lt;&#x2F;a&gt;).
These instructions are for “Connecting Printer and Wireless Router Using WPS Push Button - PIXMA MG3620”&lt;&#x2F;p&gt;
&lt;h2 id=&quot;wifi-reset&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#wifi-reset&quot; aria-label=&quot;Anchor link for: wifi-reset&quot;&gt;WiFi Reset&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;Press and hold the [Resume &#x2F; Cancel] Button until the alarm button flashes 21 times&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;cannon-mg3600&#x2F;1.png&quot; alt=&quot;Reset&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;At this point the power light should be flashing. (Not sure what needs to happen next, my suggestion to my future self is just wait for it to stop and see if that works)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;steps-to-connect-to-new-wi-fi&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#steps-to-connect-to-new-wi-fi&quot; aria-label=&quot;Anchor link for: steps-to-connect-to-new-wi-fi&quot;&gt;Steps to Connect to New Wi-Fi&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;NB: The instructions from the support article for this part are ok &lt;strong&gt;AS LONG AS YOU ALREADY DID THE RESET&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Be ready to press the WPS button on your router or press it from the web interface of the router from a nearby device.&lt;&#x2F;li&gt;
&lt;li&gt;Press and hold the &lt;strong&gt;WI-FI Button&lt;&#x2F;strong&gt; on the printer until the power light flashes once.&lt;&#x2F;li&gt;
&lt;li&gt;Press the &lt;strong&gt;Black Button&lt;&#x2F;strong&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Press the &lt;strong&gt;Wi-Fi Button&lt;&#x2F;strong&gt; again the Wi-Fi light will start to flash&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;cannon-mg3600&#x2F;2.png&quot; alt=&quot;Ready to pair&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Press and hold the WPS button on the router within two minutes&lt;&#x2F;li&gt;
&lt;li&gt;Complete when the power light and the Wi-Fi light stop flashing&lt;br &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;dev.chester.wykies.com&#x2F;misc&#x2F;cannon-mg3600&#x2F;3.png&quot; alt=&quot;Connect&quot; &#x2F;&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Things to Remember</title>
        <published>2004-10-01T00:00:00+00:00</published>
        <updated>2025-04-26T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Chester Wyke
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://dev.chester.wykies.com/misc/rem/"/>
        <id>https://dev.chester.wykies.com/misc/rem/</id>
        
        <content type="html" xml:base="https://dev.chester.wykies.com/misc/rem/">&lt;ul&gt;
&lt;li&gt;I’m not about moving out of my comfort zone. I’d prefer expand it.&lt;&#x2F;li&gt;
&lt;li&gt;If you wouldn’t want anyone to see you do it, don’t do it.&lt;&#x2F;li&gt;
&lt;li&gt;If you wouldn’t want anyone to read it, don’t write it.&lt;&#x2F;li&gt;
&lt;li&gt;If you don’t want anyone to say you said it, don’t say it.&lt;&#x2F;li&gt;
&lt;li&gt;Do the best you that you can do because that’s the best you can do&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
</feed>
