<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>CJ-Jackson Blog</title>
        <link>https://www.cjjackson.dev/</link>
        <description>Recent content on CJ-Jackson Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-gb</language>
        <lastBuildDate>Sun, 18 May 2025 19:30:27 +0100</lastBuildDate><atom:link href="https://www.cjjackson.dev/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Using GoCryptFS with QR-Code</title>
        <link>https://www.cjjackson.dev/posts/using-gocryptfs-with-qr-code/</link>
        <pubDate>Sun, 18 May 2025 19:30:27 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/using-gocryptfs-with-qr-code/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/using-gocryptfs-with-qr-code/featured.jpg" alt="Featured image of post Using GoCryptFS with QR-Code" /&gt;&lt;p&gt;In this tutorial we are going to use the following application.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://linux.die.net/man/1/pwgen&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;pwgen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://linux.die.net/man/1/qrencode&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;qrencode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;zbar (&lt;a class=&#34;link&#34; href=&#34;https://linux.die.net/man/1/zbarcam&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;zbarcam&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/rfjakob/gocryptfs&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;gocryptfs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get started we need to create the QR-code with a very long password, say around 256 character.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd /tmp
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pwgen -1syv &lt;span style=&#34;color:#ae81ff&#34;&gt;256&lt;/span&gt; | tr -d &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;\n&amp;#39;&lt;/span&gt; | qrencode -t SVG -o &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;qr.svg&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This should create a random qr-code saved as qr.svg, upload the QR-code to the phone by any means.&lt;/p&gt;
&lt;p&gt;Now to initialized the folder that will store the encrypted data.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir cipher
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;zbarcam --raw -1 | tr -d &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;\n&amp;#39;&lt;/span&gt; | gocryptfs -init -q -xchacha cipher
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Scan the QR-Code from the phone and it should initialized the folder ready for encryption.&lt;/p&gt;
&lt;p&gt;To mount&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir mnt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;zbarcam --raw -1 | tr -d &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;\n&amp;#39;&lt;/span&gt; | gocryptfs cipher mnt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Scan the QR-Code again and it should mount &lt;code&gt;cipher&lt;/code&gt; to &lt;code&gt;mnt&lt;/code&gt;, to test it add file to &lt;code&gt;mnt&lt;/code&gt; folder and than
check &lt;code&gt;cipher&lt;/code&gt; you should see an encrypted file.&lt;/p&gt;
&lt;p&gt;It is useful for encrypting key file for the password manager on the work&amp;rsquo;s machine that has a webcam,
given that it is running Linux.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Use Named Pipe to Unlock Encrypted File With Remote Key</title>
        <link>https://www.cjjackson.dev/posts/use-named-pipe-to-unlock-encrypted-file-with-remote-key/</link>
        <pubDate>Sun, 16 Mar 2025 10:08:37 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/use-named-pipe-to-unlock-encrypted-file-with-remote-key/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/use-named-pipe-to-unlock-encrypted-file-with-remote-key/featured.jpg" alt="Featured image of post Use Named Pipe to Unlock Encrypted File With Remote Key" /&gt;&lt;p&gt;It been awhile since a made the post, anyway it is what the title suggess, I’m going to show you how to unlock a
encrypted file with remote key over ssh and named pipe (fifo). You’ll need to open two different terminals to do this.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Create the named pipe&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkfifo /tmp/pipe
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# It should be in a blocked state, until information is recevied.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;age -d -i /tmp/pipe &amp;lt; in.age &amp;gt; out
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the other terminal run the following.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh username@server &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;cat /path/to/key.txt&amp;#34;&lt;/span&gt; &amp;gt; /tmp/pipe
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It should unblock age and decrypt the file. It’s quite a good way to restrict private key exposure to ram, it much more
secure than
copying the private key to &lt;code&gt;/tmp&lt;/code&gt; on MacOS it just like any other folder, while on Linux it &lt;code&gt;tmpfs&lt;/code&gt; in lament terms,
anything in &lt;code&gt;/tmp&lt;/code&gt; does not go to ram on MacOS but does on Linux. So yes I’d say that name pipe are quite secure as
you&amp;rsquo;re
also avoiding clipboard, it’s very easy to accidently paste the private key to non-volatile storage, it happened to me
but luckily the storage was encrypted. But with named pipe I don’t get into accidents, everything just stay in volatile
ram.&lt;/p&gt;
&lt;p&gt;I do not recommend using clipboard for private keys for the reason I mentioned above.&lt;/p&gt;
&lt;p&gt;I wonder what other experiment we could do with named pipes? 😁&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Using QR Code to Unlock Encrypted File Container</title>
        <link>https://www.cjjackson.dev/posts/using-qr-code-to-unlock-encrypted-file-container/</link>
        <pubDate>Sun, 18 Aug 2024 10:57:49 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/using-qr-code-to-unlock-encrypted-file-container/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/using-qr-code-to-unlock-encrypted-file-container/featured.jpg" alt="Featured image of post Using QR Code to Unlock Encrypted File Container" /&gt;&lt;p&gt;I needed a offline solution to keep my key file secure on the work computer where I can’t use the pen drive or any other
external storage, but I’m allowed to use the webcam, which requires the password to be at least 500 characters long,
which is obviously tedious to write manually, the only solution that came to mind was the QR Code which is capable of
holding long passwords.&lt;/p&gt;
&lt;p&gt;The tools used in this tutorial are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;zbar-tools, for scanning the QR Code via webcam.&lt;/li&gt;
&lt;li&gt;LUKS via cryptsetup, for managing encrypted file container.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Write the script, customise it to your liking, follow the preparation, and finally execute &lt;code&gt;unlock_crypto.sh&lt;/code&gt; and scan
the QR Code should unlock the encrypted file container.&lt;/p&gt;
&lt;h2 id=&#34;script&#34;&gt;Script
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;getpass.sh&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;cd $XDG_RUNTIME_DIR
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;touch passwd.txt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;chmod &lt;span style=&#34;color:#ae81ff&#34;&gt;600&lt;/span&gt; passwd.txt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Scan the QR Code, store password to RAM, always volatile for temporary files.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;zbarcam --raw -1 &amp;gt; passwd.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;open.sh&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;cryptsetup open --type luks &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;1&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;/.usr/img/crypto.img crypto --key-file /run/&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;2&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;/passwd.txt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mount -t ext4 /dev/mapper/crypto &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;1&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;/.key
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;clearpass.sh&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;cd $XDG_RUNTIME_DIR
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rm -rf /crypt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;unlock_crypto.sh&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;cd /home/cjjackson/.usr/libexec/crypt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./getpass.sh &lt;span style=&#34;color:#f92672&#34;&gt;||&lt;/span&gt; exit &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo ./open.sh $HOME $XDG_RUNTIME_DIR &lt;span style=&#34;color:#f92672&#34;&gt;||&lt;/span&gt; exit &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./clearpass.sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;lock_crypto.sh&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;umount $HOME/.key
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cryptsetup close crypto
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;preparation&#34;&gt;Preparation
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Get password&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./getpass.sh
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Create the container&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/urandom of&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;$HOME/.usr/img/crypto.img bs&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;1G count&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; iflag&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;fullblock
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Format the container&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cryptsetup luksFormat $HOME/.usr/img/crypto.img --key-file $XDG_RUNTIME_DIR/passwd.txt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Open the container&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo cryptsetup open --type luks $HOME/crypto.img crypto --key-file $XDG_RUNTIME_DIR/passwd.txt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Format to ext4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo mkfs.ext4 /dev/mapper/crypto
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Close the container&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo cryptsetup close crypto
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Clear Pass&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./clearpass.sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;note&#34;&gt;Note
&lt;/h2&gt;&lt;p&gt;You may need to change the ownership of the mounted folder.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo chown cjjackson:cjjackson /home/cjjackson/.key
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I used &lt;code&gt;qrencode&lt;/code&gt; to create the QR Code and save it to my phone.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Creating an executable TOML</title>
        <link>https://www.cjjackson.dev/posts/creating_an_executable_toml/</link>
        <pubDate>Sun, 14 Apr 2024 10:21:56 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/creating_an_executable_toml/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/creating_an_executable_toml/featured.jpg" alt="Featured image of post Creating an executable TOML" /&gt;&lt;p&gt;In this rather brief tutorial, I’m going to show you how to create an executable &lt;a class=&#34;link&#34; href=&#34;https://toml.io/en/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;TOML&lt;/a&gt;, this works
on Mac and Linux, it can also work on Windows using &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/wsl/about&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;WSL&lt;/a&gt; . First
you need to write a script, I’m going to use Python to write the script, it can be done in any programming language.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;py_toml&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/usr/bin/env python3&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; sys
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; tomllib
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;open_shebang_toml&lt;/span&gt;() &lt;span style=&#34;color:#f92672&#34;&gt;-&amp;gt;&lt;/span&gt; dict:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;try&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#75715e&#34;&gt;# Shebang always add the filename of thepy&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#75715e&#34;&gt;# executing script as the last parameter&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#66d9ef&#34;&gt;with&lt;/span&gt; open(sys&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;argv[&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;], &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;rb&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#66d9ef&#34;&gt;as&lt;/span&gt; f:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#66d9ef&#34;&gt;return&lt;/span&gt; tomllib&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;load(f)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;except&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;IndexError&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        print(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Must have one argument&amp;#34;&lt;/span&gt;, file&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;sys&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;stderr)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        exit(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;except&lt;/span&gt; (&lt;span style=&#34;color:#a6e22e&#34;&gt;OSError&lt;/span&gt;, tomllib&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;TOMLDecodeError):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        print(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Unable to read file&amp;#34;&lt;/span&gt;, file&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;sys&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;stderr)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        exit(&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;def&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;print_shebang&lt;/span&gt;():
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    print(open_shebang_toml())
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; __name__ &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;__main__&amp;#34;&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    print_shebang()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I called it &lt;code&gt;py_toml&lt;/code&gt; yes that without the file extension, the file needs to be executable &lt;code&gt;chmod 755 py_toml&lt;/code&gt; and need
to searchable within &lt;code&gt;PATH&lt;/code&gt; environment, I use &lt;a class=&#34;link&#34; href=&#34;https://direnv.net/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;direnv&lt;/a&gt; to update the &lt;code&gt;PATH&lt;/code&gt; . Now to create the
example TOML file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;example.toml&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/usr/bin/env py_toml&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# The trick is to use shebang&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;forename&lt;/span&gt; = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Chris&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;surname&lt;/span&gt; = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Jackson&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;location&lt;/span&gt; = &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Jersey&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Again the file also needs to be executable, run the following command.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./example.toml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And you should get something like&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{&amp;#39;forename&amp;#39;: &amp;#39;Chris&amp;#39;, &amp;#39;surname&amp;#39;: &amp;#39;Jackson&amp;#39;, &amp;#39;location&amp;#39;: &amp;#39;Jersey&amp;#39;}
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;random-conclusion&#34;&gt;Random Conclusion
&lt;/h2&gt;&lt;p&gt;It is quite useful, I used this approach to write my own rest api client for testing and I do use it for work, I could
of used something like Postman or Insomnia, but I feel that those kind of client don’t follow the Unix philosophy quite
well therefore I ended up writing my own client and yes it is written in Python rather than JavaScript, well because it
the obvious choice for data analysis, analysing the output of the API is data analysis, it comes as standard on most
Linux distributions as well, based on those two merit alone, I believe I have made the correct decision and performance
is irrelevant for data analysis. 🙂&lt;/p&gt;
&lt;p&gt;By performance I mean the speed of the programming language 🙂&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Preparing a LUKS key file image for usb flash drive on Linux</title>
        <link>https://www.cjjackson.dev/posts/luks-key-file-image-usb-flash-linux/</link>
        <pubDate>Sat, 14 Oct 2023 15:54:30 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/luks-key-file-image-usb-flash-linux/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/luks-key-file-image-usb-flash-linux/featured.jpg" alt="Featured image of post Preparing a LUKS key file image for usb flash drive on Linux" /&gt;&lt;p&gt;A few days ago, I was preparing a key drive to unlock the encrypted partition on boot, the process of doing that
