<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/atom.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:fh="http://purl.org/syndication/history/1.0">
  <title>Posts tagged: cli Archive</title>
  <id>https://pype.dev/tags/cli/archive/atom.xml</id>
  <updated>2025-06-17T09:52:17Z</updated>
  <subtitle>All posts with the tag &#34;cli&#34;</subtitle>
  <link href="https://pype.dev/tags/cli/" rel="alternate" type="text/html"></link>
  <link href="https://pype.dev/tags/cli/archive/atom.xml" rel="self" type="application/atom+xml"></link>
  <link href="https://pype.dev/tags/cli/atom.xml" rel="current" type="application/atom+xml"></link>
  <author>
    <name>Nic Payne</name>
  </author>
  <generator uri="https://github.com/WaylonWalker/markata-go">markata-go</generator>
  <fh:complete></fh:complete>
  <entry>
    <title>source_up for nested .envrc</title>
    <id>https://pype.dev/source-up-for-nested-envrc/</id>
    <updated>2025-06-17T09:52:17Z</updated>
    <published>2025-06-17T09:52:17Z</published>
    <link href="https://pype.dev/source-up-for-nested-envrc/" rel="alternate" type="text/html"></link>
    <summary type="text">I have a use case for nesting directories with cascading .envrc files. and ran into an issue where the parent environment was being reset by the child...</summary>
    <content type="html">&lt;h1 id=&#34;tldr&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;TLDR&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;I have a use case for nesting directories with cascading .envrc files. and ran&#xA;into an issue where the parent environment was being reset by the child&#xA;environment. The fix is &lt;code&gt;source_up&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;context&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Context&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;I manage some infrastructure at home with a folder like this:&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;├── homelab&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   ├── .envrc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│   └── stack1&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;│       ├── .envrc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I do this so that the &amp;ldquo;homelab-wide&amp;rdquo; terraform variables can be exported with&#xA;&lt;code&gt;TF_VAR_the_variable&lt;/code&gt; in the &lt;code&gt;homelab/.envrc&lt;/code&gt; and then the stack specific&#xA;variables in &lt;code&gt;stack1/.envrc&lt;/code&gt; get exported like &lt;code&gt;TF_VAR_stack_specific_var&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For example, my cloudflare account id is needed in every stack, but the&#xA;cloudflare zone id is different per stack - so instead of copying the account&#xA;id var to every stack (however the vars are managed), I can set it in a parent&#xA;.envrc and share it in nested stack directories&lt;/p&gt;&#xA;&lt;h2 id=&#34;problem&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Problem&lt;/span&gt; &lt;a href=&#34;#problem&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;# homelab/.envrc&#xA;#!/bin/bash&#xA;export VAR_FOO=BAR&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So when I &lt;code&gt;cd homelab&lt;/code&gt; I get&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;nic in /tmp/homelab   (dev) 󰒄 󱔎 NO PYTHON ENVIORNMENT SET&#xA;⬢ [devbox] ❯ direnv allow&#xA;direnv: loading /tmp/homelab/.envrc&#xA;direnv: export +VAR_FOO&#xA;&#xA;nic in /tmp/homelab   (dev) 󰒄 󱔎 NO PYTHON ENVIORNMENT SET&#xA;⬢ [devbox] ❯ env | grep VAR&#xA;VAR_FOO=BAR&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;You can see &lt;code&gt;VAR_FOO&lt;/code&gt; is set&amp;hellip; but now I&amp;rsquo;ll &lt;code&gt;cd stack1&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;nic in /tmp/homelab   (dev) 󰒄 󱔎 NO PYTHON ENVIORNMENT SET&#xA;⬢ [devbox] ❯ cd stack1&#xA;direnv: error /tmp/homelab/stack1/.envrc is blocked. Run `direnv allow` to approve its content&#xA;&#xA;nic in /tmp/homelab/stack1   (dev) 󰒄 󱔎 NO PYTHON ENVIORNMENT SET&#xA;⬢ [devbox] ❯ direnv allow&#xA;direnv: loading /tmp/homelab/stack1/.envrc&#xA;direnv: export +VAR_BAZ&#xA;&#xA;nic in /tmp/homelab/stack1   (dev) 󰒄 󱔎 NO PYTHON ENVIORNMENT SET&#xA;⬢ [devbox] ❯ env | grep VAR&#xA;VAR_BAZ=BAM&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;As you can see &lt;code&gt;VAR_FOO&lt;/code&gt; was unset, and &lt;code&gt;VAR_BAZ&lt;/code&gt; is set&amp;hellip; so &lt;code&gt;homelab/.envrc&lt;/code&gt; was blown away!&lt;/p&gt;&#xA;&lt;h2 id=&#34;fix&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Fix&lt;/span&gt; &lt;a href=&#34;#fix&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Edit &lt;code&gt;stack1/.envrc&lt;/code&gt; with a &lt;code&gt;source_up&lt;/code&gt; command&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;# stack1/.envrc # NEW&#xA;#!/bin/bash&#xA;source_up  # source the parent environment&#xA;export VAR_BAZ=BAM&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;After the edit&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;nic in /tmp/homelab/stack1   (dev) 󰒄 󱔎 NO PYTHON ENVIORNMENT SET&#xA;⬢ [devbox] ❯ vim .envrc&#xA;direnv: error /tmp/homelab/stack1/.envrc is blocked. Run `direnv allow` to approve its content&#xA;&#xA;nic in /tmp/homelab/stack1   (dev) 󰒄 󱔎 NO PYTHON ENVIORNMENT SET  took 5s&#xA;⬢ [devbox] ❯ direnv allow&#xA;direnv: loading /tmp/homelab/stack1/.envrc&#xA;direnv: loading /tmp/homelab/.envrc&#xA;direnv: export +VAR_BAZ +VAR_FOO&#xA;&#xA;nic in /tmp/homelab/stack1   (dev) 󰒄 󱔎 NO PYTHON ENVIORNMENT SET&#xA;⬢ [devbox] ❯ env | grep VAR&#xA;VAR_FOO=BAR&#xA;VAR_BAZ=BAM&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Both vars are set!&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>I was wrecked by a weird combo of » and -e</title>
    <id>https://pype.dev/i-was-wrecked-by-a-weird-combo-of-and-e/</id>
    <updated>2025-04-23T08:44:59Z</updated>
    <published>2025-04-23T08:44:59Z</published>
    <link href="https://pype.dev/i-was-wrecked-by-a-weird-combo-of-and-e/" rel="alternate" type="text/html"></link>
    <summary type="text">If state matters then check it in the beginning or handle it on a failure... Let me explain</summary>
    <content type="html">&lt;h2 id=&#34;tl-dr&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;TL;DR&lt;/span&gt; &lt;a href=&#34;#tl-dr&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;If state matters then check it in the beginning or handle it on a failure&amp;hellip; Let me explain&lt;/p&gt;&#xA;&lt;p&gt;I ran into some trouble recently &lt;em&gt;almost&lt;/em&gt; losing some encrypted data&amp;hellip; Now&#xA;this would be the second time I&amp;rsquo;ve had that happen, so I&amp;rsquo;m going to write a&#xA;little bit about it now that I figured it out&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-stage&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;The Stage&lt;/span&gt; &lt;a href=&#34;#the-stage&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s the scenario - I use &lt;code&gt;ansible-vault&lt;/code&gt; to keep some sensitive data in a&#xA;few public repos, and I keep the keys I use in Bitwarden Secrets Manager.&lt;/p&gt;&#xA;&lt;p&gt;I use &lt;code&gt;just&lt;/code&gt; as a command runner and have common &lt;code&gt;just encrypt&lt;/code&gt; and &lt;code&gt;just decrypt&lt;/code&gt; recipes throughout many justfiles. It might look something like this&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;get-vault-key:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    bws secret get &lt;span class=&#34;nv&#34;&gt;$HOMELAB_BOT_VAULT_KEY_ID&lt;/span&gt;  &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; jq -r &lt;span class=&#34;s1&#34;&gt;&amp;#39;.value&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;encrypt:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;#!/bin/bash&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; +e&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    just get-vault-key &amp;gt; key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ansible-vault encrypt ./secret-file --vault-password-file key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ansible-vault encrypt ./secret-file2 --vault-password-file key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    rm key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;decrypt:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;#!/bin/bash&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; +e&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    just get-vault-key &amp;gt; key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ansible-vault decrypt ./secret-file --vault-password-file key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ansible-vault decrypt ./secret-file2 --vault-password-file key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    rm key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;spoiler&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Spoiler&lt;/span&gt; &lt;a href=&#34;#spoiler&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Above is a good example of the 2 recipes, but prior to this morning they looked like this&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;get-vault-key:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    bws secret get &lt;span class=&#34;nv&#34;&gt;$HOMELAB_BOT_VAULT_KEY_ID&lt;/span&gt;  &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; jq -r &lt;span class=&#34;s1&#34;&gt;&amp;#39;.value&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# BAD EXAMPLES! DO NOT DO THIS&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;encrypt:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; -e&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    just get-vault-key &amp;gt;&amp;gt; key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ansible-vault encrypt ./secret-file --vault-password-file key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ansible-vault encrypt ./secret-file2 --vault-password-file key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    rm key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;decrypt:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; -e&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    just get-vault-key &amp;gt;&amp;gt; key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ansible-vault decrypt ./secret-file --vault-password-file key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    ansible-vault decrypt ./secret-file2 --vault-password-file key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    rm key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;problem&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Problem&lt;/span&gt; &lt;a href=&#34;#problem&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;So here&amp;rsquo;s the story - in real life I started using distrobox when I ran into&#xA;this and I thought it was an issue with different versions of ansible installed&#xA;in distrobox and on my desktop. After a few more odd deployment workflows I&#xA;think I&amp;rsquo;ve determined that the real problem is that &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt; appends to a file (see&#xA;the issue yet?), but if my recipes fail (say I try to encrypt an already&#xA;encrypted file) then the command exits but what&amp;rsquo;s left on my disk? &lt;code&gt;key&lt;/code&gt; is&#xA;still there&amp;hellip; and the next time I go to run a command I&amp;rsquo;ll echo the real key&#xA;to the &lt;code&gt;key&lt;/code&gt; file again and if I called &lt;code&gt;encrypt&lt;/code&gt; when the first or more files&#xA;in the list were &lt;code&gt;decrypted&lt;/code&gt; then they&amp;rsquo;ll be encrypted not with my key, but&#xA;with my key repeated as many times as I ran a command with &lt;code&gt;just get-vault-key &amp;gt;&amp;gt; key&lt;/code&gt;&#xA;before ever removing the key file!&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×7 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ cat secret-file&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Danger, Will Robinson&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×7 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ just encrypt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bws secret get &lt;span class=&#34;nv&#34;&gt;$HOMELAB_BOT_VAULT_KEY_ID&lt;/span&gt;  &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; jq -r &lt;span class=&#34;s1&#34;&gt;&amp;#39;.value&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Encryption successful&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×7 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ cat secret-file&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;$ANSIBLE_VAULT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;1.1&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;AES256&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;39616332393662346639633030633766666336323939346138633238626239363733316431333737&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;6463663763366434376437303335643431663431326135300a636261663636336139323033316232&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;37666439383131393631333332353731633661396431633834326432363936613331623135666565&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;6364363039663933620a326563323931643632323031396664646363613636613562366166386439&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;63653661653037393538356461323239396630643338393231306163343964623866&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×7 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ just decrypt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bws secret get &lt;span class=&#34;nv&#34;&gt;$HOMELAB_BOT_VAULT_KEY_ID&lt;/span&gt;  &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; jq -r &lt;span class=&#34;s1&#34;&gt;&amp;#39;.value&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Decryption successful&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×7 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ cat secret-file&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Danger, Will Robinson&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So as you can see, I have &lt;code&gt;secret-file&lt;/code&gt; here, and I can encrypt and decrypt&#xA;just fine. But if I have that &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt; in the recipe, add a second file, and a&#xA;failure in a command - well then I&amp;rsquo;ll start getting confused&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;Follow along with the workflow of adding a file that I&amp;rsquo;ll need encrypted&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Only secret-file is in the just recipe here - I add secret-file2 after&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×7 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ just decrypt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bws secret get &lt;span class=&#34;nv&#34;&gt;$HOMELAB_BOT_VAULT_KEY_ID&lt;/span&gt;  &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; jq -r &lt;span class=&#34;s1&#34;&gt;&amp;#39;.value&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ERROR! input is not vault encrypted data. /var/home/nic/projects/personal/pype.dev/secret-file is not a vault encrypted file &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; /var/home/nic/projects/personal/pype.dev/secret-file&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;error: Recipe &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;decrypt&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt; failed with &lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt; code &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×8 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;✗ &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Good - secret-file is already decrypted! So lets add another file&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Good - secret-file is already decrypted! So lets add another file&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×7 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Foo Bar Bam Baz&amp;#34;&lt;/span&gt; &amp;gt; secret-file2                                    &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×8 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Added secret-file2 to my Just recipes&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Added secret-file2 to my Just recipes&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×8 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ just encrypt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bws secret get &lt;span class=&#34;nv&#34;&gt;$HOMELAB_BOT_VAULT_KEY_ID&lt;/span&gt;  &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; jq -r &lt;span class=&#34;s1&#34;&gt;&amp;#39;.value&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Encryption successful&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Encryption successful&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×7 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ just decrypt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bws secret get &lt;span class=&#34;nv&#34;&gt;$HOMELAB_BOT_VAULT_KEY_ID&lt;/span&gt;  &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; jq -r &lt;span class=&#34;s1&#34;&gt;&amp;#39;.value&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ERROR! Decryption failed &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;no vault secrets were found that could decrypt&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; on /var/home/nic/projects/personal/pype.dev/secret-file &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; /var/home/nic/projects/personal/pype.dev/secret-file&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;error: Recipe &lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;decrypt&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt; failed with &lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt; code &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;nic in pype.dev   main   ×2  ×3  ×8 via   v3.11.10&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype-dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;   &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; 󰒄 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;✗ &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Oh no!&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So what happened?&lt;/p&gt;&#xA;&lt;p&gt;Recall that my recipes originally had &lt;code&gt;set -e&lt;/code&gt; at the top and used &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt; to cat&#xA;my secret to a file &lt;code&gt;key&lt;/code&gt;. Well, when the fir| decryption recipe failed the&#xA;&lt;code&gt;key&lt;/code&gt; file was left behind. Then when I went to encrypt both of my files the&#xA;recipe got the key again and made a keyfile like this:&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;secretKey&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;secretKey&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The encryption recipe encrypted the files with this key, removed the key file,&#xA;and then the next decryption recipe failed because when it got the key and made&#xA;the file it looked like&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;secretKey&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So the solution in the end is to remake the &lt;code&gt;key&lt;/code&gt; file every time (&lt;code&gt;&amp;gt;&lt;/code&gt; instead&#xA;of &lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt;), or check if it exists, or handle the error when the recipe fails, or&#xA;just keep going (&lt;code&gt;set +e&lt;/code&gt;)&lt;/p&gt;&#xA;&lt;h2 id=&#34;fin&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Fin&lt;/span&gt; &lt;a href=&#34;#fin&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;And that&amp;rsquo;s how I lost some secrets in my homelab once, and how I almost lost a&#xA;second time if I hadn&amp;rsquo;t noticed the &lt;code&gt;key&lt;/code&gt; file in my file tree&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Monolith - download and save site as html</title>
    <id>https://pype.dev/monolith-download-and-save-site-as-html/</id>
    <updated>2025-03-16T16:03:31Z</updated>
    <published>2025-03-16T16:03:31Z</published>
    <link href="https://pype.dev/monolith-download-and-save-site-as-html/" rel="alternate" type="text/html"></link>
    <summary type="text">I needed to save a website earlier and this was just what I needed...</summary>
    <content type="html">&lt;h2 id=&#34;til-monolith&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;TIL: Monolith&lt;/span&gt; &lt;a href=&#34;#til-monolith&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I needed to save a website earlier and this was just what I needed&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/Y2Z/monolith&#34;&gt;https://github.com/Y2Z/monolith&lt;/a&gt;&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>rsync like a pro</title>
    <id>https://pype.dev/rsync-like-a-pro/</id>
    <updated>2024-12-11T10:52:23Z</updated>
    <published>2024-12-11T10:52:23Z</published>
    <link href="https://pype.dev/rsync-like-a-pro/" rel="alternate" type="text/html"></link>
    <summary type="text">I am moving a hefty amount of data to a new ZFS pool due to some corruption and I want to avoid using for this just to make sure I don&#39;t propagate any...</summary>
    <content type="html">&lt;p&gt;I am moving a hefty amount of data to a new ZFS pool due to some corruption and I want to avoid using &lt;code&gt;zfs send/recv&lt;/code&gt; for this just to make sure I don&amp;rsquo;t propagate any corrupted data to my new pool.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve used &lt;code&gt;rsync&lt;/code&gt; for simple things before but I needed this to be a little smarter and I wanted to see simple progress without flooding my terminal with a billion filenames.&lt;/p&gt;&#xA;&lt;h2 id=&#34;tldr&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;TLDR&lt;/span&gt; &lt;a href=&#34;#tldr&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;TLDR:&#xA;&lt;code&gt;rsync -aHAX --chmod=Da+s --info=progress2 --inplace --exclude=&#39;encrypted/docker/frigate-media&#39; /tank/ /harbor/&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;explanation&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Explanation&lt;/span&gt; &lt;a href=&#34;#explanation&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;-aHAX: Preserves attributes (archive mode, hard links, ACLs, extended attributes).&#xA;&amp;ndash;chmod=Da+s: Ensures the setgid bit is applied to directories.&#xA;&amp;ndash;info=progress2: Provides detailed progress information, including overall data transfer stats.&#xA;&amp;ndash;inplace: Writes directly to the destination file, avoiding temporary files (useful for large files).&#xA;&amp;ndash;exclude=&amp;lsquo;encrypted/&lt;a href=&#34;/docker/&#34; class=&#34;glossary-term&#34; title=&#34;docker - container runtime&#34; data-hover-title=&#34;docker&#34;&gt;docker&lt;/a&gt;/frigate-media&amp;rsquo;: Excludes the specified path (relative to the /tank root).&#xA;/tank/ /harbor/: Ensures the contents of /tank are copied directly into /harbor.&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>hostnamectl to easily change hostname</title>
    <id>https://pype.dev/hostnamectl-to-easily-change-hostname/</id>
    <updated>2024-12-06T07:25:59Z</updated>
    <published>2024-12-06T07:25:59Z</published>
    <link href="https://pype.dev/hostnamectl-to-easily-change-hostname/" rel="alternate" type="text/html"></link>
    <summary type="text">hostnamectl is apparently a linux utility for easily changing your hostname in a variety of ways</summary>
    <content type="html">&lt;p&gt;hostnamectl is apparently a linux utility for easily changing your hostname in a variety of ways&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ hostnamectl --help&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;hostnamectl &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;OPTIONS...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; COMMAND ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Query or change system hostname.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Commands:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  status                 Show current hostname settings&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  hostname &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;NAME&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;        Get/set system hostname&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  icon-name &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;NAME&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;       Get/set icon name &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; host&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  chassis &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;NAME&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;         Get/set chassis &lt;span class=&#34;nb&#34;&gt;type&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; host&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  deployment &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;NAME&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;      Get/set deployment environment &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; host&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  location &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;NAME&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;        Get/set location &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; host&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Options:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -h --help              Show this &lt;span class=&#34;nb&#34;&gt;help&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     --version           Show package version&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     --no-ask-password   Do not prompt &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; password&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H --host&lt;span class=&#34;o&#34;&gt;=[&lt;/span&gt;USER@&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;HOST  Operate on remote host&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -M --machine&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;CONTAINER Operate on &lt;span class=&#34;nb&#34;&gt;local&lt;/span&gt; container&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     --transient         Only &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; transient hostname&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     --static            Only &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; static hostname&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     --pretty            Only &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; pretty hostname&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     --json&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;pretty&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;short&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;off&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                         Generate JSON output&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;See the hostnamectl&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; man page &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; details.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I learned there&amp;rsquo;s transient and static hostnames, so that&amp;rsquo;s cool&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;The thing I needed was &lt;code&gt;hostnamectl --static hostname babyblue-aurora&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;pretty sweet tool&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Restart KDE Plasma</title>
    <id>https://pype.dev/restart-kde-plasma/</id>
    <updated>2024-11-08T15:53:52Z</updated>
    <published>2024-11-08T15:53:52Z</published>
    <link href="https://pype.dev/restart-kde-plasma/" rel="alternate" type="text/html"></link>
    <summary type="text">Plasma shits the bed a little too often on Fedora for me right now but I finally have a quick fix...</summary>
    <content type="html">&lt;p&gt;Plasma shits the bed a little too often on Fedora for me right now but I finally have a quick fix&amp;hellip;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;&#xA;sudo killall plasmashell&#xA;&#xA;kstart plasmashell&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Customize K9s</title>
    <id>https://pype.dev/customize-k9s/</id>
    <updated>2024-05-06T11:57:07Z</updated>
    <published>2024-05-06T11:57:07Z</published>
    <link href="https://pype.dev/customize-k9s/" rel="alternate" type="text/html"></link>
    <summary type="text">To customize k9s use the skins from catppuccin or the ones k9s supplies</summary>
    <content type="html">&lt;p&gt;To customize k9s use the skins from catppuccin or the ones k9s supplies&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;OUT&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;XDG_CONFIG_HOME&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;:-&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$HOME&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;/.config&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;/k9s/skins&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mkdir -p &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OUT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl -L https://github.com/catppuccin/k9s/archive/main.tar.gz &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; tar xz -C &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OUT&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; --strip-components&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt; k9s-main/dist&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then edit your k9s config&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;# ~/.config/k9s/config.yml&#xA;k9s:&#xA;  ui:&#xA;    skin: catppuccin-mocha&#xA;    # ...or another flavor:&#xA;    # skin: catppuccin-macchiato&#xA;    # skin: catppuccin-frappe&#xA;    # skin: catppuccin-latte&#xA;&#xA;    # ...or the transparent variants:&#xA;    # skin: catppuccin-mocha-transparent&#xA;    # skin: catppuccin-macchiato-transparent&#xA;    # skin: catppuccin-frappe-transparent&#xA;    # skin: catppuccin-latte-transparent&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Other k9s skins are available &lt;a href=&#34;https://github.com/derailed/k9s/tree/master/skins&#34;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Git fetch failing - check your config</title>
    <id>https://pype.dev/git-fetch-failing-check-your-config/</id>
    <updated>2024-04-18T08:32:33Z</updated>
    <published>2024-04-18T08:32:33Z</published>
    <link href="https://pype.dev/git-fetch-failing-check-your-config/" rel="alternate" type="text/html"></link>
    <summary type="text">I started deploying a website to Cloudflare on a branch called . Similar to one of the GH Pages deployment patterns. But when my CI was pushing the branch I...</summary>
    <content type="html">&lt;p&gt;I started deploying a website to Cloudflare on a branch called &lt;code&gt;pages&lt;/code&gt;. Similar to one of the GH Pages deployment patterns. But when my CI was pushing the branch I couldn&amp;rsquo;t see it locally&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;git fetch -a&lt;/code&gt; wasn&amp;rsquo;t pulling any new branches, and &lt;code&gt;git branch -a&lt;/code&gt; was only showing my development and main branches at the remote&amp;hellip; so what gives?&lt;/p&gt;&#xA;&lt;p&gt;I checked my git config, and to this moment I have no idea how this happened but check out my fetch config:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git config --get remote.origin.fetch&#xA;+refs/tags/*:refs/tags/*&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So to fix this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;git config remote.origin.fetch &#39;+refs/heads/*:refs/remotes/origin/*&#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Now &lt;code&gt;git fetch -a&lt;/code&gt; works again&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;gt; git fetch -a&#xA;&#xA;From github.com:DigitalHarbor7/DigitalHarbor&#xA;   357a28a..969b027  develop    -&amp;gt; origin/develop&#xA;   c052ac9..6d40210  main       -&amp;gt; origin/main&#xA; * [new branch]      pages      -&amp;gt; origin/pages&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Git repo specific SSH Key!</title>
    <id>https://pype.dev/git-repo-specific-ssh-key/</id>
    <updated>2024-01-04T15:42:15Z</updated>
    <published>2024-01-04T15:42:15Z</published>
    <link href="https://pype.dev/git-repo-specific-ssh-key/" rel="alternate" type="text/html"></link>
    <summary type="text">git config --add --local core.sshCommand &#39;ssh -i &gt;&gt;&#39;</summary>
    <content type="html">&lt;p&gt;git config &amp;ndash;add &amp;ndash;local core.sshCommand &amp;lsquo;ssh -i &amp;laquo;&amp;lt;PATH_TO_SSH_KEY&amp;raquo;&amp;gt;&amp;rsquo;&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Convert Word Doc to PDF with Headless Libreoffice</title>
    <id>https://pype.dev/convert-word-doc-to-pdf-with-headless-libreoffice/</id>
    <updated>2023-03-09T06:48:38Z</updated>
    <published>2023-03-09T06:48:38Z</published>
    <link href="https://pype.dev/convert-word-doc-to-pdf-with-headless-libreoffice/" rel="alternate" type="text/html"></link>
    <summary type="text">I&#39;ve been using paperless-ngx to manage all my documents, but every once in a while I&#39;ll get a file to deal with...</summary>
    <content type="html">&lt;p&gt;I&amp;rsquo;ve been using paperless-ngx to manage all my documents, but every once in a while I&amp;rsquo;ll get a &lt;code&gt;.docx&lt;/code&gt; file to deal with&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;Turns out Libreoffice has a headless mode a &lt;code&gt;pdf&lt;/code&gt; converter built-in!&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;libreoffice --headless --convert-to pdf /path/to/file.docx --outdir /path/to/output/directory&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;blockquote&gt;&#xA;&lt;p&gt;Note that &lt;code&gt;--outdir&lt;/code&gt; is in fact a directory, not the path to a file&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>FFMPEG 10-bit videos to 8-bit</title>
    <id>https://pype.dev/ffmpeg-10-bit-videos-to-8-bit/</id>
    <updated>2023-01-16T13:15:53Z</updated>
    <published>2023-01-16T13:15:53Z</published>
    <link href="https://pype.dev/ffmpeg-10-bit-videos-to-8-bit/" rel="alternate" type="text/html"></link>
    <content type="html">&lt;p&gt;&lt;code&gt;ffmpeg -i input.mp4 -map 0 -c:v libx264 -vf format=yuv420p -c:a copy output.mp4&lt;/code&gt;&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Use non-standard named ssh keys with github</title>
    <id>https://pype.dev/use-non-standard-named-ssh-keys-with-github/</id>
    <updated>2023-01-03T08:34:50Z</updated>
    <published>2023-01-03T08:34:50Z</published>
    <link href="https://pype.dev/use-non-standard-named-ssh-keys-with-github/" rel="alternate" type="text/html"></link>
    <summary type="text">I was getting when trying to push to GH using ssh. When I tested the connection I saw that a bunch of keys in ``~/.ssh/ were being attempted</summary>
    <content type="html">&lt;p&gt;I was getting &lt;code&gt;(publickey denied)&lt;/code&gt; when trying to push to GH using ssh. When I&#xA;tested the connection I saw that a bunch of keys in ``~/.ssh/ were being&#xA;attempted&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;✗ ssh git@github.com -vv&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;debug1: Will attempt key: /home/nic/.ssh/id_rsa &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;debug1: Will attempt key: /home/nic/.ssh/id_ecdsa &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;debug1: Will attempt key: /home/nic/.ssh/id_ecdsa_sk &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;debug1: Will attempt key: /home/nic/.ssh/id_ed25519 &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;debug1: Will attempt key: /home/nic/.ssh/id_ed25519_sk &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;debug1: Will attempt key: /home/nic/.ssh/id_xmss &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;debug1: Will attempt key: /home/nic/.ssh/id_dsa &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;debug1: No more authentication methods to try.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;git@github.com: Permission denied (publickey).&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;None of those were the key I setup with GH. So I added an entry&#xA;into &lt;code&gt;~/.ssh/config&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Host&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;github.com&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;User git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Port 22&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Hostname github.com&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;IdentityFile ~/.ssh/my_custom_github_key&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;TCPKeepAlive yes&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;IdentitiesOnly yes &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Modal Labs</title>
    <id>https://pype.dev/modal-labs/</id>
    <updated>2022-12-28T21:01:52Z</updated>
    <published>2022-12-28T21:01:52Z</published>
    <link href="https://pype.dev/modal-labs/" rel="alternate" type="text/html"></link>
    <summary type="text">Playing around with Modal Labs</summary>
    <content type="html">&lt;p&gt;Playing around with Modal Labs&lt;/p&gt;&#xA;&lt;p&gt;One of the first things I tried was a regular cron job&amp;hellip;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nd&#34;&gt;@stub.function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;schedule&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;modal&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Period&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;minutes&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;59&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;secret&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;modal&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Secret&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;from_name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;my-dummy-secret&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;say_hi&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;():&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;now&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;time&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ctime&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;secret&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;os&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;environ&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;dummy-secret&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;print&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sa&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Hello &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;os&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;environ&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;USER&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;Rodney&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; at &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;now&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;print&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sa&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;secret&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;=}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This can get deployed with &lt;code&gt;modal deploy --name &amp;lt;app name&amp;gt; &amp;lt;path to .py file with the stub and function defined in it&amp;gt; &lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;This function gets deployed as an app that I conveniently call &lt;code&gt;say_hi&lt;/code&gt; (as far&#xA;as I can tell the app name can be anything - as I add functions to this same&#xA;app and deploy with the same name to get a new version)&lt;/p&gt;&#xA;&lt;p&gt;Notice that this also is an example of giving access to a secret - defined in the Modal Labs dashboard&lt;/p&gt;&#xA;&lt;p&gt;We can take a look at the apps running at &lt;a href=&#34;https://modal.com/apps&#34;&gt;https://modal.com/apps&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I then added another function to experiment with custom container images and&#xA;saw then that Modal will just slap a new version on anything provisioned with&#xA;the same name (intuitive enough for sure) so when I add functions to my .py&#xA;script and run &lt;code&gt;modal deploy --name say_hi myscript.py&lt;/code&gt; over and over, the app&#xA;called &lt;code&gt;say_hi&lt;/code&gt; in the Modal apps dashboard just gets a new version&lt;/p&gt;&#xA;&lt;p&gt;This means I can spin up several instances of functionally the same app but with different names/versions etc&amp;hellip;&#xA;Q: Maybe there&amp;rsquo;s gitops or policy stuff builtin to app names then?&lt;/p&gt;&#xA;&lt;p&gt;I needed to take down an app I deployed as a duplicate but you don&amp;rsquo;t stop apps&#xA;by name, you stop them by an id&amp;hellip; see below&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;modal-sandbox/modal_sandbox   main   ×1  ×9 via   v3.10.6(modal-sandbox)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;✗ modal app stop --help&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt; Usage: modal app stop [OPTIONS] APP_ID&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt; Stop an app.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;│ *    app_id      TEXT  [default: None] [required]                                                                                                │&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;│ --help          Show this message and exit.                                                                                                      │&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;modal-sandbox/modal_sandbox   main   ×1  ×9 via   v3.10.6(modal-sandbox)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;❯ modal app list&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;┃ App ID                    ┃ Description         ┃ State    ┃ Creation time             ┃ Stop time                 ┃&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━┩&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;│ ap-lzy1AAuVy7POFkUcDKRxpQ │ print_info          │ deployed │ 2022-12-28 20:59:07-06:00 │                           │&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;│ ap-qYjE45dciqgT3C3CpNp3RL │ say_hi              │ deployed │ 2022-12-28 19:49:22-06:00 │                           │&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;│ ap-X7FYneUeYV5IKHcyirSb87 │ link-scraper        │ stopped  │ 2022-12-28 15:39:02-06:00 │ 2022-12-28 15:39:04-06:00 │&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;│ ap-UOXTUU4uSRx2UZypJOcAsk │ example-get-started │ stopped  │ 2022-12-28 15:17:47-06:00 │ 2022-12-28 15:17:49-06:00 │&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;└───────────────────────────┴─────────────────────┴──────────┴───────────────────────────┴───────────────────────────┘&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;modal-sandbox/modal_sandbox   main   ×1  ×9 via   v3.10.6(modal-sandbox)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;❯ modal app stop ap-lzy1AAuVy7POFkUcDKRxpQ&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h1 id=&#34;git-warning&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Git warning!&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;I ran &lt;code&gt;modal deploy ...&lt;/code&gt; after comitting some stuff I wanted to try BUT I had&#xA;changes in my file I didn&amp;rsquo;t want to deploy&amp;hellip; some git safety would be nice for&#xA;deployment!&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;git stash &amp;amp;&amp;amp; modal deploy .. &amp;amp;&amp;amp; git stash pop&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Question for Modal team - in my modal sandbox repo at commit:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;aab6162 (HEAD -&amp;gt; main) HEAD@{1}: commit: print base version of my own image to prove it to me&#xA; 1 file changed, 2 insertions(+)&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;An environment variable, &lt;code&gt;BASE_VERSION&lt;/code&gt; that I expect to be in my base image&#xA;was not available to the python function in my Modal app&amp;hellip; hopefully the log&#xA;is still&#xA;&lt;a href=&#34;https://modal.com/logs/ap-qYjE45dciqgT3C3CpNp3RL?functionId=fu-rOt31ShRE1W1CQfuf02fsq&amp;amp;taskId=ta-dm8BfiblvFLwVIQyt75YC2&amp;amp;inputId=in-n64klEFrLtbcm2BiykJEvW&#34;&gt;here&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;github-actions&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;GitHub Actions&lt;/span&gt; &lt;a href=&#34;#github-actions&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I think it&amp;rsquo;d be easy to deploy from GH actions&amp;hellip; just need an API Key&amp;hellip;&lt;/p&gt;&#xA;&lt;h1 id=&#34;deployment&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Deployment&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;Without gitops it&amp;rsquo;s already ahrd to manage my versions&amp;hellip; need to get that built in either to github or locally sooooon&lt;/p&gt;&#xA;&lt;p&gt;Nomad?? :D&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Pipe to a pager to preserve console output in SSH session</title>
    <id>https://pype.dev/pipe-to-a-pager-to-preserve-console-output-in-ssh-session/</id>
    <updated>2022-12-18T15:04:02Z</updated>
    <published>2022-12-18T15:04:02Z</published>
    <link href="https://pype.dev/pipe-to-a-pager-to-preserve-console-output-in-ssh-session/" rel="alternate" type="text/html"></link>
    <summary type="text">I&#39;m playing with my ansible playbook in a remote tmux session, and I&#39;m no wiz so I don&#39;t know the ins and outs, but I can&#39;t scroll up to get any console log...</summary>
    <content type="html">&lt;p&gt;I&amp;rsquo;m playing with my ansible playbook in a remote tmux session, and I&amp;rsquo;m no wiz&#xA;so I don&amp;rsquo;t know the ins and outs, but I can&amp;rsquo;t scroll up to get any console log&#xA;output that&amp;rsquo;s not already visible on my screen. So I&amp;rsquo;m starting to end my&#xA;commands with &lt;code&gt; | less&lt;/code&gt; so I can page through the console output!&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;ansible-playbook plays.yml -v --tags mytag | less&lt;/code&gt;&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Call basicConfig to get Python log messages in iPython</title>
    <id>https://pype.dev/call-basicconfig-to-get-python-log-messages-in-ipython/</id>
    <updated>2022-12-10T14:04:23Z</updated>
    <published>2022-12-10T14:04:23Z</published>
    <link href="https://pype.dev/call-basicconfig-to-get-python-log-messages-in-ipython/" rel="alternate" type="text/html"></link>
    <summary type="text">I am trying to adopt instead of but ran into a confusing thing in ipython during Advent of Code... I riddled by script with (yes after setting ) but in...</summary>
    <content type="html">&lt;h1 id=&#34;logging-instead-of-printing&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Logging instead of printing&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;I am trying to adopt &lt;code&gt;logger.debug&lt;/code&gt; instead of &lt;code&gt;print&lt;/code&gt; but ran into a confusing&#xA;thing in ipython during Advent of Code&amp;hellip; I riddled by script with&#xA;&lt;code&gt;logger.debug&lt;/code&gt; (yes after setting &lt;code&gt;logging.setLevel(&#39;DEBUG&#39;)&lt;/code&gt;) but in ipython&#xA;none of my log messages showed up!&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;logging&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;logger&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;logging&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;getLogger&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;vm&#34;&gt;__name__&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;logger&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;setLevel&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;DEBUG&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Turns out what I was missing was a call to &lt;code&gt;basicConfig&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;logging&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# forget this and your messages are in the ether! or at least not seen in ipython...&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;logging&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;basicConfig&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;logger&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;logging&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;getLogger&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;vm&#34;&gt;__name__&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;logger&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;setLevel&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;DEBUG&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h1 id=&#34;bonus&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Bonus&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;Want your new messages to show up while iterating on something without killing&#xA;the ipython kernel?&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;importlib&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;reload&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;reload&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;logging&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;# to make sure you get new log messages you add while developing!&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Make a series of directories fast!</title>
    <id>https://pype.dev/make-a-series-of-directories-fast/</id>
    <updated>2022-11-10T15:27:50Z</updated>
    <published>2022-11-10T15:27:50Z</published>
    <link href="https://pype.dev/make-a-series-of-directories-fast/" rel="alternate" type="text/html"></link>
    <summary type="text">mkdir s{1..10} will make directories s1, s2, ... s10 in one command!</summary>
    <content type="html">&lt;p&gt;mkdir s{1..10} will make directories s1, s2, &amp;hellip; s10 in one command!&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Limit zfs list to avoid docker vomit</title>
    <id>https://pype.dev/limit-zfs-list-to-avoid-docker-vomit/</id>
    <updated>2022-10-20T06:39:18Z</updated>
    <published>2022-10-20T06:39:18Z</published>
    <link href="https://pype.dev/limit-zfs-list-to-avoid-docker-vomit/" rel="alternate" type="text/html"></link>
    <summary type="text">zfs list has a flag -r, but if you use zfs driver for docker then you&#39;ll get flooded with every docker volume in the world. zfs list -r -d N will limit the...</summary>
    <content type="html">&lt;p&gt;zfs list has a flag -r, but if you use zfs driver for &lt;a href=&#34;/docker/&#34; class=&#34;glossary-term&#34; title=&#34;docker - container runtime&#34; data-hover-title=&#34;docker&#34;&gt;docker&lt;/a&gt; then you&amp;rsquo;ll get&#xA;flooded with every docker volume in the world. zfs list -r -d N will limit the&#xA;dept of the print out, so zfs list -r -d 2 gives me tank, tank/encrypted,&#xA;tank/encrypted/docker -&amp;gt; but then I don&amp;rsquo;t see all the continer volumes&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Use the right lspsage, you dope!</title>
    <id>https://pype.dev/use-the-right-lspsage-you-dope/</id>
    <updated>2022-10-14T19:41:44Z</updated>
    <published>2022-10-14T19:41:44Z</published>
    <link href="https://pype.dev/use-the-right-lspsage-you-dope/" rel="alternate" type="text/html"></link>
    <summary type="text">If you think glepnir/lspsaga.nvim config will work with tali5/lspsaga.nvim installed... you&#39;re in for a rude awakening. Double check your forks folks!</summary>
    <content type="html">&lt;p&gt;If you think glepnir/lspsaga.nvim config will work with tali5/lspsaga.nvim installed&amp;hellip; you&amp;rsquo;re in for a rude awakening. Double check your forks folks!&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Suddenly SSH requires a password</title>
    <id>https://pype.dev/suddenly-ssh-requires-a-password/</id>
    <updated>2022-10-07T11:14:37Z</updated>
    <published>2022-10-07T11:14:37Z</published>
    <link href="https://pype.dev/suddenly-ssh-requires-a-password/" rel="alternate" type="text/html"></link>
    <summary type="text">ssh -v -i ~/.ssh/id_rsa nic@hogwarts</summary>
    <content type="html">&lt;p&gt;ssh -v -i ~/.ssh/id_rsa nic@hogwarts&lt;/p&gt;&#xA;&lt;p&gt;THen we can look at print outs&lt;/p&gt;&#xA;&lt;p&gt;cat /var/log/auth.log  also showed me that I had too wide permissions on files in ~/.ssh -&amp;gt; probably changed from an rsync job&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Check Your BIOS Version On Ubuntu</title>
    <id>https://pype.dev/check-your-bios-version-on-ubuntu/</id>
    <updated>2022-10-02T18:21:58Z</updated>
    <published>2022-10-02T18:21:58Z</published>
    <link href="https://pype.dev/check-your-bios-version-on-ubuntu/" rel="alternate" type="text/html"></link>
    <summary type="text">sudo dmidecode -s bios-version</summary>
    <content type="html">&lt;p&gt;sudo dmidecode -s bios-version&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Destroying Tmux sessions with fzf</title>
    <id>https://pype.dev/destroying-tmux-sessions-with-fzf/</id>
    <updated>2022-09-15T10:27:58Z</updated>
    <published>2022-09-15T10:27:58Z</published>
    <link href="https://pype.dev/destroying-tmux-sessions-with-fzf/" rel="alternate" type="text/html"></link>
    <summary type="text">I use Tmux and Vim for most of my workflow, but I end up with a lot of dangling tmux sessions that dont&#39; really need to persist... but killing them one at a...</summary>
    <content type="html">&lt;p&gt;I use Tmux and Vim for most of my workflow, but I end up with a lot of dangling&#xA;tmux sessions that dont&amp;rsquo; really need to persist&amp;hellip; but killing them one at a&#xA;time is a pain so I wrote a little script-kitty nonsense to pipe multiple&#xA;choices from fzf into &lt;code&gt;tmux kill-session&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;I defined a little function in my &lt;code&gt;.zshrc&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;destroy&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    tmux list-sessions -F &lt;span class=&#34;s1&#34;&gt;&amp;#39;#{session_name}&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; fzf -m &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; xargs -d &lt;span class=&#34;s1&#34;&gt;$&amp;#39;\n&amp;#39;&lt;/span&gt; sh -c &lt;span class=&#34;s1&#34;&gt;&amp;#39;echo &amp;#34;killing $0&amp;#34;; tmux kill-session -t &amp;#34;$0&amp;#34;; for arg;do echo &amp;#34;killing $arg&amp;#34;;tmux kill-session -t &amp;#34;$arg&amp;#34;; done&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bindkey -s &lt;span class=&#34;s1&#34;&gt;&amp;#39;^d&amp;#39;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;destroy \n&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;tmux list-sessions -F &#39;#{session_name}&#39; &lt;/code&gt; prints all my active tmux sessions to the console with the format of just their name&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pype.dev   main   ×1 via   v3.8.11&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;pype.dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  on  &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;us-east-1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; proxy&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯ tmux list-sessions -F &lt;span class=&#34;s1&#34;&gt;&amp;#39;#{session_name}&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;session-01&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;session-02&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;session-03&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Pipe that to &lt;code&gt;fzf -m&lt;/code&gt; to allow multiple choices to be made using tab&lt;/p&gt;&#xA;&lt;p&gt;Then the nasty bit in &lt;code&gt;xargs&lt;/code&gt;&amp;hellip; I echo &lt;code&gt;killing @0&lt;/code&gt; and &lt;code&gt;killing $arg&lt;/code&gt; because the &lt;code&gt;sh -c&lt;/code&gt; passes the first tmux session name to &lt;code&gt;@0&lt;/code&gt; (it&amp;rsquo;s just what bash does) and then the rest get handled in the for loop.&lt;/p&gt;&#xA;&lt;p&gt;Basically then I get an fzf list to choose multiple tmux sessions to destroy to clean up some RAM!&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Trick to login to web server on another box on lan</title>
    <id>https://pype.dev/trick-to-login-to-web-server-on-another-box-on-lan/</id>
    <updated>2022-09-12T18:48:45Z</updated>
    <published>2022-09-12T18:48:45Z</published>
    <link href="https://pype.dev/trick-to-login-to-web-server-on-another-box-on-lan/" rel="alternate" type="text/html"></link>
    <summary type="text">TODO: change title - add --listen or --host or something as 0.0.0.0... that way it listens not on localhost or 127.0.0.1, but on all addresses!</summary>
    <content type="html">&lt;p&gt;TODO: change title - add &amp;ndash;listen or &amp;ndash;host or something as 0.0.0.0&amp;hellip; that way it listens not on localhost or 127.0.0.1, but on all addresses!&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Check your SMART status with smartctl</title>
    <id>https://pype.dev/check-your-smart-status-with-smartctl/</id>
    <updated>2022-08-29T06:30:27Z</updated>
    <published>2022-08-29T06:30:27Z</published>
    <link href="https://pype.dev/check-your-smart-status-with-smartctl/" rel="alternate" type="text/html"></link>
    <summary type="text">https://www.simplified.guide/linux/disk-health-check</summary>
    <content type="html">&lt;p&gt;&lt;a href=&#34;https://www.simplified.guide/linux/disk-health-check&#34;&gt;https://www.simplified.guide/linux/disk-health-check&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;install&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Install&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;For ubuntu/debian based distros (which is what I primarly use presently)&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;sudo apt update -y &amp;amp;&amp;amp; sudo apt install smartmontools -y&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;list-hard-drives&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;List hard drives&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;lsblk | grep disk&lt;/code&gt; is one way or &lt;code&gt;sudo lshw -c disk&lt;/code&gt; is another&lt;/p&gt;&#xA;&lt;h1 id=&#34;smartctl&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;smartctl&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;Use a device&amp;rsquo;s logical name such as &lt;code&gt;dev/sda&lt;/code&gt;, not a partition of the disk&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;sudo smartctl -t short /dev/sda&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;dotfiles   home   ×3  ×2  ×2 via   v3.10.6(dotfiles)  took 11s&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;❯ sudo smartctl -t short /dev/sda&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.15.0-48-generic] (local build)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;Sending command: &amp;#34;Execute SMART Short self-test routine immediately in off-line mode&amp;#34;.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;Drive command &amp;#34;Execute SMART Short self-test routine immediately in off-line mode&amp;#34; successful.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;Testing has begun.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;Please wait 2 minutes for test to complete.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;Test will complete after Fri Sep 23 05:59:39 2022 CDT&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;Use smartctl -X to abort test.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h1 id=&#34;check-status&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;check status&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;sudo smartctl -H /dev/sda&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;dotfiles   home   ×3  ×2  ×2 via   v3.10.6(dotfiles)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;❯ sudo smartctl -H /dev/sda&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.15.0-48-generic] (local build)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;=== START OF READ SMART DATA SECTION ===&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;SMART overall-health self-assessment test result: PASSED&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>ZFS Permissions for Sanoid/Syncoid</title>
    <id>https://pype.dev/zfs-permissions-for-sanoid/</id>
    <updated>2022-07-08T15:54:58Z</updated>
    <published>2022-07-08T15:54:58Z</published>
    <link href="https://pype.dev/zfs-permissions-for-sanoid/" rel="alternate" type="text/html"></link>
    <content type="html">&lt;p&gt;&lt;code&gt;zfs allow -u $USER clone,load-key,create,destroy,mount,mountpoint,receive,send,rollback,compression,snapshot,hold,keylocation,bookmark tank&lt;/code&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;load-key only needed if using encrypted datasets&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>cheat on your man</title>
    <id>https://pype.dev/cheat-on-your-man/</id>
    <updated>2022-06-23T09:35:31Z</updated>
    <published>2022-06-23T09:35:31Z</published>
    <link href="https://pype.dev/cheat-on-your-man/" rel="alternate" type="text/html"></link>
    <summary type="text">can be a pain to read... and there&#39;s lots of alternatives out there and one I&#39;ve just started playing with is cheat</summary>
    <content type="html">&lt;p&gt;&lt;code&gt;man&lt;/code&gt; can be a pain to read&amp;hellip; and there&amp;rsquo;s lots of alternatives out there and one I&amp;rsquo;ve just started playing with is &lt;a href=&#34;https://github.com/cheat/cheat&#34;&gt;cheat&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;man man&lt;/code&gt; will give you this plus a billion more lines of docs, which is useful when you need it&amp;hellip;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;MAN&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;                                                                                                                       Manual pager utils                                                                                                                      MAN&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;1&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;NAME&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man - an interface to the on-line reference manuals&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;SYNOPSIS&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man  &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-C  file&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;  &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-d&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;--warnings&lt;span class=&#34;o&#34;&gt;[=&lt;/span&gt;warnings&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-R encoding&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-L locale&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-m system&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;,...&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-M path&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-S list&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-e extension&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-i&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;-I&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;--regex&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;--wildcard&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;--names-only&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-a&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-u&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;--no-subpages&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-P pager&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-r prompt&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-7&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-E encoding&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;--no-hyphenation&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;--no-justification&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-p string&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-t&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-T&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;device&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-H&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;browser&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-X&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;dpi&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-Z&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt;section&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; page&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;.section&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; ...&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man -k &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;apropos options&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; regexp ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man -K &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-w&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;-W&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-S list&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-i&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;-I&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;--regex&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;section&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; term ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man -f &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;whatis options&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; page ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man -l &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-C file&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-d&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;--warnings&lt;span class=&#34;o&#34;&gt;[=&lt;/span&gt;warnings&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-R encoding&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-L locale&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-P pager&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-r prompt&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-7&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-E encoding&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-p string&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-t&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-T&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;device&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-H&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;browser&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-X&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;dpi&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-Z&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; file ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man -w&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;-W &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-C file&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-d&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; page ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man -c &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-C file&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-d&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-D&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; page ...&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-?V&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;DESCRIPTION&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man is the system&lt;span class=&#34;err&#34;&gt;&amp;#39;&lt;/span&gt;s manual pager.  Each page argument given to man is normally the name of a program, utility or &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt;.  The manual page associated with each of these arguments is &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt; found and displayed.  A section, &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; provided, will direct  man  to  look&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       only  in  that  section of the manual.  The default action is to search in all of the available sections following a pre-defined order &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;1 n l 8 3 2 3posix 3pm 3perl 3am 5 4 9 6 7&amp;#34;&lt;/span&gt; by default, unless overridden by the SECTION directive in /etc/manpath.config&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       and to show only the first page found, even &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; page exists in several sections.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       The table below shows the section numbers of the manual followed by the types of pages they contain.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;   Executable programs or shell commands&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;   System calls &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;functions provided by the kernel&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;m&#34;&gt;3&lt;/span&gt;   Library calls &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;functions within program libraries&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;m&#34;&gt;4&lt;/span&gt;   Special files &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;usually found in /dev&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt;   File formats and conventions eg /etc/passwd&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;m&#34;&gt;6&lt;/span&gt;   Games&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;m&#34;&gt;7&lt;/span&gt;   Miscellaneous &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;including macro packages and conventions&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, e.g. man&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;7&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;, groff&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;7&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;m&#34;&gt;8&lt;/span&gt;   System administration commands &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;usually only &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; root&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;m&#34;&gt;9&lt;/span&gt;   Kernel routines &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;Non standard&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       A manual page consists of several sections.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       Conventional section names include NAME, SYNOPSIS, CONFIGURATION, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUE, ERRORS, ENVIRONMENT, FILES, VERSIONS, CONFORMING TO, NOTES, BUGS, EXAMPLE, AUTHORS, and SEE ALSO.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       The following conventions apply to the SYNOPSIS section and can be used as a guide in other sections.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       bold text          &lt;span class=&#34;nb&#34;&gt;type&lt;/span&gt; exactly as shown.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       italic text        replace with appropriate argument.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;-abc&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;             any or all arguments within &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; are optional.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       -a&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;-b              options delimited by &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; cannot be used together.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       argument ...       argument is repeatable.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;expression&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; ...   entire expression within &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; is repeatable.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       Exact rendering may vary depending on the output device.  For instance, man will usually not be able to render italics when running in a terminal, and will typically use underlined or coloured text instead.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       The &lt;span class=&#34;nb&#34;&gt;command&lt;/span&gt; or &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; illustration is a pattern that should match all possible invocations.  In some cases it is advisable to illustrate several exclusive invocations as is shown in the SYNOPSIS section of this manual page.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;EXAMPLES&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man ls&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;           Display the manual page &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; the item &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;program&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; ls.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       man man.7&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;           Display the manual page &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; macro package man from section 7.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;but-what-if-you-don-t&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;But what if you don’t?&lt;/span&gt; &lt;a href=&#34;#but-what-if-you-don-t&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;cheat man&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# To convert a man page to pdf:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;man -t bash &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; ps2pdf - bash.pdf&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# To view the ascii chart:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;man &lt;span class=&#34;m&#34;&gt;7&lt;/span&gt; ascii&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You get tiny examples to remind you of what you &lt;strong&gt;probably&lt;/strong&gt; are trying to do!&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Reset SSH key passphrase</title>
    <id>https://pype.dev/reset-ssh-key-passphrase/</id>
    <updated>2022-06-13T06:55:32Z</updated>
    <published>2022-06-13T06:55:32Z</published>
    <link href="https://pype.dev/reset-ssh-key-passphrase/" rel="alternate" type="text/html"></link>
    <summary type="text">I got into a pickle where I encrypted the ssh keys I use for my SSH connections on LAN, but then I couldn&#39;t run my ansible playbook on my server! ssh-keygen...</summary>
    <content type="html">&lt;p&gt;I got into a pickle where I encrypted the ssh keys I use for my SSH connections on LAN, but then I couldn&amp;rsquo;t run my ansible playbook on my server! ssh-keygen -p and leave the new passphrase blank saved my day (although password protected key files are safer!)&lt;/p&gt;&#xA;&lt;h1 id=&#34;tl-dr-just-reset-it-to-nothing&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;TL;DR - just reset it to nothing&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;ssh-keygen -p&lt;/code&gt; will let you reset the passphrase on your ssh keys (good for you! yay security!)&lt;/p&gt;&#xA;&lt;p&gt;But I needed to remove the passphrase to quickly deploy an ansible playbook 🤓&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Filtering emails with core utils</title>
    <id>https://pype.dev/filtering-emails-with-core-utils/</id>
    <updated>2022-05-30T06:09:27Z</updated>
    <published>2022-05-30T06:09:27Z</published>
    <link href="https://pype.dev/filtering-emails-with-core-utils/" rel="alternate" type="text/html"></link>
    <content type="html">&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;email1@me.com&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;somebody_else@gmail.com&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#! /bin/bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# pick multiple emails from list and combine into comma seperated array&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;emails&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;cat .../emails &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; fzf -m &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/^\|$/&amp;#34;/g&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;|&lt;/span&gt;paste -sd,&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$emails&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>See git history about one file</title>
    <id>https://pype.dev/see-git-history-about-one-file/</id>
    <updated>2022-05-19T06:43:32Z</updated>
    <published>2022-05-19T06:43:32Z</published>
    <link href="https://pype.dev/see-git-history-about-one-file/" rel="alternate" type="text/html"></link>
    <summary type="text">In vim does a . You get every commit that the target file is apart of (so there might be info in those commits unrelated)</summary>
    <content type="html">&lt;p&gt;In vim &lt;code&gt;G clog %&lt;/code&gt; does a &lt;code&gt;git clog {current file}&lt;/code&gt;. You get every commit that the target file is apart of (so there might be info in those commits unrelated)&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Deleting files on remote storage from Ubuntu might not do what you think</title>
    <id>https://pype.dev/deleting-files-on-remote-storage-from-ubuntu-might-not-do-what-you-think/</id>
    <updated>2022-05-19T05:51:50Z</updated>
    <published>2022-05-19T05:51:50Z</published>
    <link href="https://pype.dev/deleting-files-on-remote-storage-from-ubuntu-might-not-do-what-you-think/" rel="alternate" type="text/html"></link>
    <summary type="text">From my daily driver Ubuntu machine I often open nautilus, dolphin, etc. and delete a file here or there on my NAS... turns out Ubuntu sends thse file to ON...</summary>
    <content type="html">&lt;p&gt;From my daily driver Ubuntu machine I often open nautilus, dolphin, etc. and delete a file here or there on my NAS&amp;hellip; turns out Ubuntu sends thse file to &lt;code&gt;.Trash-100&lt;/code&gt; ON THE NAS so I&amp;rsquo;m effectively just moving that file and not freeing up any space&amp;hellip;&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Remove ZFS Dataset Specific Snapshots</title>
    <id>https://pype.dev/remove-zfs-dataset-specific-snapshots/</id>
    <updated>2022-05-19T05:49:16Z</updated>
    <published>2022-05-19T05:49:16Z</published>
    <link href="https://pype.dev/remove-zfs-dataset-specific-snapshots/" rel="alternate" type="text/html"></link>
    <summary type="text">I started my homelab journey being super naive about ZFS and how to manage the filesystem... that bit me in the butt when transfering a ton of files out of...</summary>
    <content type="html">&lt;p&gt;I started my homelab journey being super naive about ZFS and how to manage the&#xA;filesystem&amp;hellip; that bit me in the butt when transfering a ton of files out of&#xA;folders and into datasets because ZFS is copy on write so I was essentially&#xA;duplicating my storage until I got a hair smarter about removing files after&#xA;they&amp;rsquo;re moved (rsync &amp;ndash;remove-source-file ftw). But I had a ton of snapshots of&#xA;child datasets with a ton of data that I just never will need, so I learned&#xA;&lt;code&gt;zfs list -H -o name -t snapshot tank/dataset1/dataset2&lt;/code&gt; will list just the&#xA;snapshots for dataset2 and if you pipe that into &lt;code&gt;xargs -n1 zfs destroy&lt;/code&gt; then&#xA;you have a way to clear out some snapshots you don&amp;rsquo;t need!&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
</feed>