<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linux on Janusworx</title><link>https://janusworx.com/tags/linux/</link><description>Recent content in Linux on Janusworx</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>feedback@janusworx.com (Mario Jason Braganza)</managingEditor><webMaster>feedback@janusworx.com (Mario Jason Braganza)</webMaster><copyright>© 2026, Mario Jason Braganza</copyright><lastBuildDate>Mon, 09 Jun 2025 15:09:16 +0530</lastBuildDate><atom:link href="https://janusworx.com/tags/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>Forgejo Workflow Action to Publish Hugo Blog</title><link>https://janusworx.com/work/forgejo-workflow-action-to-publish-hugo-blog/</link><pubDate>Mon, 09 Jun 2025 15:09:16 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/forgejo-workflow-action-to-publish-hugo-blog/</guid><description>
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/common/forgejo-logo.svg" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;I’d gotten this working earlier and wanted to post it up.&lt;br&gt;
And then promptly forgot about it.&lt;br&gt;
Until today that is, when I wanted to make changes to it.&lt;/p&gt;
&lt;p&gt;Here it is for posterity.&lt;br&gt;
The newest change is that the action now runs every six hours.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;span class="lnt"&gt;38
&lt;/span&gt;&lt;span class="lnt"&gt;39
&lt;/span&gt;&lt;span class="lnt"&gt;40
&lt;/span&gt;&lt;span class="lnt"&gt;41
&lt;/span&gt;&lt;span class="lnt"&gt;42
&lt;/span&gt;&lt;span class="lnt"&gt;43
&lt;/span&gt;&lt;span class="lnt"&gt;44
&lt;/span&gt;&lt;span class="lnt"&gt;45
&lt;/span&gt;&lt;span class="lnt"&gt;46
&lt;/span&gt;&lt;span class="lnt"&gt;47
&lt;/span&gt;&lt;span class="lnt"&gt;48
&lt;/span&gt;&lt;span class="lnt"&gt;49
&lt;/span&gt;&lt;span class="lnt"&gt;50
&lt;/span&gt;&lt;span class="lnt"&gt;51
&lt;/span&gt;&lt;span class="lnt"&gt;52
&lt;/span&gt;&lt;span class="lnt"&gt;53
&lt;/span&gt;&lt;span class="lnt"&gt;54
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Build and Deploy Janusworx website&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;schedule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;cron&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;0 */6 * * *&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;workflow_dispatch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;push&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;branches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;main&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;build-and-deploy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;intel&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# make sure there are runners tagged &amp;#34;intel&amp;#34; on your network or replace this with something of your own&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;HUGO_VERSION&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ vars.HUGO_VERSION }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Install wget &amp;amp; rsync&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;apt-get update &amp;amp;&amp;amp; apt-get install wget rsync -y&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Install Hugo&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; &amp;amp;&amp;amp; dpkg -i ${{ runner.temp }}/hugo.deb&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Checkout the website repo&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/checkout@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;submodules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;recursive&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;fetch-depth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Build website with Hugo&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;HUGO_ENVIRONMENT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;production&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;TZ&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Asia/Kolkata&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; hugo \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; --gc \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; --minify
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Install SSH key&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; mkdir -p ~/.ssh
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; echo &amp;#34;${{ secrets.SSH_PRIVATE_KEY }}&amp;#34; &amp;gt; ~/.ssh/id_ed25519
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; chmod 600 ~/.ssh/id_ed25519
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; echo &amp;#34;${{ secrets.SSH_KNOWN_HOSTS }}&amp;#34; &amp;gt; ~/.ssh/known_hosts
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; chmod 644 ~/.ssh/known_hosts&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Deploy website with rsync&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;REMOTE_HOST&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ vars.REMOTE_HOST }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;REMOTE_USER&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ vars.REMOTE_USER }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;REMOTE_PATH&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ vars.REMOTE_PATH }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; rsync -avz --delete public/ $REMOTE_USER@$REMOTE_HOST:$REMOTE_PATH&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Notes:&lt;br&gt;
It needs a few variables set, in the repo (repo-&amp;gt;Settings-&amp;gt;Actions-&amp;gt;Variables), which are the details I need (Hugo version, Remote Host IP, Remote path to copy the built output to, and the Remote user to use for SSH) to push via rsync to the host.&lt;br&gt;
Hugo version is in there, because Hugo breaks things all the time, so I upgrade cautiously.&lt;/p&gt;
&lt;p&gt;It also needs a couple of secrets, set in the repo (repo-&amp;gt;Settings-&amp;gt;Actions-&amp;gt;Secrets) to enable rsync to copy. (SSH_KNOWN_HOSTS and SSH_PRIVATE_KEY). Also best if this is a dedicated private key just for copying.
Running &lt;code&gt;ssh-keyscan &amp;quot;your-host-name-or-ip&amp;quot; &amp;gt; known_host_data.txt&lt;/code&gt; should dump the data you’d need for SSH_KNOWN_HOSTS&lt;/p&gt;
&lt;p&gt;With the changes I made today, the workflow can publish&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;on demand&lt;/li&gt;
&lt;li&gt;every 6 hours&lt;/li&gt;
&lt;li&gt;every time I commit to the repo&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I added time based publishing, so that I could publish future dated posts as and when the time rolls around.&lt;br&gt;
With this, I think I’m done tinkering with my blog, with the exception of moving it out of my home network and out on to my VM, so that I can truly publish from anywhere. That is a big heft for me currently and a job for future Jason.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feebdback@janusworx.com?subjectFeedback on post: Forgejo Workflow Action to Publish Hugo Blog
%22" &gt;feedback at this domain&lt;/a&gt; or [continue the discourse here][3].
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_l_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Tmux Start Session Maximized With Three Panes</title><link>https://janusworx.com/work/tmux-start-session-maximized-with-three-panes/</link><pubDate>Sat, 01 Feb 2025 09:27:25 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/tmux-start-session-maximized-with-three-panes/</guid><description>&lt;p&gt;So I got tired of starting up a dedicated tmux session to manage all the work related to my writing sessions. Over the past few months, I’ve boiled it down to three.&lt;br&gt;
And it still irks me that I have to …&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Launch Terminal&lt;/li&gt;
&lt;li&gt;Launch Tmux&lt;/li&gt;
&lt;li&gt;Split it into three windows err … panes.&lt;/li&gt;
&lt;li&gt;Go to the top left pane and launch Hugo server&lt;/li&gt;
&lt;li&gt;Switch to the right pane and then launch Emacs with whatever new post I want to write today.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So &lt;em&gt;of course&lt;/em&gt;, a &lt;a href="https://en.wikipedia.org/wiki/Rube_Goldberg" target="_blank" rel="noreferrer"&gt;Rube Goldberg-esque&lt;/a&gt;, tiny bash-pipey monster took form.
It now resides, chained to an alias, &lt;code&gt;hssx&lt;/code&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; in my &lt;code&gt;.bash_aliases&lt;/code&gt; file&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; &lt;span class="nv"&gt;hssx&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cd /path/to/my/hugo/folder &amp;amp;&amp;amp; \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt;xdotool windowsize $(xdotool getactivewindow) 100% 100% &amp;amp;&amp;amp; \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt;tmux new-session \; split-window -h \; select-pane -l \; split-window -v \; select-pane -U \; send-keys &amp;#34;hugo serve&amp;#34; C-m \; select-pane -R&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;The first line switches to my hugo folder&lt;/li&gt;
&lt;li&gt;The second calls &lt;code&gt;xdotool&lt;/code&gt; and maximises the terminal window&lt;/li&gt;
&lt;li&gt;And the last line is a series of instructions to the tmux command. I’ve split it below for readability.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tmux new-session \; #Tmux start a new session
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;split-window -h \; # Split the window into two vertical panes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;select-pane -l \; # Switch to the left pane
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;split-window -v \; # Split that into two horizontal panes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;select-pane -U \; # Select the upper pane
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;send-keys &amp;#34;hugo serve&amp;#34; C-m \; # Type in `hugo serve` followed by Enter
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;select-pane -R # Select the right pane&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;And boom!&lt;/p&gt;
&lt;/figcaption&gt;
&lt;p&gt;&lt;a href="https://janusworx.com/images/2025/tmux-layout.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2025/tmux-layout.png" alt="bash terminal showing a tmux window split into three panes" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Click pic for a larger version&lt;/p&gt;
&lt;/figcaption&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feebdback@janusworx.com?subject=%22Feedback on post: Tmux Start Session Maximized With Three Panes
%22" &gt;feedback at this domain&lt;/a&gt; &lt;em&gt;or&lt;/em&gt; [continue the discourse here][3].
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;code&gt;hugo start session&lt;/code&gt; and x just because all my aliases have ended with x for years and years&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>More Espanso &amp; Emacs Shenanigans</title><link>https://janusworx.com/work/more-espanso-emacs-shenanigans/</link><pubDate>Sun, 19 Jan 2025 12:45:09 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/more-espanso-emacs-shenanigans/</guid><description>&lt;p&gt;&lt;br&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/espanso.png" alt="Espanso Logo" /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Now that I use my local machine to draft all my posts, desktop Emacs makes everything easier … with one exception. It swallows up a lot of my Espanso expansions.&lt;/p&gt;
&lt;p&gt;My current bugbear is that it will not render a &lt;code&gt;=&lt;/code&gt; when expanding.&lt;br&gt;
I know this is entirely something that I brought on myself, and neither Emacs or Espanso in isolation will have issues.&lt;/p&gt;
&lt;p&gt;My workaround after rummaging through Espanso’s documentation was to set the backend to use &lt;code&gt;xdotool&lt;/code&gt;, in my config. (&lt;code&gt;~/.config/espanso/config/default.yml&lt;/code&gt;)&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;x11_use_xdotool_backend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;One downside now is that it no longer &lt;a href="https://espanso.org/docs/matches/basics/#cursor-hints" target="_blank" rel="noreferrer"&gt;jumps back to a predefined location&lt;/a&gt; in the snippets where I’ve defined such a thing. No matter. I use them rarely and I’ll figure something out later. (Alongside why desktop emacs won’t render markdown expansions sometimes as well)&lt;/p&gt;
&lt;p&gt;For now, most of my expansions work. Hurrah!&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feebdback@janusworx.com?subject=%22Feedback on post: More Espanso &amp;amp; Emacs Shenanigans
%22" &gt;feedback at this domain&lt;/a&gt; &lt;em&gt;or&lt;/em&gt; [continue the discourse here][3].
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Fixing Espanso Expansions</title><link>https://janusworx.com/work/fixing-espanso-expansions/</link><pubDate>Sun, 29 Sep 2024 17:05:19 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/fixing-espanso-expansions/</guid><description>&lt;p&gt;&lt;br&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/espanso.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/p&gt;
&lt;p&gt;I never had the time to deal with my &lt;a href="https://espanso.org/" target="_blank" rel="noreferrer"&gt;Espanso&lt;/a&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; hijinks until today.&lt;br&gt;
While it worked perfectly, when I installed it all those years ago, when I migrated over from the Mac, Espanso itself has changed and evolved over the years.&lt;br&gt;
It took over my old configuration like a champ and &lt;em&gt;mostly&lt;/em&gt; worked, with the exception of a few shortcuts; ones that I &lt;em&gt;frequently&lt;/em&gt; used 😂&lt;/p&gt;
&lt;p&gt;Emacs was one application of mine that never quite worked right with Espanso.&lt;br&gt;
I’d frequently get &lt;code&gt;timed out waiting for reply from selection owner&lt;/code&gt; whenever I tried expansions in there. Typing :joy to get 😂 would work in every other program, but no joy with Emacs, in additon to plenty of other expansions err … not expanding.&lt;/p&gt;
&lt;p&gt;All my browser url expansions would not expand properly either, with mangled expansions most of the time.&lt;/p&gt;
&lt;p&gt;So today I &lt;a href="https://espanso.org/docs/" target="_blank" rel="noreferrer"&gt;dove in to the docs&lt;/a&gt;, and realised two things.&lt;br&gt;
1. My emacs needed a longer time out&lt;br&gt;
2. Espanso now tries to identify the &lt;em&gt;kind&lt;/em&gt; of text, and maybe those were causing my issues?&lt;/p&gt;
&lt;br&gt;


&lt;h3 class="relative group"&gt;Emacs
 &lt;div id="emacs" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#emacs" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;I realised I needed a longer clipboard threshold, only for Emacs.&lt;br&gt;
So I created an &lt;a href="https://espanso.org/docs/configuration/app-specific-configurations/" target="_blank" rel="noreferrer"&gt;App specific configuration&lt;/a&gt;, just for Emacs to use and gave it said option. Here’s what the contents of my &lt;code&gt;espanso/config/emacs.yml&lt;/code&gt; look like&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;filter_class&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Emacs&amp;#39;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;clipboard_threshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;10000&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;br&gt;


&lt;h3 class="relative group"&gt;Rich Text Expansions
 &lt;div id="rich-text-expansions" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#rich-text-expansions" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;That helped with a lot of expansions in Emacs, but not with my joy expansion.&lt;br&gt;
And not with stuff that were links and oh … links! and html! and markdown! Could those be the culprits?&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
The docs mention that Espanso now has &lt;a href="https://espanso.org/docs/matches/basics/#rich-text" target="_blank" rel="noreferrer"&gt;rich text support&lt;/a&gt;&lt;br&gt;
What that means, is that the trigger nows supports two new keywords &lt;code&gt;html&lt;/code&gt; and &lt;code&gt;markdown&lt;/code&gt; in addition ye ole &lt;code&gt;replace&lt;/code&gt;
So I changed most of my affected shortcuts to either of those two keywords; &lt;code&gt;markdown&lt;/code&gt; for most everything and &lt;code&gt;html&lt;/code&gt; for linky stuff. Here’s what my beloved joy looks like now …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;matches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;trigger&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;:joy&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;markdown&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;😂&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;br&gt;

And those two things did it! Every shortcut expands everwhere! What joy 😂&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post?&lt;br&gt;
Mail me at &lt;a href="mailto:feebdback@janusworx.com?subjectFeedback on post: Fixing Espanso Expansions
%22" &gt;feedback at this domain&lt;/a&gt; &lt;em&gt;or&lt;/em&gt; [continue the discourse here][3].
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_l_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Espanso lets you assign short snippets of text to longer streams of text, that you’d frequently use. I use &lt;code&gt;:adhx&lt;/code&gt; for example, and it expands out to type my whole address. Pretty handy!&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;dun! dun! dun! they were!&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>anki-push-u, Creating a Tiny Pushover Addon for Anki</title><link>https://janusworx.com/anki-push-u/</link><pubDate>Sat, 21 Sep 2024 11:31:39 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/anki-push-u/</guid><description>&lt;br&gt;

&lt;p&gt;I want to slowly increase my French vocabulary, so I got this comprehensive frequency word deck from &lt;a href="https://ankiweb.net/shared/info/893324022" target="_blank" rel="noreferrer"&gt;Shared Decks section of the Anki website&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I keep forgetting to look it up during the day, after my morning session and the only way I can get those stubborn words&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; to stick in my mind, is if I keep doing the deck 4–5 times a day.&lt;/p&gt;
&lt;p&gt;I know! With all my newfound devops/python skills, could I figure out a way to remind myself to do it? Turns out I can! :)&lt;/p&gt;
&lt;p&gt;I already use &lt;a href="https://pushover.net" target="_blank" rel="noreferrer"&gt;Pushover&lt;/a&gt;, to get notified of darn near anything.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
And I read enough of &lt;a href="https://addon-docs.ankiweb.net/a-basic-addon.html" target="_blank" rel="noreferrer"&gt;Anki’s add-on documentation&lt;/a&gt; to know I could whip something up.&lt;br&gt;
So a bit of searching on the net, a bit of jiggery pokery with &lt;a href="https://claude.ai/" target="_blank" rel="noreferrer"&gt;Claude&lt;/a&gt;, and some spelunking through Anki’s source code and &lt;a href="https://forums.ankiweb.net/t/how-to-get-the-number-of-cards-due-to-today/10658" target="_blank" rel="noreferrer"&gt;forums&lt;/a&gt; later, I present to you … &lt;em&gt;&lt;strong&gt;&lt;a href="https://github.com/jasonbraganza/anki-push-u" target="_blank" rel="noreferrer"&gt;anki-push-u&lt;/a&gt;!&lt;/strong&gt;&lt;/em&gt;&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;As long as your Anki’s running, this little add-on will find cards due, at the interval you tell it to, and then notify you wherever you have Pushover running!&lt;br&gt;
No more forgetting due cards!&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/anki-pushover-notifications.png" alt="A screenshot of Pushover notifications on two devices" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;&lt;a href="https://github.com/jasonbraganza/anki-push-u" target="_blank" rel="noreferrer"&gt;Find the add-on and instructions over at Github.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;?subject=%22Feedback on post: anki-push-u, Creating a Tiny Pushover Addon for Anki
%22" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;I’m looking at you, ailleurs&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;Hugo updates on three machines, calibre updates on two machines, podcast downloads and quite a bit else&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;It pushes you to do your due cards! Tada!&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Notes to Self, Compiling Qbittorrent on a Raspberry Pi 5</title><link>https://janusworx.com/work/notes-to-self-on-compiling-qbittorrent-on-a-raspberry-pi-5/</link><pubDate>Mon, 19 Aug 2024 14:13:31 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/notes-to-self-on-compiling-qbittorrent-on-a-raspberry-pi-5/</guid><description>&lt;div style="font-size: 85%; "&gt;
&lt;p&gt;&lt;em&gt;Update, 2024-08-20:&lt;br&gt;
Added a missing step, to install the qBittorrent files to their relevant places&lt;br&gt;
Also, it had to happen. No releases for close to three months and then just as I learn to compile, a new version has to release the very next day 😂&lt;br&gt;
It gave me a chance to test my notes. It hardly took me a few minutes to get the new release in place. So all is good!&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/compilation-of-letters.jpg" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;A compilation of letters, courtesy &lt;a href="https://www.cosmos.so/e/252611461" target="_blank" rel="noreferrer"&gt;Cosmos&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;I wanted to always have the lastest stable version of &lt;a href="https://www.qbittorrent.org/" target="_blank" rel="noreferrer"&gt;qBittorent&lt;/a&gt; on my Pi.&lt;br&gt;
So today, I sat down and followed the project’s &lt;a href="https://github.com/qbittorrent/qBittorrent/wiki/Compilation-Debian,-Ubuntu,-and-derivatives" target="_blank" rel="noreferrer"&gt;excellent instructions&lt;/a&gt; and got it running.&lt;br&gt;
I did however stray off the beaten path a teensy bit&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;br&gt;
I didn’t want a gui and I wanted to be able to control it with &lt;a href="https://systemd.io/" target="_blank" rel="noreferrer"&gt;systemd&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So here’s my checklist for next release. I’m currently running &lt;a href="https://en.wikipedia.org/wiki/Debian_version_history#Debian_12_%28Bookworm%29" target="_blank" rel="noreferrer"&gt;Bookworm&lt;/a&gt; on my Pi 5&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;In case you run into problems, compile instructions are here:
&lt;a href="https://github.com/qbittorrent/qBittorrent/wiki/Compilation-Debian,-Ubuntu,-and-derivatives" target="_blank" rel="noreferrer"&gt;https://github.com/qbittorrent/qBittorrent/wiki/Compilation-Debian,-Ubuntu,-and-derivatives&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Do all off this after switching to root. (or &lt;code&gt;sudo&lt;/code&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install build tools&lt;br&gt;
&lt;code&gt;sudo apt install build-essential cmake git ninja-build pkg-config libboost-dev libssl-dev zlib1g-dev libgl1-mesa-dev&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install Qt dependencies (&lt;code&gt;qtbase5-private-dev&lt;/code&gt; is not part of the instructions,
but compile will fail if you don&amp;rsquo;t include it)&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
&lt;code&gt;sudo apt install --no-install-recommends qtbase5-dev qtbase5-private-dev qttools5-dev libqt5svg5-dev&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Qt requires Python at runtime, so: &lt;code&gt;sudo apt install python3&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the libtorrent library. I compiled from source. Check &lt;a href="https://github.com/qbittorrent/qBittorrent/wiki/Compilation-Debian,-Ubuntu,-and-derivatives" target="_blank" rel="noreferrer"&gt;page&lt;/a&gt; for fresh instructions, if stuff here doesn’t work&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone --recurse-submodules https://github.com/arvidn/libtorrent.git
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; libtorrent
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git checkout RC_2_0 &lt;span class="c1"&gt;# or a 2.0.x tag&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cmake -B build -DCMAKE_BUILD_TYPE&lt;span class="o"&gt;=&lt;/span&gt;RelWithDebInfo -DCMAKE_INSTALL_PREFIX&lt;span class="o"&gt;=&lt;/span&gt;/usr/local
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cmake --build build -j4 &lt;span class="c1"&gt;# the -j4 is to do on four cores at once. my addition.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo cmake --install build&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If you ever want to uninstall libtorrent, then don’t delete this
main folder. The build process would have created a
&lt;code&gt;install_manifest.txt&lt;/code&gt; in the build folder. So you can then
uninstall with: &lt;code&gt;sudo xargs rm &amp;lt; install_manifest.txt&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Get qb source: &lt;a href="https://www.qbittorrent.org/download" target="_blank" rel="noreferrer"&gt;https://www.qbittorrent.org/download&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Unzip: &lt;code&gt;tar xzvf qbittorrent-4.6.5.tar.gz&lt;/code&gt; and then
&lt;code&gt;cd qbittorrent-4.6.5/&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create Build configuration (disabled GUI and enabled systemd. Those aren’t part of the defaults)&lt;br&gt;
&lt;code&gt;cmake -G &amp;quot;Ninja&amp;quot; -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr/local -DGUI=OFF -DSYSTEMD=ON&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Build &lt;code&gt;cmake --build build&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install all the files to their relevant locations &lt;code&gt;cmake --install build&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install service to run for a specific user.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl daemon-reload
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; qbittorrent-nox@&amp;lt;some-user&amp;gt;.service
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl start qbittorrent-nox@&amp;lt;some-user&amp;gt;.service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We’re done.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;?subject=%22Feedback on post: Notes to Self, Compiling Qbittorrent on a Raspberry Pi 5
%22" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;which the project does make provisions for.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;&lt;code&gt;Target &amp;quot;qbt_base&amp;quot; links to: Qt::CorePrivate but the target was not found.&lt;/code&gt; or words to that effect&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Moved My Music Library From Jellyfin to Emby Today</title><link>https://janusworx.com/work/moved-my-music-library-from-jellyfin-to-emby-today/</link><pubDate>Tue, 04 Jun 2024 10:47:23 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/moved-my-music-library-from-jellyfin-to-emby-today/</guid><description>&lt;p&gt;I had moved off Plex, close to two years ago, because … reasons.&lt;br&gt;
Unable to decide between Emby and Jellyfin and having just learned containers at the time, I deployed both on my Pi.&lt;br&gt;
Emby handled video duties while Jellyfin did music.&lt;/p&gt;
&lt;p&gt;And now after close to two years, I’m moving off Jellyfin to Emby.&lt;br&gt;
The only reason being its iOS client.&lt;br&gt;
It still has a lot of growing up to do, and I’ve reached the end of my tether trying to adjust to its foibles.&lt;br&gt;
I cannot turn the phone off, else the music goes off.&lt;br&gt;
I cannot switch away from the Jellyfin app, else the music goes off.&lt;br&gt;
If I get a call, then the app sorta-kinda loses its mind and I have to kill it and relaunch it.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;All&lt;/strong&gt;&lt;/em&gt; I want from my music player is to be a good audio citizen on iOS. Connect to the server, read my songs, play my music. And do it in the background.&lt;/p&gt;
&lt;p&gt;While I am sympathetic to the priorities of the open source Jellyfin team, I am not getting any younger and my hour long walks are the only time I get to enjoy my music.&lt;/p&gt;
&lt;p&gt;So … I moved.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Setting the stage
 &lt;div id="setting-the-stage" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#setting-the-stage" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;There had to be &lt;em&gt;two&lt;/em&gt; instances of Emby running. I don’t want my video online and so I don’t want it exposed&lt;/li&gt;