manually is quite tedious, so I decided to write a script to automate the process.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/usr/local/libexec/script/makeKeyImg&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;keyName&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;1-key&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;.img
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir -p /tmp/sandbox/storage
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd /tmp/sandbox
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/zero of&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;$keyName bs&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;1M count&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;512&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;devLocation&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;losetup -Pf --show $keyName&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;echo n; echo p; echo 1; echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\n&amp;#34;&lt;/span&gt;; echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;\n&amp;#34;&lt;/span&gt;; echo t; echo c; echo w&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt; | fdisk $devLocation
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkfs.vfat &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;devLocation&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;p1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mount &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;devLocation&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;p1 storage
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd bs&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;512&lt;/span&gt; count&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/random of&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;storage/key.bin iflag&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;fullblock
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;umount &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;devLocation&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;p1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DEVUUID&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;blkid &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;devLocation&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;p1 -s UUID | cut -d &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;&amp;#34;&amp;#39;&lt;/span&gt; -f 2&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;losetup -d $devLocation
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mv $keyName &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;keyName%.*&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;DEVUUID&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;keyName##*.&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;/usr/local/bin/make-key-img&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;doas /usr/local/libexec/script/makeKeyImg &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$@&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you use &lt;code&gt;sudo&lt;/code&gt; replace &lt;code&gt;doas&lt;/code&gt; with &lt;code&gt;sudo&lt;/code&gt; . Once you run the script it should create a image file with the &lt;code&gt;key.bin&lt;/code&gt;
inside on a &lt;code&gt;vfat&lt;/code&gt; partition, the image file will be located in &lt;code&gt;/tmp/sandbox&lt;/code&gt; , the file name should be something
like &lt;code&gt;key-ABCD-1234.img&lt;/code&gt; (Yes, that the UUID after first hyphen) and run the following to write image to usb-storage.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;key-ABCD-1234.img of&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/sdx bs&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;1M
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now the usb-storage device is ready for decrypting the partition, all you have to do is to configure luks to accept the
key, there is already a tutorial on Arch Wiki on how to do that and can be found
at &lt;a class=&#34;link&#34; href=&#34;https://wiki.archlinux.org/title/Dm-crypt/Device_encryption#Configuring_LUKS_to_make_use_of_the_keyfile&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://wiki.archlinux.org/title/Dm-crypt/Device_encryption#Configuring_LUKS_to_make_use_of_the_keyfile&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;tips&#34;&gt;Tips
&lt;/h2&gt;&lt;p&gt;You can prevent the drive from being auto-mounted on boot up and on insert, just add the following line to &lt;code&gt;/etc/fstab&lt;/code&gt;
quite easy.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;UUID=ABCD-1234  /root/key   vfat    ro,noauto,umask=0377    0 0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;ro&lt;/code&gt; means read-only, &lt;code&gt;noauto&lt;/code&gt; prevent auto-mounting and &lt;code&gt;umask&lt;/code&gt; restrict the permission making it read only for
root user and no access for other users and groups.&lt;/p&gt;
&lt;p&gt;I also recommend making an encrypted backup copy of the image file.&lt;/p&gt;
&lt;p&gt;Have fun 🤩&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Replacing Sudo With Doas on Arch Linux</title>
        <link>https://www.cjjackson.dev/posts/replacing-sudo-with-doas-on-arch-linux/</link>
        <pubDate>Sun, 09 Jul 2023 12:09:50 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/replacing-sudo-with-doas-on-arch-linux/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/replacing-sudo-with-doas-on-arch-linux/featured.jpg" alt="Featured image of post Replacing Sudo With Doas on Arch Linux" /&gt;&lt;p&gt;Sudo is a utility that let you run a command with root privileges, but the the issue with sudo is that it has so many
lines of code, when the source code is compressed to a zip file it is around &lt;code&gt;5.6mb&lt;/code&gt; whereas &lt;code&gt;opendoas&lt;/code&gt; that
around &lt;code&gt;53kb&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/replacing-sudo-with-doas-on-arch-linux/compare.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Using finder to compare file size&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;The more lines of code the bigger the attack vector, now that something I don’t want when running the command with root
privileges, so I decided to replace &lt;code&gt;sudo&lt;/code&gt; with &lt;code&gt;doas&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;On Arch Linux it is quite easy, first run the installation command.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pacman -S opendoas
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Create a new file &lt;code&gt;/etc/doas.conf&lt;/code&gt; with the following content&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;permit setenv {PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin} :wheel
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now test the command by uninstalling sudo, assuming your account is in the &lt;code&gt;wheel&lt;/code&gt; group.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;doas pacman -R sudo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Than secure the &lt;code&gt;doas.conf&lt;/code&gt; file&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;doas chown -c root:root /etc/doas.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;doas chmod -c &lt;span style=&#34;color:#ae81ff&#34;&gt;0400&lt;/span&gt; /etc/doas.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Well done you’ve completed setting up &lt;code&gt;doas&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;optional-stuff&#34;&gt;Optional Stuff
&lt;/h2&gt;&lt;h3 id=&#34;creating-sudo-symlink-to-doas&#34;&gt;Creating &lt;code&gt;sudo&lt;/code&gt; Symlink to &lt;code&gt;doas&lt;/code&gt;
&lt;/h3&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ln -s &lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;which doas&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt; /usr/bin/sudo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;creating-a-safe-environment-for-editing-doasconf-similar-to-visudo&#34;&gt;Creating a safe environment for editing &lt;code&gt;doas.conf&lt;/code&gt; similar to &lt;code&gt;visudo&lt;/code&gt;.
&lt;/h3&gt;&lt;p&gt;Create &lt;code&gt;/root/script/vidoas&lt;/code&gt; and add the following, you may want to replace &lt;code&gt;nvim&lt;/code&gt; with your preferred text editor. 🙂&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DOASDIR&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/tmp/doas-&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;date +%s&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir $DOASDIR
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;chmod &lt;span style=&#34;color:#ae81ff&#34;&gt;700&lt;/span&gt; $DOASDIR
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DOASFILE&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$DOASDIR&lt;span style=&#34;color:#e6db74&#34;&gt;/doas.conf&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp /etc/doas.conf $DOASFILE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;chmod &lt;span style=&#34;color:#ae81ff&#34;&gt;600&lt;/span&gt; $DOASFILE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nvim $DOASFILE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sync
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;doas -C $DOASFILE &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;valid config&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; cp $DOASFILE /etc/doas.conf &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; chmod &lt;span style=&#34;color:#ae81ff&#34;&gt;400&lt;/span&gt; /etc/doas.conf &lt;span style=&#34;color:#f92672&#34;&gt;||&lt;/span&gt; echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;invalid config&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sync
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rm -rf $DOASDIR
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Than create &lt;code&gt;/usr/local/bin/vidoas&lt;/code&gt; and add the following&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;id -u&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt; !&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        doas /root/script/vidoas
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        /root/script/vidoas
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Change the permission of both files.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;doas chmod &lt;span style=&#34;color:#ae81ff&#34;&gt;700&lt;/span&gt; /root/script/vidoas
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;doas chmod &lt;span style=&#34;color:#ae81ff&#34;&gt;755&lt;/span&gt; /usr/local/bin/vidoas
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then test it by running &lt;code&gt;vidoas&lt;/code&gt;  it should should create a temporary file inside the preferred text editor, on exit it
will apply the changes if there is no errors.&lt;/p&gt;
&lt;h2 id=&#34;good-reads&#34;&gt;Good reads
&lt;/h2&gt;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://wiki.archlinux.org/title/Doas&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;doas - ArchWiki&lt;/a&gt;&lt;br&gt;
&lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Doas&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;doas - Wikipedia&lt;/a&gt;&lt;/p&gt;
</description>
        </item>
        <item>
        <title>I’ve Been a Victim of the Pig-Butchering Scam</title>
        <link>https://www.cjjackson.dev/posts/ive-been-a-victim-of-the-pig-butchering-scam/</link>
        <pubDate>Mon, 23 Jan 2023 19:29:44 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/ive-been-a-victim-of-the-pig-butchering-scam/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/ive-been-a-victim-of-the-pig-butchering-scam/featured.jpg" alt="Featured image of post I’ve Been a Victim of the Pig-Butchering Scam" /&gt;&lt;p&gt;During November last year 2022, I’ve been contacted by someone of the name ‘Alice’ on Instagram, she introduce me to
short-term crypto trading, at first I invested around £100, I got around a 5% return on investment (which turned out to
be a scam) so I was convinced into investing more money into the the system I went up to £3,000 and I almost took out a
loan with my bank, which I’ve manage to cancel.&lt;/p&gt;
&lt;p&gt;She got me onto WhatApps, she was contacting me every morning and every night, it was quite exhausting at times, she
pretended to be rich and wealthy, at first I thought she had comprehensive knowledge but in reality she was reading from
a script. She was doing what she can to stop me from thinking for myself and doing my own research, fortunately she
failed to do that, I did do my research and I came across the site
called &lt;a class=&#34;link&#34; href=&#34;https://www.globalantiscam.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Global Anti-Scam Org&lt;/a&gt; and from there I realised I was being scammed, the first
thing I did was contact the bank and successfully cancelled the loan, if the loan money went into the scam, I’d of been
in debt for about a year. I got in contact with Global Anti-Scam Org and than the Police.&lt;/p&gt;
&lt;p&gt;She also tried to get me to borrow money from other people, which I choose not to do, I just don’t like being a burden
to other people, so I don’t borrow money from others, not even for a penny.&lt;/p&gt;
&lt;p&gt;I lost around £3,100, in the long term, I think I got off quite lightly, I’d say I was on the raising stage of the
scam, &lt;a class=&#34;link&#34; href=&#34;https://www.globalantiscam.org/about&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;there are four stages of the scam&lt;/a&gt;, I heard of other victims losing a lot
more, up to a £1m, so I’ve decided to cut my loses. But still I would not wish any of this on my worst enemy.&lt;/p&gt;
&lt;p&gt;I will admit, I still live with my parent, I had desires to move out and basically I wanted a better life for myself,
sadly that what got me deep into the scam. She took advantage of my desire and that how she got me into the scam.&lt;/p&gt;
&lt;p&gt;From this point forward, I won’t be doing any investment with people I haven’t met in reality. If someone send you a
message and all of a sudden they are talking about cryptocurrency, I’d say just don’t go any further otherwise you might
get scammed.&lt;/p&gt;
&lt;p&gt;I’m very thankful I caught on quite early, it could of been a lot worse.&lt;/p&gt;
&lt;h2 id=&#34;what-do-i-have-to-say-to-anyone-who-been-scammed&#34;&gt;What do I have to say to anyone who been scammed?
&lt;/h2&gt;&lt;p&gt;I’d say don’t feel embarrassed about that, speak your mind about it, explain how you got caught up in the scam in much
detail as you possibly can. The more you speak about it, the more other will become aware of it. Never suffer in
silence, the scammer will use your silence to their advantage.&lt;/p&gt;
&lt;p&gt;I’d also suggest you get in contact with the Police, but I’ll say the chances of you getting your money back is very
slim. It best to get on with your normal life, that is what I’m doing right now.&lt;/p&gt;
&lt;p&gt;Don’t think that it was your fault, it was their job to scam you and you did not deserve that, no one deserved to be
scammed.&lt;/p&gt;
&lt;p&gt;Also don’t get in contact with cryptocurrency recovery, that probably a scam as well, it better to cut your loses, I
know that can be a bitter pill to swallow.&lt;/p&gt;
&lt;p&gt;Got question to ask me? just ask in the comment section.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>File Encryption with Disposable Keys Using QR Code</title>
        <link>https://www.cjjackson.dev/posts/file-encryption-with-disposable-keys-using-qr-code/</link>
        <pubDate>Tue, 03 Jan 2023 21:40:45 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/file-encryption-with-disposable-keys-using-qr-code/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/file-encryption-with-disposable-keys-using-qr-code/featured.jpg" alt="Featured image of post File Encryption with Disposable Keys Using QR Code" /&gt;&lt;p&gt;I’ve been experimenting with QR Codes lately and came up with a solution that is a lot safer than carrying pen drive
