From 33183104e21ff67b27a67d9e3004ca6d4b9632f9 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Mon, 19 Jul 2021 22:36:09 +0100 Subject: Remove index.html from atom and sitemap to match urls used on the site --- scripts/php/functions.php | 9 ++--- www/posts/arch/atom.xml | 30 +++++++------- www/posts/atom.xml | 90 +++++++++++++++++++++--------------------- www/posts/gemini/atom.xml | 6 +-- www/posts/git/atom.xml | 10 ++--- www/posts/jigsaw/atom.xml | 6 +-- www/posts/laravel/atom.xml | 10 ++--- www/posts/letsencrypt/atom.xml | 10 ++--- www/posts/linux/atom.xml | 10 ++--- www/posts/markdown/atom.xml | 6 +-- www/posts/netlify/atom.xml | 6 +-- www/posts/nextcloud/atom.xml | 6 +-- www/posts/php/atom.xml | 10 ++--- www/sitemap.xml | 44 ++++++++++----------- 14 files changed, 126 insertions(+), 127 deletions(-) diff --git a/scripts/php/functions.php b/scripts/php/functions.php index 3e8e7a4..fdedc00 100644 --- a/scripts/php/functions.php +++ b/scripts/php/functions.php @@ -32,8 +32,7 @@ function getPageMetaData(\SplFileInfo $fileInfo, string $src, string $output): a $input = $fileInfo->getRealPath(); $pathData = parsePath($input); - - $url = str_replace([$src, '.gmi'], ['', '.html'], $input); + $url = str_replace([$src, 'index.gmi'], ['', ''], $input); $contentData = parseContent(file_get_contents($input)); @@ -47,7 +46,7 @@ function getPageMetaData(\SplFileInfo $fileInfo, string $src, string $output): a 'title' => $contentData['title'], 'author' => $contentData['author'], 'html' => gemtext2hmtl(file_get_contents($input)), - 'output' => "$output$url", + 'output' => "$output{$url}index.html", ]; } @@ -253,7 +252,7 @@ function generateAtomFeeds(array $pages, string $hostname): void /** * Get the page that lists all posts. */ - $allPostsIndex = array_values(array_filter($pages, fn ($post) => preg_match('/posts\/index/', $post['url']) == 1))[0]; + $allPostsIndex = array_values(array_filter($pages, fn ($post) => preg_match('/posts\/index/', $post['output']) == 1))[0]; $allPostsIndex['posts'] = $posts; @@ -266,7 +265,7 @@ function tagToAtomFeed(array $tag, string $hostname): void str_replace('index.html', 'atom.xml', $tag['output']), buildAtomFeed( $tag['title'], - "https://$hostname".str_replace('index.html', 'atom.xml', $tag['url']), + "https://$hostname{$tag['url']}atom.xml", "https://$hostname".$tag['url'], $tag['posts'][0]['date'].'T12:00:00Z', implode('', array_map(fn ($post) => postToAtomEntry($post, $hostname), $tag['posts'])) diff --git a/www/posts/arch/atom.xml b/www/posts/arch/atom.xml index e7fd215..b0a122d 100644 --- a/www/posts/arch/atom.xml +++ b/www/posts/arch/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts About Arch https://davidtsadler.com/posts/arch/atom.xml - + 2020-09-07T12:00:00Z Installing Zsh and Powerlevel10k on Arch Linux - https://davidtsadler.com/posts/arch/2020-09-07/installing-zsh-and-powerlevel10k-on-arch-linux/index.html - + https://davidtsadler.com/posts/arch/2020-09-07/installing-zsh-and-powerlevel10k-on-arch-linux/ + David T. Sadler. 2020-09-07T12:00:00Z 2020-09-07T12:00:00Z @@ -26,8 +26,8 @@ $ zsh-newuser-install -f</code></pre><h2>Changing The Default /bin/ksh</code></pre><h2>Installing Powerlevel10k</h2><p>Powerlevel10k is a theme for Zsh and in order to make the most of it you should install the Meslo Nerd Font that has been patched for Powerlevel10k.</p><pre><code class="shell">$ yay -Sy --noconfirm ttf-meslo-nerd-font-powerlevel10k</code></pre><p>You need to configure your terminal to use this font. How this is done is dependant upon what terminal you are using. Since I use st from suckless I need to edit the file config.h and specify MesloLGS NF in the font settings.</p><pre><code class="shell">static char *font = &quot;MesloLGS NF:pixelsize=14:antialias=true:autohint=true&quot;;</code></pre><p>Before rebuilding st.</p><pre><code class="shell">$ sudo make install</code></pre><p>Now that the dependences have been meet Powerlevel10k can be installed.</p><pre><code class="shell">$ yay -Sy --noconfirm zsh-theme-powerlevel10k-git</code></pre><p>Once it has been installed ensure that Zsh loads Powerlevel10k.</p><pre><code class="shell">$ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' &gt;&gt;! ~/.zshrc</code></pre><p>You can now open a new terminal which will start the Powerlevel10k configuration wizard. This will ask you a few questions and configure your prompt. If it doesn't trigger automatically, type p10k configure.</p><p>Once the configuration wizard has finished open a new terminal and you should see the Powerlevel10k theme been used.</p><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="https://www.zsh.org/">Zsh.</a><a href="https://github.com/romkatv/powerlevel10k/">Powerlevel10k.</a><a href="https://st.suckless.org/">Simple Terminal.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Enabling Audio in Arch Linux - https://davidtsadler.com/posts/arch/2020-08-31/enabling-audio-in-arch-linux/index.html - + https://davidtsadler.com/posts/arch/2020-08-31/enabling-audio-in-arch-linux/ + David T. Sadler. 2020-08-31T12:00:00Z 2020-08-31T12:00:00Z @@ -38,8 +38,8 @@ $ amixer sset Speaker 100% $ amixer sset Headphone 100%</code></pre><h2>Unmute with Alsamixer</h2><p>If you prefer a more intuitive ncurses interface you can use alsamixer.</p><pre><code class="shell">$ alsamixer</code></pre><p>Channels that are muted will have the MM label below them. Unmuted channels have 00.</p><p>Use the ← and → keys to scroll to the muted channel and press m to unmute it.</p><p>The volume can be increased and decreased with the ↑ and ↓ keys.</p><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Pacman Cheat Sheet For Ubuntu Users - https://davidtsadler.com/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html - + https://davidtsadler.com/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/ + David T. Sadler. 2020-08-24T12:00:00Z 2020-08-24T12:00:00Z @@ -68,8 +68,8 @@ $ pacman -Scc</code></pre><p>Free up disk space by removing fr $ pacman -Qdtq | pacman -Rs -</code></pre><p>Remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.</p><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Installing ST, DMENU and DWM in Arch Linux - https://davidtsadler.com/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/index.html - + https://davidtsadler.com/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/ + David T. Sadler. 2020-08-17T12:00:00Z 2020-08-17T12:00:00Z @@ -85,8 +85,8 @@ $ sudo make install</code></pre><h2>Configure and Install DWM& $ sudo make install</code></pre><h2>Starting DWM</h2><p>Since I have installed xorg-xinit I need to create a .xinitrc in my home folder.</p><pre><code class="shell">$ nvim ~/.xinitrc</code></pre><p>The contents of this file is just.</p><pre><code class="vim">exec dwm</code></pre><p>I can now start xorg and dwm with the below command.</p><pre><code class="shell">$ startx</code></pre><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="https://dwm.suckless.org/">Dynamic Window Manager (DWM).</a><a href="https://suckless.org/">Suckless Software.</a><a href="https://st.suckless.org/">Simple Terminal.</a><a href="https://tools.suckless.org/dmenu/">DMenu.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Granting Sudo Access to a User in Arch Linux - https://davidtsadler.com/posts/arch/2020-06-22/granting-sudo-access-to-a-user-in-arch-linux/index.html - + https://davidtsadler.com/posts/arch/2020-06-22/granting-sudo-access-to-a-user-in-arch-linux/ + David T. Sadler. 2020-06-22T12:00:00Z 2020-06-22T12:00:00Z @@ -95,8 +95,8 @@ $ sudo make install</code></pre><h2>Starting DWM</h2>< /home/david</code></pre><p>Since I wasn't prompted for my password and the command was executed I knew that I now had sudo access.</p><h3>Links</h3><a href="/posts/arch/2020-06-15/adding-a-user-in-arch-linux/">Adding a User in Arch Linux.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Adding a User in Arch Linux - https://davidtsadler.com/posts/arch/2020-06-15/adding-a-user-in-arch-linux/index.html - + https://davidtsadler.com/posts/arch/2020-06-15/adding-a-user-in-arch-linux/ + David T. Sadler. 2020-06-15T12:00:00Z 2020-06-15T12:00:00Z @@ -110,8 +110,8 @@ Password: david@suliman:$</code></pre><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Installing Arch Linux on a Thinkpad X220 - https://davidtsadler.com/posts/arch/2020-05-25/installing-arch-linux-on-a-thinkpad-x220/index.html - + https://davidtsadler.com/posts/arch/2020-05-25/installing-arch-linux-on-a-thinkpad-x220/ + David T. Sadler. 2020-05-25T12:00:00Z 2020-05-25T12:00:00Z diff --git a/www/posts/atom.xml b/www/posts/atom.xml index cabb593..84768f4 100644 --- a/www/posts/atom.xml +++ b/www/posts/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts https://davidtsadler.com/posts/atom.xml - + 2021-07-08T12:00:00Z HTTP_AUTHORIZATION Missing From Global $_SERVER Variable - https://davidtsadler.com/posts/php/2021-07-08/http-authorization-missing-from-global-server-variable/index.html - + https://davidtsadler.com/posts/php/2021-07-08/http-authorization-missing-from-global-server-variable/ + David T. Sadler. 2021-07-08T12:00:00Z 2021-07-08T12:00:00Z @@ -19,8 +19,8 @@ &lt;/IfModule&gt;</pre><p>After adding the above to the .htaccess file the HTTP_AUTHORIZATION key is now been populated with the value of the Authorization header.</p><h3>Links</h3><a href="/posts/php">PHP - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Backing Up a Git Repository - https://davidtsadler.com/posts/git/2021-06-13/backing-up-a-git-repository/index.html - + https://davidtsadler.com/posts/git/2021-06-13/backing-up-a-git-repository/ + David T. Sadler. 2021-06-13T12:00:00Z 2021-06-13T12:00:00Z @@ -43,8 +43,8 @@ find $BACKUP_FILES -mtime +3 -delete exit 0</code></pre><p>All it does it tar and gzip any .git directories found under /home/git. It also removes any backups that are more than three days old.</p><p>This script has been saved as /usr/bin/backup_repositories and is ran daily via cron.</p><pre><code class="cron">0 3 * * * /usr/bin/backup_repositories &gt; /dev/null 2&gt;&amp;1</code></pre><p>It is important to know that this backup strategy is far from ideal for repositories that are heavily used as you run the high risk of trying to backup a repository as users are pushing to it. As git updates a repository in two phases this will lead to a backup that may not contain all the data and so won't be suitable for restoring. However its fine for my purposes since I'm the only user and it's unlikely that I will be making changes during the time the backup is running.</p><h3>Links</h3><a href="/posts/git/2021-05-29/setting-up-a-self-host-git-server/">2021-05-29 - Setting up a Self Hosted Git Server</a><a href="/posts/git/">Git - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Xrandr: Failed to Get Size of Gamma for Output Default - https://davidtsadler.com/posts/linux/2021-06-05/xrandr-failed-to-get-size-of-gamma-for-output-default/index.html - + https://davidtsadler.com/posts/linux/2021-06-05/xrandr-failed-to-get-size-of-gamma-for-output-default/ + David T. Sadler. 2021-06-05T12:00:00Z 2021-06-05T12:00:00Z @@ -53,8 +53,8 @@ exit 0</code></pre><p>All it does it tar and gzip any .git dir Modeline &quot;1368x768_60.00&quot; 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync</code></pre><p>This mode is then added with xrandr.</p><pre><code class="shell">$ xrandr --newmode &quot;1368x768_60.00&quot; 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync</code></pre><p>The mode can then be associated with the display.</p><pre><code class="shell">$ xrandr --addmode default 1368x768_60</code></pre><p>Like I said, normally this is all that is required but in this instance the xrandr command kept displaying the below message and the desired resolution would not be applied.</p><pre><code class="shell">xrandr: Failed to get size of gamma for output default</code></pre><p>After several fruitless attempts at fixing this I eventually found that the nomodeset kernel boot option had been set. This instructs the kernel to not load any video drivers and instead use BIOS modes. Apparently many open source drivers have removed support for non-kernel modes and fall back to using a very basic VESA driver. I'm assuming this basic driver does not support the resolution I want.</p><p>With further investigation I found that nomodeset was been specified via grub so removing it meant re-configuring grub by editing /etc/default/grub.</p><pre><code class="shell">$ sudo vim /etc/default/grub</code></pre><p>In this file I located the below line.</p><pre>GRUB_CMDLINE_LINUX_DEFAULT=&quot;quiet splash nomodeset&quot;</pre><p>I edited this line to remove nomodeset and saved the changes.</p><pre>GRUB_CMDLINE_LINUX_DEFAULT=&quot;quiet splash&quot;</pre><p>Now all I needed to do was update grub with the new default settings.</p><pre><code class="shell">$ sudo update-grub</code></pre><p>After a reboot the laptop was using the correct resolution and there was no need to use xrandr.</p><h3>Links</h3><a href="https://askubuntu.com/questions/207175/what-does-nomodeset-do">askubuntu/ question regarding nomodeset does.</a><a href="/posts/linux/">Linux - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Setting up a Self Hosted Git Server - https://davidtsadler.com/posts/git/2021-05-29/setting-up-a-self-host-git-server/index.html - + https://davidtsadler.com/posts/git/2021-05-29/setting-up-a-self-host-git-server/ + David T. Sadler. 2021-05-29T12:00:00Z 2021-05-29T12:00:00Z @@ -87,8 +87,8 @@ $ git push origin main</code></pre><p>I can also test that I c git clone git@git.davidtsadler.com:test.git</code></pre><h3>Links</h3><a href="/posts/git/">Git - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Pre and Post Validation Hooks with Certbot - https://davidtsadler.com/posts/letsencrypt/2021-05-28/pre-and-post-validation-hooks-with-certbot/index.html - + https://davidtsadler.com/posts/letsencrypt/2021-05-28/pre-and-post-validation-hooks-with-certbot/ + David T. Sadler. 2021-05-28T12:00:00Z 2021-05-28T12:00:00Z @@ -110,8 +110,8 @@ PASSWORD='super strong password' curl -s -X DELETE -d &quot;$CERTBOT_VALIDATION&quot; --user $EMAIL:$PASSWORD https://examplemailinaboxserver.com/admin/dns/custom/_acme-challenge.$CERTBOT_DOMAIN/txt</code></pre><p>With these scripts I can setup the below cron job to call certbot.</p><pre>0 0 * * * /usr/bin/certbot renew --preferred-challenges=dns -q --manual-auth-hook /path/to/auth.sh --manual-cleanup-hook /path/to/cleanup.sh &gt; /dev/null 2&gt;&amp;1</pre><h3>Links</h3><a href="https://letsencrypt.org/docs/challenge-types/#dns-01-challenge">Let's Encrypt DNS-01 challenge.</a><a href="https://certbot.eff.org/docs/using.html#pre-and-post-validation-hooks">Certbot manual on pre and post validation hooks.</a><a href="https://mailinabox.email">Mail-in-a-Box. Self hosting mail server.</a><a href="/posts/letsencrypt/">Let's Encrypt - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Wildcard Certificates with Let's Encrypt - https://davidtsadler.com/posts/letsencrypt/2021-05-27/wildcard-certificates-with-lets-encrypt/index.html - + https://davidtsadler.com/posts/letsencrypt/2021-05-27/wildcard-certificates-with-lets-encrypt/ + David T. Sadler. 2021-05-27T12:00:00Z 2021-05-27T12:00:00Z @@ -119,16 +119,16 @@ curl -s -X DELETE -d &quot;$CERTBOT_VALIDATION&quot; --user $EMAIL:$PASS SSLCertificateKeyFile /etc/letsencrypt/live/davidtsadler.com/privkey.pem</pre><p>Now in future I can simply create the required vhost file for the new subdomain site and have it use the same certificate as the others.</p><h3>Links</h3><a href="https://davidtsadler.com">davidtsadler.com - My little bit of the internet.</a><a href="/posts/letsencrypt/">Let's Encrypt - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Accessing Nextcloud With WebDAV on Arch - https://davidtsadler.com/posts/nextcloud/2021-02-15/accessing-nextcloud-with-webdav-on-arch/index.html - + https://davidtsadler.com/posts/nextcloud/2021-02-15/accessing-nextcloud-with-webdav-on-arch/ + David T. Sadler. 2021-02-15T12:00:00Z 2021-02-15T12:00:00Z <h1>Accessing Nextcloud With WebDAV on Arch</h1><blockquote>Mon 15th February 2021 By David T. Sadler.</blockquote><p>I have a Nextcloud instance and I want to mount it as a directory on my local machine. Since Nextcloud cloud supports the WebDAV protocol its possible to do this by installing davfs2 which can mount a WebDAV resource.</p><p>The first thing I had to do was install davfs2.</p><pre><code class="shell">$ sudo pacman -S davfs2</code></pre><p>Next I created the directory where Nextcloud would be mounted.</p><pre><code class="shell">$ mkdir -p .local/share/nextcloud</code></pre><p>I then needed to tell Arch how to mount Nextcloud by adding the below line to the /etc/fstab file.</p><pre><code class="shell">https://my-nextcloud-server.com/path /home/david/.local/share/nextcloud davfs rw,user,uid=david,noauto 0 0</code></pre><p>Since access to Nextcloud is controlled by a username and password these where added to the ~/.davfs2 file.</p><pre><code class="shell">https://my-nextcloud-server.com/path username password</code></pre><p>I made sure this file had the correct permissions to ensure security.</p><pre><code class="shell">$ chmod 600 ~/.davfs2/secrets</code></pre><p>Now I can mount Nextcloud and access my files just like any others.</p><pre><code class="shell">$ mount .local/share/nextcloud</code></pre><h3>Links</h3><a href="/posts/nextcloud">Nextcloud - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> How to Host Your Own Gemini Site in the Cloud - https://davidtsadler.com/posts/gemini/2021-02-08/how-to-host-your-own-gemini-site-in-the-cloud/index.html - + https://davidtsadler.com/posts/gemini/2021-02-08/how-to-host-your-own-gemini-site-in-the-cloud/ + David T. Sadler. 2021-02-08T12:00:00Z 2021-02-08T12:00:00Z @@ -192,8 +192,8 @@ $ sudo systemctl status agate.service Active: active (running)</pre><p>The final step was to have this service start when the system is rebooted.</p><pre>$ sudo systemctl enable agate.service</pre><h2>Conclusion</h2><p>Setting up a Gemini site was easy to do and I hope this guide shows it. I have several ideas about how I'm going to use this new site and I'm excited to see where this leads to.</p><h3>Links</h3><a href="https://www.gandi.net/">Gandi.net - My domain registrar of choice.</a><a href="https://hetzner.cloud/?ref=Gf3UFbRaixBK">Hetzner - My cloud server provider.</a><a href="https://github.com/mbrubeck/agate/">Agate - A simple Gemini server.</a><a href="gemini://davidtsadler.co.uk/">davidtsadler.co.uk - My Gemini site.</a><a href="/posts/gemini/">Gemini - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Installing PHP 8 for Windows 10 - https://davidtsadler.com/posts/php/2021-01-18/installing-php-8-for-windows-10/index.html - + https://davidtsadler.com/posts/php/2021-01-18/installing-php-8-for-windows-10/ + David T. Sadler. 2021-01-18T12:00:00Z 2021-01-18T12:00:00Z @@ -204,8 +204,8 @@ Copyright (c) The PHP Group Zend Engine v4.0.1, Copyright (c) Zend Technologies</code></pre><h3>Links</h3><a href="https://windows.php.net/">PHP For Windows.</a><a href="/posts/php">PHP - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Installing Laravel Homestead in Arch Linux - https://davidtsadler.com/posts/laravel/2020-12-21/installing-laravel-homestead-in-arch-linux/index.html - + https://davidtsadler.com/posts/laravel/2020-12-21/installing-laravel-homestead-in-arch-linux/ + David T. Sadler. 2020-12-21T12:00:00Z 2020-12-21T12:00:00Z @@ -264,8 +264,8 @@ DB_PASSWORD=testsite</pre><p>Now when you browse to http://testsite. User vagrant</code></pre><p>From now on I can simply do ssh homestead from any directory to connect to the Homestead virtual machine.</p><h3>Links</h3><a href="https://laravel.com/docs/8.x/homestead/">Laravel Homestead</a><a href="/posts/larvel/">Laravel - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed - https://davidtsadler.com/posts/laravel/2020-12-14/sqlstate-hy000-2002-php-network-getaddresses-getaddrinfo-failed/index.html - + https://davidtsadler.com/posts/laravel/2020-12-14/sqlstate-hy000-2002-php-network-getaddresses-getaddrinfo-failed/ + David T. Sadler. 2020-12-14T12:00:00Z 2020-12-14T12:00:00Z @@ -291,8 +291,8 @@ Illuminate\Database\QueryException Illuminate\Foundation\Console\Kernel::handle()</code></pre><p>The cause of this issue is due to a change introduced to the .env.example file. This changed the environment variable DB_HOST from 127.0.0.1 to mysql. The reason for this change is to support [Laravel Sail](https://laravel.com/docs/8.x/sail) which is a Docker development environment for Laravel.</p><p>The change means your Laravel application will try and connect to a database server with the hostname of mysql. Unless this exists then the application can't connect.</p><p>To resolve the issue just change the value back to 127.0.0.1</p><pre><code class="shell">DB_HOST=127.0.0.1</code></pre><h3>Links</h3><a href="https://github.com/laravel/laravel/commit/a895748980b3e055ffcb68b6bc1c2e5fad6ecb08#diff-a3046da0d15a27e89f2afe639b25748a7ad4d9290af3e7b1b6c1a5533c8f0a8cL11">Commit that changed .env.example.</a><a href="https://laravel.com/docs/8.x/sail/">Laravel Sail</a><a href="/posts/larvel/">Laravel - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Installing Zsh and Powerlevel10k on Arch Linux - https://davidtsadler.com/posts/arch/2020-09-07/installing-zsh-and-powerlevel10k-on-arch-linux/index.html - + https://davidtsadler.com/posts/arch/2020-09-07/installing-zsh-and-powerlevel10k-on-arch-linux/ + David T. Sadler. 2020-09-07T12:00:00Z 2020-09-07T12:00:00Z @@ -310,8 +310,8 @@ $ zsh-newuser-install -f</code></pre><h2>Changing The Default /bin/ksh</code></pre><h2>Installing Powerlevel10k</h2><p>Powerlevel10k is a theme for Zsh and in order to make the most of it you should install the Meslo Nerd Font that has been patched for Powerlevel10k.</p><pre><code class="shell">$ yay -Sy --noconfirm ttf-meslo-nerd-font-powerlevel10k</code></pre><p>You need to configure your terminal to use this font. How this is done is dependant upon what terminal you are using. Since I use st from suckless I need to edit the file config.h and specify MesloLGS NF in the font settings.</p><pre><code class="shell">static char *font = &quot;MesloLGS NF:pixelsize=14:antialias=true:autohint=true&quot;;</code></pre><p>Before rebuilding st.</p><pre><code class="shell">$ sudo make install</code></pre><p>Now that the dependences have been meet Powerlevel10k can be installed.</p><pre><code class="shell">$ yay -Sy --noconfirm zsh-theme-powerlevel10k-git</code></pre><p>Once it has been installed ensure that Zsh loads Powerlevel10k.</p><pre><code class="shell">$ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' &gt;&gt;! ~/.zshrc</code></pre><p>You can now open a new terminal which will start the Powerlevel10k configuration wizard. This will ask you a few questions and configure your prompt. If it doesn't trigger automatically, type p10k configure.</p><p>Once the configuration wizard has finished open a new terminal and you should see the Powerlevel10k theme been used.</p><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="https://www.zsh.org/">Zsh.</a><a href="https://github.com/romkatv/powerlevel10k/">Powerlevel10k.</a><a href="https://st.suckless.org/">Simple Terminal.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Enabling Audio in Arch Linux - https://davidtsadler.com/posts/arch/2020-08-31/enabling-audio-in-arch-linux/index.html - + https://davidtsadler.com/posts/arch/2020-08-31/enabling-audio-in-arch-linux/ + David T. Sadler. 2020-08-31T12:00:00Z 2020-08-31T12:00:00Z @@ -322,8 +322,8 @@ $ amixer sset Speaker 100% $ amixer sset Headphone 100%</code></pre><h2>Unmute with Alsamixer</h2><p>If you prefer a more intuitive ncurses interface you can use alsamixer.</p><pre><code class="shell">$ alsamixer</code></pre><p>Channels that are muted will have the MM label below them. Unmuted channels have 00.</p><p>Use the ← and → keys to scroll to the muted channel and press m to unmute it.</p><p>The volume can be increased and decreased with the ↑ and ↓ keys.</p><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Pacman Cheat Sheet For Ubuntu Users - https://davidtsadler.com/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html - + https://davidtsadler.com/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/ + David T. Sadler. 2020-08-24T12:00:00Z 2020-08-24T12:00:00Z @@ -352,8 +352,8 @@ $ pacman -Scc</code></pre><p>Free up disk space by removing fr $ pacman -Qdtq | pacman -Rs -</code></pre><p>Remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.</p><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Installing ST, DMENU and DWM in Arch Linux - https://davidtsadler.com/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/index.html - + https://davidtsadler.com/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/ + David T. Sadler. 2020-08-17T12:00:00Z 2020-08-17T12:00:00Z @@ -369,8 +369,8 @@ $ sudo make install</code></pre><h2>Configure and Install DWM& $ sudo make install</code></pre><h2>Starting DWM</h2><p>Since I have installed xorg-xinit I need to create a .xinitrc in my home folder.</p><pre><code class="shell">$ nvim ~/.xinitrc</code></pre><p>The contents of this file is just.</p><pre><code class="vim">exec dwm</code></pre><p>I can now start xorg and dwm with the below command.</p><pre><code class="shell">$ startx</code></pre><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="https://dwm.suckless.org/">Dynamic Window Manager (DWM).</a><a href="https://suckless.org/">Suckless Software.</a><a href="https://st.suckless.org/">Simple Terminal.</a><a href="https://tools.suckless.org/dmenu/">DMenu.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Sudo: sorry, you must have a tty to run sudo - https://davidtsadler.com/posts/linux/2020-07-13/sudo-sorry-you-must-have-a-tty-to-run-sudo/index.html - + https://davidtsadler.com/posts/linux/2020-07-13/sudo-sorry-you-must-have-a-tty-to-run-sudo/ + David T. Sadler. 2020-07-13T12:00:00Z 2020-07-13T12:00:00Z @@ -378,8 +378,8 @@ $ sudo make install</code></pre><h2>Starting DWM</h2>< deployer ALL=(ALL) NOPASSWD:/usr/bin/chown, /usr/bin/tee, /usr/sbin/apachectl</code></pre><p>This configuration allows the deployer user to execute sudo when not logged into a real terminal and additionally not prompt for a password when executing chown, tee, and apachectl.</p><h2>Using Pseudo-tty</h2><p>An alternative is to use the pseudo-tty option when connecting via ssh.</p><pre><code class="shell">$ ssh -t user@example.com sudo apachectl restart</code></pre><h3>Links</h3><a href="https://deployer.org/">Deployer - A Deployment Tool for PHP.</a><a href="https://www.sudo.ws/man/sudoers.man.html">Sudo Manual.</a><a href="/posts/linux/">Linux - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Granting Sudo Access to a User in Arch Linux - https://davidtsadler.com/posts/arch/2020-06-22/granting-sudo-access-to-a-user-in-arch-linux/index.html - + https://davidtsadler.com/posts/arch/2020-06-22/granting-sudo-access-to-a-user-in-arch-linux/ + David T. Sadler. 2020-06-22T12:00:00Z 2020-06-22T12:00:00Z @@ -388,8 +388,8 @@ deployer ALL=(ALL) NOPASSWD:/usr/bin/chown, /usr/bin/tee, /usr/sbin/apachectl< /home/david</code></pre><p>Since I wasn't prompted for my password and the command was executed I knew that I now had sudo access.</p><h3>Links</h3><a href="/posts/arch/2020-06-15/adding-a-user-in-arch-linux/">Adding a User in Arch Linux.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Adding a User in Arch Linux - https://davidtsadler.com/posts/arch/2020-06-15/adding-a-user-in-arch-linux/index.html - + https://davidtsadler.com/posts/arch/2020-06-15/adding-a-user-in-arch-linux/ + David T. Sadler. 2020-06-15T12:00:00Z 2020-06-15T12:00:00Z @@ -403,16 +403,16 @@ Password: david@suliman:$</code></pre><h3>Links</h3><a href="/posts/arch/2020-05-25/installing-arch-linux-on-a-x220-thinkpad/">Installing Arch Linux on a Thinkpad X220.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Publishing Jigsaw Posts With Netlify Build Hooks - https://davidtsadler.com/posts/netlify/2020-06-08/publishing-jigsaw-posts-with-netlify-build-hooks/index.html - + https://davidtsadler.com/posts/netlify/2020-06-08/publishing-jigsaw-posts-with-netlify-build-hooks/ + David T. Sadler. 2020-06-08T12:00:00Z 2020-06-08T12:00:00Z <h1>Publishing Jigsaw Posts With Netlify Build Hooks</h1><blockquote>Mon 8th June 2020 By David T. Sadler.</blockquote><p>A previous post talks about how I use Jigsaw's filtering to schedule future posts. However because Jigsaw is a static site builder I have to run Jigsaw in order to generate the HTML for the site. So if for example I have scheduled three posts to be published over three consecutive weeks I would need to build and deploy the site on each of the scheduled dates in order for the posts to be published. This kind of defeats the point of scheduling posts. So what I needed was some way to automatically trigger new builds of the site and since I use Netlify to host the site I can make use of their build hooks to do this.</p><p>For those that don't know build hooks are URLs you can use to trigger new builds and deployments in Netlify. By making a HTTP POST request to a URL, Netlify will pull down the latest master branch of your site, build it, and then deploy it.</p><p>Creating the build hook was simple. After logging into my Netlify account I went to Settings &gt; Build &amp; deploy &gt; Continuous deployment &gt; Build hooks.</p><p>From there I clicked Add build hook where I could then provide a name and select which GitHub branch would be used to build the site.</p><p>Clicking Save creates the build hook and you are given a unique URL that can be used to trigger it.</p><p>What is very handy about Netlify is that they provide you with an example of calling the URL with cURL. With this I simply setup a cron on a server that requests this URL every Monday at 8am.</p><pre><code class="shell">8 * * 1 curl -X POST -d {} https://api.netlify.com/build_hooks/111111111111111111111111</code></pre><p>The result is that every week posts that have been scheduled for that day will now be published when the site is built and deployed by the build hook.</p><h3>Links</h3><a href="/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/">2020-06-01 - Scheduling Posts in Jigsaw</a><a href="https://jigsaw.tighten.co/">Jigsaw - Static Site Generator for PHP Developers.</a><a href="https://www.netlify.com/">Netlify - Serverless Platform for Static Websites.</a><a href="https://docs.netlify.com/configure-builds/build-hooks/">Build Hooks in Netlify.</a><a href="/posts/netlify/">Netlify - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Scheduling Posts in Jigsaw - https://davidtsadler.com/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/index.html - + https://davidtsadler.com/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/ + David T. Sadler. 2020-06-01T12:00:00Z 2020-06-01T12:00:00Z @@ -433,8 +433,8 @@ return [ ];</code></pre><p>When deploying the site each post is passed to this filter. The first thing it does is convert the date that has been specified in the post's YAML front matter into a Carbon instance. It then returns true if the date is on or before the current date, I.e. when the site is been deployed. </p><p>With this filter I can specify future dates for several posts and they will only published once that date comes around. Posts are also exluded if a date has not been specified. This allows me to have posts that are a work in progress and shouldn't be published.</p><h3>Links</h3><a href="https://jigsaw.tighten.co/">Jigsaw - Static Site Generator for PHP Developers.</a><a href="https://jigsaw.tighten.co/docs/collections-filtering/">Using Filters in Jigsaw.</a><a href="https://carbon.nesbot.com/">Carbon - PHP API Extension for DateTime.</a><a href="/posts/jigsaw/">Jigsaw - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Installing Arch Linux on a Thinkpad X220 - https://davidtsadler.com/posts/arch/2020-05-25/installing-arch-linux-on-a-thinkpad-x220/index.html - + https://davidtsadler.com/posts/arch/2020-05-25/installing-arch-linux-on-a-thinkpad-x220/ + David T. Sadler. 2020-05-25T12:00:00Z 2020-05-25T12:00:00Z @@ -537,8 +537,8 @@ efibootmgr \ --verbose </pre><p>The --unicode argument is where the kernel parameters are specified. This tells the system that the partition identified by PARTUUID is encrypted and that the root filesystem to mount is the logical volume called root that is part of the volume group vg0. The microcode is also loaded with initrd=\intel-ucode.img.</p><p>Make this script executable.</p><pre><code class="shell">chmod u+x /usr/local/sbin/mkefibootentry</code></pre><p>Run the script to add to the motherboard boot entries.</p><pre><code class="shell">$ mkefibootentry</code></pre><h2>Root Password</h2><p>Create a secure password for the root user.</p><pre><code class="shell">$ passwd</code></pre><h2>Reboot</h2><p>Return to the Arch live installation environment.</p><pre><code class="shell">$ exit</code></pre><p>Unmount the partitions.</p><pre><code class="shell">$ umount -R /mnt</code></pre><p>Restart the machine with reboot. Remember to remove any installation media such as a USB drive.</p><pre><code class="shell">$ reboot</code></pre><p>Provided nothing has gone wrong your machine will boot into a fresh installation of Arch Linux. Don't forget that during the boot you will be prompted to enter the passphrase to decrypt the system partition. </p><p>Following this guide will leave you with a very minimal system where you can login as the root user. From this point how you configure the system is up to you as it will be very different to how I configure my own. If you interested in seeing how I do it then see my other posts on the subject. </p><h3>Links</h3><a href="https://www.archlinux.org/Installation_guide/">Offical Arch Installation Guide.</a><a href="https://www.archlinux.org/download/">Arch Linux Download Page.</a><a href="https://www.balena.io/etcher/">Etcher.</a><a href="https://www.archlinux.org/mirrorlist/">Pacman Mirrorlist Generator.</a><a href="https://en.wikipedia.org/wiki/Howl%27s_Moving_Castle/">Wikipedia Entry for Howl's Moving Castle.</a><a href="/posts/arch/">Arch - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Creating an Ebook With Markdown - https://davidtsadler.com/posts/markdown/2020-03-30/creating-an-ebook-with-markdown/index.html - + https://davidtsadler.com/posts/markdown/2020-03-30/creating-an-ebook-with-markdown/ + David T. Sadler. 2020-03-30T12:00:00Z 2020-03-30T12:00:00Z diff --git a/www/posts/gemini/atom.xml b/www/posts/gemini/atom.xml index c0c1da9..0ed5bc9 100644 --- a/www/posts/gemini/atom.xml +++ b/www/posts/gemini/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts About Gemini https://davidtsadler.com/posts/gemini/atom.xml - + 2021-02-08T12:00:00Z How to Host Your Own Gemini Site in the Cloud - https://davidtsadler.com/posts/gemini/2021-02-08/how-to-host-your-own-gemini-site-in-the-cloud/index.html - + https://davidtsadler.com/posts/gemini/2021-02-08/how-to-host-your-own-gemini-site-in-the-cloud/ + David T. Sadler. 2021-02-08T12:00:00Z 2021-02-08T12:00:00Z diff --git a/www/posts/git/atom.xml b/www/posts/git/atom.xml index 404b492..0ada83f 100644 --- a/www/posts/git/atom.xml +++ b/www/posts/git/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts About Git https://davidtsadler.com/posts/git/atom.xml - + 2021-06-13T12:00:00Z Backing Up a Git Repository - https://davidtsadler.com/posts/git/2021-06-13/backing-up-a-git-repository/index.html - + https://davidtsadler.com/posts/git/2021-06-13/backing-up-a-git-repository/ + David T. Sadler. 2021-06-13T12:00:00Z 2021-06-13T12:00:00Z @@ -31,8 +31,8 @@ find $BACKUP_FILES -mtime +3 -delete exit 0</code></pre><p>All it does it tar and gzip any .git directories found under /home/git. It also removes any backups that are more than three days old.</p><p>This script has been saved as /usr/bin/backup_repositories and is ran daily via cron.</p><pre><code class="cron">0 3 * * * /usr/bin/backup_repositories &gt; /dev/null 2&gt;&amp;1</code></pre><p>It is important to know that this backup strategy is far from ideal for repositories that are heavily used as you run the high risk of trying to backup a repository as users are pushing to it. As git updates a repository in two phases this will lead to a backup that may not contain all the data and so won't be suitable for restoring. However its fine for my purposes since I'm the only user and it's unlikely that I will be making changes during the time the backup is running.</p><h3>Links</h3><a href="/posts/git/2021-05-29/setting-up-a-self-host-git-server/">2021-05-29 - Setting up a Self Hosted Git Server</a><a href="/posts/git/">Git - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Setting up a Self Hosted Git Server - https://davidtsadler.com/posts/git/2021-05-29/setting-up-a-self-host-git-server/index.html - + https://davidtsadler.com/posts/git/2021-05-29/setting-up-a-self-host-git-server/ + David T. Sadler. 2021-05-29T12:00:00Z 2021-05-29T12:00:00Z diff --git a/www/posts/jigsaw/atom.xml b/www/posts/jigsaw/atom.xml index a63fda5..f73aec5 100644 --- a/www/posts/jigsaw/atom.xml +++ b/www/posts/jigsaw/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts About Jigsaw https://davidtsadler.com/posts/jigsaw/atom.xml - + 2020-06-01T12:00:00Z Scheduling Posts in Jigsaw - https://davidtsadler.com/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/index.html - + https://davidtsadler.com/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/ + David T. Sadler. 2020-06-01T12:00:00Z 2020-06-01T12:00:00Z diff --git a/www/posts/laravel/atom.xml b/www/posts/laravel/atom.xml index a049495..044fb75 100644 --- a/www/posts/laravel/atom.xml +++ b/www/posts/laravel/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts About Laravel https://davidtsadler.com/posts/laravel/atom.xml - + 2020-12-21T12:00:00Z Installing Laravel Homestead in Arch Linux - https://davidtsadler.com/posts/laravel/2020-12-21/installing-laravel-homestead-in-arch-linux/index.html - + https://davidtsadler.com/posts/laravel/2020-12-21/installing-laravel-homestead-in-arch-linux/ + David T. Sadler. 2020-12-21T12:00:00Z 2020-12-21T12:00:00Z @@ -67,8 +67,8 @@ DB_PASSWORD=testsite</pre><p>Now when you browse to http://testsite. User vagrant</code></pre><p>From now on I can simply do ssh homestead from any directory to connect to the Homestead virtual machine.</p><h3>Links</h3><a href="https://laravel.com/docs/8.x/homestead/">Laravel Homestead</a><a href="/posts/larvel/">Laravel - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed - https://davidtsadler.com/posts/laravel/2020-12-14/sqlstate-hy000-2002-php-network-getaddresses-getaddrinfo-failed/index.html - + https://davidtsadler.com/posts/laravel/2020-12-14/sqlstate-hy000-2002-php-network-getaddresses-getaddrinfo-failed/ + David T. Sadler. 2020-12-14T12:00:00Z 2020-12-14T12:00:00Z diff --git a/www/posts/letsencrypt/atom.xml b/www/posts/letsencrypt/atom.xml index 3c27726..4feba15 100644 --- a/www/posts/letsencrypt/atom.xml +++ b/www/posts/letsencrypt/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts About Let's Encrypt https://davidtsadler.com/posts/letsencrypt/atom.xml - + 2021-05-28T12:00:00Z Pre and Post Validation Hooks with Certbot - https://davidtsadler.com/posts/letsencrypt/2021-05-28/pre-and-post-validation-hooks-with-certbot/index.html - + https://davidtsadler.com/posts/letsencrypt/2021-05-28/pre-and-post-validation-hooks-with-certbot/ + David T. Sadler. 2021-05-28T12:00:00Z 2021-05-28T12:00:00Z @@ -30,8 +30,8 @@ PASSWORD='super strong password' curl -s -X DELETE -d &quot;$CERTBOT_VALIDATION&quot; --user $EMAIL:$PASSWORD https://examplemailinaboxserver.com/admin/dns/custom/_acme-challenge.$CERTBOT_DOMAIN/txt</code></pre><p>With these scripts I can setup the below cron job to call certbot.</p><pre>0 0 * * * /usr/bin/certbot renew --preferred-challenges=dns -q --manual-auth-hook /path/to/auth.sh --manual-cleanup-hook /path/to/cleanup.sh &gt; /dev/null 2&gt;&amp;1</pre><h3>Links</h3><a href="https://letsencrypt.org/docs/challenge-types/#dns-01-challenge">Let's Encrypt DNS-01 challenge.</a><a href="https://certbot.eff.org/docs/using.html#pre-and-post-validation-hooks">Certbot manual on pre and post validation hooks.</a><a href="https://mailinabox.email">Mail-in-a-Box. Self hosting mail server.</a><a href="/posts/letsencrypt/">Let's Encrypt - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Wildcard Certificates with Let's Encrypt - https://davidtsadler.com/posts/letsencrypt/2021-05-27/wildcard-certificates-with-lets-encrypt/index.html - + https://davidtsadler.com/posts/letsencrypt/2021-05-27/wildcard-certificates-with-lets-encrypt/ + David T. Sadler. 2021-05-27T12:00:00Z 2021-05-27T12:00:00Z diff --git a/www/posts/linux/atom.xml b/www/posts/linux/atom.xml index febc9d2..a6022d1 100644 --- a/www/posts/linux/atom.xml +++ b/www/posts/linux/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts About Linux https://davidtsadler.com/posts/linux/atom.xml - + 2021-06-05T12:00:00Z Xrandr: Failed to Get Size of Gamma for Output Default - https://davidtsadler.com/posts/linux/2021-06-05/xrandr-failed-to-get-size-of-gamma-for-output-default/index.html - + https://davidtsadler.com/posts/linux/2021-06-05/xrandr-failed-to-get-size-of-gamma-for-output-default/ + David T. Sadler. 2021-06-05T12:00:00Z 2021-06-05T12:00:00Z @@ -17,8 +17,8 @@ Modeline &quot;1368x768_60.00&quot; 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync</code></pre><p>This mode is then added with xrandr.</p><pre><code class="shell">$ xrandr --newmode &quot;1368x768_60.00&quot; 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync</code></pre><p>The mode can then be associated with the display.</p><pre><code class="shell">$ xrandr --addmode default 1368x768_60</code></pre><p>Like I said, normally this is all that is required but in this instance the xrandr command kept displaying the below message and the desired resolution would not be applied.</p><pre><code class="shell">xrandr: Failed to get size of gamma for output default</code></pre><p>After several fruitless attempts at fixing this I eventually found that the nomodeset kernel boot option had been set. This instructs the kernel to not load any video drivers and instead use BIOS modes. Apparently many open source drivers have removed support for non-kernel modes and fall back to using a very basic VESA driver. I'm assuming this basic driver does not support the resolution I want.</p><p>With further investigation I found that nomodeset was been specified via grub so removing it meant re-configuring grub by editing /etc/default/grub.</p><pre><code class="shell">$ sudo vim /etc/default/grub</code></pre><p>In this file I located the below line.</p><pre>GRUB_CMDLINE_LINUX_DEFAULT=&quot;quiet splash nomodeset&quot;</pre><p>I edited this line to remove nomodeset and saved the changes.</p><pre>GRUB_CMDLINE_LINUX_DEFAULT=&quot;quiet splash&quot;</pre><p>Now all I needed to do was update grub with the new default settings.</p><pre><code class="shell">$ sudo update-grub</code></pre><p>After a reboot the laptop was using the correct resolution and there was no need to use xrandr.</p><h3>Links</h3><a href="https://askubuntu.com/questions/207175/what-does-nomodeset-do">askubuntu/ question regarding nomodeset does.</a><a href="/posts/linux/">Linux - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Sudo: sorry, you must have a tty to run sudo - https://davidtsadler.com/posts/linux/2020-07-13/sudo-sorry-you-must-have-a-tty-to-run-sudo/index.html - + https://davidtsadler.com/posts/linux/2020-07-13/sudo-sorry-you-must-have-a-tty-to-run-sudo/ + David T. Sadler. 2020-07-13T12:00:00Z 2020-07-13T12:00:00Z diff --git a/www/posts/markdown/atom.xml b/www/posts/markdown/atom.xml index a00093d..d656924 100644 --- a/www/posts/markdown/atom.xml +++ b/www/posts/markdown/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts About Markdown https://davidtsadler.com/posts/markdown/atom.xml - + 2020-03-30T12:00:00Z Creating an Ebook With Markdown - https://davidtsadler.com/posts/markdown/2020-03-30/creating-an-ebook-with-markdown/index.html - + https://davidtsadler.com/posts/markdown/2020-03-30/creating-an-ebook-with-markdown/ + David T. Sadler. 2020-03-30T12:00:00Z 2020-03-30T12:00:00Z diff --git a/www/posts/netlify/atom.xml b/www/posts/netlify/atom.xml index d370a82..c6c9af9 100644 --- a/www/posts/netlify/atom.xml +++ b/www/posts/netlify/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts About Netlify https://davidtsadler.com/posts/netlify/atom.xml - + 2020-06-08T12:00:00Z Publishing Jigsaw Posts With Netlify Build Hooks - https://davidtsadler.com/posts/netlify/2020-06-08/publishing-jigsaw-posts-with-netlify-build-hooks/index.html - + https://davidtsadler.com/posts/netlify/2020-06-08/publishing-jigsaw-posts-with-netlify-build-hooks/ + David T. Sadler. 2020-06-08T12:00:00Z 2020-06-08T12:00:00Z diff --git a/www/posts/nextcloud/atom.xml b/www/posts/nextcloud/atom.xml index 7f88a8f..732f8eb 100644 --- a/www/posts/nextcloud/atom.xml +++ b/www/posts/nextcloud/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts About Nextcloud https://davidtsadler.com/posts/nextcloud/atom.xml - + 2021-02-15T12:00:00Z Accessing Nextcloud With WebDAV on Arch - https://davidtsadler.com/posts/nextcloud/2021-02-15/accessing-nextcloud-with-webdav-on-arch/index.html - + https://davidtsadler.com/posts/nextcloud/2021-02-15/accessing-nextcloud-with-webdav-on-arch/ + David T. Sadler. 2021-02-15T12:00:00Z 2021-02-15T12:00:00Z diff --git a/www/posts/php/atom.xml b/www/posts/php/atom.xml index 278a6bd..9f64dc4 100644 --- a/www/posts/php/atom.xml +++ b/www/posts/php/atom.xml @@ -2,13 +2,13 @@ The Home of David T. Sadler - All Posts About PHP https://davidtsadler.com/posts/php/atom.xml - + 2021-07-08T12:00:00Z HTTP_AUTHORIZATION Missing From Global $_SERVER Variable - https://davidtsadler.com/posts/php/2021-07-08/http-authorization-missing-from-global-server-variable/index.html - + https://davidtsadler.com/posts/php/2021-07-08/http-authorization-missing-from-global-server-variable/ + David T. Sadler. 2021-07-08T12:00:00Z 2021-07-08T12:00:00Z @@ -19,8 +19,8 @@ &lt;/IfModule&gt;</pre><p>After adding the above to the .htaccess file the HTTP_AUTHORIZATION key is now been populated with the value of the Authorization header.</p><h3>Links</h3><a href="/posts/php">PHP - Read More Posts.</a><p>I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.</p><a href="mailto:david@davidtsadler.com">Email david@davidtsadler.com</a><h3>License</h3><a href="https://creativecommons.org/licenses/by-sa/4.0/">The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</a><p>Copyright © 2021 David T. Sadler.</p><a href="/">Return to Homepage.</a> Installing PHP 8 for Windows 10 - https://davidtsadler.com/posts/php/2021-01-18/installing-php-8-for-windows-10/index.html - + https://davidtsadler.com/posts/php/2021-01-18/installing-php-8-for-windows-10/ + David T. Sadler. 2021-01-18T12:00:00Z 2021-01-18T12:00:00Z diff --git a/www/sitemap.xml b/www/sitemap.xml index 43888a6..d4e68ea 100644 --- a/www/sitemap.xml +++ b/www/sitemap.xml @@ -1,91 +1,91 @@ - https://davidtsadler.com/posts/php/2021-07-08/http-authorization-missing-from-global-server-variable/index.html + https://davidtsadler.com/posts/php/2021-07-08/http-authorization-missing-from-global-server-variable/ 2021-07-08T12:00:00Z never - https://davidtsadler.com/posts/git/2021-06-13/backing-up-a-git-repository/index.html + https://davidtsadler.com/posts/git/2021-06-13/backing-up-a-git-repository/ 2021-06-13T12:00:00Z never - https://davidtsadler.com/posts/linux/2021-06-05/xrandr-failed-to-get-size-of-gamma-for-output-default/index.html + https://davidtsadler.com/posts/linux/2021-06-05/xrandr-failed-to-get-size-of-gamma-for-output-default/ 2021-06-05T12:00:00Z never - https://davidtsadler.com/posts/git/2021-05-29/setting-up-a-self-host-git-server/index.html + https://davidtsadler.com/posts/git/2021-05-29/setting-up-a-self-host-git-server/ 2021-05-29T12:00:00Z never - https://davidtsadler.com/posts/letsencrypt/2021-05-28/pre-and-post-validation-hooks-with-certbot/index.html + https://davidtsadler.com/posts/letsencrypt/2021-05-28/pre-and-post-validation-hooks-with-certbot/ 2021-05-28T12:00:00Z never - https://davidtsadler.com/posts/letsencrypt/2021-05-27/wildcard-certificates-with-lets-encrypt/index.html + https://davidtsadler.com/posts/letsencrypt/2021-05-27/wildcard-certificates-with-lets-encrypt/ 2021-05-27T12:00:00Z never - https://davidtsadler.com/posts/nextcloud/2021-02-15/accessing-nextcloud-with-webdav-on-arch/index.html + https://davidtsadler.com/posts/nextcloud/2021-02-15/accessing-nextcloud-with-webdav-on-arch/ 2021-02-15T12:00:00Z never - https://davidtsadler.com/posts/gemini/2021-02-08/how-to-host-your-own-gemini-site-in-the-cloud/index.html + https://davidtsadler.com/posts/gemini/2021-02-08/how-to-host-your-own-gemini-site-in-the-cloud/ 2021-02-08T12:00:00Z never - https://davidtsadler.com/posts/php/2021-01-18/installing-php-8-for-windows-10/index.html + https://davidtsadler.com/posts/php/2021-01-18/installing-php-8-for-windows-10/ 2021-01-18T12:00:00Z never - https://davidtsadler.com/posts/laravel/2020-12-21/installing-laravel-homestead-in-arch-linux/index.html + https://davidtsadler.com/posts/laravel/2020-12-21/installing-laravel-homestead-in-arch-linux/ 2020-12-21T12:00:00Z never - https://davidtsadler.com/posts/laravel/2020-12-14/sqlstate-hy000-2002-php-network-getaddresses-getaddrinfo-failed/index.html + https://davidtsadler.com/posts/laravel/2020-12-14/sqlstate-hy000-2002-php-network-getaddresses-getaddrinfo-failed/ 2020-12-14T12:00:00Z never - https://davidtsadler.com/posts/arch/2020-09-07/installing-zsh-and-powerlevel10k-on-arch-linux/index.html + https://davidtsadler.com/posts/arch/2020-09-07/installing-zsh-and-powerlevel10k-on-arch-linux/ 2020-09-07T12:00:00Z never - https://davidtsadler.com/posts/arch/2020-08-31/enabling-audio-in-arch-linux/index.html + https://davidtsadler.com/posts/arch/2020-08-31/enabling-audio-in-arch-linux/ 2020-08-31T12:00:00Z never - https://davidtsadler.com/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/index.html + https://davidtsadler.com/posts/arch/2020-08-24/pacman-cheat-sheet-for-ubuntu-users/ 2020-08-24T12:00:00Z never - https://davidtsadler.com/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/index.html + https://davidtsadler.com/posts/arch/2020-08-17/installing-st-dmenu-dwm-in-arch-linux/ 2020-08-17T12:00:00Z never - https://davidtsadler.com/posts/linux/2020-07-13/sudo-sorry-you-must-have-a-tty-to-run-sudo/index.html + https://davidtsadler.com/posts/linux/2020-07-13/sudo-sorry-you-must-have-a-tty-to-run-sudo/ 2020-07-13T12:00:00Z never - https://davidtsadler.com/posts/arch/2020-06-22/granting-sudo-access-to-a-user-in-arch-linux/index.html + https://davidtsadler.com/posts/arch/2020-06-22/granting-sudo-access-to-a-user-in-arch-linux/ 2020-06-22T12:00:00Z never - https://davidtsadler.com/posts/arch/2020-06-15/adding-a-user-in-arch-linux/index.html + https://davidtsadler.com/posts/arch/2020-06-15/adding-a-user-in-arch-linux/ 2020-06-15T12:00:00Z never - https://davidtsadler.com/posts/netlify/2020-06-08/publishing-jigsaw-posts-with-netlify-build-hooks/index.html + https://davidtsadler.com/posts/netlify/2020-06-08/publishing-jigsaw-posts-with-netlify-build-hooks/ 2020-06-08T12:00:00Z never - https://davidtsadler.com/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/index.html + https://davidtsadler.com/posts/jigsaw/2020-06-01/scheduling-posts-in-jigsaw/ 2020-06-01T12:00:00Z never - https://davidtsadler.com/posts/arch/2020-05-25/installing-arch-linux-on-a-thinkpad-x220/index.html + https://davidtsadler.com/posts/arch/2020-05-25/installing-arch-linux-on-a-thinkpad-x220/ 2020-05-25T12:00:00Z never - https://davidtsadler.com/posts/markdown/2020-03-30/creating-an-ebook-with-markdown/index.html + https://davidtsadler.com/posts/markdown/2020-03-30/creating-an-ebook-with-markdown/ 2020-03-30T12:00:00Z never -- cgit v1.2.3-13-gbd6f