&lt;li&gt;Video is secondary anyway. So that had to be the second container. The main one is Music.&lt;/li&gt;
&lt;li&gt;Music needs to be accessible from anywhere on the web.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Doing it
 &lt;div id="doing-it" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#doing-it" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;I already had docker running and installed, along with Nginx&lt;/li&gt;
&lt;li&gt;Jellyfin has better documentation. So I used &lt;a href="https://jellyfin.org/docs/general/networking/nginx/" target="_blank" rel="noreferrer"&gt;their guide&lt;/a&gt; to reverse proxy Nginx to the Emby service that would come up. All I had to do, was put in my SSL cert paths correctly and change the variable &lt;code&gt;jellyfin&lt;/code&gt; to &lt;code&gt;embymusicserver&lt;/code&gt; (along with the rest of the require settings.)&lt;/li&gt;
&lt;li&gt;I created a folder to hold Emby’s &lt;a href="https://hub.docker.com/r/emby/embyserver/" target="_blank" rel="noreferrer"&gt;&lt;code&gt;docker compose&lt;/code&gt;&lt;/a&gt; file. I modified the container name to &lt;code&gt;embymusicserver&lt;/code&gt; and gave the path to mount for its config and another one that pointed to my music folder. Pretty straightforward. (I had already changed the ports earlier on the video emby instance to 8097 &amp;amp; 8921 to avoid conflicts with Jellyfin, so I did not have to touch that.)&lt;/li&gt;
&lt;li&gt;Assigned ownership recursively to the user that would run the container.&lt;/li&gt;
&lt;li&gt;Did a &lt;code&gt;docker compose up&lt;/code&gt; to see if everything came up ok. And then tore it down&lt;/li&gt;
&lt;li&gt;And finally, once again, adapted my &lt;a href="https://jellyfin.org/docs/general/installation/container#using-docker-compose" target="_blank" rel="noreferrer"&gt;old Jellyfin systemd script&lt;/a&gt; to ensure I could have it start and stop with the system&lt;/li&gt;
&lt;/ul&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/emby-1.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/emby-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;In hindsight, there was no way to pull all of this off in an hour, if it wasn’t for Docker and Emby’s image. Now I realise why containers are taking over the world.&lt;/p&gt;
&lt;p&gt;And thank you for all you do, Jellyfin. I shall return as soon as the app gets more useful.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;?subject=%22Feedback on post: Moved My Music Library From Jellyfin to Emby Today
%22" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Assigning Keyboard Shortcuts to Nemo Actions</title><link>https://janusworx.com/work/assigning-keyboard-shortcuts-to-nemo-actions/</link><pubDate>Mon, 03 Jun 2024 17:08:35 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/assigning-keyboard-shortcuts-to-nemo-actions/</guid><description>&lt;p&gt;Everytime I download a &lt;a href="https://www.humblebundle.com/books/dynamite-20th-anniversary-20000page-mega-bundle-books" target="_blank" rel="noreferrer"&gt;Humble Bundle&lt;/a&gt;, I’m left with a ton of books, in various formats on my desktop.&lt;br&gt;
I normally like all the formats for a single title to be in a single folder, so that Calibre can then treat them as a single book&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;, when adding them.&lt;/p&gt;
&lt;p&gt;I’ve been using Pedro Santana’s, &lt;a href="https://github.com/pedro-augusto-santana/nemo_create_new_folder_with_selection" target="_blank" rel="noreferrer"&gt;nifty little Nemo action&lt;/a&gt; to help me do just this.&lt;br&gt;
Once installed, all I need to do is select my files, right click on them and then create a new folder, like so …

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/nemo-action-1.png" alt="nemo cinnamon screenshot with no pointer in the context command" /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;The one remaining wrinkle, being that when you’re completely keyboard driven, you still need to come down a couple of steps with the arrow keys or switch to the mouse.&lt;br&gt;
When doing this with close to 250+ files, this quickly gets tedious.&lt;br&gt;
&lt;a href="https://stackoverflow.com/a/42786928" target="_blank" rel="noreferrer"&gt;Stack Overflow to the rescue&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Turns out that all I needed to do was add an &lt;code&gt;_&lt;/code&gt; in front of the letter, I wanted to use to activate my little action from the context menu.&lt;br&gt;
My original action went …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-toml" data-lang="toml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;Nemo&lt;/span&gt; &lt;span class="nx"&gt;Action&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;Active&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;Create&lt;/span&gt; &lt;span class="nx"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;folder&lt;/span&gt; &lt;span class="nx"&gt;with&lt;/span&gt; &lt;span class="nx"&gt;selection&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I decided to use the &lt;em&gt;n&lt;/em&gt; in &lt;em&gt;selection&lt;/em&gt;. &lt;em&gt;&lt;strong&gt;N&lt;/strong&gt;&lt;/em&gt; for &lt;em&gt;new folder&lt;/em&gt;. Easy to remember! So with this tiny change …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-TOML" data-lang="TOML"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;Create&lt;/span&gt; &lt;span class="nx"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;folder&lt;/span&gt; &lt;span class="nx"&gt;with&lt;/span&gt; &lt;span class="nx"&gt;selectio_n&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I get to do this!&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/nemo-action-2.png" alt="nemo cinnamon screenshot that lets me use a custom key in the context command" /&gt;
 
 
 &lt;/figure&gt;