with you and does not require you to use your cloud storage username and password on someone else’s machine neither.&lt;/p&gt;
&lt;p&gt;So I have written a script that encrypt the file and sends the private key to the printer in the form of a QR code, so
here is the script.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Grab first parameter and create a time stamp.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;srcPath&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;$1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;stamp&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;date +%s&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Generate Private and Public Key&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;privateKey&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;age-keygen 2&amp;gt;/dev/null | sed &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;s:#.*$::g&amp;#39;&lt;/span&gt; | tr -d &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;\n&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;publicKey&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;echo $privateKey | age-keygen -y&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dstPath&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/path/to/$stamp-&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;srcPath:t&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;.age
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Dump the URL&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;https://www.example.com/&lt;/span&gt;$stamp&lt;span style=&#34;color:#e6db74&#34;&gt;-&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;srcPath:t&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;.age&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Encrypt the file to dstPath,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# on success send the QR Code (containing the private key) to the default printer.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;age -e -r $publicKey -o $dstPath $srcPath &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; echo $privateKey | qrencode -t EPS | lpr
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The only two external dependencies are &lt;a class=&#34;link&#34; href=&#34;https://github.com/FiloSottile/age&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;age file encryption&lt;/a&gt;
and &lt;a class=&#34;link&#34; href=&#34;https://fukuchi.org/works/qrencode/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;qrencode&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After running the script, it just the case of downloading the file onto the target machine and also scanning the QR code
either by using the phone, webcam or a 2D scanner, than it should reveal the private key.&lt;/p&gt;
&lt;p&gt;Once you’re done, you can destroy that piece of paper that has the QR code on, so it can not be used again, it a lot
easier than trying to destroy the pen drive. After all it a piece of paper, you can shred it, you can set it alight
quite easily, heck you can even swallow it, but I would not recommend doing that. 😂&lt;/p&gt;
&lt;p&gt;In my humble opinion it better to store a piece of paper in the wallet than to carry the pen drive with you, as the
piece of paper is safer as long as you don’t put full url on there.&lt;/p&gt;
&lt;p&gt;Modern encryption key are quite short nowadays, they fit quite nicely onto a small QR code, without much fuss.&lt;/p&gt;
&lt;p&gt;If you want me to write other kinds of script, let me know in the comments section.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>2023 New Year Resolution?</title>
        <link>https://www.cjjackson.dev/posts/2023-new-year-resolution/</link>
        <pubDate>Mon, 02 Jan 2023 20:34:13 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/2023-new-year-resolution/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/2023-new-year-resolution/featured.jpg" alt="Featured image of post 2023 New Year Resolution?" /&gt;&lt;p&gt;I don’t usually keep New Year’s resolution, but I’m going try my best to be a bit more proactive about making and saving
money, I’m thinking about starting a new business in the near future but I’m honestly not quite sure when to start yet,
but I’ll figure it out, I just have to keep learning continuously.&lt;/p&gt;
&lt;p&gt;Late last year, I’ve been reading a few thought-provoking books, like ‘Rich Dad, Poor Dad’ by Robert Kiyosaki and ‘Think
Like a Freak’ by Steven D. Levitt and Stephen J. Dubner, so I’ll definitely be reading more of those kind of book in 2023.
I think I set a target of 30 books this year, I believe I can do that.&lt;/p&gt;
&lt;p&gt;I’d love to go on holiday this year, but unfortunately late last year, I’ve lost around £3,000 to a pig butchering scam,
it a long story I’m not going to go too much into details on that, that will be for another post. On the plus side, I’ll
recover and hopefully go on holiday this year, as long as I don’t do anything too fancy with my spending I should be ok.&lt;/p&gt;
&lt;p&gt;I’m going to figure what my bad habits are and try to find a way to address, I’ve been doing that last year as well. I
think I’ve been spending way too much time on Twitter.&lt;/p&gt;
&lt;p&gt;I’ve been playing badminton last year, so going to be doing more of that this year, maybe some other fun activities,
definitely got to do more graphic design stuff as well, I just recently brought a license for a nice suite of graphic
design software.&lt;/p&gt;
&lt;p&gt;Also I should write more blog post, I can make more time for that, I actually enjoy writing blog post, I find it quite
zen and relaxing!&lt;/p&gt;
&lt;p&gt;Ultimately I should be more proactive and stay healthy! Also study more Japanese 😄&lt;/p&gt;
&lt;p&gt;Happy New Year 🥳&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Nix Package Manager</title>
        <link>https://www.cjjackson.dev/posts/nix-package-manager/</link>
        <pubDate>Sat, 13 Aug 2022 07:33:46 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/nix-package-manager/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/nix-package-manager/featured.jpg" alt="Featured image of post Nix Package Manager" /&gt;&lt;p&gt;Finally I found a package manager I can agree with, can be used on macOS and
that &lt;a class=&#34;link&#34; href=&#34;https://nixos.wiki/wiki/Nix_package_manager&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Nix&lt;/a&gt; what I like about it, is that it does not touch the &lt;code&gt;/usr/local&lt;/code&gt;
folder on macOS let alone change the ownership of the directory, instead it create a sub-volume and mount it at &lt;code&gt;/nix&lt;/code&gt;
directory.&lt;/p&gt;
&lt;p&gt;I read the manual and I paid close attention to
the &lt;a class=&#34;link&#34; href=&#34;https://nixos.org/manual/nix/stable/introduction.html#multi-user-support&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;multi-user section&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Nix has multi-user support. This means that non-privileged users can securely install software. Each user can have a
different profile, a set of packages in the Nix store that appear in the user’s PATH. If a user installs a package that
another user has already installed previously, the package won’t be built or downloaded a second time. At the same time,
it is not possible for one user to inject a Trojan horse into a package that might be used by another user.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I especially like the last sentence in the paragraph, in other package manager like Homebrew, that is quite possible to
do, here is a quote I got from the &lt;a class=&#34;link&#34; href=&#34;https://en.m.wikipedia.org/wiki/Homebrew_%28package_manager%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;wikipedia article&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Homebrew does not honor the default  &lt;a class=&#34;link&#34; href=&#34;https://en.m.wikipedia.org/wiki/Privilege_%28computing%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;privileges&lt;/a&gt;
of &lt;code&gt;/usr/local&lt;/code&gt;; directory  &lt;a class=&#34;link&#34; href=&#34;https://en.m.wikipedia.org/wiki/Chmod&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;ownership&lt;/a&gt;  is changed
from  &lt;a class=&#34;link&#34; href=&#34;https://en.m.wikipedia.org/wiki/Superuser&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;root&lt;/a&gt;  with group permissions for
the  &lt;a class=&#34;link&#34; href=&#34;https://en.m.wikipedia.org/wiki/Wheel_%28computing%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;wheel&lt;/a&gt;  group to the installing user and the &amp;ldquo;admin&amp;rdquo; group.
Specifically, the mode changes from &lt;code&gt;drwxr-xr-x root&lt;/code&gt; wheel to &lt;code&gt;drwxrwxr-x myuser admin&lt;/code&gt;. All files, not just the
directories, have their ownership changed by the installer. This is considered by some as a major security flaw.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It is a major security flaw, for example it can be use to override command like &lt;code&gt;sudo&lt;/code&gt; and use that to steal password
from the admin and therefore gain root access to the system. They change the ownership so you don’t use &lt;code&gt;sudo&lt;/code&gt; command,
in my humble opinion this is not a very good approach, because of that alone I choose not to install the Homebrew.&lt;/p&gt;
&lt;p&gt;But thankfully Nix does not use that approach, it relies on the unprivileged user to interact with the lightweight
daemon which has the privileged to managed anything in the &lt;code&gt;/nix&lt;/code&gt; directory in a very safe manner and like Homebrew you
don’t need to use the &lt;code&gt;sudo&lt;/code&gt; command. If I wanted to install &lt;a class=&#34;link&#34; href=&#34;https://neovim.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;neovim&lt;/a&gt;, I can run the following
without using &lt;code&gt;sudo&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nix-env -iA nixpkgs.neovim
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Well I just love the Nix package manager, I really love the way it was designed and I also heard it can more than
package manager, it can do manage server configurations and it can also do DevOps stuff, pretty much
what &lt;a class=&#34;link&#34; href=&#34;https://en.m.wikipedia.org/wiki/Progress_Chef&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Chef&lt;/a&gt; does. I think it awesome it can do all those, but I choose to
use it as a package manager. I had other advices to check out &lt;a class=&#34;link&#34; href=&#34;https://nixos.wiki/wiki/Home_Manager&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;home manager&lt;/a&gt; as
well, but I choose not to, I prefer to install and uninstall the package as I need to.&lt;/p&gt;
&lt;p&gt;There is also part of NixOS, which demonstrates to me that they got a great background in dealing with Unix (Linux and
macOS). Homebrew is just one of the those things built by a cool kid, who thinks it cool to change the owner
of &lt;code&gt;/usr/local&lt;/code&gt; which in reality that is dangerous, therefore I don’t recommend Homebrew. I leave it at that. 🙂&lt;/p&gt;
&lt;p&gt;Have a nice day ☀️&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Sandboxing SDK With Shell Script</title>
        <link>https://www.cjjackson.dev/posts/sandboxing-sdk-with-shell-script/</link>
        <pubDate>Wed, 10 Aug 2022 20:19:19 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/sandboxing-sdk-with-shell-script/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/sandboxing-sdk-with-shell-script/featured.jpg" alt="Featured image of post Sandboxing SDK With Shell Script" /&gt;&lt;p&gt;Many developers like to sandbox their stuff with things like Docker, which I’m not a fan of, it just feels like a clumsy