&lt;p&gt;I can select, get the context menu, hit n, type in the folder name and done!&lt;br&gt;
It’s still a lot of work when there’s lots of files, but there’s a seamless flow to the entire process.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;?subject=%22Feedback on post: Assigning Keyboard Shortcuts to Nemo Actions
%22" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;a href="https://manual.calibre-ebook.com/gui.html#add-books" target="_blank" rel="noreferrer"&gt;point two, in this section of the documentation&lt;/a&gt;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Notes to Self on Renewing Wildcard Letsencrypt Certs Manually With Lego</title><link>https://janusworx.com/work/notes-to-self-on-renewing-wildcard-letsencrypt-certs-manually-with-lego/</link><pubDate>Fri, 31 May 2024 11:12:17 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/notes-to-self-on-renewing-wildcard-letsencrypt-certs-manually-with-lego/</guid><description>&lt;p&gt;&lt;br&gt;
&lt;br&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/lego-logo.svg" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;image courtesy, the &lt;a href="https://github.com/go-acme/lego" target="_blank" rel="noreferrer"&gt;Lego Github page&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;I want to someday, automate all my domain certificate renewals.&lt;br&gt;
Namecheap doesn’t support it, ergo my move to &lt;a href="https://porkbun.com/about" target="_blank" rel="noreferrer"&gt;Porkbun&lt;/a&gt;.&lt;br&gt;
And &lt;code&gt;certbot&lt;/code&gt; doesn’t support Porkbun, so I’ve moved to &lt;a href="https://github.com/go-acme/lego" target="_blank" rel="noreferrer"&gt;Lego&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I still need to someday figure out how to do this automatically, but for now, since all is in place, this is the new manual process.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You’ll need to generate a Porkbun API key along with its associated secret, and store it somewhere safe and secure. (This is a one time thing, the &lt;a href="https://kb.porkbun.com/article/190-getting-started-with-the-porkbun-api" target="_blank" rel="noreferrer"&gt;Generating API keys&lt;/a&gt; section here describes how)&lt;/li&gt;
&lt;li&gt;Another one time step is to &lt;a href="https://go-acme.github.io/lego/installation/" target="_blank" rel="noreferrer"&gt;get Lego installed&lt;/a&gt; and have it &lt;a href="https://go-acme.github.io/lego/dns/porkbun/" target="_blank" rel="noreferrer"&gt;generate your certs&lt;/a&gt;,
and then have your applications, point to where they are.&lt;/li&gt;
&lt;li&gt;Command to renew: &lt;code&gt;PORKBUN_SECRET_API_KEY=&amp;quot;your-api-*secret*&amp;quot; PORKBUN_API_KEY=&amp;quot;your-porkbun-api-key&amp;quot; ./lego --domains your-domain.tld --domains *.domain.tld --email your-email@domain --dns porkbun renew&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;And the renewal’s done!&lt;/li&gt;
&lt;li&gt;Restart yer engines … err your applications&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; et voilà!&lt;/li&gt;
&lt;li&gt;If you have multiple machines, figure out a way to securely transfer the certs there too.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;?subject=%22Feedback on post: Notes to Self on Renewing Wildcard Letsencrypt Certs Manually With Lego
%22" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;in my case Nginx&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Moving Audio Library to Flac &amp; MP3 Formats</title><link>https://janusworx.com/personal/moving-audio-library-to-flac-mp3/</link><pubDate>Tue, 27 Feb 2024 08:47:52 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/personal/moving-audio-library-to-flac-mp3/</guid><description>&lt;p&gt;&lt;br&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/audio-file-converting-01-shaping-metal-s.jpg" alt="a hot metal rod being shaped into an ornament/tool" /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;A piece of metal being converted into something useful.&lt;br&gt;
Image courtesy, &lt;a href="https://unsplash.com/photos/person-holding-black-metal-pipe-4AT3mZMuFuI?utm_content=creditCopyText&amp;amp;utm_medium=referral&amp;amp;utm_source=unsplash" target="_blank" rel="noreferrer"&gt;Jonny Gios&lt;/a&gt;, &lt;a href="https://unsplash.com/license" target="_blank" rel="noreferrer"&gt;Unsplash License&lt;/a&gt;, on Unsplash&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;I thought I was set with my audio jukebox when I &lt;em&gt;finally&lt;/em&gt; finished collecting and digitising all my tapes, records&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; and cds and then tagging, sorting and organising my files in or around the late noughties.&lt;br&gt;
When I began doing all that in the mid noughties, I was comfortably ensconced in the Apple/iTunes ecosystem, so all my files were in various MPEG-4 formats.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;And the one big thing I missed, was letting a track have multiples genres or multiple artists. I wanted to be able to search for a song in each artist’s name i.e. the song ought to be listed as an entry under each singer’s name (Shibani Dandekar &lt;em&gt;and&lt;/em&gt; Zoya Akhtar &lt;em&gt;and&lt;/em&gt; Ankur Tewari &lt;em&gt;and&lt;/em&gt; SEL) in the jukebox and also have it listed / searchable under multiple genres (remove Bollywood, but be able to add IndiPop &lt;em&gt;and&lt;/em&gt; Oldies). I always thought that wasn’t possible. A decade passed since. I’ve moved homes to &lt;a href="https://www.linuxmint.com/" target="_blank" rel="noreferrer"&gt;Mint&lt;/a&gt; and the .deb ecosystem in the meanwhile. And it still never occured to me to re-evaluate my choice of audio formats, despite this being a constant thorn in my side. I still thought it wasn’t possible. Look at what happens when I try to add a genre to a song in &lt;a href="https://quodlibet.readthedocs.io/" target="_blank" rel="noreferrer"&gt;Quod Libet&lt;/a&gt; …&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;a href="https://janusworx.com/images/2024/audio-file-converting-02.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/audio-file-converting-02.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Click to enlarge&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Until, when I read that message more closely, recently. It wasn’t telling me that it wasn’t possible, just that I was a dummkopf&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt; with my choice of audio formats all those years ago. &lt;em&gt;These&lt;/em&gt; files did not support multiple values for genre, but was it possible that other formats did? Spoiler, of course, they did!&lt;br&gt;
A quick search revealed both mp3 as well as flac supported this.&lt;/p&gt;
&lt;p&gt;I decided to try this with one of my recent songs.&lt;br&gt;
I use ffmpeg to convert &lt;a href="https://youtu.be/7YStGjns4Go" target="_blank" rel="noreferrer"&gt;Plum Pudding&lt;/a&gt;.&lt;br&gt;
&lt;code&gt;ffmpeg -i &amp;quot;05 Plum Pudding.m4a&amp;quot; -c:a flac &amp;quot;05 Plum Pudding.flac&amp;quot;&lt;/code&gt;&lt;br&gt;
And tada! A quick metadata edit in Quod Libet and I had multiple artist and genre entries! 🎉🎉🎉&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;a href="https://janusworx.com/images/2024/audio-file-converting-03.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/audio-file-converting-03.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Click to enlarge&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Sigh! I’m both happy and a bit chagrined.&lt;br&gt;
I can haz music the way I want it organised and tagged, but I’m looking at weeks/months of work now 😂&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Thank you daddy&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;lossless and lossy m4a files.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;a dummkopf with the benefit of hindsight that is&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Viewing Hugo Server Output Remotely</title><link>https://janusworx.com/personal/viewing-hugo-server-remotely/</link><pubDate>Sun, 11 Feb 2024 15:18:13 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/personal/viewing-hugo-server-remotely/</guid><description>&lt;p&gt;I’ve been living a little dangerously when posting stuff on the blog.&lt;br&gt;
While it’s true that I compose my posts locally on my desktop, with a locally installed Hugo, I always catch a ton of things that I miss, &lt;em&gt;after&lt;/em&gt; I publish a post. Nearly every single time.&lt;/p&gt;
&lt;p&gt;So the process then becomes …&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the post on the server in Emacs (after logging in, via &lt;code&gt;ssh&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Make an edit.&lt;/li&gt;
&lt;li&gt;Build and publish.&lt;/li&gt;
&lt;li&gt;Reload the page and re-read the post.&lt;/li&gt;
&lt;li&gt;Find a typo. Fix it.&lt;/li&gt;
&lt;li&gt;Repeat steps 3 &amp;amp; 4.&lt;/li&gt;
&lt;li&gt;Keep the Emacs pane to keep editing and open &lt;em&gt;another&lt;/em&gt; terminal pane, just to build and deploy.&lt;/li&gt;
&lt;li&gt;Twenty three edits later … Be ok with what I have. (with a build and deploy, and reload and reread every couple of edits)&lt;/li&gt;
&lt;li&gt;Do a final build and deploy&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Having done this, for God knows how long now, I’m used to this workflow and decided to just lean into it.&lt;br&gt;
But while I loved my edit, build, deploy, reload, reread, workflow, I felt like I was tempting &lt;a href="https://en.wikipedia.org/wiki/Moirai#/media/File:The_Three_Fates_by_Paul_Thumann.jpg" target="_blank" rel="noreferrer"&gt;the fates&lt;/a&gt;, everytime I did it. Besides I did not like messing with the live website like that.&lt;/p&gt;
&lt;p&gt;So I wondered, if the way I did it locally, could be kinda sorta done remotely.&lt;br&gt;
When I write posts locally, all I need to do is run &lt;code&gt;hugo server&lt;/code&gt; in a terminal and it spins up a local server, with the all the posts, built and rendered in memory for speedy access.&lt;br&gt;
Could I have that? But remote? Could I run &lt;code&gt;hugo server&lt;/code&gt; on my server and view the results in my browser from anywhere?&lt;br&gt;
About an hour of exploration later, I did have it up and running!&lt;/p&gt;
&lt;p&gt;Here’s what I did, after delving into Hugo’s &lt;a href="https://gohugo.io/commands/hugo_server/" target="_blank" rel="noreferrer"&gt;&lt;code&gt;server&lt;/code&gt;&lt;/a&gt; command options&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Created a subdomain (drpr.janusworx.com) and pointed it to my server. (this is where I’ll see my temporary, work-in-progress, results whenever I run &lt;code&gt;hugo server&lt;/code&gt; on my server)&lt;/li&gt;
&lt;li&gt;Used Nginx as a proxy to point to it. (Also serves as my SSL termination point, freeing Hugo from the burdens of HTTPS/SSL drama)&lt;/li&gt;
&lt;li&gt;Spun up Hugo with &lt;code&gt;hugo serve -D -b https://drpr.janusworx.com --appendPort=false --liveReloadPort=443&lt;/code&gt; where …&lt;br&gt;
a. &lt;code&gt;-D&lt;/code&gt; builds posts marked with drafts&lt;br&gt;
b. &lt;code&gt;-b&lt;/code&gt; tells Hugo the hostname and path to the root of the blog (in my case, &lt;a href="https://drpr.janusworx.com" target="_blank" rel="noreferrer"&gt;https://drpr.janusworx.com&lt;/a&gt;)&lt;br&gt;
c. &lt;code&gt;--appendPort&lt;/code&gt; is set to false, which stops appending the port number to the url (happens by default, http://localhost:1313)&lt;br&gt;
d. &lt;code&gt;--liveReloadPort&lt;/code&gt; is set to my SSL/TLS port, so that I can watch changes live with every edit.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And everything worked!&lt;br&gt;
Except for the live reloading. That bit just refused to work.
I could make changes and then go manually reload the web page and it would update. &lt;em&gt;&lt;strong&gt;Grr!&lt;/strong&gt;&lt;/em&gt; So near, yet so far!&lt;br&gt;
Some more exploration led to &lt;a href="https://github.com/gohugoio/hugo/issues/2205#issuecomment-498769463" target="_blank" rel="noreferrer"&gt;Pothi Kalimuthu’s extremely helpful comment&lt;/a&gt; on Github …&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/hugo-livereload-remote.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;p&gt;Where I realised that Hugo’s LiveReload script (that reflects changes) needs a location in my Nginx config.&lt;br&gt;
So a bit of copying and pasting and adapting and &lt;em&gt;tada!&lt;/em&gt; 🎉&lt;/p&gt;
&lt;p&gt;This blog post was written entirely on the server, with me watching the changes live as they happened …&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2024/hugo-livereload-remote-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;p&gt;And once this was done, I could just do a single, final, build and deploy to publish.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Note to Self, Switch to Manjaro “Unstable”</title><link>https://janusworx.com/work/note-to-self-switch-to-manjaro-unstable/</link><pubDate>Tue, 06 Feb 2024 09:01:31 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/note-to-self-switch-to-manjaro-unstable/</guid><description>&lt;p&gt;I kept wondering why Syncthing releases on one of my Pis would lag behind my other one.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; The big difference between the two is that one runs Raspbian and the other, Manjaro&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;. This wouldn’t happen earlier when they ran Arch and Manjaro.&lt;br&gt;
And today, I head-slappingly remembered, that it &lt;em&gt;did&lt;/em&gt; lag and I had to do stuff to get at the latest software stuff.&lt;/p&gt;
&lt;p&gt;What I had to do, was to switch Manjaro’s software branch to &lt;code&gt;unstable&lt;/code&gt; (as opposed to the default &lt;code&gt;stable&lt;/code&gt;. &lt;a href="https://wiki.manjaro.org/index.php?title=Switching_Branches" target="_blank" rel="noreferrer"&gt;Read more here&lt;/a&gt;.)&lt;br&gt;
The only reason I use Manjaro, instead of Arch&lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;, is that the Arch kernel does not boot on this Pi and I want the latest Arch stuff, which is what the &lt;code&gt;unstable&lt;/code&gt; Manjaro software branch offers.&lt;/p&gt;
&lt;p&gt;So a …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo pacman-mirrors --api --set-branch unstable&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;switches me to the &lt;code&gt;unstable&lt;/code&gt; branch and …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo pacman-mirrors --fasttrack &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo pacman -Syu &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;will resync all the software with what’s available on that branch.&lt;/p&gt;
&lt;p&gt;Tada, I have &lt;code&gt;syncthing v1.27.2 &amp;quot;Gold Grasshopper&amp;quot;&lt;/code&gt; on all my machines :)&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback at this domain&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;as well as other software in general&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;because, reasons. and a long chain of upgrade and experimentation and moves from Pis 3 to 4 to 5&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;It’s the Manjaro Pi that lags. And yes, I know you can already guess why&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;with apologies to Manjaro&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Updated to Emacs 29.2</title><link>https://janusworx.com/work/updated-to-emacs-29.2/</link><pubDate>Fri, 19 Jan 2024 07:52:20 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/updated-to-emacs-29.2/</guid><description>&lt;p&gt;Updated to &lt;a href="https://www.gnu.org/software/emacs/news/NEWS.29.2" target="_blank" rel="noreferrer"&gt;Emacs 29.2&lt;/a&gt;, just now.&lt;br&gt;
Took me and my four core workhorse about fifteen minutes tops, from start to finish.&lt;/p&gt;
&lt;p&gt;Emacs 29.0 was the first version I compiled from source, because I wanted the latest release as soon as it was out and I no longer had the patience for the kindly distribution folk (or third party packagers) to give me a binary.&lt;br&gt;
The first time was a nightmare.&lt;br&gt;
I didn’t have various bits and bobs that were needed. Stuff that the guides say should work a certain way wouldn’t.&lt;br&gt;
But it did happen eventually and I learnt a lot along the way about what &lt;em&gt;I&lt;/em&gt; wanted compiled in, in my Emacs.&lt;br&gt;
I also appreciated just how much easier it is now to compile stuff and recover from errors. I tried this last in the late 90s&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; and it scared me off.&lt;/p&gt;
&lt;p&gt;But like I was saying … now that I have it all set up, 29.1 and 29.2 have been a breeze.&lt;br&gt;
I’d never have guessed, updating software, by compiling from source, would be so painless.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;I compiled the linux kernel. Bold first step. I know 😂&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I know, there will be hiccoughs. But even so, this is so much better than what I imagined in my head.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Emacs, Three and a Half Years On</title><link>https://janusworx.com/work/emacs-three-and-a-half-years-on/</link><pubDate>Sat, 30 Dec 2023 10:16:07 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/emacs-three-and-a-half-years-on/</guid><description>&lt;p&gt;If someone had told me &lt;a href="https://janusworx.com/blog/emacs-day-01" &gt;three and a half years ago&lt;/a&gt;, that I would:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use &lt;a href="https://en.wikipedia.org/wiki/Emacs" target="_blank" rel="noreferrer"&gt;Emacs&lt;/a&gt; as my primary editor nearly everywhere.&lt;/li&gt;
&lt;li&gt;Not just as an editor. In fact, I would stop thinking of it as an editor and come to see it for what it really is. A whole computer with an editor bolted on.&lt;/li&gt;
&lt;li&gt;Use Emacs not just for writing, but also have it serve as the cornerstone for two other extremely important activities in my life, organising my life (with &lt;a href="https://orgmode.org/" target="_blank" rel="noreferrer"&gt;Org Mode&lt;/a&gt;) and tending to my commonplace book (with &lt;a href="https://www.orgroam.com/" target="_blank" rel="noreferrer"&gt;Org Roam&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Come so far as to scrape a web page, set it up as a connected node in my &lt;a href="https://janusworx.com/tags/zettelkasten/" &gt;Zettelkasten&lt;/a&gt;, strip close to fifty superfluous lines, edit the rest to my liking, change the title to title case, and then file it way within minutes, and learn do all this by osmosis and research over the years, just by using it daily and being curious&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;Have a kind community support all my &lt;a href="https://janusworx.com/blog/having-my-emacs-tasks-and-notes-ready/#update-2023-11-17" target="_blank" rel="noreferrer"&gt;crazy attempts&lt;/a&gt; to bend Emacs to my will&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I would have told you, you were off your rocker.&lt;br&gt;
But I do, do these things (which, I’m ridiculously pleased with) and have this wonderful community (which, I am earnestly grateful for).&lt;br&gt;
Here’s to three and a half decades!&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;and being a bit stubborn and refusing to accept the status quo&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Weirdly Placed Emacs Org Branches Are Only Cosmetic</title><link>https://janusworx.com/work/weirdly-placed-emacs-org-branches-are-only-cosmetic/</link><pubDate>Mon, 27 Nov 2023 08:26:19 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/weirdly-placed-emacs-org-branches-are-only-cosmetic/</guid><description>&lt;p&gt;Every evening, after my &lt;a href="https://www.youtube.com/watch?v=-pdmry5gU7g" target="_blank" rel="noreferrer"&gt;shutdown ritual&lt;/a&gt;, I move my current day’s branch to the bottom of my &lt;a href="https://orgmode.org/" target="_blank" rel="noreferrer"&gt;Org Mode&lt;/a&gt; file, so I begin the next day at &lt;a href="https://janusworx.com/blog/having-my-emacs-tasks-and-notes-ready/" &gt;the same fixed place, at line 36.&lt;/a&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/emacs-orgmove-branch-1.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;The day is done; moving it to the bottom of the pile&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Every time I move though, it goes there and sits, right &lt;em&gt;next&lt;/em&gt; to the last branch, instead of &lt;em&gt;under&lt;/em&gt; it. So I would grumble a bit, and then go hit the &lt;code&gt;return&lt;/code&gt; key as required, to get it all right and proper. And I’m tired, so at least one time out of three, I mess the older day too, and then I grumble even more and fix that too.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/emacs-orgmove-branch-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Where it sits awkwardly&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Until today morning, when I realised I had &lt;em&gt;not&lt;/em&gt; done my fix the day dance, yesterday…&lt;br&gt;
And the day was correctly positioned at the bottom!&lt;br&gt;
So, was this was just a purely cosmetic issue?!&lt;br&gt;
I tried it with a couple of test days.&lt;br&gt;
I saved, closed, and opened up my file. Fixed!&lt;br&gt;
Then I tried some more tests days and I expanded all my tasks &lt;code&gt;Shift-Tab&lt;/code&gt; and and closed them. Fixed! 🙂&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/emacs-orgmove-branch-3.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Yay! The Org Mode elves fixed it!&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;I guess, I have to go find something else to be grumpy about now 😂&lt;/p&gt;

&lt;h3 class="relative group"&gt;&lt;em&gt;Update: 2023-11-27&lt;/em&gt;
 &lt;div id="update-2023-11-27" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#update-2023-11-27" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;A friend on the fediverse, encouraged me to try filing a bug report with the Org folk.&lt;br&gt;
To which I retort, this is more a PEBKAC problem, than an Org Mode problem.&lt;br&gt;
Most likely I am doing something dumb or I have something misconfigured, or some of my Org helper packages (Org-contrib, Org-ql, Org-Web-Tools, Org Superstar) are trampling over one another.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;As I grow older, habits, routines and static places are growing ever more important, so I can function well.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Getting Emacs Windows to Not Be Shy</title><link>https://janusworx.com/work/getting-emacs-windows-to-not-be-shy/</link><pubDate>Sat, 18 Nov 2023 09:37:35 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/getting-emacs-windows-to-not-be-shy/</guid><description>&lt;p&gt;Figuring out my webapps problem yesterday made me ask myself if I could somehow repurpose that little &lt;code&gt;xdotool&lt;/code&gt; script to solve another niche itch that I had.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Spoiler alert: It did.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I run &lt;a href="https://www.emacswiki.org/emacs/EmacsAsDaemon" target="_blank" rel="noreferrer"&gt;Emacs as a daemon&lt;/a&gt;, and use EmacsClient to connect to the Emacs process.&lt;br&gt;
Makes it really ease to launch, work on, sling around and close lots of Emacs windows.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Which brings me to the hiccough. I launch EmacsClient and a window (frame) does indeed launch, but it just … stays there in the background.&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/ec-err-1.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Repeated attempts to launch EmacsClient are to no avail.&lt;br&gt;
The pesky little windows just pile up in their corner.&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/ec-err-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Ergo, this little bit of Bash/xdotool shenanigans …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#!/usr/bin/env bash 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;EMACSWINID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;xdotool search &lt;span class="s2"&gt;&amp;#34;\*scratch\*&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; tail -n1&lt;span class="k"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;$EMACSWINID&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; xdotool windowactivate &lt;span class="nv"&gt;$EMACSWINID&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; sh -c &lt;span class="s1"&gt;&amp;#39;emacsclient --create-frame --no-wait --alternate-editor=&amp;#34;&amp;#34; &amp;amp;&amp;amp; export EMACSWINID=$(xdotool search &amp;#34;\*scratch\*&amp;#34; | tail -n1) &amp;amp;&amp;amp; xdotool windowactivate $EMACSWINID&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;fi&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Check to see if an Emacs scratch buffer is open. If it is, switch to it.&lt;/li&gt;
&lt;li&gt;Otherwise, just launch EmacsClient, get the id of the scratch buffer window (frame) and raise it, so that I can work on it. In peace.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/ec-err-3.png" alt="An Emacs frame in the foreground" /&gt;
 
 
 &lt;/figure&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;&lt;em&gt;Cue: sounds of relief, in the background&lt;/em&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Frames, in Emacs parlance&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>On How Emacs Adapts</title><link>https://janusworx.com/work/on-how-emacs-adapts/</link><pubDate>Sat, 18 Nov 2023 06:30:27 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/on-how-emacs-adapts/</guid><description>&lt;p&gt;I love it whenever the Roger Ebert of the Emacs world aka Jon Snader aka irreal, gets his hands on &lt;a href="https://janusworx.com/blog/having-my-emacs-tasks-and-notes-ready/" &gt;one of my posts&lt;/a&gt; and uses it for his insightful annotations.&lt;br&gt;
His conclusion is something I totally relate to, because that is exactly what has kept me using Emacs ever since I began using it. It bends to my will. Or as Jon puts it …&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;It’s yet another way that Emacs adapts itself to its users rather than insisting those users adapt themselves to Emacs.&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;&lt;a href="https://irreal.org/blog/?p=11778" target="_blank" rel="noreferrer"&gt;Read irreal’s entire post here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;P.S. I also managed to power my workflow with elisp, like Jon’s first impulse told him to. And that was because of Emacs’ second (or rather biggest) strength.&lt;br&gt;
The kindness and warmth of the Emacs community at large.&lt;br&gt;
&lt;a href="https://mastodon.social/@laotang" target="_blank" rel="noreferrer"&gt;@laotang&lt;/a&gt; from the fediverse, reached out and gave me the &lt;a href="https://janusworx.com/blog/having-my-emacs-tasks-and-notes-ready/#update-2023-11-17" &gt;gift of an elisp function, that did what I needed&lt;/a&gt; :)&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Getting Around Linux Mint Web App Manager Window Errors</title><link>https://janusworx.com/work/getting-around-linux-mint-web-app-manager-window-errors/</link><pubDate>Fri, 17 Nov 2023 19:09:46 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/getting-around-linux-mint-web-app-manager-window-errors/</guid><description>&lt;p&gt;One of best parts of using Linux Mint is its &lt;a href="https://www.linuxmint.com/rel_ulyssa_cinnamon_whatsnew.php" target="_blank" rel="noreferrer"&gt;Web Apps Manager&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I can use most of my websites as dedicated applications now.&lt;br&gt;
Case in point, I use a dedicated web app to run &lt;a href="https://elk.zone/" target="_blank" rel="noreferrer"&gt;Elk&lt;/a&gt;, the web client for Mastodon.&lt;br&gt;
Social stuff like this, or banking stuff or my webmail for that matter, stays away from the rest of my browsing and lets me keep these activities cognitively separate.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/ff-err-1.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;So far, so good.&lt;br&gt;
The issue arises, when I try to launch one of these dedicated apps and it is already running.&lt;br&gt;
Due to the way these little web containers are created, it cannot run another instance and I run into this error.&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;“Firefox is already running, but is not responding. To use Firefox, you must first close the existing Firefox process, restart your device, or use a different profile.”&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;&lt;p&gt;&lt;br&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/ff-err-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;br&gt;

And I’m like, I know this you git! I &lt;em&gt;am&lt;/em&gt; running a different profile. Can’t you just switch to it? Apparently it cannot. So I’d have to go looking for my app and then &lt;em&gt;Alt-Tab&lt;/em&gt; through dozens of windows or look in my dock&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt; and then get it back.&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;The problem wasn’t the error per se, the problem was the slightly longish delay between me calling the app and the error popping up. And also all that crazy hunting and pecking to find the right window, once I see the error. It gets maddening when I need to do this dance and all I want to do is get to my email window to go look for something important.&lt;/p&gt;
&lt;p&gt;So I began casting around for a way to somehow switch to the actually running window. Was it possible?&lt;br&gt;
That’s when I found &lt;a href="https://github.com/jordansissel/xdotool" target="_blank" rel="noreferrer"&gt;&lt;code&gt;xdotool&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
It lets you do all sorts of crazy things with windows and keyboard and mouse input, but most importantly for me, it let me search for my running app window &lt;em&gt;and&lt;/em&gt; it let me raise and bring it back up. Awesome!&lt;/p&gt;
&lt;p&gt;So instead of telling &lt;a href="https://ulauncher.io/" target="_blank" rel="noreferrer"&gt;Ulauncher&lt;/a&gt; to directly launch the app, I told it to run this script instead.&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/ff-err-3.png" alt="pic of the ulauncher script window" /&gt;
 
 
 &lt;/figure&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;span class="lnt"&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#!/usr/bin/env bash 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ELKWINID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;xdotool search WebApp-ElkforToots1234 &lt;span class="p"&gt;|&lt;/span&gt; tail -n1&lt;span class="k"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;$ELKWINID&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; xdotool windowactivate &lt;span class="nv"&gt;$ELKWINID&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; sh -c &lt;span class="s1"&gt;&amp;#39; firefox --class WebApp-ElkforToots1234 --profile /home/user/.local/share/ice/firefox/ElkforToots1234 --no-remote &amp;#34;https://elk.zone/&amp;#34;&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;fi&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;In a nutshell, I’m looking to see if Elk is already running (using the xdotool search option in line 3).&lt;br&gt;
If it is, I tell xdotool to get that window to the forefront of the display; and if it isn’t, then to just go ahead and launch the app anew.&lt;/p&gt;
&lt;p&gt;What a load off my mind, this one was!&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;I don’t know if this would happen if I use Chrome as the browser engine. I don’t even use it as a browser, much. And for things like these, I wouldn’t touch it with a ten foot pole.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;and still some how miss it&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Having My Emacs Tasks and Notes Ready</title><link>https://janusworx.com/work/having-my-emacs-tasks-and-notes-ready/</link><pubDate>Thu, 16 Nov 2023 18:56:38 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/having-my-emacs-tasks-and-notes-ready/</guid><description>&lt;p&gt;&lt;a href="https://janusworx.com/work/having-my-emacs-tasks-and-notes-ready/#update-2023-11-17" &gt;&lt;em&gt;Updated: 2023-11-17. Read more below&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nearly everything I write is in Emacs.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
It’s been slightly more than two years, since I made the move to using it as my everyday text editor.&lt;br&gt;
I have a spartan Emacs config, with only a few customisations, that I found by watching David Wilson aka System Crafters’ &lt;a href="https://www.youtube.com/live/74zOY-vgkyw" target="_blank" rel="noreferrer"&gt;Emacs From Scratch #1&lt;/a&gt; video and the rest by searching on the web and asking around on the fediverse.&lt;/p&gt;
&lt;p&gt;I’ve touched my config only about three times; basically every time I’ve found a new use for emacs.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;When I started editing text&lt;/li&gt;
&lt;li&gt;When I start using it as my Organiser (&lt;a href="https://orgmode.org/features.html" target="_blank" rel="noreferrer"&gt;Org Mode&lt;/a&gt;) and&lt;/li&gt;
&lt;li&gt;When I began using it as my Zettelkasten (&lt;a href="https://www.orgroam.com/" target="_blank" rel="noreferrer"&gt;Org Roam&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Which is to say, I know only the bare bones of how Emacs configuration and Elisp work.&lt;/p&gt;
&lt;p&gt;And yet … and yet …&lt;br&gt;
I have this itch that rankles.&lt;br&gt;
You see, every morning I sit at the computer with my cup of coffee, and pull up my tasks and notes and the agenda for the day.&lt;br&gt;
Now I don’t use the agenda much, but the tasks and notes are a must.&lt;br&gt;
So I open the tasks file and maximize my window and then I split my frame and I open the notes file, and then I go back to my tasks and I have it all ready just the way I like it.&lt;br&gt;
Thing is, I’m grumpy in the morning and doing all that grates on me.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://youtu.be/RMgaDqgv5u4?t=20" target="_blank" rel="noreferrer"&gt;There’s gotta be a better way!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So I tried looking around, and came to the conclusion that creating a function, that did all this for me, would be the best thing.&lt;br&gt;
But I know no Elisp.&lt;br&gt;
And right now, I have no time to put into learning it. I did spend close to a day looking at what I could whip up, to no avail.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;So the next best idea I came up with, was recording my actions, doing the file opening, window arranging dance, as a macro and then assigning a keyboard shortcut to it.&lt;br&gt;
That turned out to be iffy.&lt;br&gt;
It’d work fine when I created it, but when I restarted my Emacs daemon (or my system) and then call it again, Emacs would freeze.&lt;/p&gt;
&lt;p&gt;My intuition told me that it could be the fact, that a recorded macro&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt; could not handle opening files and switching buffers.&lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
Then I realised that I could outsource &lt;em&gt;that&lt;/em&gt; part to the command line or my application launcher&lt;sup id="fnref:5"&gt;&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref"&gt;5&lt;/a&gt;&lt;/sup&gt; and leave the rest of it to the macro.&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;So I did just that. I created a Ulauncher shortcut.&lt;br&gt;
It binds the keyword &lt;code&gt;etn&lt;/code&gt; to the command:&lt;br&gt;
&lt;code&gt;emacsclient -c --no-wait ~/path/to/tasks.org ~/path/to/my/notes.org&lt;/code&gt;&lt;br&gt;
so that Emacs opens both my tasks and notes files as it fires up.&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/etn-ulauncher.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;A Ulauncher window, with name, keyword and the actual command to launch emacs&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;And in Emacs I bound a keyboard macro, to the rest of the recorded macro code that would&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Maximise the frame&lt;/li&gt;
&lt;li&gt;Split the frame into two windows, with my tasks on top and the notes in the bottom&lt;/li&gt;
&lt;li&gt;Have the cursor be ready at the place I needed it to be.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-elisp" data-lang="elisp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;defalias&lt;/span&gt; &lt;span class="ss"&gt;&amp;#39;mjbtn&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;kmacro&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;M-x t o g g l e - f r a m e - m a x i m i z e d &amp;lt;return&amp;gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; C-x 2 C-x o C-x b n o t e s . o r g &amp;lt;return&amp;gt; C-x o M-g g 3 6 &amp;lt;return&amp;gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;;; Assign a keyboard shortcut to the macro above: C-c z&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;global-set-key&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;kbd&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;C-c z&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ss"&gt;&amp;#39;mjbtn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;br&gt;
Et voilà! I have everything, just the way I want it.&lt;br&gt;
And while it might not be fancy, it works without a fuss!&lt;br&gt;
&lt;br&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/etn-emacs.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;Update: 2023-11-17
 &lt;div id="update-2023-11-17" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#update-2023-11-17" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;One advantage of writing about what you do and putting it out there, is that really kind souls come along and teach you new things!&lt;br&gt;
One of them is &lt;a href="https://mastodon.social/@laotang" target="_blank" rel="noreferrer"&gt;@laotang&lt;/a&gt;, over on the Fediverse.&lt;br&gt;
Remember when I said, the best solution would be to write an Emacs function that would do what I wanted?&lt;br&gt;
Well, laotang loved my tinkering and then went on to &lt;a href="https://mastodon.social/@laotang/111424355930361393" target="_blank" rel="noreferrer"&gt;give me just that&lt;/a&gt;!&lt;br&gt;
I raise my cup of coffee to you, Sir! You made my day! Thank you, so much!&lt;/p&gt;
&lt;p&gt;Here’s the code he suggested.Worked like a charm!&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-elisp" data-lang="elisp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;defun&lt;/span&gt; &lt;span class="nv"&gt;getting-ready&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s"&gt;&amp;#34;Getting ready for work.&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;interactive&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;toggle-frame-maximized&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;split-window-below&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;find-file&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;~/path/to/notes/notes.org&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;find-file-other-window&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;~/path/to/tasks/tasks.org&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;global-set-key&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;kbd&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;C-c r&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ss"&gt;&amp;#39;getting-ready&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Oh, and if you liked how Org-Roam worked in the past? When it was all just text files?&lt;br&gt;
Well, if you want something like that, check out laotang’s feature-complete&lt;sup id="fnref:6"&gt;&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref"&gt;6&lt;/a&gt;&lt;/sup&gt; replica, &lt;a href="https://github.com/rtrppl/orgrr" target="_blank" rel="noreferrer"&gt;ORGRR&lt;/a&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;with the exception of code.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;Not much. there are lots of primitives and I cannot separate the language from Emacs specific stuff yet&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;rather, &lt;em&gt;&lt;strong&gt;my&lt;/strong&gt;&lt;/em&gt; recorded macro&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;Don’t know if this is true or not. This is just me scratching my head. I’m assuming a function that can call buffers and handle switching between them is the ticket.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:5"&gt;
&lt;p&gt;&lt;a href="https://ulauncher.io/" target="_blank" rel="noreferrer"&gt;Ulauncher&lt;/a&gt;&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:6"&gt;
&lt;p&gt;almost&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>My Custom CSS for Miniflux</title><link>https://janusworx.com/work/my-custom-css-for-miniflux/</link><pubDate>Wed, 15 Nov 2023 16:10:13 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/my-custom-css-for-miniflux/</guid><description>&lt;p&gt;Various bits and bobs, I gradually accumulated over the past couple of years, to make my self hosted &lt;a href="https://miniflux.app" target="_blank" rel="noreferrer"&gt;Miniflux&lt;/a&gt; look just the way I want it.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Width and Size
 &lt;div id="width-and-size" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#width-and-size" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Changed the width to 850 pixels wide, because even on my vertical monitor, there was quite a bit of wasted horizontal space. Changed the body to use a slightly smaller size.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-CSS" data-lang="CSS"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;850&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="err"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;&lt;em&gt;Italic&lt;/em&gt; Blockquotes
 &lt;div id="italic-blockquotes" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#italic-blockquotes" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Changed blockquotes to be italic, so that they’re better set off against normal body text.&lt;br&gt;
Also made them a wee bit tinier than the body.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-CSS" data-lang="CSS"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;blockquote&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;87.5&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;italic&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;Smaller title size
 &lt;div id="smaller-title-size" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#smaller-title-size" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;If you follow Tumblr blogs as I do&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;, you know they have &lt;a href="https://help.tumblr.com/hc/en-us/articles/231857168-Ask" target="_blank" rel="noreferrer"&gt;Tumblr Asks&lt;/a&gt;.&lt;br&gt;
The asks themselves become the title of an RSS entry, when the author responds to one.&lt;br&gt;
And long asks lead to long titles.&lt;br&gt;
So here’s a bit of CSS to make the font smaller than the default &lt;code&gt;H1&lt;/code&gt; size.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-CSS" data-lang="CSS"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;entry-header&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="kt"&gt;em&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Even at this size, the titles get a bit unwieldy at times (below), but this much I can live with.&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/miniflux-smol-title.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;Disable Tag Visibility
 &lt;div id="disable-tag-visibility" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#disable-tag-visibility" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Miniflux displays tags, if it detects them on certain posts.&lt;br&gt;
I don’t read them. I don’t need them. It breaks my next-next-clicky-next chain of continuity by pushing the next post link below, making me move my mouse&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;. So I killed them!&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-CSS" data-lang="CSS"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;entry-tags&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;In Summary
 &lt;div id="in-summary" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#in-summary" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;So, all the flotsam and jetsam above, go into a box that says “Custom CSS” at the very bottom of the Settings page.
Putting it all together we have …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-CSS" data-lang="CSS"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;/*set width*/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;850&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="err"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;article&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;blockquote&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;87.5&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;italic&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;entry-header&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="kt"&gt;em&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;entry-tags&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Hello, &lt;a href="https://tkingfisher.tumblr.com/" target="_blank" rel="noreferrer"&gt;Ursula Vernon&lt;/a&gt;, &lt;a href="https://dduane.tumblr.com/" target="_blank" rel="noreferrer"&gt;Diane Duane&lt;/a&gt;, &lt;a href="https://petermorwood.tumblr.com/" target="_blank" rel="noreferrer"&gt;Peter Morwood&lt;/a&gt; &amp;amp; &lt;a href="https://neil-gaiman.tumblr.com/" target="_blank" rel="noreferrer"&gt;Neil Gaiman&lt;/a&gt;!&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;Oh, the troubles I face, I tell you!&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>derb; Script to Create podcast RSS feeds</title><link>https://janusworx.com/work/derb/</link><pubDate>Thu, 14 Sep 2023 17:38:03 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/derb/</guid><description>&lt;p&gt;I wrote a tiny script that creates an RSS feed for all the audio files it finds in a folder.&lt;br&gt;
I call it &lt;a href="https://github.com/jasonbraganza/derb" target="_blank" rel="noreferrer"&gt;derb&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;My mother gets devotional songs and sermons on cds, which I rip to MP3 files and then dump on her phone for her.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
She listens to them all the time, and now three of her friends want to do the same too.&lt;br&gt;
I thought of just sticking them in my self hosted &lt;a href="https://jellyfin.org/" target="_blank" rel="noreferrer"&gt;Jellyfin&lt;/a&gt; instance,&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt; but then I realised, all of them have erratic, slow internet. So the idea of self hosting a podcast feed really appealed to me.&lt;/p&gt;
&lt;p&gt;So I quickly used &lt;a href="https://github.com/lkiesow/python-feedgen" target="_blank" rel="noreferrer"&gt;Feedgenerator&lt;/a&gt; in conjunction with &lt;a href="https://github.com/devsnd/tinytag" target="_blank" rel="noreferrer"&gt;Tinytag&lt;/a&gt;, to whip up a script that’d help me do just that.
&lt;a href="https://github.com/jasonbraganza/derb" target="_blank" rel="noreferrer"&gt;The code’s up on Github&lt;/a&gt;, if you want to go install and play with it yourselves.&lt;/p&gt;
&lt;p&gt;Here’s a quick walk through &lt;code&gt;derb.py&lt;/code&gt;.&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;h3 class="relative group"&gt;Setting up house
 &lt;div id="setting-up-house" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#setting-up-house" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;We set up a place to accept a path containing the files. The feed will ultimately be placed as a &lt;code&gt;feed.xml&lt;/code&gt; in the same folder as well
We then walk through the folder (after a really basic sanity check) and gather all the files into a list.&lt;br&gt;
The &lt;code&gt;base_url&lt;/code&gt; is where the feeds (along with the audio) will be served from.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;base_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;https://ab.janusworx.com&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;book_folder&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Paste path to audiobook folder here: &amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;book_out_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;base_url&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;book_folder&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;/&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;file_list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;walk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;book_folder&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Do a basic check on the validity of the path we get, &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# before we build the audio file list.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;all_files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file_list&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="ne"&gt;IndexError&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;---&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;ERROR!: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Have you typed in the right path?&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;---&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Quitting script!&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;each_file&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;all_files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;each_file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;each_file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;each_file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;suffix&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;.mp3&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;.m4a&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;.m4b&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;audio_files&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;each_file&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;audio_files&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;Creating a feed
 &lt;div id="creating-a-feed" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#creating-a-feed" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;We now go about the business of setting up the feed proper.&lt;br&gt;
To begin with, we grab the first file we can get our grubby paws on, and create a TinyTag object that’ll give us a lot of metadata. (If there isn’t any, we quit.)&lt;br&gt;
Oh, and by the way, how do I know what data I’d need to create a feed? I just cribbed everything from the &lt;a href="https://github.com/lkiesow/python-feedgen" target="_blank" rel="noreferrer"&gt;Feedgenerator’s excellent documentation&lt;/a&gt;. I also looked at the widely linked to, &lt;a href="https://cyber.harvard.edu/rss/rss.html" target="_blank" rel="noreferrer"&gt;RSS&lt;/a&gt; reference page for clarification if I got confused.&lt;/p&gt;
&lt;p&gt;We then, instantiate create a feedgenerator object along with the podcast extension.&lt;br&gt;
Following which, we supply the feed a title, an id&lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;, feed author details, a language, podcast category and description.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Setup a feed&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;## Grab feed metadata from the first audio file&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;feed_metadata_file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TinyTag&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;book_folder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;audio_files&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;## Grab title from metadata file.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;## At the same time, break out if there isn’t any.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;feed_metadata_file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;album&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;---&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Stopping feed creation.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;		&lt;span class="n"&gt;Setup&lt;/span&gt; &lt;span class="n"&gt;audio&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="n"&gt;metadata&lt;/span&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;tag&lt;/span&gt; &lt;span class="n"&gt;editor&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;feed_title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;feed_metadata_file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;album&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;## Creating feed instance&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_book_feed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;FeedGenerator&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_book_feed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;load_extension&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;podcast&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;## Setting up more stuff on the feed proper&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_book_feed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_book_feed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;feed_title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_book_feed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;author&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;name&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Jason Braganza&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;email&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;feedback@janusworx.com&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_book_feed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;link&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;book_out_path&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;self&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_book_feed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;language&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;en&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_book_feed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;podcast&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;itunes_category&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Private&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_book_feed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;feed_title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;Adding episodes and writing out the file
 &lt;div id="adding-episodes-and-writing-out-the-file" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#adding-episodes-and-writing-out-the-file" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;After which it’s then a matter of looping through that audio file list we created and adding them as entries to the feed object we created.&lt;br&gt;
Once again we grab the metadata from each file, using &lt;a href="https://github.com/devsnd/tinytag" target="_blank" rel="noreferrer"&gt;Tinytag&lt;/a&gt;, and then set each feed entry’s details (title, id and enclosure).&lt;br&gt;
I’ve hardcoded the mime types, since I know I only have two basic type of audio files. If you don’t know what kind of audio, you might be serving, the &lt;a href="https://pypi.org/project/mimetypes-magic/" target="_blank" rel="noreferrer"&gt;&lt;code&gt;mimetypes-magic&lt;/code&gt;&lt;/a&gt; package should help.&lt;br&gt;
Finally we write it all out to a file.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Loop the file list and create entries in the feed&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;each_file&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;audio_files&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;each_file_metadata&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TinyTag&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;book_folder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;each_file&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;episode_file_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;each_file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;episode_suffix&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;episode_file_path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;suffix&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;episode_mime_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;audio/mpeg&amp;#39;&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;episode_suffix&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;.mp3&amp;#39;&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;audio/x-m4a&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;episode_title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;each_file_metadata&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;episode_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;each_file_metadata&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;filesize&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;episode_link&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;book_out_path&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;each_file&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="n"&gt;audio_episode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;audio_book_feed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add_entry&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;audio_episode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;episode_title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;audio_episode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;episode_link&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;audio_episode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;enclosure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;episode_link&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;episode_size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;episode_mime_type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Write the rss feed to the same folder as the source audio files&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;audio_book_feed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rss_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;book_folder&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/feed.xml&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;h3 class="relative group"&gt;Serving
 &lt;div id="serving" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#serving" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Once done, I moved it all to my trusty Pi, which runs barebones Nginx with a single bare page, protected by basic auth.&lt;br&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/private-web-page.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
I decided not to publish the feeds publicly.&lt;br&gt;
Rather I’m going to just set it up in their podcast players, when I meet them, or pass it over to their kids over Signal.&lt;sup id="fnref:5"&gt;&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref"&gt;5&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
It’s already worked with three of them, so everyone’s happy and here’s me hoping, fingers crossed, it’ll be easy to support in the long run.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update (2023-09-15):&lt;/strong&gt;&lt;/em&gt; &lt;em&gt;&lt;a href="https://www.humblebundle.com/books/sci-fi-classic-audiobooks-feat-hell-divers-books" target="_blank" rel="noreferrer"&gt;Guess I’m using it for myself too, now&lt;/a&gt; 😂&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Yes, while it’s slowly moving to Youtube, that world still mostly depends on CDs and USB sticks.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;the audio files, not my mother’s friends.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;Large parts are elided. Please look at Github for the actual file.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;normally, the site it’ll be served from&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:5"&gt;
&lt;p&gt;Why should I be the only one doing family tech support?&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>htpasswd Notes to Self</title><link>https://janusworx.com/work/htpasswd-notes-to-self/</link><pubDate>Sat, 24 Jun 2023 15:16:26 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/htpasswd-notes-to-self/</guid><description>&lt;p&gt;To &lt;em&gt;create&lt;/em&gt; the &lt;code&gt;htpasswd&lt;/code&gt; file along with its first user, I just:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;htpasswd -c /path/to/htpasswdfile/htpasswd some-user&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;It’ll ask you for the password for that user, encrypt it and store it in that location.&lt;/p&gt;
&lt;p&gt;Add these lines to get Nginx to use the file for basic auth:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-nginx" data-lang="nginx"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;auth_basic&lt;/span&gt;	&lt;span class="s"&gt;&amp;#34;Login&lt;/span&gt; &lt;span class="s"&gt;to&lt;/span&gt; &lt;span class="s"&gt;Proceed:&lt;/span&gt; &lt;span class="s"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;#(or whatever message you want)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;auth_basic_user_file&lt;/span&gt; &lt;span class="s"&gt;/path/to/htpasswdfile/htpasswd&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;To &lt;em&gt;append&lt;/em&gt; &lt;em&gt;&lt;strong&gt;another&lt;/strong&gt;&lt;/em&gt; user to the &lt;code&gt;htpasswd&lt;/code&gt; file do:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;htpasswd /path/to/htpasswd/htpasswd second-user&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;That ought to do it.&lt;/p&gt;
&lt;p&gt;P.S. Install &lt;code&gt;apache-utils&lt;/code&gt; on Debian or use Paru/Yay to install &lt;code&gt;nginx_passwd&lt;/code&gt; on Arch.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Quick Fix: Go Mod File Not Found in Current Directory</title><link>https://janusworx.com/work/quick-fix-go-mod-file-not-found-in-current-directory/</link><pubDate>Wed, 15 Mar 2023 19:11:11 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/quick-fix-go-mod-file-not-found-in-current-directory/</guid><description>&lt;p&gt;As I have begun learning Go (or &lt;code&gt;golang&lt;/code&gt; as I needed to use for searching on the web), I’ve been running into some sort of chasm that the Go language seems to have crossed&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; that my old textbook obviously could not have foreseen when it was published.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;The book asks me to do a &lt;code&gt;go run .&lt;/code&gt; to get my file to compile and run.&lt;br&gt;
Go seems to having none of it.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;go: go.mod file not found in current directory or any parent directory; see &amp;#39;go help modules&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Some searching on the web, and I found setting the &lt;code&gt;GO111MODULE&lt;/code&gt; environment variable to &lt;code&gt;auto&lt;/code&gt; or &lt;code&gt;off&lt;/code&gt; will do the trick. So …&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;GO111MODULE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;auto&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;did indeed do the trick.&lt;/p&gt;
&lt;p&gt;I’m not putting this in my &lt;code&gt;.bashrc&lt;/code&gt; to make it persistent though. The Go folks must have had some reason to make this change, which I’m (currently) not aware of. Was it architectural? Security related? That is a web search for another day.&lt;/p&gt;
&lt;p&gt;Right now the code compiles and I must be off to my next exercise.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;I’m using v1.20.1&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I’m learning from Packt’s, The Go Workshop (Delio D’Anna et al), 2019&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Huginn: Vive La Pratique Délibérée Avec Les Flux RSS</title><link>https://janusworx.com/work/huginn-vive-la-pratique-d%C3%A9lib%C3%A9r%C3%A9e-avec-les-flux-rss/</link><pubDate>Wed, 15 Mar 2023 09:32:05 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/huginn-vive-la-pratique-d%C3%A9lib%C3%A9r%C3%A9e-avec-les-flux-rss/</guid><description>&lt;p&gt;I’ve been learning French, on my own at a snail’s pace over the past year or so.&lt;br&gt;
All because I want to read Émilie du Châtelet, Dumas, Verne, and Montaigne in their native tongue.&lt;/p&gt;
&lt;p&gt;Since I cannot do immersion nor give regular practice the time it wants, it’s … slow going
But I do, do it. Regularly and &lt;a href="https://jamesclear.com/deliberate-practice-theory" target="_blank" rel="noreferrer"&gt;deliberately&lt;/a&gt;. I’ve built up a vocabulary of about 500-700 words by now and I know if I keep this up, I’ll be able to do read well in time.&lt;/p&gt;
&lt;p&gt;One way I practice is to take something in French and read it slowly, looking up words and phrases and slowly building up the missing pieces.&lt;br&gt;
And to do that, I need something in French. I stumbled across the &lt;a href="https://www.france-pittoresque.com/" target="_blank" rel="noreferrer"&gt;France Pittoresque&lt;/a&gt; site and fell in love with it. French &lt;em&gt;and&lt;/em&gt; History! Just my kind of site.&lt;/p&gt;
&lt;p&gt;Being the lazy bum, that I am, I went looking for an RSS feed, so that I could read their daily article in &lt;a href="https://reeder.app/" target="_blank" rel="noreferrer"&gt;Reeder&lt;/a&gt;.&lt;br&gt;
And hit my first stumbling block.&lt;br&gt;
The good folk at France Pittoresque, don’t provide a feed. Or if they do, I couldn’t find it. Even after looking and looking. And then looking some more.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;You know where I’m going with this. This is a job for &lt;a href="https://janusworx.com/blog/huginn" &gt;Huginn&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;This is how the site looks today&lt;/p&gt;
&lt;p&gt;&lt;a href="https://janusworx.com/images/2023/huginn-france-pittoresque-0.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-france-pittoresque-0.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;click to embiggen.&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;And this little item is what I want to get, on a daily basis.&lt;br&gt;
&lt;br&gt;

&lt;a href="https://janusworx.com/images/2023/huginn-france-pittoresque-1.jpeg" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-france-pittoresque-1.jpeg" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;click to embiggen. Actually click any of them to embiggen!&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;So I whipped up this scenario.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://janusworx.com/images/2023/huginn-france-pittoresque-2.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-france-pittoresque-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol&gt;
&lt;li&gt;It scrapes that little section I mentioned above and gets me the title, the url and the description of the article&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href="https://janusworx.com/images/2023/huginn-france-pittoresque-3.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-france-pittoresque-3.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol start="2"&gt;
&lt;li&gt;And generates an RSS feed that I can then use in my feed reader!&lt;br&gt;
The feed is normally at:&lt;br&gt;
&lt;code&gt;http://your-huginn-instance/users/[your-user-id-int]/web_requests/[agent-id-int]/some-'secret'-string.xml&lt;/code&gt;&lt;br&gt;
&lt;br&gt;

It looks more complicated than it is. It’ll get generated the moment you create your agent. One advantage of &lt;a href="https://janusworx.com/blog/why-i-use-an-online-vm/" &gt;using a vm&lt;/a&gt; is that my feed is accessible from any device.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href="https://janusworx.com/images/2023/huginn-france-pittoresque-4.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-france-pittoresque-4.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;You can &lt;a href="https://github.com/jasonbraganza/huginn-scenarios/tree/main/france-pittoresque-scrape-create-rss" target="_blank" rel="noreferrer"&gt;find the scenario code here&lt;/a&gt;, if you want to play with it.&lt;/p&gt;
&lt;p&gt;Huginn has proven invaluable when it comes to doing all the little things, that I’d rather not do :)&lt;br&gt;
&lt;em&gt;&lt;strong&gt;Merci beaucoup, Huginn!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;You’re talking to a lazy bum here. So quite possible I overlooked something.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Huginn: On Becoming a Cal Newport Podcast Packrat</title><link>https://janusworx.com/work/huginn-on-becoming-a-cal-newport-podcast-packrat/</link><pubDate>Tue, 14 Mar 2023 17:55:01 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/huginn-on-becoming-a-cal-newport-podcast-packrat/</guid><description>&lt;p&gt;First things first, you should be &lt;a href="https://www.thedeeplife.com/listen/" target="_blank" rel="noreferrer"&gt;listening to Cal Newport&lt;/a&gt; and &lt;a href="https://calnewport.com/writing/#books" target="_blank" rel="noreferrer"&gt;reading his books too&lt;/a&gt;!&lt;br&gt;
His recent episode on &lt;a href="https://www.thedeeplife.com/podcasts/episodes/ep-238-the-joys-of-the-reading-life/" target="_blank" rel="noreferrer"&gt;books and reading&lt;/a&gt; was lovely!&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;If I remember right, he started doing the podcast, a couple of months after the &lt;a href="https://en.wikipedia.org/wiki/COVID-19_pandemic" target="_blank" rel="noreferrer"&gt;pandemic&lt;/a&gt; broke out and the world shut down. And it felt very much at the time, like one of those friendly voices across the waves in some post apocalyptic movie.&lt;br&gt;
It felt warm, personal and gave me something to do in those dark days.&lt;br&gt;
Ergo, I have a strong connection to it and I began saving every episode, at around episode 10 or so.&lt;/p&gt;
&lt;p&gt;Oh, and speaking of slow productivity, it’s amazing to see what Cal has fashioned the podcast into. A slow steady drumbeat of episodic growth has led to what he call the Cal Newport Empire, with &lt;a href="https://www.thedeeplife.com/" target="_blank" rel="noreferrer"&gt;media galore&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, like I was saying, I’ve been downloading them ever since the beginning, because I’ve some sort of unnatural attachment to them. They’re the thing I want to listen to if I’m marooned on a desert island.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;And now that I have &lt;a href="https://janusworx.com/blog/huginn" &gt;Huginn&lt;/a&gt;, the computer downloads it for me, in the folder I want, with the naming convention, I want.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Here’s the scenario that does it.&lt;br&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-cnp-0.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It scrapes the website, once every twelve hours to check for a new episode, and grabs the url and title.&lt;br&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-cnp-1.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/li&gt;
&lt;li&gt;It uses the url to download the episode to a folder.&lt;br&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-cnp-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/li&gt;
&lt;li&gt;And at the same time, sends me a notification. The title tells me what’s new :)

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-cnp-4.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I probably could use Huginn to rename and copy the file to where I want, but it runs from a Docker container and does not have access to the parent filesystem.&lt;br&gt;
So this little Python script&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt; does it for me.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;shutil&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;downloads_folder&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/path/to/downloaded/episode/directory/&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;destination_folder&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/path/to/destination/directory/&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;audio_file&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;downloads_folder&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;iterdir&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;audio_file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;suffix&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;.mp3&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;original_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;audio_file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stem&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;original_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;original_name&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;-&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;episode_number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;raw_file_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;CNPE&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;original_name&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;original_name&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:]))&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;new_file_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;episode_number&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39; - &amp;#39;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;raw_file_name&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;audio_file&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;suffix&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;shutil&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;move&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;downloads_folder&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;audio_file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;destination_folder&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;new_file_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;It looks for any mp3 files in the specified folder, renames them the way I want them named and then moves them to my packrat archive. &lt;em&gt;&lt;strong&gt;Et voilà!&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-cnp-5.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/p&gt;
&lt;p&gt;The scenario and scripts &lt;a href="https://github.com/jasonbraganza/huginn-scenarios/tree/main/cal-newport-podcast-episode-download" target="_blank" rel="noreferrer"&gt;are here, if you want them&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;What else, do you expect a bookworm to tell ya? 😂&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;with a stock of mp3 players and rechargable batteries&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;scheduled via crontab&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Huginn: the Rube Goldbergness of Updating Hugo</title><link>https://janusworx.com/work/huginn-the-rube-goldbergness-of-updating-hugo/</link><pubDate>Mon, 13 Mar 2023 19:35:06 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/huginn-the-rube-goldbergness-of-updating-hugo/</guid><description>&lt;p&gt;&lt;br&gt;