way of doing it, but fortunately there is a way to do with shell script alone. I have many different example of shell
script to do that for &lt;a class=&#34;link&#34; href=&#34;https://go.dev/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Golang&lt;/a&gt;, &lt;a class=&#34;link&#34; href=&#34;https://nodejs.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Node&lt;/a&gt; and &lt;a class=&#34;link&#34; href=&#34;https://deno.land/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Deno&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I’m assuming you got the SDK in &lt;code&gt;~/.software/sdk&lt;/code&gt; and the bin path &lt;code&gt;~/.software/bin&lt;/code&gt; in PATH environment variable for
the shell script.&lt;/p&gt;
&lt;h2 id=&#34;golang&#34;&gt;Golang
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;PATH&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/Users/cjjackson/.software/sdk/&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;basename $0&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;/bin:&lt;/span&gt;$PATH&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go $@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Notice the path reflect the file name of the script at &lt;code&gt;$(basename $0)&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;node&#34;&gt;Node
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;PATH&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/Users/cjjackson/.software/sdk/&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;basename $0&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;/bin:&lt;/span&gt;$PATH&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt; $1 &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;--&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    shift &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	$@
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;else&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	node $@
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you want to run rpm, you have to run the command like &lt;code&gt;node16 -- npm install&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;deno&#34;&gt;Deno
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;PATH&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;/Users/cjjackson/.software/sdk/&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;basename $0&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;/bin:&lt;/span&gt;$PATH&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;deno $@
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;You can create copies of the script for different version of the SDK without having to rely on Docker or any gimmick in
the wild, which would be probably over engineered compared to those script. It not limited to those SDK I mentioned, can
be used with other SDK.&lt;/p&gt;
&lt;p&gt;The trick was prepending the PATH environment variable temporarily, the same trick that used by Jetbrain’s IDE suite, I
should know I run &lt;code&gt;echo $PATH&lt;/code&gt; inside the IDE terminal and it did prepend something in the beginning.&lt;/p&gt;
&lt;p&gt;Also you might want to adjust the PATH variable for your environment, stick to hard coding user home directory otherwise
it won’t work with &lt;code&gt;sudo&lt;/code&gt;.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>The DD Command on Unix</title>
        <link>https://www.cjjackson.dev/posts/the-dd-command-on-unix/</link>
        <pubDate>Thu, 21 Jul 2022 16:07:33 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/the-dd-command-on-unix/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/the-dd-command-on-unix/featured.jpg" alt="Featured image of post The DD Command on Unix" /&gt;&lt;p&gt;What does DD stand for? It really depends on how you use the command, it could stand for Data Duplicator while cloning
the HDD or Data Destroyer while securely erasing the HDD by overwriting with zero or random data. &lt;em&gt;In reality it does
not stand for anything really.&lt;/em&gt; 😉&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Just a little heads up, be absolutely sure if you want to run the command it will not give a confirmation. It will just
do it.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;writing-iso-image-to-memory-storage&#34;&gt;Writing iso image to memory storage
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/path/to/image.iso of&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/sdX bs&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;1m
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is quite useful for creating bootable pen drive.&lt;/p&gt;
&lt;h2 id=&#34;cloning-one-device-to-another-device&#34;&gt;Cloning one device to another device
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/sda of&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/sdb bs&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;1m
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The destination device should have the same amount of space or more than the source device.&lt;/p&gt;
&lt;h2 id=&#34;creating-a-backup-image-of-the-device&#34;&gt;Creating a backup image of the device
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/sda of&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/home/user/backup.img bs&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;1m
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Come useful when you want a backup of a SD especially when using it with a Raspberry PI.&lt;/p&gt;
&lt;h2 id=&#34;securely-erasing-the-hdd&#34;&gt;Securely erasing the HDD
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/zero of&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/sdX bs&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;1m
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This overwrites the entire HDD with zeros, this should to prevent data recovery.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/urandom of&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/sdX bs&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;1m
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Same as above but with random data.&lt;/p&gt;
&lt;p&gt;I wouldn’t recommend trying that with solid state drive or SSD, it will only cause extra wear and tear and you will not
get the desired effect, you’re better off using encryption from day one, that way you won’t have to worry about securely
erasing the drive.&lt;/p&gt;
&lt;p&gt;If you haven’t got the patient you can always drill holes in the drive, so it can’t be recovered.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;I have pretty much covered the basic of the DD command, there are more advanced use cases, but you can look up the man
page for more details.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.man7.org/linux/man-pages/man1/dd.1.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://www.man7.org/linux/man-pages/man1/dd.1.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also you can find more examples using search engines. 😁&lt;/p&gt;
&lt;p&gt;The best part about DD it’s comes as standard on most Unix systems! 😉&lt;/p&gt;
</description>
        </item>
        <item>
        <title>What Is Systemd-Oomd? How to Disable It?</title>
        <link>https://www.cjjackson.dev/posts/what-is-systemd-oomd-how-to-disable-it/</link>
        <pubDate>Wed, 15 Jun 2022 18:11:33 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/what-is-systemd-oomd-how-to-disable-it/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/what-is-systemd-oomd-how-to-disable-it/featured.jpg" alt="Featured image of post What Is Systemd-Oomd? How to Disable It?" /&gt;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/facebookincubator/oomd&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Systemd-oomd&lt;/a&gt; is a userspace out-of-memory (OOM) killer, it supposed to cut
off any application that is hogging up machine memory (RAM) therefore causing the system to be laggy, but however it is
too aggressive and can cut off application that are not actually memory hogs, resulting in end users losing hours of
unsaved work.&lt;/p&gt;
&lt;p&gt;It can kill off any application without warning, the most likely to be cut off is the IDE, I could imagine that would
frustrate some developers. So that could be a problem to developers.&lt;/p&gt;
&lt;p&gt;I know this is going to sound daring to say, but the thing is Linux kernel already has an out-of-memory killer, I felt
that Meta (Facebook) has reinvented the wheel, why on earth did they do this? I’d honestly rather see the time and
effort spent on improving the kernel’s OOM killer.&lt;/p&gt;
&lt;p&gt;Some Linux distribution have systemd-oomd enabled by default such as Ubuntu 22.04. I already checked Arch Linux, it is
disabled by default but I do recommend masking the system service so no application can start it up.&lt;/p&gt;
&lt;h2 id=&#34;how-to-disable-it&#34;&gt;How to disable it?
&lt;/h2&gt;&lt;p&gt;Open up the terminal and run.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo systemctl disable --now systemd-oomd
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However some application can start up oomd, we can prevent this by running the following.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo systemctl mask systemd-oomd
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;From there it should now fallback to the kernel’s OOM killer.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;IMHO Power user and developers don’t need things like systemd-oomd, as that could lead to loss of productivity and that
is not an acceptable risk. The project has been around since 2019, so that three years that not a long time and I’ve a
feeling that it is not anywhere as mature as the kernel’s OOM killer. Honestly, I think I just leave it there.&lt;/p&gt;
&lt;h2 id=&#34;useful-links&#34;&gt;Useful links
&lt;/h2&gt;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://askubuntu.com/questions/1404888/how-do-i-disable-the-systemd-oom-process-killer-in-ubuntu-22-04&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;How do I disable the systemd OOM process killer in Ubuntu 22.04? - Ask Ubuntu&lt;/a&gt;&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Why I Ditch Windows 11 for Arch Linux on My Main Pc</title>
        <link>https://www.cjjackson.dev/posts/why-i-ditch-windows-11-for-arch-linux-on-my-main-pc/</link>
        <pubDate>Mon, 18 Apr 2022 13:03:10 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/why-i-ditch-windows-11-for-arch-linux-on-my-main-pc/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/why-i-ditch-windows-11-for-arch-linux-on-my-main-pc/featured.jpg" alt="Featured image of post Why I Ditch Windows 11 for Arch Linux on My Main Pc" /&gt;&lt;p&gt;I decided to get rid of Windows 11 from my PC and installed Arch Linux onto my machine. I don’t the like the direction
that Microsoft is going with Windows, it getting more and more invasive over the years, they have been on about
introducing ads
into &lt;a class=&#34;link&#34; href=&#34;https://www.pcmag.com/news/microsoft-experiments-with-ads-in-windows-11-file-explorer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;file explorer&lt;/a&gt;, you’ve read
that correctly not edge but file explorer, yes the file manager and I find that very scary.&lt;/p&gt;
&lt;p&gt;For the average joe or anyone who works in IT, Windows is quite a simple Operating System (OS) to use, I mean they only
have to worry about doing things like word processing, doing spreadsheets and browsing the internet. But for the
developers and probably administrators however it’s actually a complicated OS especially when you have to deal with
their complicated API, but on Linux or Unix that is not much of the
case &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Everything_is_a_file&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;everything is treated as a file&lt;/a&gt;, the devices are treated as
files for example  &lt;code&gt;/dev/sda&lt;/code&gt; would be the storage drive could either be solid state drive, hard disk drive or pen drive
and &lt;code&gt;/dev/sda1&lt;/code&gt; would be the partition of the storage device, I mean it couldn’t get any simpler than that!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/why-i-ditch-windows-11-for-arch-linux-on-my-main-pc/linux_ssh.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Operating a Linux system by remote with SSH&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;Linux (or Unix) does not even have a registry, like windows has, I always find the registry system a bit overwhelming
and if you not careful with the registry you can break the system quite easily. Linux just store configuration in a file
which is easier to access without having rely on complex API like you would with Windows registry, as a bonus you can
easily create a back of the file by just copying it or by taking a snapshot if the file system support it e.g. &lt;code&gt;brtfs&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;gaming&#34;&gt;Gaming
&lt;/h2&gt;&lt;p&gt;Nowadays I’m not into PC gaming anymore, it’s just too expensive especially when people are buying GPU for crypto
currency mining and silicon shortage, those factors are driving the prices up. Also I got a couple of games consoles and
I play video games on those.&lt;/p&gt;
&lt;p&gt;Every time I install a game on Windows, I tend to install DirectX as well, I thought to myself that is not great design
at all, I find that messy; This never happens on games console at all.&lt;/p&gt;
&lt;p&gt;Linux does quite well with emulators, so far I tested PlayStation 1 and the Super Nintendo, I compiled and installed the
emulators from &lt;a class=&#34;link&#34; href=&#34;https://aur.archlinux.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Arch User Repository or AUR&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/why-i-ditch-windows-11-for-arch-linux-on-my-main-pc/emulators.jpg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Screenshot of Linux running PS1 and Super Nintendo Emulator&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;The open source driver for AMD GPU are
fantastic, &lt;a class=&#34;link&#34; href=&#34;https://www.makeuseof.com/tag/open-source-amd-graphics-now-awesome-heres-get/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;run reasonably fast&lt;/a&gt; and does
not crash, on Windows the GPU driver keep crashing the whole OS now and then, it very annoying when it happens on a
video call, that happened to me a few times.&lt;/p&gt;
&lt;h2 id=&#34;productivity&#34;&gt;Productivity
&lt;/h2&gt;&lt;p&gt;I can use the Mac for anything else, like word processing and programming, mind you I can do programming just as well on
Linux except for iOS development which I’m planning to get into in the near future and I have to use a Mac for that one.&lt;/p&gt;
&lt;p&gt;Any graphics related can be done on the Mac with no issue, nothing wrong with owning two different machine.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/why-i-ditch-windows-11-for-arch-linux-on-my-main-pc/mac_on_desk.jpg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Mac on the desk&#34;
	
	
&gt;&lt;/p&gt;
&lt;h2 id=&#34;at-the-end&#34;&gt;At the end
&lt;/h2&gt;&lt;p&gt;I’ve been wanting to move away from Windows for quite a while now, for when I do need to run Windows, I can run it
inside a virtual machine and I have no plans to reinstall it has a host system.&lt;/p&gt;
&lt;p&gt;If I need to use different distro of Linux, I can use Linux containers or &lt;a class=&#34;link&#34; href=&#34;https://linuxcontainers.org/lxd/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;LXD&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Windows registry offer no advantage over traditional configuration files in this day and age, I think it another layer of
complexity that the world could do without. I say stick with config file with a sane format such as  &lt;code&gt;json&lt;/code&gt;  or  &lt;code&gt;toml&lt;/code&gt;
.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Having Fun With Age 上げ File Encryption</title>
        <link>https://www.cjjackson.dev/posts/having-fun-with-age-file-encryption/</link>
        <pubDate>Mon, 29 Nov 2021 19:32:13 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/having-fun-with-age-file-encryption/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/having-fun-with-age-file-encryption/featured.jpg" alt="Featured image of post Having Fun With Age 上げ File Encryption" /&gt;&lt;p&gt;I needed a decent solution to keep all my backup secured, so I checked out solutions online and I initially checked
out &lt;a class=&#34;link&#34; href=&#34;https://gnupg.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;GnuPG&lt;/a&gt; which is based on the OpenPGP specification , however I looked up
a &lt;a class=&#34;link&#34; href=&#34;https://pkg.go.dev/golang.org/x/crypto/openpgp&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Golang library&lt;/a&gt; for that and I’ve read the deprecation message, it’s
didn’t take me too long to find an &lt;a class=&#34;link&#34; href=&#34;https://latacora.micro.blog/2019/07/16/the-pgp-problem.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;interesting article&lt;/a&gt;
about the flaws of that specification; not long after that I decided to stop encrypting my backup with GnuPG, I just
felt it was just over engineered.&lt;/p&gt;
&lt;p&gt;At the bottom of that article I came across &lt;a class=&#34;link&#34; href=&#34;https://age-encryption.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Age File Encryption&lt;/a&gt;, my first impression was
that the key pair the software generated are pretty short and yet still secure, so short that I can copy the public key
and easily paste it into a shell script; on a Mac to run a shell script I can simply just double click on it, backup my
stuff and encrypt it just like that.&lt;/p&gt;
&lt;p&gt;The software itself is quite lightweight, I decided to install a copy on one of the servers (along with the public key)
on the cloud, so I can encrypt it server side, so it effectively delivers an end to end encryption as I download the
backup to my desktop (I’m also using SFTP). For when I do need to access the backup I can just simply decrypt it with a
private key. There is no way I’m going to install GnuPG on my server, the key the software generate are way too long,
therefore I just can’t copy the public key and put it into the shell script otherwise it will be a right mess and also I
do not want to rely on the keychain, that itself add another layer of complexity that I’d rather not have, thanks but no
thanks. Complexity is the bane of most software, that is not fun at all, never has been, never will.&lt;/p&gt;
&lt;p&gt;Age is not over engineered, it’s does exactly what it says on the tin and that is ‘file encryption’ nothing more,
nothing less, but GnuPG just tries to be more than that, does file encryption, handle signatures and hashing, also
support different types of encryption and key types just for the sake of backward compatibility and because of that the
software itself tend to be very difficult to maintain.&lt;/p&gt;
&lt;h1 id=&#34;the-process-of-generating-key-pairs&#34;&gt;The process of generating key pairs.
&lt;/h1&gt;&lt;h2 id=&#34;age&#34;&gt;Age
&lt;/h2&gt;&lt;p&gt;Let’s start with Age, it’s quite a simple process you just run the key generator and it’s won’t ask for any input.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ age-keygen
# created: 2021-11-28T15:29:43Z
# public key: age1ksn4azh0feuys3kpmc230wjx7hew45aqpty6pnsxwcp9a6wwqgfsv4dsvn
AGE-SECRET-KEY-1YGSLFL2KWS4VNPGNWTPJLPND3XKQ5TAECN8C0WKWDX5JUPYSCK5QH3WQVG
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you want to write a to a file, it just the case of using the &lt;code&gt;-o&lt;/code&gt; flag. I won’t be using those keys, obviously.&lt;/p&gt;
&lt;h2 id=&#34;gnupg&#34;&gt;GnuPG
&lt;/h2&gt;&lt;p&gt;Let’s move onto GnuPG, first you run the command below.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;gpg --full-generate-key
Please select what kind of key you want:
   (1) RSA and RSA (default)
   (2) DSA and Elgamal
   (3) DSA (sign only)
   (4) RSA (sign only)
Your selection? 1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I chose one, the process is already more complicated and for the next question. The key size&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I press enter for the default. The next one the expire&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Please specify how long the key should be valid.
         0 = key does not expire
      &amp;lt;n&amp;gt;  = key expires in n days
      &amp;lt;n&amp;gt;w = key expires in n weeks
      &amp;lt;n&amp;gt;m = key expires in n months
      &amp;lt;n&amp;gt;y = key expires in n years
Key is valid for? (0)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Again I press enter for default, then it ask you for your name, email address and additional comment.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;GnuPG needs to construct a user ID to identify your key.

Real name: Best User
Email address: bestuser@example.com
Comment: Best Company
You selected this USER-ID:
    &amp;#34;Best User (Best Company) &amp;lt;bestuser@example.com&amp;gt;&amp;#34;

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit?
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I type O for Okay and then it’s generate the key pair, as soon as you share the public key to the world, your name and
email will be exposed to the world. There is really no anonymity with OpenPGP. You can find an example of a public
key &lt;a class=&#34;link&#34; href=&#34;https://paul.fawkesley.com/pgp-public-key-example/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;here&lt;/a&gt; and it pretty long, it’s quite tedious to integrate with
shell script.&lt;/p&gt;
&lt;h1 id=&#34;useful-script-i-written-for-age&#34;&gt;Useful script I written for Age.
&lt;/h1&gt;&lt;h2 id=&#34;decrypt&#34;&gt;decrypt
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;identity&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; file in $HOME/.age/*/*.txt; &lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt; identity&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$identity&lt;span style=&#34;color:#e6db74&#34;&gt; -i &amp;#39;&lt;/span&gt;$file&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;&amp;#34;&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;aged&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;age -d &lt;/span&gt;$identity&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; var in &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$@&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	eval &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;aged&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt; -o \&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;var%.*&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;\&amp;#34; \&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;var&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;\&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Example usage: decrypt file1.zip.age file2.zip.age&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I use that script to decrypt batches of file, I don’t have to worry about passing in the identity (or private key) as
the script does all that work for me and therefore I don’t need to use a fancy keychain, I just use the file system that
comes standard with every OS on the market.&lt;/p&gt;
&lt;h2 id=&#34;agerotatekey&#34;&gt;ageRotateKey
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt; $# -eq &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   print &amp;gt;&amp;amp;&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Usage: &lt;/span&gt;$0&lt;span style=&#34;color:#e6db74&#34;&gt; need foldername&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   exit &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;folderName&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;$1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp -r $HOME/.age/&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;folderName&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; $HOME/.age/.legacy/&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;folderName&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;-&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;date &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;+%s&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; file in $HOME/.age/&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;folderName&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;/*.txt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	rm $file
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	echo $file
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	age-keygen -o $file
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Example usage: ageRotateKey folderName&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Hopefully I won’t have to use that script for awhile, but if one of my private key does get compromised or get outdated,
I’ll run this script, it will copy my old keys to a new folder in legacy with timestamp appended to it and regenerate a
new set of keys!&lt;/p&gt;
&lt;h2 id=&#34;decryptlegacy&#34;&gt;decryptLegacy
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;identity&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; file in $HOME/.age/.legacy/*/*.txt; &lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt; identity&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$identity&lt;span style=&#34;color:#e6db74&#34;&gt; -i &amp;#39;&lt;/span&gt;$file&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;&amp;#34;&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;aged&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;age -d &lt;/span&gt;$identity&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; var in &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$@&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	eval &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;aged&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt; -o \&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;var%.*&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;\&amp;#34; \&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;var&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;\&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Example usage: decryptLegacy file1.zip.age file2.zip.age&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For when I do need to decrypt the files with legacy keys, the keys I no longer use with newly encrypted files. Hopefully
I’ll not need to touch this script neither, it’s there just in case.&lt;/p&gt;
&lt;h1 id=&#34;conclusion&#34;&gt;Conclusion
&lt;/h1&gt;&lt;p&gt;I believe GnuPG has served its purpose for it time when it’s was introduce, but in this day and age, it’s better to have
a tool that is specialised for it own purpose and very good at it, for example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Age for file encryption&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://jedisct1.github.io/minisign/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Minisign&lt;/a&gt; for integrity checking or signing data!&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.signal.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Signal&lt;/a&gt; for sending encrypted messages!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As for email, I wouldn’t bother I would use Signal instead!  Email is generally not very secure even if you did use PGP
and it doesn’t matter which email provider use, that include proton mail!&lt;/p&gt;
&lt;p&gt;Just don’t send anything highly sensitive via email, as there is no end to end encryption at all, as the email needs to
be stored on the servers!&lt;/p&gt;
</description>
        </item>
        <item>
        <title>My Experience With My First Mac</title>
        <link>https://www.cjjackson.dev/posts/my-experience-with-my-first-mac/</link>
        <pubDate>Sun, 03 Oct 2021 09:43:28 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/my-experience-with-my-first-mac/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/my-experience-with-my-first-mac/featured.jpg" alt="Featured image of post My Experience With My First Mac" /&gt;&lt;p&gt;To be honest I’m actually quite overwhelmed, the number of high quality applications that are available to macOS is