&lt;a href="https://janusworx.com/images/2023/rube_goldberg_war_machine_large.jpg" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/rube_goldberg_war_machine_small.jpg" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Click the pic to embiggen.&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Rube_Goldberg" target="_blank" rel="noreferrer"&gt;Rube Goldberg&lt;/a&gt; illustration via &lt;a href="https://www.flickr.com/photos/x-ray_delta_one/18482076814" target="_blank" rel="noreferrer"&gt;James Vaughan&lt;/a&gt;&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Ended up too sick to even tinker, since I last wrote.&lt;br&gt;
Well enough now, to scratch out some prose to get my brains in gear.&lt;br&gt;
Let’s start with Huginn adventure #1.&lt;br&gt;
Buckle up!&lt;/p&gt;

&lt;h3 class="relative group"&gt;Background
 &lt;div id="background" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#background" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;I found &lt;a href="https://janusworx.com/blog/huginn" &gt;Huginn&lt;/a&gt;, and am using it as my man friday.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;h3 class="relative group"&gt;The “Problem”
 &lt;div id="the-problem" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-problem" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;I run Hugo on &lt;del&gt;two&lt;/del&gt; three machines.&lt;br&gt;
I’m tired of updating to the latest release manually.&lt;br&gt;
The computer can do it for me!&lt;/p&gt;