quite staggering, I like how every application compliments each other in a very seamless fashion as a long time Windows
user it felt quite strange at first but as soon as I got used to it, it is quite an amazing experience and I found it to
be quite intuitive and productive.&lt;/p&gt;
&lt;p&gt;I like that I’m able to place images in &lt;a class=&#34;link&#34; href=&#34;https://bear.app/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Bear&lt;/a&gt; note taking app on iOS, sync it though iCloud and then
open Bear on the Mac and it’s all there like magic, the bigger bonus is that I can even open images into different
applications like &lt;a class=&#34;link&#34; href=&#34;https://www.nevercenter.com/camerabag/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Camera Bag Pro&lt;/a&gt;
and &lt;a class=&#34;link&#34; href=&#34;https://www.realmacsoftware.com/squash/?ref=bookmarks.design&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Squash&lt;/a&gt; from within Bear, then save the images to the
appropriate location and I didn’t even have to abuse copy and paste, which I otherwise would of done on Windows and
desktop Linux, that can get messy at times.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/my-experience-with-my-first-mac/image-with-any-app.jpg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Opening an image with any application you desire.&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;One time I was doing wire framing with &lt;a class=&#34;link&#34; href=&#34;https://setapp.com/apps/flinto&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Flinto&lt;/a&gt; and unfortunately I wasn’t able to
import SVG file into the applications, so I did some research and I’ve came across &lt;a class=&#34;link&#34; href=&#34;https://geticonjar.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;IconJar&lt;/a&gt;,
it’s a very nice application that keep a library of icons and allows you to import SVG into the library, also you can
select an icon, convert to a format of your choice such as PNG and drag and drop to another application such as Flinto
and problem solved elegantly, I didn’t even touch Finder to do that, sweet!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/my-experience-with-my-first-mac/dragging-and-dropping.jpg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Dragging and Dropping from IconJar to Flinto&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;Most of the application I’ve mentioned I’ve got from &lt;a class=&#34;link&#34; href=&#34;https://setapp.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Setapp&lt;/a&gt;, which is a subscription service that
give you access to over 220 apps for as little as $9.99/month which I think is a very good deal and plus you get a 7-day
free trial without having to hand over any payment information. 👍 I would also
recommend &lt;a class=&#34;link&#34; href=&#34;https://setapp.com/apps/cleanmymac&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;CleanMyMac X&lt;/a&gt; keeps the Mac clean and protects it from unwanted malware,
that comes part of the subscription too!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/my-experience-with-my-first-mac/setapp.png&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;A lot of brilliant apps in one place, under a flat monthly fee, its feel like Christmas has came early.&#34;
	
	
&gt;&lt;/p&gt;
&lt;p&gt;So the only steep cost I dealt with was the Mac itself, but at least I didn’t spend too much on the software. As a
frugal person who does not drink, breaking even will not be too much of issue with me and that how I was able to afford
the machine in the first place. 😉&lt;/p&gt;
&lt;p&gt;I came across two different package managers, &lt;a class=&#34;link&#34; href=&#34;https://brew.sh/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Homebrew&lt;/a&gt; and &lt;a class=&#34;link&#34; href=&#34;https://www.macports.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;MacPorts&lt;/a&gt;, I
went with the latter, while the former had
that &lt;a class=&#34;link&#34; href=&#34;https://infotoast.org/site/index.php/2021/05/30/homebrew-is-a-major-security-flaw-install-macports-instead/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;one unacceptable bug&lt;/a&gt;
that I can do without. However I choose to run certain software on my &lt;a class=&#34;link&#34; href=&#34;https://www.raspberrypi.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Raspberry PI&lt;/a&gt; (
running &lt;a class=&#34;link&#34; href=&#34;https://archlinuxarm.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Arch Linux ARM&lt;/a&gt;), such as &lt;a class=&#34;link&#34; href=&#34;https://transmissionbt.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Transmission&lt;/a&gt;
and &lt;a class=&#34;link&#34; href=&#34;https://github.com/ytdl-org/youtube-dl&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;YouTube-dl&lt;/a&gt; and operate them remotely from my Mac using SSH (for executing
commands and upload) and SMB (for accessing the downloaded files with read only access), so I don’t have to abuse
MacPorts that much and therefore keeping my Mac nice and vanilla, whatever I do with my Raspberry PI will not have any
effect on the Mac, I find using an isolated environment more secure than using any package manager like Homebrew and
MacPorts on the Mac.&lt;/p&gt;
&lt;p&gt;Overall I find the Mac very easy to keep clean and I think I can get very far with 1TB of storage, considering I keep my
movies on my &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Network-attached_storage&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;NAS&lt;/a&gt; which is around 6TB and I can also offload my
downloads to either my NAS or external storage. Also I like how the app are in an archive file (the &lt;code&gt;.app&lt;/code&gt; extension)&lt;/p&gt;
</description>
        </item>
        <item>
        <title>My First Mac Ever</title>
        <link>https://www.cjjackson.dev/posts/my-first-mac-ever/</link>
        <pubDate>Sun, 12 Sep 2021 17:17:14 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/my-first-mac-ever/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/my-first-mac-ever/featured.jpg" alt="Featured image of post My First Mac Ever" /&gt;&lt;h1 id=&#34;introduction&#34;&gt;Introduction
&lt;/h1&gt;&lt;p&gt;12 weeks ago I’ve put a down a deposit for a new iMac and now I’ve finally got one, after plugging in the Mac the first
thing I did was set up time machine using my one of my existing raspberry pi and I got that working nicely. Time machine
is a backup system, I thought it would be wise to get the backup system working, simply because the Mac has SSD soldered
on. Never backup to internal storage, if the Mac break down, you&amp;rsquo;ll lose everything.&lt;/p&gt;
&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.mazsoft.com/blog/post/2020/08/23/raspberry-pi-smb-server-to-be-used-by-time-machine&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Raspberry Pi SMB server to use with Time Machine&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Because I was so familiar with Linux, it’s didn’t take me too long to get used to the Mac, I was already familiar with
default &lt;a class=&#34;link&#34; href=&#34;https://en.m.wikipedia.org/wiki/Z_shell&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;zsh&lt;/a&gt; terminal because it’s my preferred choice with Linux at work. I
installed &lt;a class=&#34;link&#34; href=&#34;https://ohmyz.sh/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;oh my zsh&lt;/a&gt; and I got my other work colleges into oh my zsh (including my boss).&lt;/p&gt;
&lt;figure&gt;&lt;a href=&#34;https://www.cjjackson.dev/posts/my-first-mac-ever/freshlysetupmac.jpg&#34;&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/my-first-mac-ever/freshlysetupmac.jpg&#34;
    alt=&#34;M1 iMac on the desk&#34;&gt;&lt;/a&gt;&lt;figcaption&gt;
      &lt;h4&gt;My freshly setup first Mac&lt;/h4&gt;
    &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h1 id=&#34;developing-my-first-mac-application&#34;&gt;Developing my first mac application
&lt;/h1&gt;&lt;p&gt;Just to get the feel I&amp;rsquo;ve taken my time to develop my first Mac application, it was just simply a hello world program
with a simple GUI interface, but I was impress the IDE &lt;a class=&#34;link&#34; href=&#34;https://developer.apple.com/xcode/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Xcode&lt;/a&gt;, it’s just has pretty
much everything really for you, whether it’s macOS or iOS app, it has it all. Even the debugger was ready out of the
box, in other words I didn&amp;rsquo;t need to set up the debugger. I haven’t gotten to writing test files, but I’ll have to learn
how to do that and I’ll eventually start building iOS application.&lt;/p&gt;
&lt;p&gt;Tutorial: &lt;a class=&#34;link&#34; href=&#34;https://www.raywenderlich.com/2865-how-to-make-a-simple-mac-app-on-os-x-10-7-tutorial-part-1-3&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;How to Make a Simple Mac App on OS X 10.7 Tutorial: Part 1/3&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&#34;packaging-the-mac-came-in&#34;&gt;Packaging the Mac came in.
&lt;/h1&gt;&lt;p&gt;Even the packaging the Mac came in well engineered, it’s also quite heavy, even when it’s empty, my theory is that they
designed it that way, so that would be thieves can not run off with it quite easily. The Mac itself is quite light.&lt;/p&gt;
&lt;figure&gt;&lt;a href=&#34;https://www.cjjackson.dev/posts/my-first-mac-ever/packaging.jpg&#34;&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/my-first-mac-ever/packaging.jpg&#34;
    alt=&#34;iMac Packaging, Keyboard and Mouse&#34;&gt;&lt;/a&gt;&lt;figcaption&gt;
      &lt;h4&gt;iMac accessories&lt;/h4&gt;
    &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;It’s very easy to open and get the mac and the accessories out.&lt;/p&gt;
&lt;h1 id=&#34;more-to-come&#34;&gt;More to come
&lt;/h1&gt;&lt;p&gt;I’ll be doing more graphically more as well, so I’ll write another blog post in the future. This is the first
using &lt;a class=&#34;link&#34; href=&#34;https://bear.app/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Bear&lt;/a&gt; to prepare this blog post, it’s previewing as well.&lt;/p&gt;
&lt;h2 id=&#34;update-more-photos&#34;&gt;Update, more photos
&lt;/h2&gt;&lt;p&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/my-first-mac-ever/boxFront.jpg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;iMac Box Front&#34;
	
	
&gt; &lt;img src=&#34;https://www.cjjackson.dev/posts/my-first-mac-ever/macHello.jpg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;iMac Hello&#34;
	
	
&gt;
&lt;img src=&#34;https://www.cjjackson.dev/posts/my-first-mac-ever/macSide.jpg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;Side of iMac&#34;
	
	
&gt; &lt;img src=&#34;https://www.cjjackson.dev/posts/my-first-mac-ever/macAndIpad.jpg&#34;
	
	
	
	loading=&#34;lazy&#34;
	
		alt=&#34;iMac and iPad (with Sidecar)&#34;
	
	
&gt;&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Future Plans and Ambitions</title>
        <link>https://www.cjjackson.dev/posts/future-plans-and-ambitions/</link>
        <pubDate>Sat, 19 Jun 2021 07:40:24 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/future-plans-and-ambitions/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/future-plans-and-ambitions/featured.jpg" alt="Featured image of post Future Plans and Ambitions" /&gt;&lt;p&gt;There are quite a lot of things, I would like to do in the future, I would like to get on board with machine learning
that means I have to invest in getting a new machine and I could do it with my current machine, but that would mean
switching OS, which I don&amp;rsquo;t want to do at all, as that will be too much hassle; so it will easier for me just to buy a
new machine which would be the M1 iMac and hopefully I&amp;rsquo;ll be able to excel with machine learning, but honestly I do not
know where to start on that exactly, but that okay, everything is a learning process. Yeah, my bank balance will take a
bit of tumble but I&amp;rsquo;ve been through a lot worse, I&amp;rsquo;ve recovered from that and I&amp;rsquo;m pretty confident that I&amp;rsquo;ll recover
again, I&amp;rsquo;ll do whatever I can to break even, by any means necessary and I can&amp;rsquo;t tell you exactly.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d also like to get better at drawing and I already brought an iPad just to do exactly that, I also ended up using that
to do other things like notes of everything I learn during those online Japanese lessons, I&amp;rsquo;ve been enjoying so far, I&amp;rsquo;m
not sure if I ever move to Japan, even if I fail to do so, I won&amp;rsquo;t regret learning, as life is supposed to be a learning
experience anyway and I enjoy learning new language either spoken or programming language, I hope I get to learn ideas
and concepts more in the future, which I&amp;rsquo;ll probably do.&lt;/p&gt;
&lt;p&gt;I mean I ready been learning &lt;a class=&#34;link&#34; href=&#34;https://developer.apple.com/swift/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Swift&lt;/a&gt; on my iPad
with &lt;a class=&#34;link&#34; href=&#34;https://www.apple.com/swift/playgrounds/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Swift Playground&lt;/a&gt;, it&amp;rsquo;s been quite interesting actually. I don&amp;rsquo;t know, I
brought the device to do one thing then I end up doing something else, but what can I say just go with the flow.&lt;/p&gt;
&lt;p&gt;Also, I would need to brush up on my &lt;a class=&#34;link&#34; href=&#34;https://www.twitch.tv/cjjackson&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Twitch channel&lt;/a&gt;, it could do with a fresh coat of
paint, basically, give it a fresh new look and I do have something in mind, I&amp;rsquo;d probably have to do that after I get the
new machine, I can do it on my existing machine but the concern is that the resolution is a bit too low and I need
plenty of headroom.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll also be posting more content on YouTube, so I won&amp;rsquo;t just stick to one avenue, I&amp;rsquo;m going to take as many avenues as
I can, my current boss thinks I take on too many hobbies, you know what, I think he right, but honestly that what drives
me to do better in the future and I&amp;rsquo;ll not have any regrets. Honestly, I&amp;rsquo;m looking forward to it!!!&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Emotional Attachment in Computer Science</title>
        <link>https://www.cjjackson.dev/posts/emotional-attachment-in-computer-science/</link>
        <pubDate>Sun, 18 Apr 2021 10:50:15 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/emotional-attachment-in-computer-science/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/emotional-attachment-in-computer-science/featured.jpg" alt="Featured image of post Emotional Attachment in Computer Science" /&gt;&lt;p&gt;At one time, I used to have a favourite text editor and a favourite programming language, but I had one issue I have got