&lt;h3 class="relative group"&gt;Why this way? Why? Why?!
 &lt;div id="why-this-way-why-why" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-this-way-why-why" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;It’s fun!&lt;/li&gt;
&lt;li&gt;Yes, there are other (most likely simpler) ways to do it, but Huginn is my new shiny hammer … and well you know!&lt;/li&gt;
&lt;li&gt;Did I tell you it’s fun? :)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 class="relative group"&gt;How now brown cow?
 &lt;div id="how-now-brown-cow" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#how-now-brown-cow" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Some more background:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I could just &lt;code&gt;apt install&lt;/code&gt;, but I’m too posh for that 😂 I want the &lt;em&gt;latest&lt;/em&gt; version of Hugo. And the &lt;em&gt;extended&lt;/em&gt; version at that.&lt;/li&gt;
&lt;li&gt;I depend on two more helpers.&lt;br&gt;
a. &lt;a href="syncthing.net/" &gt;Syncthing&lt;/a&gt; syncs the folder that the Hugo deb package downloads to, across all my machines&lt;br&gt;
b. Pushover sends me push notifications. Huginn &lt;a href="https://pushover.net/apps" target="_blank" rel="noreferrer"&gt;integrates&lt;/a&gt; with it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Having said that, here’s a pic of my four step scenario, followed by the output of each step.&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-0.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol&gt;
&lt;li&gt;Scrape the Hugo github releases page to get the title.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-1.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol start="2"&gt;
&lt;li&gt;Get the latest release title&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt; and fashion a url out of it.&lt;/li&gt;
&lt;/ol&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol start="3"&gt;
&lt;li&gt;Download Hugo to a folder.&lt;br&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-3.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol start="4"&gt;
&lt;li&gt;Send myself a push notification.&lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-4.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;ol start="5"&gt;
&lt;li&gt;And tada!

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-5.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;So we done? No, you silly goose!&lt;br&gt;
&lt;br&gt;

We’re done downloading the installer. Said installer now needs installing.&lt;br&gt;
So my very imaginatively titled &lt;code&gt;install-hugo.sh&lt;/code&gt; script&lt;sup id="fnref:5"&gt;&lt;a href="#fn:5" class="footnote-ref" role="doc-noteref"&gt;5&lt;/a&gt;&lt;/sup&gt;, which runs once a day via a &lt;code&gt;crontab&lt;/code&gt; entry …&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;takes the file,&lt;/li&gt;
&lt;li&gt;checks to see if it’s downloaded in the last day&lt;/li&gt;
&lt;li&gt;and if so, installs it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Mind you, it needs root privileges. And then it also …&lt;br&gt;
4. deletes any stray debs more than a few days old.&lt;sup id="fnref:6"&gt;&lt;a href="#fn:6" class="footnote-ref" role="doc-noteref"&gt;6&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#! /usr/bin/env bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /path/to/hugo/deb/file
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Install deb from the last 24 hours&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;find *.deb -maxdepth &lt;span class="m"&gt;1&lt;/span&gt; -mmin -1440 &lt;span class="p"&gt;|&lt;/span&gt; xargs -d &lt;span class="s1"&gt;&amp;#39;\n&amp;#39;&lt;/span&gt; dpkg -i
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Remove debs more than 2 days old&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;find *.deb -maxdepth &lt;span class="m"&gt;1&lt;/span&gt; -mtime +2 &lt;span class="p"&gt;|&lt;/span&gt; xargs -d &lt;span class="s1"&gt;&amp;#39;\n&amp;#39;&lt;/span&gt; rm -rf &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;And &lt;em&gt;&lt;strong&gt;now&lt;/strong&gt;&lt;/em&gt; we’re done :)&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn-hugo-6.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;figcaption style="font-style: italic; text-align: center; font-size: 85%; color: var(--secondary)"&gt;
&lt;p&gt;Holy shiny hammer, Batgirl! It worked!&lt;/p&gt;
&lt;/figcaption&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;The scenario, should you install Huginn and want to import and play with, as well as the shell script are here, &lt;a href="https://github.com/jasonbraganza/huginn-scenarios/tree/main/hugo-update" target="_blank" rel="noreferrer"&gt;on Github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note: I had originally used the RSS agent in step one, instead of the Website agent I use now, and that was much easier. But it would detect the new feed entry and then just sit there hatching eggs, not doing anything. I wish I had a snapshot (of the missed events, not hatched eggs) but I digress. The website agent, for all its hacky xpath quackery &lt;em&gt;works.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;it could have been girl friday too, but I call mine Bertuccio, after &lt;a href="https://en.wikipedia.org/wiki/The_Count_of_Monte_Cristo" target="_blank" rel="noreferrer"&gt;Edmond Dantes&lt;/a&gt;’ man friday&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I cannot believe, I go scrape a website and learn all that xpath voodoo, just to get a measly text string.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;And here’s where Huginn helps. It remembers the last title. And only proceeds if something has changed.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;the push notification is just like that. something whimsical for me. It’s independent of the download. I should probably have called it Step 3a. or 2b. Never mind now.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:5"&gt;
&lt;p&gt;which is also synced and available across all three machines&amp;#160;&lt;a href="#fnref:5" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:6"&gt;
&lt;p&gt;I let them be for a couple of days, in case a machine is not online that day.&amp;#160;&lt;a href="#fnref:6" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Huginn</title><link>https://janusworx.com/work/huginn/</link><pubDate>Thu, 02 Mar 2023 05:00:00 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/huginn/</guid><description>&lt;p&gt;&lt;br&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/huginn.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Let’s get the, “What the heck is &lt;a href="https://github.com/huginn/huginn" target="_blank" rel="noreferrer"&gt;Huginn&lt;/a&gt;?” out of the way.&lt;br&gt;
If you’ve heard of Zapier or IFTTT, that’s what this is. Only better. You host it. You control it. You program it. And everything’s in your control.&lt;br&gt;
If you’ve used &lt;a href="https://en.wikipedia.org/wiki/Yahoo!_Pipes" target="_blank" rel="noreferrer"&gt;Yahoo Pipes&lt;/a&gt;, then I tip my hat to you my dear friend and tell the rest of you folk, that I believe all of these new fangled pieces of zaps and agents are the spiritual successor to that pioneering web app. IBM has a similar open source alternative, with all the new fangled hotness called &lt;a href="https://en.wikipedia.org/wiki/Node-RED" target="_blank" rel="noreferrer"&gt;Node-RED&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just like piping and transforming text with Unix utilities locally, &lt;a href="https://github.com/huginn/huginn" target="_blank" rel="noreferrer"&gt;Huginn&lt;/a&gt; lets us do that with web data. RSS feeds, webhooks, JSON data and the like. Take ’em, ingest ’em, chew on ’em, transform ’em and do what the heck you want with ’em!&lt;/p&gt;

&lt;h3 class="relative group"&gt;Why Huginn?
 &lt;div id="why-huginn" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-huginn" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;So why did I settle on Huginn? And what do I use it for?&lt;br&gt;
Well, I liked the name. And I wanted something Yahoo-pipesque for myself :)&lt;br&gt;
I used it originally on my desktop, to push my blog posts to twitter and my &lt;a href="https://toots.dgplug.org/@jason" target="_blank" rel="noreferrer"&gt;mastodon account&lt;/a&gt;. And then I lost it in a system crash&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; and I didn’t get to putting it up again.&lt;/p&gt;
&lt;p&gt;Until a recent bout of sickness, and the urge to tinker led me to put it up on my vm.&lt;br&gt;
I realised that I don’t want to use my programming hammer to tackle every computing hammer that I face. There’s too much to learn and too little life.&lt;br&gt;
So if Huginn lets me do interesting things with json and liquid and duct tape, why ever not?&lt;/p&gt;
&lt;p&gt;I still have to do the autopost to my social accounts&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;, but I’ve already set it up to scratch several itches I had.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It scrapes a couple of art websites, that don’t have feeds and then creates RSS feeds so that I can read them peacefully in my RSS &lt;a href="https://www.reederapp.com/" target="_blank" rel="noreferrer"&gt;Reeder&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I check my &lt;a href="https://calibre-ebook.com/" target="_blank" rel="noreferrer"&gt;Calibre&lt;/a&gt; &lt;a href="https://calibre-ebook.com/changelog.rss" target="_blank" rel="noreferrer"&gt;release feed&lt;/a&gt;, update my local install of Calibre to the latest hotness, and then get notified via a push notification, using a &lt;a href="https://youtu.be/3isQI0nXQRE" target="_blank" rel="noreferrer"&gt;Rube Goldberg&lt;/a&gt; pastiche of &lt;a href="https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29" target="_blank" rel="noreferrer"&gt;Bash&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/CURL" target="_blank" rel="noreferrer"&gt;cURL&lt;/a&gt; and &lt;a href="https://pushover.net/" target="_blank" rel="noreferrer"&gt;Pushover&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I love archiving episodes of my favourite podcast (the &lt;a href="https://www.thedeeplife.com/listen/" target="_blank" rel="noreferrer"&gt;Cal Newport podcast&lt;/a&gt;&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;), so Huginn and Python and &lt;a href="https://syncthing.net/" target="_blank" rel="noreferrer"&gt;Syncthing&lt;/a&gt; and cron all pull together to get it in the right place, with the naming convention I want.&lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I hope to write a bit more about each of these in the coming days, but needless to say, I’m having more fun playing with Huginn, than I imagined I ever would!&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;it did work like the little engine that could, without a hitch until then&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I’ve forgotten how I did it!&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;I think it’s called &lt;em&gt;&lt;strong&gt;Deep Questions&lt;/strong&gt;&lt;/em&gt;, but to me it’ll always be the Cal Newport Podcast&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;If you lose all your audio files in a fire Cal, you know who to call!&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>TIL: The Difference Between a CLI Tool and a Freeze Tool</title><link>https://janusworx.com/work/til-the-difference-between-a-cli-tool-and-a-freeze-tool/</link><pubDate>Wed, 01 Mar 2023 11:35:47 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/til-the-difference-between-a-cli-tool-and-a-freeze-tool/</guid><description>&lt;p&gt;I keep writing these tiny utilities for myself in Python and while I &lt;em&gt;love&lt;/em&gt; writing in Python, I definitely don’t enjoy the little war dance I have to do everytime I want to run it on a new machine. Keeping track of virtual environments, and then installing packages in them, quickly gets tiresome. I want to just run the program once I’m done with it. Like a C program. Or Rust. Or Go.&lt;/p&gt;
&lt;p&gt;I could go learn one of those languages. Sure. That’s an option.&lt;br&gt;
And I see no problem doing it for other needs (like if I’m working with a group that uses said language) or for my career’s sake or just for being a polyglot.&lt;/p&gt;
&lt;p&gt;But when I write for myself, I’d rather stick to Python.&lt;br&gt;
Its mental model fits my brain. I find writing Python joyful.&lt;/p&gt;
&lt;p&gt;So what’s a boy to do?&lt;br&gt;
Since I was writing CLI applications, I went and looked for how to write Python CLIs and I found &lt;code&gt;argparse&lt;/code&gt; and &lt;a href="https://typer.tiangolo.com/" target="_blank" rel="noreferrer"&gt;Typer&lt;/a&gt; and &lt;a href="https://click.palletsprojects.com/en/8.1.x/" target="_blank" rel="noreferrer"&gt;Click&lt;/a&gt; and I was confused. They didn’t seem to give me my executable. They had all sorts of other powerful features, but the one I wanted.&lt;br&gt;
And I went looking some more. And the penny dropped.&lt;/p&gt;
&lt;p&gt;What I wanted, wasn’t a way to build a CLI, (although that is what I was writing).&lt;br&gt;
What I wanted, was a way to bundle my environment into an executable.&lt;br&gt;
What I wanted, I learned, was a way to &lt;em&gt;&lt;a href="https://docs.python-guide.org/shipping/freezing/" target="_blank" rel="noreferrer"&gt;freeze my code&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;More searching led to &lt;a href="https://nuitka.net/pages/overview.html" target="_blank" rel="noreferrer"&gt;Nuitka&lt;/a&gt;, &lt;a href="https://github.com/indygreg/PyOxidizer" target="_blank" rel="noreferrer"&gt;PyOxidizer&lt;/a&gt;, &lt;a href="https://pyinstaller.org/en/stable/" target="_blank" rel="noreferrer"&gt;PyInstaller&lt;/a&gt; and their ilk.&lt;br&gt;
I went with Nuitka, because that is what I found first and what I found was &lt;em&gt;dead simple&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;python -m nuitka --static-libpython&lt;span class="o"&gt;=&lt;/span&gt;no mastodon-to-moi.py&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and &lt;em&gt;boom!&lt;/em&gt;&lt;br&gt;
I got myself an executable &lt;code&gt;mastodon-to-moi.bin&lt;/code&gt;!&lt;br&gt;
And then I got greedy and did a &lt;code&gt;mastodon-to-moi.bin --help&lt;/code&gt; and figured, &lt;em&gt;that’s&lt;/em&gt; where the cli/tui frameworks like Typer and Textualize, come in handy. To scaffold and help these interfaces.&lt;/p&gt;
&lt;p&gt;But when I ran it on my laptop, which has nothing other than system Python, it hiccoughed. I tried Pyinstaller next, and that too, did not do the trick. It choked on a loop, that worked when I ran it as with Python normally. PyOxidizer scared me off.&lt;/p&gt;
&lt;p&gt;This needs looking further looking into, but atleast I know what I need to do now&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Afterthought:&lt;/strong&gt;&lt;/em&gt; The one con I do see, is losing platform independence. My binaries will be Linux on Intel only.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; I could just take my Python source anywhere, set up my environment and &lt;em&gt;go&lt;/em&gt;. Well, I still have that option if I need it and in the meanwhile, having binaries affords me a lot of convenience.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;until I learn to cross compile that is.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Why I Use an Online VM</title><link>https://janusworx.com/work/why-i-use-an-online-vm/</link><pubDate>Wed, 01 Mar 2023 05:00:00 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/why-i-use-an-online-vm/</guid><description>&lt;p&gt;I am fortunate enough, to run most of my life between my local computer and another VM in a cloud. In this day and age of cloud native and serverless, why would anyone choose to run their life off a virtual server aka VM?&lt;br&gt;
This post is me, thinking this through. I’ll return to this every now and then, and see if things have changed enough out there, for me to evaluate and make a change.&lt;br&gt;
For now, I am happy using my dinky little box in the cloud.&lt;/p&gt;

&lt;h3 class="relative group"&gt;Reasons I use a VM.
 &lt;div id="reasons-i-use-a-vm" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#reasons-i-use-a-vm" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Because I cannot have a cloud connected desktop.&lt;br&gt;
If I could I would. But commercial forces, at least in India don’t bode well for an always on, always connected desktop. The VM is a good compromise&lt;/li&gt;
&lt;li&gt;Because I can. Being an old sysadmin lets me do this. But don’t let that scare you off. If you can afford one, I’d venture to say you should. If you put in the time to learn &lt;a href="https://lym.readthedocs.io/en/latest/" target="_blank" rel="noreferrer"&gt;Linux fundamentals&lt;/a&gt;, most hosting providers now have excellent guides that will let you have a box that is pretty secure.&lt;/li&gt;
&lt;li&gt;The amount of control it affords me. Most cloud services will handicap you, some way or the other. When you’re using a VM on the other hand, you have the power of the whole machine&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; in the palm of your hand. You can do what you want with it. Install programming languages to your hearts content, access all the storage that you have, run containers if you wish. Your VM is your oyster :)&lt;/li&gt;
&lt;li&gt;I can host what I want to. Without paying per service. Or without letting outsiders slurp my data and attention to serve me ads. Right now I host — &lt;em&gt;(goes and looks)&lt;/em&gt; —
&lt;ol&gt;
&lt;li&gt;This website&lt;/li&gt;
&lt;li&gt;&lt;a href="https://wiki.znc.in/ZNC" target="_blank" rel="noreferrer"&gt;ZNC&lt;/a&gt;, an IRC bouncer, so I can stay connected always to my favourite IRC channels along with&lt;/li&gt;
&lt;li&gt;&lt;a href="https://thelounge.chat/" target="_blank" rel="noreferrer"&gt;The Lounge&lt;/a&gt;, so I can then access IRC from anywhere&lt;/li&gt;
&lt;li&gt;an instance of &lt;a href="https://miniflux.app/" target="_blank" rel="noreferrer"&gt;Miniflux&lt;/a&gt;, to read my RSS feeds, to keep my self update with all my interests&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sendy.co/" target="_blank" rel="noreferrer"&gt;Sendy&lt;/a&gt;, to send emails to my mailing list.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sabre.io/baikal/" target="_blank" rel="noreferrer"&gt;Baikal&lt;/a&gt;, for my contacts and calendars and finally…&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/huginn/huginn" target="_blank" rel="noreferrer"&gt;Huginn&lt;/a&gt;, to let me do all sorts of wizardry with stuff on the net. Think of it as a self hosted &lt;a href="https://zapier.com/" target="_blank" rel="noreferrer"&gt;Zapier&lt;/a&gt; / &lt;a href="https://ifttt.com/" target="_blank" rel="noreferrer"&gt;IFTTT&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;My data is not held hostage!&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 class="relative group"&gt;Reasons I wouldn’t use a VM
 &lt;div id="reasons-i-wouldnt-use-a-vm" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#reasons-i-wouldnt-use-a-vm" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;If I am sharing something with the world at large.&lt;br&gt;