emotionally attached to them and why was that an issue? It was an issue because it&amp;rsquo;s caused me to have an inflexible
attitude, for example, I couldn&amp;rsquo;t work with a certain company or clients because they want me to use a certain
programming language and then I realised if I learned only one programming language and not anything else, I would have
got stuck in a rut and that not really a good thing, I really don&amp;rsquo;t want to be in that position.&lt;/p&gt;
&lt;p&gt;Now I believe it is better to learn more than one programming language and more opportunities will open up to you if you
stick to one programming language you might not get as many opportunities and that not where I want to be in life and
not ever, those other programmings language I tried to learn and yes I tried, but still it was a breath of fresh air, I
have felt better for trying, I have felt like I have become a better person in a way. I believe the same logic also
applies to spoken language, but that a different topic for another day.&lt;/p&gt;
&lt;p&gt;If a company asks you to use a certain IDE or text editor, but if you think your text editor is better, well you could
try to convince your employer, but at the end of the day, you&amp;rsquo;re better off using that IDE, you never know you might end
up liking the IDE and that has happened to me, I ended up liking it and it was awesome, I ended up using it for my own
projects, it has boosted productivity.&lt;/p&gt;
&lt;p&gt;If a company requires you to use a certain language you got no choice but to use that language, you could try to
convince them but it is very likely they will change so the best option is to use that language even if you don&amp;rsquo;t like
it, but try to make the most of it and you should be fine. The same can also apply to computer equipment as well, it is
better to use their equipment and again make the most of it while still conforming to their restriction but you will
always have more freedom when doing your own project at home.&lt;/p&gt;
&lt;p&gt;Check out the comment made by one of those emotionally attached types, figure out the environment they are in, do you
really want to be in that environment? I don&amp;rsquo;t think so, you want to be in a better place, a place you deserve to be in.
Have a nice day champ!&lt;/p&gt;
</description>
        </item>
        <item>
        <title>My Impression of Hugo Static Site Generator</title>
        <link>https://www.cjjackson.dev/posts/my-impression-of-hugo-static-site-generator/</link>
        <pubDate>Wed, 31 Mar 2021 07:52:00 +0100</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/my-impression-of-hugo-static-site-generator/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/my-impression-of-hugo-static-site-generator/featured.jpg" alt="Featured image of post My Impression of Hugo Static Site Generator" /&gt;&lt;p&gt;I have heard of &lt;a class=&#34;link&#34; href=&#34;https://gohugo.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Hugo&lt;/a&gt; for quite a while now, I never thought about using it, until about a few
weeks ago. When I started using I thought it was great, the idea of being able to write content
in &lt;a class=&#34;link&#34; href=&#34;https://www.markdownguide.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Markdown&lt;/a&gt; and actually being able to save it to Git is really quite nice.&lt;/p&gt;
&lt;p&gt;What Hugo does is take the content that written in Markdown and convert them
to &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/HTML&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;HTML&lt;/a&gt;, on top of that it uses Go’s templating system, because of my background
in &lt;a class=&#34;link&#34; href=&#34;https://golang.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Go&lt;/a&gt;, I was already familiar with it, so I felt right at home.&lt;/p&gt;
&lt;p&gt;In the past I have used &lt;a class=&#34;link&#34; href=&#34;https://wordpress.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;WordPress&lt;/a&gt;, at first I thought it was great, as time gone by I felt
that something about it didn’t feel right, as soon as I got good with PHP the more I started to realise how much of a
mess WordPress codebase was, but to be fair it was a while ago, a lot might of change today, but even today users who
self-host WordPress may have to maintain the database unless they&amp;rsquo;re using a managed host. Oh, there is also the
plugins, they have to be vetted and maintained, as some plugins can introduce security holes into the site if you’re not
careful, yet you have to install a few plugins to make the WordPress site scalable as the product on it own does not
scale well, there has been a few instances when the site did go down because of heavy traffic.&lt;/p&gt;
&lt;p&gt;Because Hugo generates static HTML, all of those above concern that I mention about WordPress pretty much does not exist
with static HTML. Hugo does not have a plugin system, and in all fairness, it does not need such a system, as Hugo has
enough features in my humble opinion, like for example &lt;a class=&#34;link&#34; href=&#34;https://esbuild.github.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;esbuild&lt;/a&gt; which is one of the faster
JavaScript bundler, if not the fastest, the extended version comes complete with &lt;a class=&#34;link&#34; href=&#34;https://sass-lang.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Sass&lt;/a&gt; and
other CSS processing abilities. It does have a lot of nice stuff out of the box, I honestly prefer that, out of the box
experience always count.&lt;/p&gt;
&lt;p&gt;I can execute esbuild and Sass from within the Go template system in Hugo, so I don’t need to write any of those complex
configuration files that you otherwise need to do with Webpack, I heard from my colleague that it was a pain to
maintain. I mean I worked with task runners, I even built &lt;a class=&#34;link&#34; href=&#34;https://github.com/cjtoolkit/taskforce&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;my own task runner&lt;/a&gt;,
they can be tedious to work with.&lt;/p&gt;
&lt;p&gt;I’ve checked the landing page of &lt;a class=&#34;link&#34; href=&#34;https://webpack.js.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Webpack&lt;/a&gt; and esbuild, the former welcomes you with a fancy
box, just to try to woo you into using their product, but the latter on the other hand welcomes you with a benchmark,
just to demonstrate how fast their product in comparison to others in the market and that has left me with a very good
lasting first impression and obviously first impression does count.&lt;/p&gt;
&lt;p&gt;I did check out other static web generators on the market, but I’m happy to stick with Hugo for the time being, as I’m
really impressed with the performance of the product. I look forward to seeing what the product has to offer in the
future.&lt;/p&gt;
&lt;p&gt;To prepare my blog post in advance I use &lt;a class=&#34;link&#34; href=&#34;https://draftin.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;draftin&lt;/a&gt; as I can easily use that on my iPad while
sitting in the Café, for when I don’t feel like writing at home.&lt;/p&gt;
&lt;p&gt;I think Hugo is the way to go for beginners who want to get into blog posting, I highly recommend it. Or if you more
experience you can try out something else, nothing wrong with being adventurous but it’s probably not as fast as Hugo 😁&lt;/p&gt;
</description>
        </item>
        <item>
        <title>The Theme I Have Chosen</title>
        <link>https://www.cjjackson.dev/posts/the-theme-i-have-chosen/</link>
        <pubDate>Fri, 26 Mar 2021 19:41:11 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/the-theme-i-have-chosen/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/the-theme-i-have-chosen/featured.jpg" alt="Featured image of post The Theme I Have Chosen" /&gt;&lt;p&gt;The theme I have originally chosen was &lt;a class=&#34;link&#34; href=&#34;https://github.com/theNewDynamic/gohugo-theme-ananke&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Ananke&lt;/a&gt;, I thought the
design was ok. Anyway, I ran &lt;a class=&#34;link&#34; href=&#34;https://gohugo.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Hugo&lt;/a&gt; with CSS processing.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ hugo
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Start building sites …
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                   | EN | FR
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-------------------+----+-----
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Pages            | 21 | 13
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Paginator pages  |  1 |  0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Non-page files   |  0 |  0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Static files     |  5 |  5
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Processed images |  0 |  0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Aliases          |  3 |  1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Sitemaps         |  2 |  1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Cleaned          |  0 |  0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Total in 1889 ms
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Yes, that 1889 milliseconds, that theme had few things that I didn&amp;rsquo;t like, one of them being the fact that it relied
on &lt;a class=&#34;link&#34; href=&#34;https://nodejs.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;node.js&lt;/a&gt; and some packages from &lt;a class=&#34;link&#34; href=&#34;https://www.npmjs.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;npm&lt;/a&gt;, it was kinda slowing down the
site generator.&lt;/p&gt;
&lt;p&gt;So I decided to fork the theme and strip out anything I thought wasn&amp;rsquo;t necessary, mainly I removed the dependency on the
node.js, as I felt the features in &lt;a class=&#34;link&#34; href=&#34;https://gohugo.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Hugo&lt;/a&gt; was enough and I didn&amp;rsquo;t feel the need for anything from
node.js or npm, if I kept it, I would need to keep updating the dependencies, which I don&amp;rsquo;t want to keep doing.&lt;/p&gt;
&lt;p&gt;I also replaced &lt;a class=&#34;link&#34; href=&#34;https://postcss.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;PostCss&lt;/a&gt; version of Tachyons with a Sass version of Tachyons, I just like using
Sass that all I can say really.&lt;/p&gt;
&lt;p&gt;I ran Hugo again, this time with all the junk removed&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ hugo
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Start building sites …
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                   | EN | FR
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-------------------+----+-----
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Pages            | 21 | 13
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Paginator pages  |  1 |  0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Non-page files   |  0 |  0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Static files     |  5 |  5
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Processed images |  0 |  0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Aliases          |  3 |  1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Sitemaps         |  2 |  1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Cleaned          |  0 |  0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Total in 1525 ms
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I had a slightly faster result, the best thing I like about the Ananke theme is the fact is that it&amp;rsquo;s under
the &lt;a class=&#34;link&#34; href=&#34;https://mit-license.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;MIT license&lt;/a&gt;, meaning I can just fork it and make proprietary use of it. Also, I just
like having something that I can fully control.&lt;/p&gt;
&lt;p&gt;If you like the theme and you want full control just fork it, but of course check the license first before you do that,
you don’t want to get into legal trouble obviously 😁.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>How to Prepare a Raspberry Pi Image File on Windows 10</title>
        <link>https://www.cjjackson.dev/posts/how-to-prepare-a-raspberry-pi-image-file-on-windows-10/</link>
        <pubDate>Thu, 18 Mar 2021 20:28:23 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/how-to-prepare-a-raspberry-pi-image-file-on-windows-10/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/how-to-prepare-a-raspberry-pi-image-file-on-windows-10/featured.jpg" alt="Featured image of post How to Prepare a Raspberry Pi Image File on Windows 10" /&gt;&lt;h2 id=&#34;what-is-a-raspberry-pi&#34;&gt;What is a Raspberry Pi
&lt;/h2&gt;&lt;p&gt;It&amp;rsquo;s basically a small ARM-powered computer that lets you do whatever you want with it if you want to know in great
detail visit &lt;a class=&#34;link&#34; href=&#34;https://www.raspberrypi.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://www.raspberrypi.org/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I personally used a Raspberry Pi for building a custom NAS server and torrent box, it&amp;rsquo;s has served me quite well. I also
used a Raspberry Pi for setting up a media centre as well, it&amp;rsquo;s pretty cool.&lt;/p&gt;
&lt;figure&gt;&lt;a href=&#34;https://www.cjjackson.dev/posts/how-to-prepare-a-raspberry-pi-image-file-on-windows-10/nasserver.jpg&#34;&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/how-to-prepare-a-raspberry-pi-image-file-on-windows-10/nasserver.jpg&#34;
    alt=&#34;NAS Server&#34;&gt;&lt;/a&gt;&lt;figcaption&gt;
      &lt;h4&gt;Running a NAS Server on Raspberry Pi 4 (4GB)&lt;/h4&gt;
    &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;&lt;a href=&#34;https://www.cjjackson.dev/posts/how-to-prepare-a-raspberry-pi-image-file-on-windows-10/mediacentre.jpg&#34;&gt;&lt;img src=&#34;https://www.cjjackson.dev/posts/how-to-prepare-a-raspberry-pi-image-file-on-windows-10/mediacentre.jpg&#34;
    alt=&#34;TV with Kodi on Screen&#34;&gt;&lt;/a&gt;&lt;figcaption&gt;
      &lt;h4&gt;Kodi running on Raspberry Pi 4 (4GB)&lt;/h4&gt;
    &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&#34;how-to-prepare-the-image-for-raspberry-pi-using-wsl2&#34;&gt;How to prepare the image for Raspberry Pi using WSL2
&lt;/h2&gt;&lt;p&gt;Before we do that I’m going to list down the requirements. I’m assuming a Raspberry Pi 4B.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Windows 10 May 2020 Update (build number 10.0.19041) or greater
&lt;ul&gt;
&lt;li&gt;This is required for WSL2&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Windows Subsystem for Linux 2 (WSL2)
&lt;ul&gt;
&lt;li&gt;version 1 does not support the ext4 file system, which will not work.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now we are going to prepare an image file with multiple partitions, let&amp;rsquo;s create a 1GB image file using the WSL2
terminal.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Not as root&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dd &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/dev/zero of&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;1GB_sd.img bs&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;1M count&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1024&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can create a bigger image file if you like, but it will take longer to create, alternatively, you can expand the
partition after you booted up the
system. &lt;a class=&#34;link&#34; href=&#34;https://raspberry-hosting.com/en/faq/how-expand-arch-linux-root-partition&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;link&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now you going to need to link the image file to the system, you can do that by using &lt;code&gt;losetup&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# As root&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;losetup -Pf --show 1GB_sd.img
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That command should tell where it has been linked, I’m going to assume &lt;code&gt;/dev/loop1&lt;/code&gt;, now we are going to prepare the
partition inside the image using &lt;code&gt;fdisk&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# As root&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fdisk /dev/loop1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;At the fdisk prompt, create two new partitions. Type &lt;code&gt;n&lt;/code&gt;, then &lt;code&gt;p&lt;/code&gt; for primary, &lt;code&gt;1&lt;/code&gt; for the first partition on the
drive, press &lt;code&gt;enter&lt;/code&gt; to accept the default first sector, then type &lt;code&gt;+100M&lt;/code&gt; for the last sector.&lt;/p&gt;
&lt;p&gt;Type &lt;code&gt;t&lt;/code&gt;, then &lt;code&gt;c&lt;/code&gt; to set the first partition to type W95 FAT32 (LBA)&lt;/p&gt;
&lt;p&gt;Type &lt;code&gt;n&lt;/code&gt;, then &lt;code&gt;p&lt;/code&gt; for primary, &lt;code&gt;2&lt;/code&gt; for the second partition on the drive, and then press &lt;code&gt;enter&lt;/code&gt; twice to accept the
default first and the last sector. Write the partition table and exit by typing &lt;code&gt;w&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Then create and mount the &lt;code&gt;FAT&lt;/code&gt; filesystem&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# As root&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkfs.vfat /dev/loop1p1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir boot
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mount /dev/loop1p1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then create and mount the &lt;code&gt;ext4&lt;/code&gt; filesystem&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# As root&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkfs.ext4 /dev/loop1p2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir root
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mount /dev/loop1p2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then download and extract the root filesystem (as root, not via sudo)&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# As root&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-4-latest.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bsdtar -xpf ArchLinuxARM-rpi-4-latest.tar.gz -C root
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sync
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then move boot files to the first partition&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# As root&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mv root/boot/* boot
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then umount the two partitions&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# As root&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;umount boot root
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then unlink the image from the system.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# As root&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;losetup -d /dev/loop1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;At this point, you should have the image file ready to write to the SD card, you can
use &lt;a class=&#34;link&#34; href=&#34;https://duckduckgo.com/?q=win32&amp;#43;disk&amp;#43;imager&amp;amp;atb=v82-3__&amp;amp;ia=web&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Win32 Disk Imager&lt;/a&gt; Once you have done that insert
the SD into the Raspberry PI and it should boot up. 🙂&lt;/p&gt;
&lt;h2 id=&#34;references&#34;&gt;References
&lt;/h2&gt;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;http://www.linuxandubuntu.com/home/creating-virtual-disks-using-linux-command-line&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Creating Virtual Disks Using Linux Command Line&lt;/a&gt;&lt;br&gt;
&lt;a class=&#34;link&#34; href=&#34;https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Arch Linux ARM Raspberry Pi 4&lt;/a&gt;&lt;/p&gt;
</description>
        </item>
        <item>
        <title>About My Previous Site</title>
        <link>https://www.cjjackson.dev/posts/about-my-previous-site/</link>
        <pubDate>Sat, 13 Mar 2021 14:42:42 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/about-my-previous-site/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/about-my-previous-site/featured.jpg" alt="Featured image of post About My Previous Site" /&gt;&lt;p&gt;My previous site was a total nightmare to maintain, I got a bit wild with my ideas, I thought it would be cool to have a
component based blog system, well it was cool at the time, the issue was I ended up building an interface that was very
clunky to work with, therefore it has taken me a lot of effort to write a simple blog post as each blog page was built
up with different component for different kind of content for example, text (Markdown), images and youtube video.&lt;/p&gt;
&lt;p&gt;I mean I can honestly say I was over ambitious, I thought I had the site well-thought-out, but the reality is that
the site was difficult for one person to maintain alone, I had to constantly make sure that the database software is
up-to-date, and it was hard for me to find the time to do it.  I can&amp;rsquo;t just update them in one step, it&amp;rsquo;s has to be done
in multiple steps and that has taken a lot of my time, and I don&amp;rsquo;t get much time nowadays because I work most of the
weekdays and sometimes weekend, and I also have other commitments as well, I like to draw, learn how to play the guitar
which is not going well at the moment 😂, play video games when I&amp;rsquo;m feeling a little stressed, to be honest that doesn&amp;rsquo;t
happen much nowadays, I like to take my dog for a walk, go for a bike ride and study Japanese.&lt;/p&gt;
&lt;p&gt;The other issue with building your own blog system that you intend to run on a server, is that you got to have that
unhealthy obsession with security, I mean nobody wants their property getting hacked into, that in itself can have
hugh consequences such as lost in finance, which is unlikely to a site that does not make much money anyway, but still
I don&amp;rsquo;t want to get hacked.&lt;/p&gt;
&lt;p&gt;Do I regret building my own blog system?  No I don&amp;rsquo;t regret it at all, it&amp;rsquo;s actually been an amazing experience, as I
do enjoy programming, I felt that I have learned a lot from it and working with
&lt;a class=&#34;link&#34; href=&#34;https://golang.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Google Go Programming Language&lt;/a&gt; that I happen to prefer over say &lt;a class=&#34;link&#34; href=&#34;https://nodejs.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Node.Js&lt;/a&gt;,
I might talk about that some other time.  Sometimes I just can&amp;rsquo;t help myself. 😂&lt;/p&gt;
&lt;p&gt;What do you use now? I use &lt;a class=&#34;link&#34; href=&#34;https://gohugo.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Hugo&lt;/a&gt; and it&amp;rsquo;s been great, I did have a few small issue, I work them out
at the end.  Being able to write content in pure Markdown, manually copying and pasted images to a folder, and being
able to save them to a Git repository, it&amp;rsquo;s a godsend really.  After I have written some content, I use Hugo to generate
static HTML and some XML feeds and deploy it with a &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Rsync&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;rsync&lt;/a&gt; command, it&amp;rsquo;s just
really nice, as I don&amp;rsquo;t have to worry about maintaining a couple of databases.&lt;/p&gt;
&lt;p&gt;I have written the command in the script file and save it to the repository.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/dash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;export HUGO_ENV&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;production
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hugo &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; rsync -avz --no-perms --no-owner --no-group --delete public/ hugo@example.com:~/www/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I can just run the command inside the terminal of my IDE of choice, that happens to be
&lt;a class=&#34;link&#34; href=&#34;https://www.jetbrains.com/webstorm/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;WebStorm&lt;/a&gt; in my case.  Hugo seems to take care of the highlight for you, that
awesome, save me from a lot of research cost.  It&amp;rsquo;s just soo much cleaner then &lt;a class=&#34;link&#34; href=&#34;https://wordpress.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Wordpress&lt;/a&gt;,
I&amp;rsquo;ll get to that someday. 😊&lt;/p&gt;
&lt;p&gt;Anyway I look forward to writing more blog post.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Hello World</title>
        <link>https://www.cjjackson.dev/posts/hello-world/</link>
        <pubDate>Thu, 11 Mar 2021 11:21:11 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/posts/hello-world/</guid>
        <description>&lt;img src="https://www.cjjackson.dev/posts/hello-world/featured.jpg" alt="Featured image of post Hello World" /&gt;&lt;p&gt;Hello, I have recently switch to &lt;a class=&#34;link&#34; href=&#34;https://gohugo.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Hugo&lt;/a&gt; and the reason why I have done that is because I just don&amp;rsquo;t
have  the time to maintain my existing site, it&amp;rsquo;s involves having to maintain the database and that can take some time
to maintain.&lt;/p&gt;
&lt;p&gt;I honestly rather just use an IDE of my choice and just write in &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Markdown&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;MarkDown&lt;/a&gt; and
save it to my private git server. I don&amp;rsquo;t mind maintaining my own git server as that does not take up too much time, and it&amp;rsquo;s
relies on SQLLite and that is built into the software (&lt;a class=&#34;link&#34; href=&#34;https://gitea.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Gitea&lt;/a&gt;), and I can easily keep the backup
maintained.&lt;/p&gt;
&lt;p&gt;I honestly didn&amp;rsquo;t think I ever go back to static html, anyway I look forward to using Hugo more in the future.
Happy Days 😁&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Archives</title>
        <link>https://www.cjjackson.dev/page/archives/</link>
        <pubDate>Tue, 28 May 2019 00:00:00 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/page/archives/</guid>
        <description></description>
        </item>
        <item>
        <title>CV/Résumé</title>
        <link>https://www.cjjackson.dev/page/cv/</link>
        <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/page/cv/</guid>
        <description>&lt;p&gt;My CV/Résumé are available in the following formats, pick the format that is the most ideal to you.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Search</title>
        <link>https://www.cjjackson.dev/page/search/</link>
        <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/page/search/</guid>
        <description></description>
        </item>
        <item>
        <title>Social</title>
        <link>https://www.cjjackson.dev/page/social/</link>
        <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
        
        <guid>https://www.cjjackson.dev/page/social/</guid>
        <description></description>
        </item>
        
    </channel>
</rss>