Something that might have the potential of being abused, even if I made or shared out of the goodness of my heart. No concrete example of this, comes to mind right now.&lt;/li&gt;
&lt;li&gt;Serving or hosting something that my VM cannot handle. I wouldn’t serve video from my little box, for e.g.&lt;/li&gt;
&lt;li&gt;Storing data. As in long lived collections. I doubt I’d store, my audio or photo library on here. Too large. It’d probably run too expensive and too risky.&lt;/li&gt;
&lt;li&gt;Tradeoff between control and life. I outsource email and my fediverse, because for me, maintaining them, was too much of a time suck. (No matter how much I loved doing it)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 class="relative group"&gt;Conclusion: Control
 &lt;div id="conclusion-control" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#conclusion-control" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;The more I think about it, the more I think it’s about control more than cost.&lt;br&gt;
I want as much of my data and digital life, out of the control of the software giants and/or other third parties to extent, I can control.&lt;br&gt;
As much as possible, I want to express myself without constraint. Most SAAS options in this day and age, don’t come close to the power and options that old desktop software gave us.&lt;br&gt;
Having a VM lets me be creative, expressive and grab some semblance of control back for myself.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;well, as much as you’re paying for 😂&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Emacs Can Transparently Encrypt and Decrypt File With Gpg</title><link>https://janusworx.com/work/emacs-can-transparently-encrypt-and-decrypt-file-with-gpg/</link><pubDate>Tue, 28 Feb 2023 12:43:56 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/emacs-can-transparently-encrypt-and-decrypt-file-with-gpg/</guid><description>&lt;p&gt;I’ve been struggling to get &lt;strong&gt;&lt;a href="https://github.com/dengste/org-caldav/" target="_blank" rel="noreferrer"&gt;org-caldav&lt;/a&gt;&lt;/strong&gt; working on the desktop.&lt;br&gt;
Nothing to do with the program itself. It’s excellent, fairly intuitive and really well documented. There just seems to be some gremlin in the works, that does not let the darned calendar see my org files.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; Will keep at it.&lt;/p&gt;
&lt;p&gt;What this note is for however, was the pleasant realisation that Emacs can transparently work with gpg encrypted files.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
I wanted to keep my calendar user/password credentials in a file, because the to and fro between my Baikal caldav server was generating too many requests for my password.&lt;br&gt;
The &lt;a href="https://github.com/dengste/org-caldav/" target="_blank" rel="noreferrer"&gt;org-caldav&lt;/a&gt; &lt;em&gt;&lt;a href="https://github.com/dengste/org-caldav/#storing-authentication-information-in-authinfonetrc" target="_blank" rel="noreferrer"&gt;README&lt;/a&gt;&lt;/em&gt; suggested that I save it all in an &lt;code&gt;.authinfo&lt;/code&gt; file, like so.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-emacs" data-lang="emacs"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;machine&lt;/span&gt; &lt;span class="nv"&gt;www.google.com:443&lt;/span&gt; &lt;span class="nv"&gt;port&lt;/span&gt; &lt;span class="nv"&gt;https&lt;/span&gt; &lt;span class="nv"&gt;login&lt;/span&gt; &lt;span class="nv"&gt;username&lt;/span&gt; &lt;span class="nv"&gt;password&lt;/span&gt; &lt;span class="nv"&gt;secret&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;which for me translated as&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-emacs" data-lang="emacs"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;machine&lt;/span&gt; &lt;span class="nv"&gt;my-caldav-server:443&lt;/span&gt; &lt;span class="nv"&gt;port&lt;/span&gt; &lt;span class="nv"&gt;https&lt;/span&gt; &lt;span class="nv"&gt;login&lt;/span&gt; &lt;span class="nv"&gt;&amp;lt;my-username&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;password&lt;/span&gt; &lt;span class="nv"&gt;&amp;lt;my-password&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;And the connection worked! Without me putting my password in every two seconds.&lt;/p&gt;
&lt;p&gt;I was still a bit leery about putting my password into a plaintext file, so I &lt;a href="https://www.emacswiki.org/emacs/GnusAuthinfo" target="_blank" rel="noreferrer"&gt;looked it up&lt;/a&gt; and it told me to specifically use an &lt;code&gt;authinfo.gpg&lt;/code&gt; not the plaintext version.
The magic still didn’t strike me, until I tried to save the file. Emacs called up my gpg agent, which popped up a box asking me to unlock my key, and then Emacs went ahead and encrypted my file. Just like that! I tried opening it and the same thing happened in reverse. No mussing around with the command line.&lt;/p&gt;
&lt;p&gt;If I save a file with a &lt;code&gt;.gpg&lt;/code&gt; extension, Emacs will automatically encrypt it!&lt;br&gt;
If you want to learn more, the great Mickey Petersen &lt;a href="https://www.masteringemacs.org/article/keeping-secrets-in-emacs-gnupg-auth-sources" target="_blank" rel="noreferrer"&gt;knows all&lt;/a&gt;!&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:&amp;amp;#102;&amp;amp;%23101;&amp;amp;%23101;&amp;amp;%23100;&amp;amp;%2398;&amp;amp;%2397;&amp;amp;%2399;&amp;amp;%23107;&amp;amp;%2364;&amp;amp;%23106;&amp;amp;%2397;&amp;amp;%23110;&amp;amp;%23117;&amp;amp;%23115;&amp;amp;%23119;&amp;amp;%23111;&amp;amp;%23114;&amp;amp;%23120;&amp;amp;%2346;&amp;amp;%2399;&amp;amp;%23111;&amp;amp;%23109;" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Probably because I’m running &lt;a href="https://sabre.io/baikal/" target="_blank" rel="noreferrer"&gt;Baikal&lt;/a&gt;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;via the &lt;a href="https://www.emacswiki.org/emacs/EasyPG" target="_blank" rel="noreferrer"&gt;EasyPG&lt;/a&gt; package&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;And ofcourse, I had to find this lovely article, &lt;em&gt;&lt;strong&gt;after&lt;/strong&gt;&lt;/em&gt; all my stumbling about!&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Miniflux Now Supports Custom CSS?</title><link>https://janusworx.com/work/miniflux-now-supports-custom-css/</link><pubDate>Fri, 27 Jan 2023 15:23:57 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/miniflux-now-supports-custom-css/</guid><description>&lt;p&gt;I use &lt;a href="https://miniflux.app/" target="_blank" rel="noreferrer"&gt;Miniflux&lt;/a&gt; as my feed reader, and I love it to bits.&lt;br&gt;
It does what I need, it does it fast and it stays out of the way.&lt;/p&gt;
&lt;p&gt;Well, almost.&lt;br&gt;
I have a couple of those—whatchacalit—firehose feeds.&lt;br&gt;
And I keep skimming through them by clicking next, next, next on each page.&lt;/p&gt;
&lt;p&gt;Like so,&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/mcssb1.jpg" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Except for when there is no next under my pointer.&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/mcssb2.jpg" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;It’d happen quite frequently and I’d have to keep moving my mouse to find the link. The whole thing was driving me batty!&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
And then it hit me. Sometimes the headlines would be too long and stretch across two lines, causing rest of the page to shift down to accomodate them.&lt;/p&gt;
&lt;p&gt;What if I could reduce the size of the title headlines? That’d help keep it to one line and give me my next button consistently in place.&lt;br&gt;
I didn’t want to go wrangle with custom stylesheets.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt; I grumbled a bit about Miniflux not letting me do this, before I thought, I ought to go give the settings a look see. I found a Google Reader API in one of the recent releases.&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt; Maybe it’d let me do something with CSS too.&lt;br&gt;
And lo and behold!&lt;br&gt;
Miniflux does in fact have support for custom CSS. It has in fact, had it &lt;em&gt;&lt;strong&gt;&lt;a href="https://miniflux.app/releases/2.0.22.html" target="_blank" rel="noreferrer"&gt;since 2020!&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;&lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;A tiny bit of twiddling to make my headlines smaller.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-css" data-lang="css"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;entry-header&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.2&lt;/span&gt;&lt;span class="kt"&gt;em&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I put this in the &lt;code&gt;Custom CSS&lt;/code&gt; box in the main &lt;code&gt;Settings&lt;/code&gt; section.&lt;br&gt;
&lt;br&gt;

And the next link stays put under my mouse pointer, letting me rapidly skim my feeds :)&lt;br&gt;
&lt;br&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/mcssa1.jpg" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/p&gt;

&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2023/mcssa2.jpg" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Feedback on this post? Mail me at &lt;a href="mailto:feedback@janusworx.com" &gt;feedback@janusworx.com&lt;/a&gt;
&lt;br&gt;

&lt;br&gt;

P.P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list!&lt;/a&gt;&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit.&lt;/a&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Yes, I can (and do) use the &lt;a href="https://miniflux.app/docs/keyboard_shortcuts.html" target="_blank" rel="noreferrer"&gt;keyboard shortcuts&lt;/a&gt;. But my RSI ridden wrists need constant entertainment and movement. So I switch it up frequently.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I did try. And failed miserably.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;Helped Reeder, my iOS feed reader talk much better to Miniflux&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;I’ve been a blind bat, as usual&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Learning Kubernetes, Setup Notes</title><link>https://janusworx.com/work/learning-kubernetes-setup-notes/</link><pubDate>Thu, 03 Nov 2022 13:12:50 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/learning-kubernetes-setup-notes/</guid><description>&lt;p&gt;Ok, here’s to learning Kubernetes in earnest, to get that career pivot going.&lt;br&gt;
Notes as I learn, over the coming days.&lt;/p&gt;
&lt;p&gt;This one, is a lot of random thoughts on bringing up a cluster.&lt;/p&gt;
&lt;div class="book-list"&gt;
&lt;ol&gt;
&lt;li&gt;It is both harder than you think, and easier than you think&lt;/li&gt;
&lt;li&gt;I did this, because &lt;em&gt;I wanted to run my own cluster&lt;/em&gt;, just like the big boys do.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;It’s much easier to run alternatives like &lt;a href="https://kind.sigs.k8s.io/" target="_blank" rel="noreferrer"&gt;kind&lt;/a&gt;, if that suits your needs better.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;Notes to future Jason:&lt;/p&gt;
&lt;div class="book-list"&gt;
&lt;ol&gt;
&lt;li&gt;I made a gigantic Ubuntu KVM vm, for my playground&lt;/li&gt;
&lt;li&gt;Then four small vms in that big one&lt;/li&gt;
&lt;li&gt;Because of life, I goofed up and used Ubuntu LTS on the big vm and a non-LTS version on the small ones. Next time just use the same os everywhere.&lt;/li&gt;
&lt;li&gt;If learning is your aim, make sure the vms use a beefy, full fat os install. The skinny ones might be helpful online when actually building stuff, but when it comes to learning, you’ll be installing a lot of things manually.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;To that end, make sure the virtual machines have lots of disk space available. I had to learn how to resize qcow files, because I nearly ran out of space.&lt;/li&gt;
&lt;li&gt;The control-plane node will need two cpus. the others can get by with one.&lt;/li&gt;
&lt;li&gt;Same with ram. Helps if the control-plane node has 4gb.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://kubernetes.io/docs/home/" target="_blank" rel="noreferrer"&gt;documentation&lt;/a&gt; is the best resource. It is comprehensive but not well structured. No hand holding here.&lt;/li&gt;
&lt;li&gt;I used &lt;code&gt;containerd&lt;/code&gt; and &lt;code&gt;runc&lt;/code&gt; rather than Docker, manually installing them using the documentation links&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;Pair with a how to install guide, off the web. Kubernetes releases come fast and furious. Make sure you aren’t following something woefully out of date.&lt;/li&gt;
&lt;li&gt;Once again, the documentation is the go to. Make sure you read them for notes and pitfalls. My cluster keeled and fell over after my first reboot, because I did not configure the &lt;a href="https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/" target="_blank" rel="noreferrer"&gt;cgroups driver&lt;/a&gt; right, to work with &lt;code&gt;systemd&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;It takes time. It’s ok. It’s supposed to take that long.&lt;/li&gt;
&lt;li&gt;If your system is old and creaky like mine, don’t bring up all the vms at once. That’s another surefire way of making sure the cluster goes splat. Bring up the control node, wait a while&lt;sup id="fnref:4"&gt;&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref"&gt;4&lt;/a&gt;&lt;/sup&gt;, wait some more just to make sure, and then slowly bring up the worker nodes one by one.&lt;/li&gt;
&lt;li&gt;Then keep the darned thing on all day.&lt;/li&gt;
&lt;li&gt;If stuff works, and you like me, need to get on with life because you are doing all this in the middle of a house move, make sure to take lots of vm snapshots.&lt;/li&gt;
&lt;li&gt;What else? Hmm … oh yea! Stop stressing. You got this. Show up. It’ll come to you.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Like Scott says, You got to &lt;a href="https://www.scotthyoung.com/blog/2020/05/04/do-the-real-thing/" target="_blank" rel="noreferrer"&gt;do the real thing&lt;/a&gt;, if you want to learn well.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I had to manually install apt-utils, whiptail, ping, devel tools and &lt;a href="https://janusworx.com/blog/so-god-made-a-dog/" &gt;Dog&lt;/a&gt; knows, what else&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;I honestly don’t why I did this. No objective reason. Just that the recent Docker emails give me the creeps. Reminds me of the old Microsoft emails. So, &lt;a href="https://www.artofmanliness.com/character/advice/via-negativa-adding-to-your-life-by-subtracting/" target="_blank" rel="noreferrer"&gt;Via Negativa!&lt;/a&gt;&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;Waiting time? Enough to brew me a coffee. Measure yours.&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Make KVM Use a NIC in Bridge Mode</title><link>https://janusworx.com/work/make-kvm-use-nic-in-bridge-mode/</link><pubDate>Tue, 18 Oct 2022 17:48:35 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/make-kvm-use-nic-in-bridge-mode/</guid><description>&lt;p&gt;I wanted to start learning Kubernetes.&lt;br&gt;
So I thought I’d spin up a Ubuntu VM to use as my sacrificial guinea pig.&lt;/p&gt;
&lt;p&gt;While the normal NAT mode works well enough for most of my networking needs, I wanted the Ubuntu VM to show up and work as a machine on my host’s network.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
I have two network cards on my desktop and wanted to allocate one of them to this VM.&lt;br&gt;
I wanted a passthrough, where the guest OS would see the NIC and then have exclusive access to it.&lt;br&gt;
When I tried doing that, &lt;a href="https://www.linux-kvm.org/page/Main_Page" target="_blank" rel="noreferrer"&gt;KVM&lt;/a&gt; complained that it could not do this with PCI devices.&lt;/p&gt;
&lt;p&gt;Hmm, that had me stumped a bit.&lt;br&gt;
And then I learnt about &lt;a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-virtual_networking-directly_attaching_to_physical_interface#sect-macvtap-virt_manager" target="_blank" rel="noreferrer"&gt;attaching my VM’s NIC directly to a physical interface.&lt;/a&gt;&lt;br&gt;
What I needed to do was use Macvtap as my network source in the VM’s settings.&lt;br&gt;
It then prompted me for my NIC’s device name, which I gave it, courtesy a little spelunking through &lt;code&gt;ifconfig&lt;/code&gt;’s output.&lt;br&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2022/linux-kvm-nic-macvtap.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

And then once I began my Ubuntu VM install, it detected my NIC and then let me assign an ip that I use on my local network.&lt;br&gt;
For all intents and purposes the VM now appears as just another machine on my network ala my Pis.&lt;br&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;To my mind, that’d be one less layer of networking I’d need to deal with.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Make SSH Ignore Key, When Logging On to a Fresh Box</title><link>https://janusworx.com/work/make-ssh-ignore-key/</link><pubDate>Tue, 18 Oct 2022 17:38:28 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/make-ssh-ignore-key/</guid><description>&lt;p&gt;Every now and then, I spin up a fresh vm.&lt;br&gt;
And being a creature of habit, I use the same username on my play / experimental vms as my normal login.&lt;br&gt;
So everytime I try to login to such a vm or pi, I get a &lt;code&gt;Too many authentication failures&lt;/code&gt; error.&lt;/p&gt;
&lt;p&gt;So to just get in and start working, I need to tell ssh to ignore my keys and try using passwords as the authentication mechanism.&lt;br&gt;
Like so&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ssh -o &lt;span class="nv"&gt;PreferredAuthentications&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;password -o &lt;span class="nv"&gt;PubkeyAuthentication&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;no jason@ip-address-on-my-network&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;And then I can login and begin the process of locking everything down.&lt;br&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/p&gt;</description></item><item><title>Notes to Self, on Self Hosting Fonts on My Hugo Blog</title><link>https://janusworx.com/work/notes-to-self-on-self-hosting-fonts/</link><pubDate>Sun, 09 Oct 2022 14:32:28 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/notes-to-self-on-self-hosting-fonts/</guid><description>&lt;p&gt;Writing this down, so that I will not struggle the next time&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;, I have to do this.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I use &lt;a href="https://mbtype.com/fonts/valkyrie/" target="_blank" rel="noreferrer"&gt;Valkyrie&lt;/a&gt; for everything on the blog in various weights, except for code and preformatted stuff, which uses &lt;a href="https://github.com/adobe-fonts/source-code-pro" target="_blank" rel="noreferrer"&gt;Source Code Pro Medium&lt;/a&gt;. Both are &lt;a href="https://en.wikipedia.org/wiki/Web_Open_Font_Format" target="_blank" rel="noreferrer"&gt;WOFF2&lt;/a&gt; fonts.&lt;/li&gt;
&lt;li&gt;Anything in Hugo’s &lt;code&gt;assets/css/extended&lt;/code&gt; folder will be picked up by Hugo and &lt;a href="https://discourse.gohugo.io/t/papermod-theme-how-to-add-custom-css/30165/9" target="_blank" rel="noreferrer"&gt;bundled into a single CSS file.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The fonts are in subdirectories in the &lt;code&gt;static/fonts/font-name&lt;/code&gt; folder. Anything in the &lt;code&gt;static&lt;/code&gt; folder shows up at the root of the site. &lt;code&gt;~/mjb/blog/static/images/test.jpg&lt;/code&gt; will become &lt;code&gt;/images/test.jpg&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I’ve created an &lt;code&gt;embed-font-name.css&lt;/code&gt; file in the &lt;code&gt;css&lt;/code&gt; folder above, with embed instructions generously provided by Matthew Butterick in his font documentation for Valkyrie. I adapted the same for Source Code Pro as well. Here’s a sample of my &lt;code&gt;embed-source-code-pro.css&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-css" data-lang="css"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="k"&gt;font-face&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;font-family&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Source Code Pro Medium&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;font-style&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;normal&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;font-weight&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;medium&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;font-stretch&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;normal&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;font-display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;auto&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/fonts/source-code-pro/SourceCodePro-Medium.woff2&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;format&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;woff2&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Finally, I created a &lt;code&gt;zz-include-css.css&lt;/code&gt; file, which I use to overide the default CSS, so I can use my custom fonts. Since it starts with a &lt;em&gt;zz&lt;/em&gt; it comes after the files above, that start with &lt;em&gt;embed&lt;/em&gt;, in the final munged and minified CSS file.&lt;br&gt;
These are my instructions to have most text rendered with Valkyrie and code as Source Code Pro Medium&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-css" data-lang="css"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;#&lt;/span&gt;&lt;span class="nn"&gt;top&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;valkyrie&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-variant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;oldstyle-nums&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;post-content&lt;/span&gt; &lt;span class="nt"&gt;pre&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;code&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Source Code Pro Medium&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;medium&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;ol start="6"&gt;
&lt;li&gt;Look! So pretty :)&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;hopefully, never!&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I figured out what to target by inspecting the final web page in Firefox&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Exclude Files and Folders From an Rsync Copy</title><link>https://janusworx.com/work/exclude-files-and-folders-from-an-rsync-copy/</link><pubDate>Sun, 18 Sep 2022 19:43:24 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/exclude-files-and-folders-from-an-rsync-copy/</guid><description>&lt;p&gt;I’ve been sticking to plain old &lt;code&gt;rsync -az&lt;/code&gt; to sling files around using &lt;a href="https://download.samba.org/pub/rsync/rsync.1" target="_blank" rel="noreferrer"&gt;Rsync&lt;/a&gt;.&lt;br&gt;
Until I ran into a hiccough today, where I filled up my teensy remote storage on the Pi, because a couple of subdirectories that were part of the run, were hundreds of megabytes large.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;So I did the usual, did hunt around the web thing, and learnt about &lt;code&gt;--exclude&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So now the new Rsync command is …&lt;/p&gt;
&lt;p&gt;&lt;code&gt;rsync -az src dest --exclude={'excluded_dir_1','excluded_dir_2'}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And my poor Pi no longer has disk full nightmares.&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;I’d expected the normal run to be a few hundred kilobytes in size.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Rename a File as You Work on It in Emacs</title><link>https://janusworx.com/work/rename-a-file-as-you-work-on-it-in-emacs/</link><pubDate>Fri, 16 Sep 2022 19:23:18 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/rename-a-file-as-you-work-on-it-in-emacs/</guid><description>&lt;p&gt;I often fat fingered the file name / buffer name / Org Roam link name when launching something new.&lt;br&gt;
And then when I am busy and knee deep in work, I glance up to see the error glaring at me.&lt;/p&gt;
&lt;p&gt;I &lt;del&gt;figured out&lt;/del&gt;, &lt;a href="https://stackoverflow.com/a/17830120" target="_blank" rel="noreferrer"&gt;looked up&lt;/a&gt; how to fix it&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Hit &lt;code&gt;C-x d&lt;/code&gt; to flip into a dired buffer&lt;/li&gt;
&lt;li&gt;Find my filename in the list. (&lt;code&gt;C-s&lt;/code&gt; can help search and narrow stuff)&lt;/li&gt;
&lt;li&gt;Then &lt;code&gt;C-x C-q&lt;/code&gt; to go into &lt;a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Wdired.html" target="_blank" rel="noreferrer"&gt;Wdired mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Change the file name to whatever I want it to&lt;/li&gt;
&lt;li&gt;&lt;code&gt;C-c C-c&lt;/code&gt; to be done with it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Et voilà!&lt;br&gt;
(If you are editing an Org Roam node, &lt;code&gt;M-x org-roam-db-sync&lt;/code&gt; to keep everything shipshape)&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Update, 2022-09-17: &lt;a href="https://www.linkedin.com/feed/update/urn:li:activity:6976545929109626880?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A6976545929109626880%2C6976586196365783040%29" target="_blank" rel="noreferrer"&gt;Antón responded to my post&lt;/a&gt; on Linkedin to suggest that step 3 could also be done alternatively by just hitting &lt;code&gt;R&lt;/code&gt; at the filename, which would let me rename the file (using &lt;code&gt;dired-do-rename&lt;/code&gt;)&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;I know, I know, the db eventually catches up. But if you’ve been reading me long enough, you know I’m enough of a control freak to be doing this 😂&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Moving Tasks Between Org Files in Emacs</title><link>https://janusworx.com/work/moving-tasks-between-org-files-in-emacs/</link><pubDate>Tue, 23 Aug 2022 16:13:08 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/moving-tasks-between-org-files-in-emacs/</guid><description>&lt;p&gt;More diving into Org Mode and Emacs.&lt;/p&gt;
&lt;p&gt;I have a &lt;code&gt;stuff-to-do.org&lt;/code&gt; file, that serves as an inbox for most long term tasks that I want to tackle. Stuff that needs doing, books that I want to buy, books that I want to read, courses that I want to learn, movies or tv shows that I want to watch, stuff on the web that I want to catchup on, etc. etc. etc.&lt;/p&gt;
&lt;p&gt;And all this while, I have been moving tasks into my &lt;code&gt;daily-tasks.org&lt;/code&gt; as and when I tackle them. This meant I needed to open both files, and then cut said task out of one and paste it into the other. And as usual, I am now doing this often enough, that it’s become bothersome. Because there are a couple more files as well, that serve as inboxes.&lt;/p&gt;
&lt;p&gt;And the same question arises, as usual. Can Emacs help with this?&lt;br&gt;
The answer as it almost always is, is a big, resounding, &lt;em&gt;&lt;strong&gt;Yes!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I know it had to do something with what Org calls a refile, since I keep using &lt;code&gt;C-c C-w&lt;/code&gt; to move items between different headings in my daily tasks file.&lt;br&gt;
So after a bit of &lt;a href="https://orgmode.org/manual/Refile-and-Copy.html" target="_blank" rel="noreferrer"&gt;reading the manual&lt;/a&gt;, &lt;a href="https://www.johnborwick.com/2019/02/23/org-todo-setup.html#org47b732f" target="_blank" rel="noreferrer"&gt;reading blog posts&lt;/a&gt;, spelunking through the &lt;a href="https://emacs.stackexchange.com/questions/55014/how-do-i-move-a-subtree-to-another-file" target="_blank" rel="noreferrer"&gt;emacs stackexchange&lt;/a&gt;, stalking the &lt;a href="https://www.reddit.com/r/orgmode/comments/g5006o/comment/fo0k8gy/" target="_blank" rel="noreferrer"&gt;Org Mode reddit&lt;/a&gt; and an hour of head scratching, I roughed up something that does what I want :)&lt;/p&gt;
&lt;p&gt;In a nutshell, what I am doing is what Org calls, a &lt;a href="https://orgmode.org/manual/Refile-and-Copy.html" target="_blank" rel="noreferrer"&gt;Refile and Copy.&lt;/a&gt; The manual page let me know that I could do this &lt;em&gt;across files too&lt;/em&gt;. This was exactly what I wanted. It also told me that I needed to configure &lt;code&gt;org-refile-targets&lt;/code&gt; variable to tell Org a list of locations, that it would then let me refile my tasks to.&lt;/p&gt;
&lt;p&gt;Having &lt;a href="https://janusworx.com/blog/splitting-an-unwieldy-emacs-init.el-file/" &gt;split my emacs init.el file&lt;/a&gt; into a set of logical files, I opened up the file that held my org settings (very imaginatively called &lt;code&gt;emacs-org-mode-settings.el&lt;/code&gt;) and then thought a bit about what files I would want Org to pop up when I wanted to file tasks to.&lt;br&gt;
Would just my daily tasks file do? What if I wanted to file something &lt;em&gt;out&lt;/em&gt; of my daily tasks file? Or what if I wanted crisscross transfers between all my task inboxes and daily task file?&lt;/p&gt;
&lt;p&gt;I then realised that I was already telling Org Agenda to scan my tasks folder (which holds all my productivity system files) for tasks and dates and schedules and deadlines. I decided to use the same set of files as my targets for refiling. And this turned out to be easier to do than expected. I just had to tell Org to use &lt;code&gt;org-agenda-files&lt;/code&gt; as the value for &lt;code&gt;org-refile-targets&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;It looks a little bit like this.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-lisp" data-lang="lisp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;setq&lt;/span&gt; &lt;span class="nv"&gt;org-refile-targets&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="o"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="ss"&gt;:maxlevel&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	 &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;org-agenda-files&lt;/span&gt; &lt;span class="ss"&gt;:maxlevel&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;br&gt;

I’m telling &lt;code&gt;org-refile-targets&lt;/code&gt; on line 1, to look for targets in two locations.&lt;br&gt;
Line 3, is what we were talking about above. Org will look to the same location that &lt;code&gt;org-agenda-files&lt;/code&gt; points to, for its refile targets.&lt;br&gt;
Line 2, is where I tell Org to include my current file, the one I am working on, as a target. It helps me move stuff in my daily tasks file from one day to another.&lt;br&gt;
The &lt;code&gt;maxlevel&lt;/code&gt; bit is to tell Org the level of headlines to show as targets. Org has headlines and sub-headlines and sub-sub-headlines.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; I just need the first level, which is why it’s set to 1.&lt;br&gt;
It seemed to work, until I ran into a small stumbling block. Org would not let me refile my task at level 0, i.e. the root of the file as a level 1 headline. It could only nest under an existing headline. So, line 4 below, fixes that for me.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-lisp" data-lang="lisp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;setq&lt;/span&gt; &lt;span class="nv"&gt;org-refile-targets&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="o"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="ss"&gt;:maxlevel&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	 &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;org-agenda-files&lt;/span&gt; &lt;span class="ss"&gt;:maxlevel&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;setq&lt;/span&gt; &lt;span class="nv"&gt;org-refile-use-outline-path&lt;/span&gt; &lt;span class="ss"&gt;&amp;#39;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;br&gt;

&lt;p&gt;And tada! It works! You can see it in action below.&lt;br&gt;
Click any of the images below to view them, larger.&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

The waiting task on the right (writing this post), needs to come in to my daily tasks file on the left
&lt;a href="https://janusworx.com/images/2022/org-mode-move-task-1.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2022/org-mode-move-task-1.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

So I hit &lt;code&gt;C-c C-w&lt;/code&gt; and Org Mode helpfully pops up what target it thinks I want to move my task to.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
I can hit the tab key to get a list of other files and targets.&lt;br&gt;
&lt;a href="https://janusworx.com/images/2022/org-mode-move-task-2.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2022/org-mode-move-task-2.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

Once I do that, the task hops over to the right place!&lt;br&gt;
&lt;a href="https://janusworx.com/images/2022/org-mode-move-task-3.png" &gt;
&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2022/org-mode-move-task-3.png" alt="" /&gt;
 
 
 &lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;It’s an outliner after all :)&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;The daily tasks file, under today’s date&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Notes to Self on Renewing Wildcard Certbot Certs</title><link>https://janusworx.com/work/notes-to-self-on-renewing-wildcard-certbot-certs/</link><pubDate>Sat, 20 Aug 2022 11:45:54 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/notes-to-self-on-renewing-wildcard-certbot-certs/</guid><description>&lt;p&gt;&lt;em&gt;(Update, 2024-03-15: I now use lego. will update this post later.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;After struggling to renew my certs for the third time in a row, hopefully these pointers should keep me on track for the next time.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Namecheap does &lt;em&gt;not&lt;/em&gt; yet support automatic wildcard renewal for the Letsencrypt/Certbot combo. Check next year.&lt;/li&gt;
&lt;li&gt;Have your Namecheap control panel open and ready.&lt;/li&gt;
&lt;li&gt;Switch to &lt;code&gt;root&lt;/code&gt; or run the command below with &lt;code&gt;sudo&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Command to renew: &lt;code&gt;certbot certonly --manual --manual-public-ip-logging-ok --preferred-challenges dns-01 -d *.domain.com -d domain.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;certbot&lt;/code&gt; will then, print a couple of lines that you need to add as a &lt;code&gt;TXT&lt;/code&gt; record in the Namecheap DNS control panel.&lt;/li&gt;
&lt;li&gt;When you do that, make sure you set the &lt;code&gt;TTL&lt;/code&gt; of the record, to a minute, so that you can redo stuff quicker, if you mess up.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;certbot&lt;/code&gt; might ask you to do multiple records. Read the instructions carefully.&lt;/li&gt;
&lt;li&gt;When you check to see if the &lt;code&gt;TXT&lt;/code&gt; record is set, search for the whole domain name. For e.g. &lt;code&gt;_acme-challenge.domain.blah&lt;/code&gt; instead of just &lt;code&gt;domain.blah&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;If you’ve done all of the above, hopefully things should go smoothly and the certificate should renew.&lt;/li&gt;
&lt;li&gt;Restart Nginx and you’re done.&lt;/li&gt;
&lt;li&gt;If you have multiple machines, figure out a way to securely transfer the certs there too.
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Tomorrow is Another Date</title><link>https://janusworx.com/work/tomorrow-is-another-date/</link><pubDate>Sun, 31 Jul 2022 15:17:11 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/tomorrow-is-another-date/</guid><description>&lt;p&gt;&lt;br&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2022/org-daily-tasks.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href="https://orgmode.org/" target="_blank" rel="noreferrer"&gt;Org mode&lt;/a&gt; is &lt;del&gt;slowly spreading its tentacles&lt;/del&gt; increasingly becoming something, I cannot live without, to manage my day.&lt;br&gt;
And I’m getting pretty consistent with it too!&lt;/p&gt;
&lt;p&gt;Like you see above, I use dates as my headlines, below which I list the various tasks for the day.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
And that’s where I run into my current itch to scratch.&lt;/p&gt;
&lt;p&gt;I don’t want to keep typing out the date daily.&lt;br&gt;
The computer can do that for me.&lt;br&gt;
But how? Of the millions of ways possible, what do I want to do?&lt;br&gt;
My first thought was to figure out some way to &lt;a href="https://www.emacswiki.org/emacs/InsertingTodaysDate" target="_blank" rel="noreferrer"&gt;insert a date into Emacs.&lt;/a&gt;&lt;br&gt;
And then I thought, why only emacs? I want it &lt;em&gt;systemwide,&lt;/em&gt; across all my programs.&lt;br&gt;
So I checked if &lt;a href="https://espanso.org/" target="_blank" rel="noreferrer"&gt;Espanso&lt;/a&gt;, my friendly text expansion program, would do that for me.&lt;br&gt;
&lt;a href="https://espanso.org/docs/matches/basics/#dynamic-matches" target="_blank" rel="noreferrer"&gt;Turns out, Espanso does!&lt;/a&gt;&lt;br&gt;
I could just type &lt;code&gt;:dtx&lt;/code&gt; wherever I wanted and Espanso would happily insert the date in there. And so I did that for a few days.&lt;br&gt;
Problem solved? Well, that’s when the itch got stronger.&lt;br&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;


&lt;figure&gt;
 &lt;img class="my-0 rounded-md" src="https://janusworx.com/images/2022/org-shutdown-routine.png" alt="" /&gt;
 
 
 &lt;/figure&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;
&lt;/p&gt;
&lt;p&gt;See my evening tasks above?&lt;br&gt;
I use Cal Newport’s idea of a &lt;a href="https://www.calnewport.com/blog/2009/06/08/drastically-reduce-stress-with-a-work-shutdown-ritual/" target="_blank" rel="noreferrer"&gt;shutdown ritual&lt;/a&gt;, to empty my mind and plan the next day, every evening.&lt;br&gt;
Which, for the past couple of weeks meant using my little expansion snippet to put in today’s date for the next day’s headline, as I began planning it. And I’d just manually change the date part to the next day’s date.&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;Until today.&lt;/p&gt;
&lt;p&gt;I typed in &lt;code&gt;:dtx&lt;/code&gt; and I got 2022-07-31.&lt;br&gt;
And then the lazy bum inside me groaned. What? I need to the change the &lt;em&gt;month&lt;/em&gt; too?&lt;br&gt;
The computer can do that for me!&lt;/p&gt;
&lt;p&gt;So I went back to Espanso to see if it did support date expansions for tomorrow.&lt;br&gt;
&lt;a href="https://espanso.org/docs/matches/extensions/#future-and-past-dates" target="_blank" rel="noreferrer"&gt;Turns out it does!&lt;/a&gt;&lt;br&gt;
Only for some reason, it just wouldn’t play ball with the way I want my dates expressed, &lt;em&gt;(YYYY-MM-DD)&lt;/em&gt;. It would throw weird &lt;code&gt;yaml&lt;/code&gt; errors.&lt;br&gt;
And then I recalled Emacs &lt;a href="https://www.emacswiki.org/emacs/InsertingTodaysDate" target="_blank" rel="noreferrer"&gt;just called the shell to do it.&lt;/a&gt;&lt;br&gt;
So I went looking to see, if Espanso could call the operating system shell&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt; to do expansions ala Emacs.&lt;br&gt;
&lt;a href="https://espanso.org/docs/matches/extensions/#shell-extension" target="_blank" rel="noreferrer"&gt;Turns out, it can!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Finally, I looked up how the &lt;code&gt;date&lt;/code&gt; command worked with past and future dates, and jigged up a small expansion snippet and put that into Espanso’s &lt;code&gt;match/base.yaml&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;trigger&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;:dttx&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;{{output}}&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;output&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;shell&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;date --date=&amp;#39;tomorrow&amp;#39; +&amp;#39;%Y-%m-%d&amp;#39;&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;br&gt;

Et voilà!&lt;br&gt;
No more backspacing and struggling with Espanso undos and date calculations.&lt;br&gt;
&lt;code&gt;:dttx&lt;/code&gt; turns into tomorrow’s date:&lt;code&gt;2022-08-01&lt;/code&gt;!&lt;br&gt;
And the monkey brain is happy again :)&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Subtasks not shown.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;like yesterday evening, I typed in &lt;code&gt;:dtx&lt;/code&gt; to get &lt;code&gt;2022-07-30&lt;/code&gt; for e.g. and then changed the &lt;code&gt;30&lt;/code&gt; to a &lt;code&gt;31&lt;/code&gt;.&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;in my case, &lt;code&gt;bash&lt;/code&gt;&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Emacsclient Does Not Recognise Compose Key Sequences</title><link>https://janusworx.com/work/emacsclient-does-not-recognise-compose-key-sequences/</link><pubDate>Sun, 31 Jul 2022 08:00:00 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/emacsclient-does-not-recognise-compose-key-sequences/</guid><description>&lt;p&gt;&lt;span style="font-size: 90%; font-style: italic"&gt;Originally published 2021/10/27. Updated to include the &lt;code&gt;.xssessionsrc&lt;/code&gt; point&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I run pretty often into this issue, so this is a checklist for me.&lt;br&gt;
Issue being, that I cannot use Compose key sequences to type out the characters I need.&lt;/p&gt;
&lt;p&gt;Case in point being, the apostrophe &lt;code&gt;’&lt;/code&gt; and the quote marks &lt;code&gt;“” , ‘’&lt;/code&gt; that I use, all the live long day.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Make sure that emacs is running as a service. It runs in your user, so check status with &lt;code&gt;systemctl --user status emacs.service&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;Do the normal computer user thing. Restart the service.&lt;code&gt;systemctl --user restart emacs.service.&lt;/code&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Make sure the system is UTF-8 everywhere. (en_IN.UTF-8 does not work for me. Make sure it’s en_US.UTF-8)
&lt;ul&gt;
&lt;li&gt;One place that Emacs looks is the &lt;code&gt;.xsessionrc&lt;/code&gt; file in the home folder.
&lt;ul&gt;
&lt;li&gt;These are the contents of mine. My Emacs &lt;em&gt;refuses&lt;/em&gt; to let the compose key sequences work, unless it’s present
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LC_NUMERIC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US.UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LC_MONETARY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US.UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LC_PAPER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US.UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LC_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US.UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LC_ADDRESS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US.UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LC_TELEPHONE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US.UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LC_MEASUREMENT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US.UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LC_IDENTIFICATION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US.UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LC_TIME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US.UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;PAPERSIZE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;a4
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LANGUAGE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;LANG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;en_US.UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;$DISPLAY&lt;/span&gt; !&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;:0&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;XAUTHORITY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;/.Xauthority
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;fi&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This should do the trick 99% of the time.&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Have done it close to 4–5 times now. It works!&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Installing PyCLD3 on an Apple M1 Mac</title><link>https://janusworx.com/work/installing-pycld3-on-an-apple-m1-mac/</link><pubDate>Wed, 30 Mar 2022 09:33:39 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/installing-pycld3-on-an-apple-m1-mac/</guid><description>&lt;p&gt;While building my work product on the fancy-schmancy M1 work Mac, I kept running into &lt;code&gt;clang&lt;/code&gt; errors, when I did a &lt;code&gt;pip install&lt;/code&gt;&lt;br&gt;
Turns out, PyCLD3 would not build.&lt;br&gt;
So I did it manually. &lt;a href="https://github.com/bsolomon1124/pycld3/issues/17#issuecomment-1023857132" target="_blank" rel="noreferrer"&gt;This tip on Github did the trick&lt;/a&gt;&lt;br&gt;
We need &lt;code&gt;brew&lt;/code&gt; installed.&lt;br&gt;
And then we run the following commands in a terminal …&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;brew install protobuf #install protobuf
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# set various compiler flags
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;export CFLAGS=&amp;#39;-I /opt/homebrew/opt/protobuf/include&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;export LDFLAGS=-L/opt/homebrew/opt/protobuf/lib
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# install pycld3
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;python3 -m pip install pycld3&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;And we’re set!&lt;/p&gt;
&lt;p&gt;P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list&lt;/a&gt;!&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Raspberry Pi 4 Not Accessible After a Reboot</title><link>https://janusworx.com/work/raspberry-pi-4-not-accessible-after-a-reboot/</link><pubDate>Tue, 28 Dec 2021 14:00:00 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/raspberry-pi-4-not-accessible-after-a-reboot/</guid><description>&lt;p&gt;Update: 28/12/2021&lt;br&gt;
&lt;strong&gt;&lt;em&gt;The solution? Move off the 64 bit Raspberry Pi OS and install Ubuntu. Everything below is now just for history and context :)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto;margin-bottom: 40px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;' /&gt;
&lt;p&gt;Every time I update my &lt;a href="https://janusworx.com/blog/thoughts-on-running-plex-on-a-raspberry-pi-4/" target="_blank" rel="noreferrer"&gt;Pi&lt;/a&gt;, whether it be an kernel update or due to something goofy I do, it refuses to be accessible via ssh after it boots back up.&lt;br&gt;
And everytime I bring it back to my desk, it just works.&lt;br&gt;
And when I put it back into its niche, by the door, it continues to work.&lt;br&gt;
But inevitably, sooner or later, comes a reboot, and we’re back to being inaccessible.&lt;br&gt;
No ssh, no plex, no network.&lt;/p&gt;
&lt;!-- TEASER_END --&gt; 
&lt;p&gt;The other Pi, my old 3 series, keeps chugging along like a champ in the meanwhile.&lt;br&gt;
This was driving me up the wall.&lt;br&gt;
So I got to thinking, and I realised, I was running the &lt;a href="https://downloads.raspberrypi.org/raspios_arm64/images/" target="_blank" rel="noreferrer"&gt;64 bit edition&lt;/a&gt; of the Raspberry Pi OS.&lt;br&gt;
And then I got to thinking some more, hmm, this is not a mature os. What if, it might be buggy? Or what if, something I do, is tripping it up the wrong way?&lt;br&gt;
Logically then, that meant the network stack, or the network interface, or the port itself.&lt;br&gt;
Because everytime I brought the Pi in, to where my desktop is, I connect it to a switch (that connects to my upstream router).&lt;br&gt;
And then when I take it back, it changes back to connecting to the router directly.&lt;/p&gt;
&lt;p&gt;So the next time it borked, I put the Pi off, then turned the router off and on and then finally, put the Pi back on.&lt;br&gt;
And that did the trick.&lt;br&gt;
I tried it again this morning, when the Pi went offline, after another update. The heuristic still holds!&lt;br&gt;
I’m sure, I could go digging further to find the root cause, &lt;em&gt;(dhcp release renew not happening correctly?)&lt;/em&gt;, this just lets me get on with my life and I’m happy :)&lt;/p&gt;
&lt;p&gt;P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list&lt;/a&gt;!&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Basic Docker Image Management Pointers</title><link>https://janusworx.com/work/basic-docker-image-management-pointers/</link><pubDate>Sun, 28 Nov 2021 18:09:20 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/basic-docker-image-management-pointers/</guid><description>&lt;p&gt;Stuff for future Jason to take note, when he tries to redo his &lt;a href="https://github.com/huginn/huginn" target="_blank" rel="noreferrer"&gt;Huginn instance …&lt;/a&gt;&lt;br&gt;
I wanted a quick and easy way to install it, without messing up my base system much, so I chose the Docker route.&lt;br&gt;
Now, I don’t know the A or D of Docker, so these quick notes for me to remember in the future.&lt;/p&gt;
&lt;!-- TEASER_END --&gt; 
&lt;ol&gt;
&lt;li&gt;I need to install Docker &lt;a href="https://docs.docker.com/engine/security/rootless/" target="_blank" rel="noreferrer"&gt;rootless, and bring it up as a systemd service.&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;If I want persistent data, I should create a &lt;a href="https://docs.docker.com/storage/volumes/" target="_blank" rel="noreferrer"&gt;Docker volume.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Create an &lt;code&gt;env&lt;/code&gt; file to hold all the secrets that I want to pass to the container&lt;/li&gt;
&lt;li&gt;I need to &lt;code&gt;run&lt;/code&gt; and create my huggins instance first, give it a name, pass the env file and also remembering to mount the volume at the place I need&lt;/li&gt;
&lt;li&gt;I can then &lt;code&gt;start&lt;/code&gt; and &lt;code&gt;stop&lt;/code&gt; the image with the name I assigned it.&lt;/li&gt;
&lt;li&gt;I need to then tag the image &lt;a href="https://docs.docker.com/config/containers/start-containers-automatically/" target="_blank" rel="noreferrer"&gt;with a policy to restart automatically&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;So everytime Docker comes up, it will start the container automatically.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list&lt;/a&gt;!&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Using Regex to Prepend to Titles in Calibre</title><link>https://janusworx.com/work/using-regex-to-prepend-to-titles-in-calibre/</link><pubDate>Sat, 20 Nov 2021 12:04:27 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/using-regex-to-prepend-to-titles-in-calibre/</guid><description>&lt;p&gt;So I do this peculiar thing, where I prepend the author’s initials to the title of every book I add to &lt;a href="https://calibre-ebook.com/" target="_blank" rel="noreferrer"&gt;Calibre.&lt;/a&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; &lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;And all these years, I’ve just been manually editing the metadata, everytime I added a book, and changing the titles to what I want.&lt;br&gt;
It’s not a problem if it’s just one book, but I normally tend to go hogwild with authors, normally buying out / &lt;a href="https://archive.org/search.php?query=creator%3A%22Jules%20Verne%22&amp;amp;and[]=mediatype%3A%22texts%22" target="_blank" rel="noreferrer"&gt;downloading&lt;/a&gt; all their work.&lt;br&gt;
And now that I’ve learnt the basics of the hammer called &lt;a href="https://janusworx.com/tags/regex/" &gt;regex&lt;/a&gt;, I wanted to see, you guessed it, if there was a way to quickly do this using regular expressions in Caliber, which &lt;a href="https://manual.calibre-ebook.com/regexp.html" target="_blank" rel="noreferrer"&gt;has inbuilt support for regexes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A quick look through the documentation led me to the &lt;a href="https://manual.calibre-ebook.com/metadata.html#search-and-replace" target="_blank" rel="noreferrer"&gt;search and replace page&lt;/a&gt;, which explains really pretty well … well, how search and replace works :)&lt;/p&gt;
&lt;p&gt;So what did I need to do?&lt;br&gt;
I needed to take the initial character of the title of any book.&lt;br&gt;
And then replace it with author initials + that character&lt;/p&gt;
&lt;p&gt;So here’s the Calibre search and replace box when I choose to edit the metadata for multiple books.&lt;br&gt;
I choose Regular expression as my MO and I choose the title field to work with.&lt;br&gt;
You can see the titles of the books, I chose below&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://janusworx.com/images/2021/cb1.png" &gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt="jwcb1"
 src="https://janusworx.com/images/2021/cb1.png"
 &gt;&lt;/figure&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Then, in the “Search for:” box, I go looking for a single character at the beginning of the title.&lt;br&gt;
With regex I express that as a &lt;code&gt;^.&lt;/code&gt;&lt;br&gt;
I’ve surrounded that pattern with &lt;code&gt;()&lt;/code&gt; brackets to tell regex to remember what it matched.&lt;br&gt;
You’ll see that I’ve matched the character succcesfully and the “A” from A Journey … and the “T” from Twenty Thousand … are missing in the Test results in the bottom right.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://janusworx.com/images/2021/cb2.png" &gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt="jwcb2"
 src="https://janusworx.com/images/2021/cb2.png"
 &gt;&lt;/figure&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;Now in the “Replace with:” box, I tell the regex engine what to match it with.&lt;br&gt;
Which in my case are the author initials “JV” followed by a “ - ” seperator followed by a &lt;code&gt;\1&lt;/code&gt; which tells it to put the match that I found earlier back in.&lt;br&gt;
You can see, now that the titles match the crazy way, I want them.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://janusworx.com/images/2021/cb3.png" &gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt="jwcb3"
 src="https://janusworx.com/images/2021/cb3.png"
 &gt;&lt;/figure&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;We do an ok, and &lt;em&gt;&lt;strong&gt;Tada!&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
The books are renamed in the library :)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://janusworx.com/images/2021/cb4.png" &gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt="jwcb4"
 src="https://janusworx.com/images/2021/cb4.png"
 &gt;&lt;/figure&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto; margin-bottom: 40px; margin-top: 50px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;'/&gt;

&lt;p&gt;All hail the power of regex!&lt;/p&gt;
&lt;p&gt;P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list&lt;/a&gt;!&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit&lt;/a&gt;.&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;a href="https://youtu.be/4fndeDfaWCg?t=25" target="_blank" rel="noreferrer"&gt;Why?&lt;/a&gt;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;Calibre is a rock solid, does not get in your way, marvellously multifunctional way of categorising ebooks and comics. And that is just scratching the tip of everything Calibre can do&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;Click the images for a larger version&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Regular Expressions (Regex) Resources</title><link>https://janusworx.com/work/regular-expressions-regex-resources/</link><pubDate>Wed, 17 Nov 2021 07:04:51 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/regular-expressions-regex-resources/</guid><description>&lt;p&gt;Will update this page whenever I come across something regex, that I love.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Damian Conway’s 5 hour, &lt;a href="https://learning.oreilly.com/videos/understanding-regular-expressions/9781491996300/" target="_blank" rel="noreferrer"&gt;Understanding Regular Expressions&lt;/a&gt; series. This one is the bestestest regex resource ever. If you know the basics of programming and then want to pick up Regular Expressions, this is it.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;br&gt;
And Damian is one of the finest, bestestestest teachers around.&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;Damian Conway’s &lt;a href="https://www.youtube.com/watch?v=ubvSjW6Nyqk" target="_blank" rel="noreferrer"&gt;hour long youtube talk&lt;/a&gt; and the &lt;a href="https://slides.yowconference.com/yowwest2015/Conway-EverythingYouKnowAboutRegexesIsWrong.pdf?feature=oembed" target="_blank" rel="noreferrer"&gt;accompanying slides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/regextip" target="_blank" rel="noreferrer"&gt;RegexTip&lt;/a&gt;, one of John D Cook’s many twitter accounts. This one specialises in, you guessed it, regex tips&lt;/li&gt;
&lt;li&gt;Regex cheatsheets? &lt;a href="https://resources.oreilly.com/examples/0636920098690/-/blob/master/RegexesCheatSheet.pdf" target="_blank" rel="noreferrer"&gt;This one&lt;/a&gt;, by Damian Conway and &lt;a href="https://cheatography.com/davechild/cheat-sheets/regular-expressions/" target="_blank" rel="noreferrer"&gt;this one&lt;/a&gt; by Dave Child.&lt;/li&gt;
&lt;li&gt;Want to keep regex top of mind? Use Anki? &lt;a href="https://ankiweb.net/shared/info/284568815" target="_blank" rel="noreferrer"&gt;This is the deck I love&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Unnecessary, ars gratia artis like Deep Dive? &lt;a href="https://learning.oreilly.com/library/view/mastering-regular-expressions/0596528124/" target="_blank" rel="noreferrer"&gt;The Friedl book&lt;/a&gt; is it.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;em&gt;Also don’t be like me and try to learn Regex first. You’re just making it harder on yourself. It is indeed possible, but nearly every regex resource presumes basic programming knowledge. It does not have to be much. Loops and variables and such, &lt;a href="https://automatetheboringstuff.com/" target="_blank" rel="noreferrer"&gt;Automate the Boring Stuff&lt;/a&gt; is good for that, but I don’t want to digress into Python resources&lt;/em&gt; 😂&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Rough Notes on Swap File/Partition in Linux</title><link>https://janusworx.com/work/rough-notes-on-swap-filepartition-in-linux/</link><pubDate>Fri, 12 Nov 2021 09:31:43 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/rough-notes-on-swap-filepartition-in-linux/</guid><description>&lt;p&gt;Am using my rickety old laptop as my daily driver these days, because … reasons.&lt;br&gt;
And now, that I run &lt;a href="https://janusworx.com/blog/starting-emacs-from-the-command-line-and-getting-back-to-the-prompt/" target="_blank" rel="noreferrer"&gt;PyCharm alongside Emacs&lt;/a&gt;, alongside Chrome in its various incarnations, the poor old thing crashes, freezes and stutters a lot.&lt;br&gt;
A cursory inspection told me that while I had plenty of CPU firepower, I was &lt;em&gt;constantly&lt;/em&gt; running out of ram &lt;em&gt;(8gb)&lt;/em&gt; and swap &lt;em&gt;(1 gb partition)&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Too broke to add more ram to the system right now (don’t even know if this thing will support 8 gb modules to push it up to 16).&lt;br&gt;
So the only way to go, was to somehow increase the swap on my system.&lt;br&gt;
This is the checklist for curious / researching Jason in the future.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Make sure system is backed up&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;Check if there is a swap file or partition&lt;/li&gt;
&lt;li&gt;If there’s a file then we’re in luck. If it’s a partition then,&lt;/li&gt;
&lt;li&gt;Just make sure we have a live usb disk. I used my &lt;a href="https://linuxmint.com/download.php" target="_blank" rel="noreferrer"&gt;Mint installer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Then we need to turn swap off (&lt;code&gt;swapoff&lt;/code&gt; command)&lt;/li&gt;
&lt;li&gt;If there’s a partition / file entry in &lt;code&gt;fstab&lt;/code&gt; remove it&lt;/li&gt;
&lt;li&gt;Now, if it’s a file skip down to step 13&lt;/li&gt;
&lt;li&gt;If it’s a partition boot off the live usb disk&lt;/li&gt;
&lt;li&gt;Install some gui partition tool off the net, depending on the kind of partition we have. &lt;em&gt;(for e.g. &lt;code&gt;GParted&lt;/code&gt; for raw ext4 partitions and &lt;code&gt;blivet-gui&lt;/code&gt; for lvm stuff)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Best way forward (to my mind) is to get rid of the partition and then create a swap&lt;em&gt;file&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;So delete the swap partition, and resize the main one to take in the free space left behind &lt;em&gt;(this could take a while)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Once done boot back into the system&lt;/li&gt;
&lt;li&gt;Create a bigger swapfile and activate it. (&lt;code&gt;mkswap&lt;/code&gt;,&lt;code&gt;swapon&lt;/code&gt;) &lt;em&gt;(I made mine 3gb. (while having 8gb of ram))&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Create entry in &lt;code&gt;fstab&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Reboot&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Linuxize, has a &lt;a href="https://linuxize.com/post/create-a-linux-swap-file/" target="_blank" rel="noreferrer"&gt;pretty good guide&lt;/a&gt; on the commands and permissions involved.&lt;/p&gt;</description></item><item><title>Pycharm Does Not Recognise Compose Key Sequences</title><link>https://janusworx.com/work/pycharm-does-not-recognise-compose-key-sequences/</link><pubDate>Tue, 09 Nov 2021 15:56:04 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/pycharm-does-not-recognise-compose-key-sequences/</guid><description>&lt;p&gt;Did I not &lt;em&gt;just&lt;/em&gt; write about this, &lt;a href="https://janusworx.com/blog/emacsclient-does-not-recognise-compose-key-sequences/" target="_blank" rel="noreferrer"&gt;the other day with Emacs?&lt;/a&gt;&lt;br&gt;
I did, but Pycharm seems to have the same affliction. Pycharm, just like Emacs, stubbornly refuses to accept my Compose key combinations. Which means … you guessed it, no &lt;code&gt;‘,”,“ or ’&lt;/code&gt; punctuation and all the other affordances, Compose gives me.&lt;br&gt;
Considering that I need &lt;em&gt;both&lt;/em&gt;, &lt;a href="https://janusworx.com/blog/starting-emacs-from-the-command-line-and-getting-back-to-the-prompt/" target="_blank" rel="noreferrer"&gt;Pycharm as well as Emacs in my life&lt;/a&gt;, it behooved me, that I go solve this too.&lt;/p&gt;
&lt;p&gt;And … drumroll … the answer turned out to be the same as Emacs.&lt;br&gt;
Set the &lt;code&gt;locale&lt;/code&gt; to be &lt;code&gt;en_US.utf8&lt;/code&gt; systemwide.&lt;/p&gt;
&lt;p&gt;Which confused me a bit for a second.&lt;br&gt;
I had done it for Emacs. So why was Pycharm behaving oddly?&lt;br&gt;
And then, another second later, I realised, that this was a &lt;em&gt;different&lt;/em&gt; machine.&lt;br&gt;
This was my laptop, which I now use as my daily driver and the &lt;code&gt;locale&lt;/code&gt; was set to India, as per my original preferences.&lt;/p&gt;
&lt;p&gt;A quick, &lt;code&gt;sudo localectl set-locale LANG=en_US.utf8&lt;/code&gt; and a reboot later, both Pycharm and Emacs were humming along to the Compose key dance :)&lt;/p&gt;
&lt;br&gt;

&lt;p&gt;P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list&lt;/a&gt;!&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Starting Emacs From the Command Line, and Getting Back to the Prompt</title><link>https://janusworx.com/personal/starting-emacs-from-the-command-line-and-getting-back-to-the-prompt/</link><pubDate>Wed, 27 Oct 2021 17:00:00 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/personal/starting-emacs-from-the-command-line-and-getting-back-to-the-prompt/</guid><description>&lt;p&gt;I want to leave VS Code behind me and move to using Emacs for mostly everything I write in the long haul.&lt;/p&gt;
&lt;p&gt;Emacs &lt;em&gt;is&lt;/em&gt; the editor I use to putter around for any text editing I need to do, but most of my long form writing and coding were done in VS Code.&lt;br&gt;
And the more I use it (VS Code, not Emacs), the more uncomfortable I get, no matter how nice and shiny it is.&lt;/p&gt;
&lt;!-- TEASER_END --&gt; 
&lt;p&gt;While they are old and crufty, there &lt;em&gt;is&lt;/em&gt; a benefit to using editors like Emacs.&lt;br&gt;
One that matters to me. Emacs (and Vim) are &lt;a href="https://janusworx.com/blog/what-i-learnt-from-antifragile-iv/" target="_blank" rel="noreferrer"&gt;Lindy.&lt;/a&gt;&lt;br&gt;
So I’ve decided to split my needs for now.&lt;br&gt;
Programming code goes to Jetbrains and everything else goes to Emacs.&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;p&gt;The one thing I immediately missed was doing &lt;code&gt;code .&lt;/code&gt; in my terminal to open up a folder full of files in VS Code.&lt;br&gt;
Emacsclient would launch alright, but I would have to close the Emacs window to regain control of my terminal to process other commands.&lt;br&gt;
Yes, I could &lt;code&gt;bg&lt;/code&gt; it, but I want to be able to quit the terminal as well.&lt;br&gt;
Spelunking through the &lt;a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/emacsclient-Options.html" target="_blank" rel="noreferrer"&gt;Emacs documentation&lt;/a&gt; led me to the &lt;code&gt;no-wait&lt;/code&gt; switch.&lt;br&gt;
So I updated my &lt;code&gt;ec&lt;/code&gt; alias to&lt;br&gt;
&lt;code&gt;alias ec='emacsclient -create-frame --no-wait --alternate-editor=&amp;quot;&amp;quot;'&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now an &lt;code&gt;ec .&lt;/code&gt; in a folder opens up Emacs with gorgeous folder listing of files for me.&lt;/p&gt;
&lt;p&gt;One more step towards an all Emacs future :)&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto;margin-bottom: 40px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;' /&gt;
&lt;p&gt;P.S. Subscribe to my &lt;a href="https://janusworx.com/subscribe/" target="_blank" rel="noreferrer"&gt;mailing list&lt;/a&gt;!&lt;br&gt;
Forward these posts and letters to your friends and get them to subscribe!&lt;br&gt;
P.P.S. Feed my &lt;a href="https://www.amazon.in/hz/wishlist/ls/2QAUKHHAMOOVS?ref_=wl_share" target="_blank" rel="noreferrer"&gt;insatiable reading habit&lt;/a&gt;.&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;em&gt;Even programming eventually will go to Emacs&lt;/em&gt;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Joining Two Images Using ImageMagick</title><link>https://janusworx.com/work/joining-two-images-using-imagemagick/</link><pubDate>Fri, 06 Aug 2021 07:25:47 +0530</pubDate><author>feedback@janusworx.com (Mario Jason Braganza)</author><guid>https://janusworx.com/work/joining-two-images-using-imagemagick/</guid><description>&lt;p&gt;Sometimes, I want to share snippets of what I am reading with my friends.&lt;br&gt;
Kindles make it easy, with screenshots.&lt;br&gt;
The only issue being I want to share the full length of two pages, like I’d do if I was reading a book.&lt;br&gt;
And I need it often enough, that I felt I needed to go figure out some way to do it.&lt;/p&gt;
&lt;p&gt;It was an easy-ish hack on the mac with printing with Preview.&lt;br&gt;
But now, that I use Linux, I wondered if I could do better.&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;p&gt;A little bit of spelunking and I figured out how to let &lt;a href="https://imagemagick.org/index.php" target="_blank" rel="noreferrer"&gt;ImageMagick&lt;/a&gt; do the hard work for me.&lt;br&gt;
The &lt;a href="https://imagemagick.org/script/command-line-tools.php" target="_blank" rel="noreferrer"&gt;suite&lt;/a&gt; comes with a utility called Convert, that does exactly what I need.&lt;/p&gt;
&lt;p&gt;The basic command structure is,&lt;/p&gt;
&lt;p&gt;&lt;code&gt;some-imagemagick-utility -options input-file-1 input-file-2 … output-file&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So to join my screenshots all I needed to do was,&lt;/p&gt;
&lt;p&gt;&lt;code&gt;convert +append dff1.png dff2.png combined-kindle-screenshot.png&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and boom!&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto;margin-bottom: 40px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;' /&gt; 
&lt;p&gt;&lt;a href="https://janusworx.com/images/2021/combined-kindle-screenshot.png" &gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt="screenshot of a two pages from a kindle book"
 src="https://janusworx.com/images/2021/combined-kindle-screenshot.png"
 &gt;&lt;/figure&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;hr style='margin-left: auto; margin-right: auto;margin-bottom: 40px; width:100px; border: none; background-color:rgb(238, 238, 238); color: rgb(238, 238, 238); height: 1px;' /&gt; 
&lt;p&gt;While this is what I want, the convert utility also lets me stack them one below the other by using &lt;code&gt;-append&lt;/code&gt; like so …&lt;/p&gt;
&lt;p&gt;&lt;code&gt;convert -append dff1.png dff2.png combined-kindle-screenshot.png&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Yes, I know ImageMagick is the &lt;a href="https://legacy.imagemagick.org/Usage/" target="_blank" rel="noreferrer"&gt;bees knees&lt;/a&gt; when it comes to images, but I guess this will be the most I’ll ever use it :) &lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Famous last words! 😂&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item></channel></rss>