@@ -75,7 +73,7 @@ After moving across most of my stuff I came across the problem of how to hook th
diff --git a/public/multi-user-qtile-fiddling/index.html b/public/multi-user-qtile-fiddling/index.html
index 68f5ac9..2b757e2 100644
--- a/public/multi-user-qtile-fiddling/index.html
+++ b/public/multi-user-qtile-fiddling/index.html
@@ -1,19 +1,17 @@
-
+
-
+
-
-
-
+
multi user qtile fiddling
-
diff --git a/public/posts/index.xml b/public/posts/index.xml
index 080279f..e7fb5fc 100644
--- a/public/posts/index.xml
+++ b/public/posts/index.xml
@@ -2,22 +2,22 @@
Posts on James' Blog :-)
- http://localhost:1313/posts/
+ https://nonsense.dymc.win/posts/
Recent content in Posts on James' Blog :-)Hugo -- gohugo.ioen-GBTue, 25 Jun 2024 00:00:00 +0000
-
+ so you want to write a neovim plugin with lua
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/
Sat, 06 Apr 2024 00:00:00 +0000
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/<p>I’ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There’s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
making nix-colors talk to neovim
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/
Fri, 18 Aug 2023 00:00:00 +0000
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/<p>I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
@@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
vanilla javascript theme toggle for simpletons
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/
Mon, 26 Jun 2023 00:00:00 +0000
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/<p>Sometimes when I’m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I’ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you’re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
<h3 id="html">HTML</h3>
@@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
tailscale, caddy, and nixos containers - a match made in heaven
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
Tue, 16 May 2023 00:00:00 +0000
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/<p>For a little while now I’ve been running some services (jellyfin etc.) on an old laptop in my house. I’m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you’d have a reverse proxy and set up SSL certs so your browser doesn’t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
<h3 id="what-to-do">what to do?</h3>
@@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
learning about qtile widgets via the medium of cricket
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/
Mon, 03 Apr 2023 00:00:00 +0000
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/<p>I’m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I’m sure this will interest very few people but I learnt some good stuff along the way.</p>
<h3 id="hello-world">Hello World?!</h3>
@@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
theming nirvana
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/
Mon, 13 Mar 2023 00:00:00 +0000
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/<p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: ‘oh this is cool I can specify which desktop environment to use in my configuration.nix’. Next thing you know you’ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
<h3 id="how-to-make-it-work">how to make it work</h3>
@@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
translating docker to nix?!
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/
Tue, 28 Feb 2023 00:00:00 +0000
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/<p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can’t be beat. I’ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I’ve been playing around with the nixos approach to managing docker containers.</p>
<h3 id="nix---docker-compose---docker-run">nix -> docker compose -> docker run</h3>
<p>To illustrate how to translate a simple example from the world of docker to nix let’s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
@@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
simple nixos config for vps static site
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/
Sun, 29 Jan 2023 00:00:00 +0000
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/<p>Setting up a little static site is something I’ve done a few different times on a few different operating systems. It’s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let’s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
<p>I’m going to go through a bit of the nixos config I’ve got for my vps.</p>
<h3 id="ssh">SSH</h3>
@@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
podcast setup for broke boys whose trash phone cant hack modern apps
- http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
+ https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
Tue, 24 Jan 2023 00:00:00 +0000
- http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
+ https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/<p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been ‘podcast-player-hopping’ without success for the last couple of months trying to find something which doesn’t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
<ul>
<li>write python script to download podcasts</li>
@@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
elite bread dough for lazy boys
- http://localhost:1313/elite-bread-dough-for-lazy-boys/
+ https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/
Sun, 22 Jan 2023 00:00:00 +0000
- http://localhost:1313/elite-bread-dough-for-lazy-boys/
+ https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/<h3 id="ingredienti">INGREDIENTI</h3>
<ul>
<li>flour (ideally bread flour but if you don’t have it, it’s not the end of the world)</li>
@@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
multi user qtile fiddling
- http://localhost:1313/multi-user-qtile-fiddling/
+ https://nonsense.dymc.win/multi-user-qtile-fiddling/
Tue, 20 Dec 2022 00:00:00 +0000
- http://localhost:1313/multi-user-qtile-fiddling/
+ https://nonsense.dymc.win/multi-user-qtile-fiddling/<p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
<p>I basically just want the config to work out which computer it’’s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
@@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
teeny tiny bash fetch script
- http://localhost:1313/teeny-tiny-bash-fetch-script/
+ https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/
Sat, 10 Dec 2022 00:00:00 +0000
- http://localhost:1313/teeny-tiny-bash-fetch-script/
+ https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/<p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn’t really try that hard with the portability). I didn’t think much about performance; I’m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">"</span><span class="nv">$USER</span><span class="s2">"</span>
@@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">"</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
-<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
+<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
@@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
get the thoughts out of your head and into a digital format with this python journal script
- http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
+ https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
Thu, 01 Dec 2022 00:00:00 +0000
- http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
+ https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/<p>Since getting going with emacs I’ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I’m doing something with my text editor makes it a lot more palletable.</p>
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal’s features but allow you to use whatever editor you like with markdown.</p>
<h3 id="whats-the-time">WHAT’S THE TIME?</h3>
@@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
lowkey emacs setup
- http://localhost:1313/lowkey-emacs-setup/
+ https://nonsense.dymc.win/lowkey-emacs-setup/
Fri, 18 Nov 2022 00:00:00 +0000
- http://localhost:1313/lowkey-emacs-setup/
+ https://nonsense.dymc.win/lowkey-emacs-setup/<p>About a month ago I was a little bored and thought I’d give emacs a go. There’s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There’s also the quite jarring default theme which wasn’t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I’ve landed on a simple little setup that I’ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
<p>First things first, assuming you’re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
@@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">"M-c"</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
</span></span></code></pre></div><p>Here’s a little pic of the current setup :)</p>
-<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
+<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
@@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
setting up a lean mean hugo blogging theme
- http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/
+ https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/
Thu, 10 Nov 2022 00:00:00 +0000
- http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/
+ https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/<p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you’ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you’ve got a selection of mostly empty directories looking something like this.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
</span></span><span class="line"><span class="cl">├── archetypes
@@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
chess.com api and the continuing search for en passant checkmate
- http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
Tue, 08 Nov 2022 00:00:00 +0000
- http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/<p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
<ul>
<li>Parse this info for the pgn (portable game notation) of each game.</li>
@@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
</span></span></code></pre></div><p>Now a pgn looks something like this if it’s just printed as a string:</p>
-<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
+<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'e4'</span><span class="p">,</span> <span class="s1">'e5'</span><span class="p">,</span> <span class="s1">'Bc4'</span><span class="p">,</span> <span class="s1">'Nc6'</span><span class="p">,</span> <span class="s1">'Qh5'</span><span class="p">,</span> <span class="s1">'Nf6'</span><span class="p">,</span> <span class="s1">'Qxf7#'</span><span class="p">]</span>
</span></span></code></pre></div><p>We don’t need the headers, we don’t need the result, and we don’t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
@@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
chess.com api and the search for en passant checkmate
- http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/
Wed, 26 Oct 2022 00:00:00 +0000
- http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/<p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn’t think of any obvious way to get completely random players on the site, I used the API’s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
@@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="s1">'https://api.chess.com/pub/titled/WGM'</span>
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here’s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
-<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
+<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
@@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
declarative firefox config with home-manager on nixos
- http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/
+ https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/
Sun, 02 Oct 2022 00:00:00 +0000
- http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/
+ https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/<p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber’s templates to be very helpful.</p>
<p>First of all you’ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
<h3 id="extensions">EXTENSIONS</h3>
@@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
upgrade your qtile setup with a cute dropdown terminal
- http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
+ https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
Fri, 23 Sep 2022 00:00:00 +0000
- http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
+ https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/<p>I didn’t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
</span></span><span class="line"><span class="cl">
@@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
-<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
+<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">"scratchpad"</span><span class="p">,</span> <span class="p">[</span>
@@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
-<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
+<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
<p>We also have the option to set keybindings to toggle the appearance of the window. I’ve got this in my config.py now:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">"shift"</span><span class="p">],</span> <span class="s2">"Return"</span><span class="p">,</span>
@@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
rudimentary local scrobbling with bash
- http://localhost:1313/rudimentary-local-scrobbling-with-bash/
+ https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/
Tue, 13 Sep 2022 00:00:00 +0000
- http://localhost:1313/rudimentary-local-scrobbling-with-bash/
+ https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/<p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I’ll be talking specifically about my setup for recording the albums I’ve been listening to.</p>
<h3 id="lets-get-down-to-business">LET’S GET DOWN TO BUSINESS</h3>
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I’m playing the classic album Lemonade by Beyonce it would look like this:</p>
diff --git a/public/rudimentary-local-scrobbling-with-bash/index.html b/public/rudimentary-local-scrobbling-with-bash/index.html
index 82218a5..3dfe7b3 100644
--- a/public/rudimentary-local-scrobbling-with-bash/index.html
+++ b/public/rudimentary-local-scrobbling-with-bash/index.html
@@ -1,19 +1,17 @@
-
+
-
+
-
-
-
+
rudimentary local scrobbling with bash
-
diff --git a/public/tags/bash/index.xml b/public/tags/bash/index.xml
index 0f9d8e5..70cd1ab 100644
--- a/public/tags/bash/index.xml
+++ b/public/tags/bash/index.xml
@@ -2,22 +2,22 @@
Bash on James' Blog :-)
- http://localhost:1313/tags/bash/
+ https://nonsense.dymc.win/tags/bash/
Recent content in Bash on James' Blog :-)Hugo -- gohugo.ioen-GBSat, 10 Dec 2022 00:00:00 +0000
-
+ so you want to write a neovim plugin with lua
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/
Sat, 06 Apr 2024 00:00:00 +0000
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/<p>I’ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There’s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
making nix-colors talk to neovim
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/
Fri, 18 Aug 2023 00:00:00 +0000
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/<p>I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
@@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
vanilla javascript theme toggle for simpletons
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/
Mon, 26 Jun 2023 00:00:00 +0000
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/<p>Sometimes when I’m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I’ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you’re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
<h3 id="html">HTML</h3>
@@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
tailscale, caddy, and nixos containers - a match made in heaven
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
Tue, 16 May 2023 00:00:00 +0000
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/<p>For a little while now I’ve been running some services (jellyfin etc.) on an old laptop in my house. I’m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you’d have a reverse proxy and set up SSL certs so your browser doesn’t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
<h3 id="what-to-do">what to do?</h3>
@@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
learning about qtile widgets via the medium of cricket
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/
Mon, 03 Apr 2023 00:00:00 +0000
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/<p>I’m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I’m sure this will interest very few people but I learnt some good stuff along the way.</p>
<h3 id="hello-world">Hello World?!</h3>
@@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
theming nirvana
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/
Mon, 13 Mar 2023 00:00:00 +0000
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/<p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: ‘oh this is cool I can specify which desktop environment to use in my configuration.nix’. Next thing you know you’ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
<h3 id="how-to-make-it-work">how to make it work</h3>
@@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
translating docker to nix?!
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/
Tue, 28 Feb 2023 00:00:00 +0000
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/<p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can’t be beat. I’ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I’ve been playing around with the nixos approach to managing docker containers.</p>
<h3 id="nix---docker-compose---docker-run">nix -> docker compose -> docker run</h3>
<p>To illustrate how to translate a simple example from the world of docker to nix let’s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
@@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
simple nixos config for vps static site
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/
Sun, 29 Jan 2023 00:00:00 +0000
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/<p>Setting up a little static site is something I’ve done a few different times on a few different operating systems. It’s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let’s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
<p>I’m going to go through a bit of the nixos config I’ve got for my vps.</p>
<h3 id="ssh">SSH</h3>
@@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
podcast setup for broke boys whose trash phone cant hack modern apps
- http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
+ https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
Tue, 24 Jan 2023 00:00:00 +0000
- http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
+ https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/<p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been ‘podcast-player-hopping’ without success for the last couple of months trying to find something which doesn’t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
<ul>
<li>write python script to download podcasts</li>
@@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
elite bread dough for lazy boys
- http://localhost:1313/elite-bread-dough-for-lazy-boys/
+ https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/
Sun, 22 Jan 2023 00:00:00 +0000
- http://localhost:1313/elite-bread-dough-for-lazy-boys/
+ https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/<h3 id="ingredienti">INGREDIENTI</h3>
<ul>
<li>flour (ideally bread flour but if you don’t have it, it’s not the end of the world)</li>
@@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
multi user qtile fiddling
- http://localhost:1313/multi-user-qtile-fiddling/
+ https://nonsense.dymc.win/multi-user-qtile-fiddling/
Tue, 20 Dec 2022 00:00:00 +0000
- http://localhost:1313/multi-user-qtile-fiddling/
+ https://nonsense.dymc.win/multi-user-qtile-fiddling/<p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
<p>I basically just want the config to work out which computer it’’s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
@@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
teeny tiny bash fetch script
- http://localhost:1313/teeny-tiny-bash-fetch-script/
+ https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/
Sat, 10 Dec 2022 00:00:00 +0000
- http://localhost:1313/teeny-tiny-bash-fetch-script/
+ https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/<p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn’t really try that hard with the portability). I didn’t think much about performance; I’m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">"</span><span class="nv">$USER</span><span class="s2">"</span>
@@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">"</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
-<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
+<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
@@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
get the thoughts out of your head and into a digital format with this python journal script
- http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
+ https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
Thu, 01 Dec 2022 00:00:00 +0000
- http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
+ https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/<p>Since getting going with emacs I’ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I’m doing something with my text editor makes it a lot more palletable.</p>
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal’s features but allow you to use whatever editor you like with markdown.</p>
<h3 id="whats-the-time">WHAT’S THE TIME?</h3>
@@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
lowkey emacs setup
- http://localhost:1313/lowkey-emacs-setup/
+ https://nonsense.dymc.win/lowkey-emacs-setup/
Fri, 18 Nov 2022 00:00:00 +0000
- http://localhost:1313/lowkey-emacs-setup/
+ https://nonsense.dymc.win/lowkey-emacs-setup/<p>About a month ago I was a little bored and thought I’d give emacs a go. There’s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There’s also the quite jarring default theme which wasn’t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I’ve landed on a simple little setup that I’ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
<p>First things first, assuming you’re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
@@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">"M-c"</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
</span></span></code></pre></div><p>Here’s a little pic of the current setup :)</p>
-<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
+<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
@@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
setting up a lean mean hugo blogging theme
- http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/
+ https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/
Thu, 10 Nov 2022 00:00:00 +0000
- http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/
+ https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/<p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you’ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you’ve got a selection of mostly empty directories looking something like this.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
</span></span><span class="line"><span class="cl">├── archetypes
@@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
chess.com api and the continuing search for en passant checkmate
- http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
Tue, 08 Nov 2022 00:00:00 +0000
- http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/<p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
<ul>
<li>Parse this info for the pgn (portable game notation) of each game.</li>
@@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
</span></span></code></pre></div><p>Now a pgn looks something like this if it’s just printed as a string:</p>
-<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
+<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'e4'</span><span class="p">,</span> <span class="s1">'e5'</span><span class="p">,</span> <span class="s1">'Bc4'</span><span class="p">,</span> <span class="s1">'Nc6'</span><span class="p">,</span> <span class="s1">'Qh5'</span><span class="p">,</span> <span class="s1">'Nf6'</span><span class="p">,</span> <span class="s1">'Qxf7#'</span><span class="p">]</span>
</span></span></code></pre></div><p>We don’t need the headers, we don’t need the result, and we don’t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
@@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
chess.com api and the search for en passant checkmate
- http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/
Wed, 26 Oct 2022 00:00:00 +0000
- http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/<p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn’t think of any obvious way to get completely random players on the site, I used the API’s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
@@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="s1">'https://api.chess.com/pub/titled/WGM'</span>
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here’s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
-<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
+<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
@@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
declarative firefox config with home-manager on nixos
- http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/
+ https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/
Sun, 02 Oct 2022 00:00:00 +0000
- http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/
+ https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/<p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber’s templates to be very helpful.</p>
<p>First of all you’ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
<h3 id="extensions">EXTENSIONS</h3>
@@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
upgrade your qtile setup with a cute dropdown terminal
- http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
+ https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
Fri, 23 Sep 2022 00:00:00 +0000
- http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
+ https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/<p>I didn’t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
</span></span><span class="line"><span class="cl">
@@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
-<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
+<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">"scratchpad"</span><span class="p">,</span> <span class="p">[</span>
@@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
-<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
+<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
<p>We also have the option to set keybindings to toggle the appearance of the window. I’ve got this in my config.py now:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">"shift"</span><span class="p">],</span> <span class="s2">"Return"</span><span class="p">,</span>
@@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
rudimentary local scrobbling with bash
- http://localhost:1313/rudimentary-local-scrobbling-with-bash/
+ https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/
Tue, 13 Sep 2022 00:00:00 +0000
- http://localhost:1313/rudimentary-local-scrobbling-with-bash/
+ https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/<p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I’ll be talking specifically about my setup for recording the albums I’ve been listening to.</p>
<h3 id="lets-get-down-to-business">LET’S GET DOWN TO BUSINESS</h3>
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I’m playing the classic album Lemonade by Beyonce it would look like this:</p>
diff --git a/public/tags/caddy/index.html b/public/tags/caddy/index.html
index 1e8921b..bdc063e 100644
--- a/public/tags/caddy/index.html
+++ b/public/tags/caddy/index.html
@@ -1,20 +1,18 @@
-
+
-
-
+
+
-
-
-
+
Caddy
-
diff --git a/public/tags/caddy/index.xml b/public/tags/caddy/index.xml
index 110b0ef..e44309d 100644
--- a/public/tags/caddy/index.xml
+++ b/public/tags/caddy/index.xml
@@ -2,22 +2,22 @@
Caddy on James' Blog :-)
- http://localhost:1313/tags/caddy/
+ https://nonsense.dymc.win/tags/caddy/
Recent content in Caddy on James' Blog :-)Hugo -- gohugo.ioen-GBTue, 16 May 2023 00:00:00 +0000
-
+ so you want to write a neovim plugin with lua
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/
Sat, 06 Apr 2024 00:00:00 +0000
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/<p>I’ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There’s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
making nix-colors talk to neovim
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/
Fri, 18 Aug 2023 00:00:00 +0000
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/<p>I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
@@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
vanilla javascript theme toggle for simpletons
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/
Mon, 26 Jun 2023 00:00:00 +0000
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/<p>Sometimes when I’m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I’ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you’re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
<h3 id="html">HTML</h3>
@@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
tailscale, caddy, and nixos containers - a match made in heaven
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
Tue, 16 May 2023 00:00:00 +0000
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/<p>For a little while now I’ve been running some services (jellyfin etc.) on an old laptop in my house. I’m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you’d have a reverse proxy and set up SSL certs so your browser doesn’t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
<h3 id="what-to-do">what to do?</h3>
@@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
learning about qtile widgets via the medium of cricket
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/
Mon, 03 Apr 2023 00:00:00 +0000
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/<p>I’m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I’m sure this will interest very few people but I learnt some good stuff along the way.</p>
<h3 id="hello-world">Hello World?!</h3>
@@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
theming nirvana
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/
Mon, 13 Mar 2023 00:00:00 +0000
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/<p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: ‘oh this is cool I can specify which desktop environment to use in my configuration.nix’. Next thing you know you’ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
<h3 id="how-to-make-it-work">how to make it work</h3>
@@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
translating docker to nix?!
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/
Tue, 28 Feb 2023 00:00:00 +0000
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/<p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can’t be beat. I’ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I’ve been playing around with the nixos approach to managing docker containers.</p>
<h3 id="nix---docker-compose---docker-run">nix -> docker compose -> docker run</h3>
<p>To illustrate how to translate a simple example from the world of docker to nix let’s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
@@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
simple nixos config for vps static site
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/
Sun, 29 Jan 2023 00:00:00 +0000
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/<p>Setting up a little static site is something I’ve done a few different times on a few different operating systems. It’s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let’s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
<p>I’m going to go through a bit of the nixos config I’ve got for my vps.</p>
<h3 id="ssh">SSH</h3>
@@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
podcast setup for broke boys whose trash phone cant hack modern apps
- http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
+ https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
Tue, 24 Jan 2023 00:00:00 +0000
- http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
+ https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/<p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been ‘podcast-player-hopping’ without success for the last couple of months trying to find something which doesn’t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
<ul>
<li>write python script to download podcasts</li>
@@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
elite bread dough for lazy boys
- http://localhost:1313/elite-bread-dough-for-lazy-boys/
+ https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/
Sun, 22 Jan 2023 00:00:00 +0000
- http://localhost:1313/elite-bread-dough-for-lazy-boys/
+ https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/<h3 id="ingredienti">INGREDIENTI</h3>
<ul>
<li>flour (ideally bread flour but if you don’t have it, it’s not the end of the world)</li>
@@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
multi user qtile fiddling
- http://localhost:1313/multi-user-qtile-fiddling/
+ https://nonsense.dymc.win/multi-user-qtile-fiddling/
Tue, 20 Dec 2022 00:00:00 +0000
- http://localhost:1313/multi-user-qtile-fiddling/
+ https://nonsense.dymc.win/multi-user-qtile-fiddling/<p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
<p>I basically just want the config to work out which computer it’’s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
@@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
teeny tiny bash fetch script
- http://localhost:1313/teeny-tiny-bash-fetch-script/
+ https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/
Sat, 10 Dec 2022 00:00:00 +0000
- http://localhost:1313/teeny-tiny-bash-fetch-script/
+ https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/<p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn’t really try that hard with the portability). I didn’t think much about performance; I’m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">"</span><span class="nv">$USER</span><span class="s2">"</span>
@@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">"</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
-<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
+<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
@@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
get the thoughts out of your head and into a digital format with this python journal script
- http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
+ https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
Thu, 01 Dec 2022 00:00:00 +0000
- http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
+ https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/<p>Since getting going with emacs I’ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I’m doing something with my text editor makes it a lot more palletable.</p>
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal’s features but allow you to use whatever editor you like with markdown.</p>
<h3 id="whats-the-time">WHAT’S THE TIME?</h3>
@@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
lowkey emacs setup
- http://localhost:1313/lowkey-emacs-setup/
+ https://nonsense.dymc.win/lowkey-emacs-setup/
Fri, 18 Nov 2022 00:00:00 +0000
- http://localhost:1313/lowkey-emacs-setup/
+ https://nonsense.dymc.win/lowkey-emacs-setup/<p>About a month ago I was a little bored and thought I’d give emacs a go. There’s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There’s also the quite jarring default theme which wasn’t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I’ve landed on a simple little setup that I’ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
<p>First things first, assuming you’re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
@@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">"M-c"</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
</span></span></code></pre></div><p>Here’s a little pic of the current setup :)</p>
-<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
+<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
@@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
setting up a lean mean hugo blogging theme
- http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/
+ https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/
Thu, 10 Nov 2022 00:00:00 +0000
- http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/
+ https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/<p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you’ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you’ve got a selection of mostly empty directories looking something like this.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
</span></span><span class="line"><span class="cl">├── archetypes
@@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
chess.com api and the continuing search for en passant checkmate
- http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
Tue, 08 Nov 2022 00:00:00 +0000
- http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/<p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
<ul>
<li>Parse this info for the pgn (portable game notation) of each game.</li>
@@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
</span></span></code></pre></div><p>Now a pgn looks something like this if it’s just printed as a string:</p>
-<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
+<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'e4'</span><span class="p">,</span> <span class="s1">'e5'</span><span class="p">,</span> <span class="s1">'Bc4'</span><span class="p">,</span> <span class="s1">'Nc6'</span><span class="p">,</span> <span class="s1">'Qh5'</span><span class="p">,</span> <span class="s1">'Nf6'</span><span class="p">,</span> <span class="s1">'Qxf7#'</span><span class="p">]</span>
</span></span></code></pre></div><p>We don’t need the headers, we don’t need the result, and we don’t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
@@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
chess.com api and the search for en passant checkmate
- http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/
Wed, 26 Oct 2022 00:00:00 +0000
- http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/<p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn’t think of any obvious way to get completely random players on the site, I used the API’s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
@@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="s1">'https://api.chess.com/pub/titled/WGM'</span>
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here’s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
-<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
+<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
@@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
declarative firefox config with home-manager on nixos
- http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/
+ https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/
Sun, 02 Oct 2022 00:00:00 +0000
- http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/
+ https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/<p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber’s templates to be very helpful.</p>
<p>First of all you’ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
<h3 id="extensions">EXTENSIONS</h3>
@@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
upgrade your qtile setup with a cute dropdown terminal
- http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
+ https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
Fri, 23 Sep 2022 00:00:00 +0000
- http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
+ https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/<p>I didn’t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
</span></span><span class="line"><span class="cl">
@@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
-<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
+<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">"scratchpad"</span><span class="p">,</span> <span class="p">[</span>
@@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
-<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
+<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
<p>We also have the option to set keybindings to toggle the appearance of the window. I’ve got this in my config.py now:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">"shift"</span><span class="p">],</span> <span class="s2">"Return"</span><span class="p">,</span>
@@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
rudimentary local scrobbling with bash
- http://localhost:1313/rudimentary-local-scrobbling-with-bash/
+ https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/
Tue, 13 Sep 2022 00:00:00 +0000
- http://localhost:1313/rudimentary-local-scrobbling-with-bash/
+ https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/<p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I’ll be talking specifically about my setup for recording the albums I’ve been listening to.</p>
<h3 id="lets-get-down-to-business">LET’S GET DOWN TO BUSINESS</h3>
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I’m playing the classic album Lemonade by Beyonce it would look like this:</p>
diff --git a/public/tags/chess/index.html b/public/tags/chess/index.html
index 717d9d6..60cdd97 100644
--- a/public/tags/chess/index.html
+++ b/public/tags/chess/index.html
@@ -1,20 +1,18 @@
-
+
-
-
+
+
-
-
-
+
Chess
-
diff --git a/public/tags/chess/index.xml b/public/tags/chess/index.xml
index 89baed2..0b91b1b 100644
--- a/public/tags/chess/index.xml
+++ b/public/tags/chess/index.xml
@@ -2,22 +2,22 @@
Chess on James' Blog :-)
- http://localhost:1313/tags/chess/
+ https://nonsense.dymc.win/tags/chess/
Recent content in Chess on James' Blog :-)Hugo -- gohugo.ioen-GBTue, 08 Nov 2022 00:00:00 +0000
-
+ so you want to write a neovim plugin with lua
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/
Sat, 06 Apr 2024 00:00:00 +0000
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/<p>I’ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There’s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
making nix-colors talk to neovim
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/
Fri, 18 Aug 2023 00:00:00 +0000
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/<p>I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
@@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
vanilla javascript theme toggle for simpletons
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/
Mon, 26 Jun 2023 00:00:00 +0000
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/<p>Sometimes when I’m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I’ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you’re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
<h3 id="html">HTML</h3>
@@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
tailscale, caddy, and nixos containers - a match made in heaven
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
Tue, 16 May 2023 00:00:00 +0000
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/<p>For a little while now I’ve been running some services (jellyfin etc.) on an old laptop in my house. I’m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you’d have a reverse proxy and set up SSL certs so your browser doesn’t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
<h3 id="what-to-do">what to do?</h3>
@@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
learning about qtile widgets via the medium of cricket
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/
Mon, 03 Apr 2023 00:00:00 +0000
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/<p>I’m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I’m sure this will interest very few people but I learnt some good stuff along the way.</p>
<h3 id="hello-world">Hello World?!</h3>
@@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
theming nirvana
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/
Mon, 13 Mar 2023 00:00:00 +0000
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/<p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: ‘oh this is cool I can specify which desktop environment to use in my configuration.nix’. Next thing you know you’ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
<h3 id="how-to-make-it-work">how to make it work</h3>
@@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
translating docker to nix?!
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/
Tue, 28 Feb 2023 00:00:00 +0000
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/<p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can’t be beat. I’ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I’ve been playing around with the nixos approach to managing docker containers.</p>
<h3 id="nix---docker-compose---docker-run">nix -> docker compose -> docker run</h3>
<p>To illustrate how to translate a simple example from the world of docker to nix let’s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
@@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
simple nixos config for vps static site
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/
Sun, 29 Jan 2023 00:00:00 +0000
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/<p>Setting up a little static site is something I’ve done a few different times on a few different operating systems. It’s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let’s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
<p>I’m going to go through a bit of the nixos config I’ve got for my vps.</p>
<h3 id="ssh">SSH</h3>
@@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
podcast setup for broke boys whose trash phone cant hack modern apps
- http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
+ https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
Tue, 24 Jan 2023 00:00:00 +0000
- http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
+ https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/<p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been ‘podcast-player-hopping’ without success for the last couple of months trying to find something which doesn’t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
<ul>
<li>write python script to download podcasts</li>
@@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
elite bread dough for lazy boys
- http://localhost:1313/elite-bread-dough-for-lazy-boys/
+ https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/
Sun, 22 Jan 2023 00:00:00 +0000
- http://localhost:1313/elite-bread-dough-for-lazy-boys/
+ https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/<h3 id="ingredienti">INGREDIENTI</h3>
<ul>
<li>flour (ideally bread flour but if you don’t have it, it’s not the end of the world)</li>
@@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
multi user qtile fiddling
- http://localhost:1313/multi-user-qtile-fiddling/
+ https://nonsense.dymc.win/multi-user-qtile-fiddling/
Tue, 20 Dec 2022 00:00:00 +0000
- http://localhost:1313/multi-user-qtile-fiddling/
+ https://nonsense.dymc.win/multi-user-qtile-fiddling/<p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
<p>I basically just want the config to work out which computer it’’s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
@@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
teeny tiny bash fetch script
- http://localhost:1313/teeny-tiny-bash-fetch-script/
+ https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/
Sat, 10 Dec 2022 00:00:00 +0000
- http://localhost:1313/teeny-tiny-bash-fetch-script/
+ https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/<p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn’t really try that hard with the portability). I didn’t think much about performance; I’m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">"</span><span class="nv">$USER</span><span class="s2">"</span>
@@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">"</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
-<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
+<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
@@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
get the thoughts out of your head and into a digital format with this python journal script
- http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
+ https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
Thu, 01 Dec 2022 00:00:00 +0000
- http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
+ https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/<p>Since getting going with emacs I’ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I’m doing something with my text editor makes it a lot more palletable.</p>
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal’s features but allow you to use whatever editor you like with markdown.</p>
<h3 id="whats-the-time">WHAT’S THE TIME?</h3>
@@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
lowkey emacs setup
- http://localhost:1313/lowkey-emacs-setup/
+ https://nonsense.dymc.win/lowkey-emacs-setup/
Fri, 18 Nov 2022 00:00:00 +0000
- http://localhost:1313/lowkey-emacs-setup/
+ https://nonsense.dymc.win/lowkey-emacs-setup/<p>About a month ago I was a little bored and thought I’d give emacs a go. There’s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There’s also the quite jarring default theme which wasn’t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I’ve landed on a simple little setup that I’ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
<p>First things first, assuming you’re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
@@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">"M-c"</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
</span></span></code></pre></div><p>Here’s a little pic of the current setup :)</p>
-<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
+<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
@@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
setting up a lean mean hugo blogging theme
- http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/
+ https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/
Thu, 10 Nov 2022 00:00:00 +0000
- http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/
+ https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/<p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you’ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you’ve got a selection of mostly empty directories looking something like this.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
</span></span><span class="line"><span class="cl">├── archetypes
@@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
chess.com api and the continuing search for en passant checkmate
- http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
Tue, 08 Nov 2022 00:00:00 +0000
- http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/<p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
<ul>
<li>Parse this info for the pgn (portable game notation) of each game.</li>
@@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
</span></span></code></pre></div><p>Now a pgn looks something like this if it’s just printed as a string:</p>
-<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
+<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'e4'</span><span class="p">,</span> <span class="s1">'e5'</span><span class="p">,</span> <span class="s1">'Bc4'</span><span class="p">,</span> <span class="s1">'Nc6'</span><span class="p">,</span> <span class="s1">'Qh5'</span><span class="p">,</span> <span class="s1">'Nf6'</span><span class="p">,</span> <span class="s1">'Qxf7#'</span><span class="p">]</span>
</span></span></code></pre></div><p>We don’t need the headers, we don’t need the result, and we don’t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
@@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
chess.com api and the search for en passant checkmate
- http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/
Wed, 26 Oct 2022 00:00:00 +0000
- http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/<p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn’t think of any obvious way to get completely random players on the site, I used the API’s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
@@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="s1">'https://api.chess.com/pub/titled/WGM'</span>
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here’s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
-<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
+<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
@@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
declarative firefox config with home-manager on nixos
- http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/
+ https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/
Sun, 02 Oct 2022 00:00:00 +0000
- http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/
+ https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/<p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber’s templates to be very helpful.</p>
<p>First of all you’ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
<h3 id="extensions">EXTENSIONS</h3>
@@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
upgrade your qtile setup with a cute dropdown terminal
- http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
+ https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
Fri, 23 Sep 2022 00:00:00 +0000
- http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
+ https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/<p>I didn’t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
</span></span><span class="line"><span class="cl">
@@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
-<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
+<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">"scratchpad"</span><span class="p">,</span> <span class="p">[</span>
@@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
-<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
+<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
<p>We also have the option to set keybindings to toggle the appearance of the window. I’ve got this in my config.py now:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">"shift"</span><span class="p">],</span> <span class="s2">"Return"</span><span class="p">,</span>
@@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
rudimentary local scrobbling with bash
- http://localhost:1313/rudimentary-local-scrobbling-with-bash/
+ https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/
Tue, 13 Sep 2022 00:00:00 +0000
- http://localhost:1313/rudimentary-local-scrobbling-with-bash/
+ https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/<p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I’ll be talking specifically about my setup for recording the albums I’ve been listening to.</p>
<h3 id="lets-get-down-to-business">LET’S GET DOWN TO BUSINESS</h3>
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I’m playing the classic album Lemonade by Beyonce it would look like this:</p>
diff --git a/public/tags/cooking/index.html b/public/tags/cooking/index.html
index 5c88ec2..acb2d06 100644
--- a/public/tags/cooking/index.html
+++ b/public/tags/cooking/index.html
@@ -1,20 +1,18 @@
-
+
-
-
+
+
-
-
-
+
Cooking
-
diff --git a/public/tags/cooking/index.xml b/public/tags/cooking/index.xml
index 41e910b..e095db4 100644
--- a/public/tags/cooking/index.xml
+++ b/public/tags/cooking/index.xml
@@ -2,22 +2,22 @@
Cooking on James' Blog :-)
- http://localhost:1313/tags/cooking/
+ https://nonsense.dymc.win/tags/cooking/
Recent content in Cooking on James' Blog :-)Hugo -- gohugo.ioen-GBSun, 22 Jan 2023 00:00:00 +0000
-
+ so you want to write a neovim plugin with lua
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/
Sat, 06 Apr 2024 00:00:00 +0000
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/<p>I’ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There’s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
making nix-colors talk to neovim
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/
Fri, 18 Aug 2023 00:00:00 +0000
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/<p>I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
@@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
vanilla javascript theme toggle for simpletons
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/
Mon, 26 Jun 2023 00:00:00 +0000
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/<p>Sometimes when I’m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I’ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you’re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
<h3 id="html">HTML</h3>
@@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
tailscale, caddy, and nixos containers - a match made in heaven
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
Tue, 16 May 2023 00:00:00 +0000
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/<p>For a little while now I’ve been running some services (jellyfin etc.) on an old laptop in my house. I’m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you’d have a reverse proxy and set up SSL certs so your browser doesn’t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
<h3 id="what-to-do">what to do?</h3>
@@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
learning about qtile widgets via the medium of cricket
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/
Mon, 03 Apr 2023 00:00:00 +0000
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/<p>I’m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I’m sure this will interest very few people but I learnt some good stuff along the way.</p>
<h3 id="hello-world">Hello World?!</h3>
@@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
theming nirvana
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/
Mon, 13 Mar 2023 00:00:00 +0000
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/<p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: ‘oh this is cool I can specify which desktop environment to use in my configuration.nix’. Next thing you know you’ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
<h3 id="how-to-make-it-work">how to make it work</h3>
@@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
translating docker to nix?!
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/
Tue, 28 Feb 2023 00:00:00 +0000
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/<p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can’t be beat. I’ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I’ve been playing around with the nixos approach to managing docker containers.</p>
<h3 id="nix---docker-compose---docker-run">nix -> docker compose -> docker run</h3>
<p>To illustrate how to translate a simple example from the world of docker to nix let’s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
@@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
simple nixos config for vps static site
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/
Sun, 29 Jan 2023 00:00:00 +0000
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/<p>Setting up a little static site is something I’ve done a few different times on a few different operating systems. It’s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let’s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
<p>I’m going to go through a bit of the nixos config I’ve got for my vps.</p>
<h3 id="ssh">SSH</h3>
@@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th
podcast setup for broke boys whose trash phone cant hack modern apps
- http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
+ https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
Tue, 24 Jan 2023 00:00:00 +0000
- http://localhost:1313/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/
+ https://nonsense.dymc.win/podcast-setup-for-broke-boys-whose-trash-phone-cant-hack-modern-apps/<p>I have an old sad android phone with 2GB of ram which nowadays seems to struggle with anything but the most lightweight apps. As a result of this I have been ‘podcast-player-hopping’ without success for the last couple of months trying to find something which doesn’t nuke my phone whenever I use it. In a moment of desperation it occured to me that a creative solution might be required. The gameplan was this:</p>
<ul>
<li>write python script to download podcasts</li>
@@ -718,10 +718,10 @@ After moving across most of my stuff I came across the problem of how to hook th
elite bread dough for lazy boys
- http://localhost:1313/elite-bread-dough-for-lazy-boys/
+ https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/
Sun, 22 Jan 2023 00:00:00 +0000
- http://localhost:1313/elite-bread-dough-for-lazy-boys/
+ https://nonsense.dymc.win/elite-bread-dough-for-lazy-boys/<h3 id="ingredienti">INGREDIENTI</h3>
<ul>
<li>flour (ideally bread flour but if you don’t have it, it’s not the end of the world)</li>
@@ -764,10 +764,10 @@ After moving across most of my stuff I came across the problem of how to hook th
multi user qtile fiddling
- http://localhost:1313/multi-user-qtile-fiddling/
+ https://nonsense.dymc.win/multi-user-qtile-fiddling/
Tue, 20 Dec 2022 00:00:00 +0000
- http://localhost:1313/multi-user-qtile-fiddling/
+ https://nonsense.dymc.win/multi-user-qtile-fiddling/<p>This post is going to detail how I solved a very particular problem I had created for myself. First, a quick description of the problem. I use home-manager on nixos to declaratively configure what happens on my computer. In the cases where home-manager does not expose sufficient configuration options for my liking (qtile for example), I instead link a configuration file from my nixos config to where it belongs in my home using <code>xdg.configFile</code>. This is what I do with my qtile <code>config.py</code>. I use qtile on my desktop and laptop but I dont want an identical setup on the two machines. I have jumped through many different slightly silly hoops in my nixos config sort of solving this problem until the other day it occured to me this could all be achieved with my python in my qtile config.</p>
<h3 id="the-nub-of-the-problem">THE NUB OF THE PROBLEM</h3>
<p>I basically just want the config to work out which computer it’’s on and then change some things accordingly. This can be achieved by getting the hostname with the socket module:</p>
@@ -844,10 +844,10 @@ After moving across most of my stuff I came across the problem of how to hook th
teeny tiny bash fetch script
- http://localhost:1313/teeny-tiny-bash-fetch-script/
+ https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/
Sat, 10 Dec 2022 00:00:00 +0000
- http://localhost:1313/teeny-tiny-bash-fetch-script/
+ https://nonsense.dymc.win/teeny-tiny-bash-fetch-script/<p>This is my attempt at a neofetch, pfetch, whateverfetch style system info utility. My main concern was making something which looked nice, was easily configurable, and as portable as possible (I didn’t really try that hard with the portability). I didn’t think much about performance; I’m personally not a man who stresses too much when a command takes a quarter of a second instead of a tenth. The basic gameplan was to get an array of bash commands which would fetch various bits and bobs, then loop through this array formatting the text with ANSI escape codes. First things first, this was the associative array I came up with:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">declare</span> -A <span class="nv">fetch</span><span class="o">=(</span>
</span></span><span class="line"><span class="cl"> <span class="o">[</span>user<span class="o">]=</span><span class="s2">"</span><span class="nv">$USER</span><span class="s2">"</span>
@@ -916,7 +916,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="nb">echo</span> -e <span class="s2">"</span><span class="k">$(</span>random_color<span class="k">)</span><span class="s2"> \e[0;1;3m</span><span class="nv">$info</span><span class="s2">\e[0m</span><span class="si">${</span><span class="nv">sep</span><span class="si">}${</span><span class="nv">fetch</span><span class="p">[</span><span class="nv">$info</span><span class="p">]</span><span class="si">}</span><span class="s2">"</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span></code></pre></div><p>This had the happy unintended consequence of allowing you to very easily configure which items you wanted in the fetch by simply commenting out keys from the order array. You can check out the script in its entirety <a href="https://gitlab.com/robbygozzarder/golazo">here</a>. This is a pretty picture of a few variations.</p>
-<p><img src="http://localhost:1313/image/golazo.png" alt="golazo"></p>
+<p><img src="https://nonsense.dymc.win/image/golazo.png" alt="golazo"></p>
@@ -924,10 +924,10 @@ After moving across most of my stuff I came across the problem of how to hook th
get the thoughts out of your head and into a digital format with this python journal script
- http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
+ https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
Thu, 01 Dec 2022 00:00:00 +0000
- http://localhost:1313/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/
+ https://nonsense.dymc.win/get-the-thoughts-out-of-your-head-and-into-a-digital-format-with-this-python-journal-script/<p>Since getting going with emacs I’ve gone down the org-mode rabbit hole a little bit. In particular the very nice <a href="https://github.com/bastibe/org-journal">org-journal</a> package. It basically does what it says on the tin: maintains a journal with a selection of org files. This has been very nice for me. I have often thought about journalling but never really got up a head of steam. Somehow having an entry a keybinding away while I’m doing something with my text editor makes it a lot more palletable.</p>
<p>Having said all this, I am not completely converted to the church of emacs. Thus, I thoght it would be nice to write a little editor agnostic script which would emulate some of org-journal’s features but allow you to use whatever editor you like with markdown.</p>
<h3 id="whats-the-time">WHAT’S THE TIME?</h3>
@@ -988,10 +988,10 @@ After moving across most of my stuff I came across the problem of how to hook th
lowkey emacs setup
- http://localhost:1313/lowkey-emacs-setup/
+ https://nonsense.dymc.win/lowkey-emacs-setup/
Fri, 18 Nov 2022 00:00:00 +0000
- http://localhost:1313/lowkey-emacs-setup/
+ https://nonsense.dymc.win/lowkey-emacs-setup/<p>About a month ago I was a little bored and thought I’d give emacs a go. There’s something fun about trying out these mythical pieces of software that have been around forever; kind of like watching The Godfather for the first time. Like many extensible, super configurable programs, emacs seems kind of impenetrable at first glance. I tried doing the tutorial but kind of glazed over after a while with the endless stream of C-a C-b C-c. There’s also the quite jarring default theme which wasn’t vibing with the lovely screenshots I had seen on the internet. Anyway, after quite a bit of fiddling I’ve landed on a simple little setup that I’ve been quite enjoying. Here are a few little pointers to hopefully ease you in.</p>
<h3 id="aesthetic-niceties">AESTHETIC NICETIES</h3>
<p>First things first, assuming you’re on linux emacs is configured with a file at <code>~/.emacs.d/init.el</code>. As a terrible aesthete, the first thing I was worried about was changing the theme. This can be achieved with <code>M-x load-theme</code>; if you want the setting to persist though you can add this to you init.el:</p>
@@ -1064,7 +1064,7 @@ After moving across most of my stuff I came across the problem of how to hook th
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">use-package</span> <span class="nv">smart-comment</span>
</span></span><span class="line"><span class="cl"> <span class="ss">:bind</span> <span class="p">(</span><span class="s">"M-c"</span> <span class="o">.</span> <span class="nv">smart-comment</span><span class="p">))</span>
</span></span></code></pre></div><p>Here’s a little pic of the current setup :)</p>
-<p><img src="http://localhost:1313/image/emacs.png" alt="emacs"></p>
+<p><img src="https://nonsense.dymc.win/image/emacs.png" alt="emacs"></p>
@@ -1072,10 +1072,10 @@ After moving across most of my stuff I came across the problem of how to hook th
setting up a lean mean hugo blogging theme
- http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/
+ https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/
Thu, 10 Nov 2022 00:00:00 +0000
- http://localhost:1313/setting-up-a-lean-mean-hugo-blogging-theme/
+ https://nonsense.dymc.win/setting-up-a-lean-mean-hugo-blogging-theme/<p>When I first started messing around with hugo, I found the whole thing slihtly mystifying. I downloaded a theme like they asked me, edited the config file to try and customise things a little and quickly broke everything. To be fair, this was mainly due to my tinkering instinct to fly to close to the sun. But anyway, the point at which I started to really appreciate the power of hugo was when I tried to make my own - admittedly less feautureful - theme. This selection of tips and tricks will assume that you’ve just run something like <code>hugo new site lovely-new-website</code>, entered the new directory with <code>cd lovely-new-website</code> and you’ve got a selection of mostly empty directories looking something like this.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">.
</span></span><span class="line"><span class="cl">├── archetypes
@@ -1158,10 +1158,10 @@ After moving across most of my stuff I came across the problem of how to hook th
chess.com api and the continuing search for en passant checkmate
- http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
Tue, 08 Nov 2022 00:00:00 +0000
- http://localhost:1313/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-continuing-search-for-en-passant-checkmate/<p>Last time we worked out how to get info for all the games played by titled players in a particular month. Today, we have three objectives:</p>
<ul>
<li>Parse this info for the pgn (portable game notation) of each game.</li>
@@ -1184,7 +1184,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="k">for</span> <span class="n">pgn</span> <span class="ow">in</span> <span class="n">pgns</span><span class="p">:</span>
</span></span><span class="line"><span class="cl"> <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">pgn</span><span class="p">)</span>
</span></span></code></pre></div><p>Now a pgn looks something like this if it’s just printed as a string:</p>
-<p><img src="http://localhost:1313/image/pgn.webp" alt="image alt text"></p>
+<p><img src="https://nonsense.dymc.win/image/pgn.webp" alt="image alt text"></p>
<p>It contains lots of very useful info but for our purposes of finding en passant checkmates, we would ideally just have a list of each move looking something like this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">moves</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'e4'</span><span class="p">,</span> <span class="s1">'e5'</span><span class="p">,</span> <span class="s1">'Bc4'</span><span class="p">,</span> <span class="s1">'Nc6'</span><span class="p">,</span> <span class="s1">'Qh5'</span><span class="p">,</span> <span class="s1">'Nf6'</span><span class="p">,</span> <span class="s1">'Qxf7#'</span><span class="p">]</span>
</span></span></code></pre></div><p>We don’t need the headers, we don’t need the result, and we don’t really need the move numbers (these can be deduced from the list indexes). So the challenge is how to convert the pgn to a list; this is the slightly janky solution I came up wtih.</p>
@@ -1213,10 +1213,10 @@ After moving across most of my stuff I came across the problem of how to hook th
chess.com api and the search for en passant checkmate
- http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/
Wed, 26 Oct 2022 00:00:00 +0000
- http://localhost:1313/chess.com-api-and-the-search-for-en-passant-checkmate/
+ https://nonsense.dymc.win/chess.com-api-and-the-search-for-en-passant-checkmate/<p>The chess.com API gives you access to a crazy amount of data on games played on the site. Armed with the knowledge that this data was at my fingertips, I set out to do what any sane person would do: find en passant checkmates. For those not in the know, en passant check mate is kind of the king of moves in chess meme circles. So some sort of python script that identified en passant check mates that occured on the site would be of great value to me.</p>
<p>First things first, I would need a method of grabbing lots of games from the api. This would be achieved by looking at players on the site and searching their game archives. As I couldn’t think of any obvious way to get completely random players on the site, I used the API’s lists of all titled players (GM, IM, WIM, etc.) on the site. This is what I came up with -></p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"> <span class="k">def</span> <span class="nf">get_archive_urls</span><span class="p">(</span><span class="n">titled_urls</span><span class="p">):</span>
@@ -1251,7 +1251,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="s1">'https://api.chess.com/pub/titled/WGM'</span>
</span></span><span class="line"><span class="cl"> <span class="p">]))</span>
</span></span></code></pre></div><p>We get a very long list of json objects (is that the right phrase? um). Each corresponding to one of games played by GMs and WGMs on chess.com during May of 2022. Come back next time to see what we can do with this very long list. Here’s a taster of what the list looks like printed to a terminal - lots of possiblities.</p>
-<p><img src="http://localhost:1313/image/output.webp" alt="image alt text"></p>
+<p><img src="https://nonsense.dymc.win/image/output.webp" alt="image alt text"></p>
@@ -1259,10 +1259,10 @@ After moving across most of my stuff I came across the problem of how to hook th
declarative firefox config with home-manager on nixos
- http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/
+ https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/
Sun, 02 Oct 2022 00:00:00 +0000
- http://localhost:1313/declarative-firefox-config-with-home-manager-on-nixos/
+ https://nonsense.dymc.win/declarative-firefox-config-with-home-manager-on-nixos/<p>As a man who finds himself reinstalling his OS more than is probably sensible, any opportunity to minimise the post install admin of sorting out all your settings is an attractive one. With that in mind lets take a look at some of the firefox (my current browser of choice) configuration options avilable to you through home-manager. This assumes you have some sort of home-manager setup working. If you do not I found <a href="https://github.com/misterio77/nix-starter-configs">this</a> friendly githubber’s templates to be very helpful.</p>
<p>First of all you’ll need to enable firefox with <code>programs.firefox.enable = true;</code></p>
<h3 id="extensions">EXTENSIONS</h3>
@@ -1325,10 +1325,10 @@ After moving across most of my stuff I came across the problem of how to hook th
upgrade your qtile setup with a cute dropdown terminal
- http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
+ https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
Fri, 23 Sep 2022 00:00:00 +0000
- http://localhost:1313/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/
+ https://nonsense.dymc.win/upgrade-your-qtile-setup-with-a-cute-dropdown-terminal/<p>I didn’t know you could do this until recently, very fun and playful little feature. How you want to do it will depend slightly on how you have your groups set up but I start with importing the relevant libraries and defining an empty list.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">libqtile.config</span> <span class="kn">import</span> <span class="n">Dropdown</span><span class="p">,</span> <span class="n">Scratchpad</span>
</span></span><span class="line"><span class="cl">
@@ -1345,7 +1345,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="p">),</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span></code></pre></div><p>This gives you a terminal (kitty in this case) with a little tranparency. By default, it will pop up with this size:</p>
-<p><img src="http://localhost:1313/image/dropdown.webp" alt="alt"></p>
+<p><img src="https://nonsense.dymc.win/image/dropdown.webp" alt="alt"></p>
<p>Though this can easily be altered with the x, y, height, and width keys:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
</span></span><span class="line"><span class="cl"> <span class="n">ScratchPad</span><span class="p">(</span><span class="s2">"scratchpad"</span><span class="p">,</span> <span class="p">[</span>
@@ -1361,7 +1361,7 @@ After moving across most of my stuff I came across the problem of how to hook th
</span></span><span class="line"><span class="cl"> <span class="p">])</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span></code></pre></div><p>This gives us a little boxy guy in the top left corner:</p>
-<p><img src="http://localhost:1313/image/dropdown2.webp" alt="alt"></p>
+<p><img src="https://nonsense.dymc.win/image/dropdown2.webp" alt="alt"></p>
<p>We also have the option to set keybindings to toggle the appearance of the window. I’ve got this in my config.py now:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">keys</span> <span class="o">=</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl"> <span class="n">Key</span><span class="p">([</span><span class="n">m</span><span class="p">,</span> <span class="s2">"shift"</span><span class="p">],</span> <span class="s2">"Return"</span><span class="p">,</span>
@@ -1377,10 +1377,10 @@ After moving across most of my stuff I came across the problem of how to hook th
rudimentary local scrobbling with bash
- http://localhost:1313/rudimentary-local-scrobbling-with-bash/
+ https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/
Tue, 13 Sep 2022 00:00:00 +0000
- http://localhost:1313/rudimentary-local-scrobbling-with-bash/
+ https://nonsense.dymc.win/rudimentary-local-scrobbling-with-bash/<p>There are lots of music players on linux. I have used lots of them, I quite like some of them. But for some reason I decided I wanted more. With this in mind, over the past few months I have been constructing a sprawling ecosystem of bash scripts all geared towards delivering a customised listening experience tailored perfectly to my every need. In short, the setup uses a simple dmenu file manager to browse my local files and mpv to play them. Today I’ll be talking specifically about my setup for recording the albums I’ve been listening to.</p>
<h3 id="lets-get-down-to-business">LET’S GET DOWN TO BUSINESS</h3>
<p>Whenever I select a file to be played with my script I am effectively selecting a path to a file or a path to a directory with files in it which is then fed to mpv. For example, if I’m playing the classic album Lemonade by Beyonce it would look like this:</p>
diff --git a/public/tags/css/index.html b/public/tags/css/index.html
index 5ed4522..b26eb60 100644
--- a/public/tags/css/index.html
+++ b/public/tags/css/index.html
@@ -1,20 +1,18 @@
-
+
-
-
+
+
-
-
-
+
Css
-
diff --git a/public/tags/css/index.xml b/public/tags/css/index.xml
index a4f5f47..442ffbc 100644
--- a/public/tags/css/index.xml
+++ b/public/tags/css/index.xml
@@ -2,22 +2,22 @@
Css on James' Blog :-)
- http://localhost:1313/tags/css/
+ https://nonsense.dymc.win/tags/css/
Recent content in Css on James' Blog :-)Hugo -- gohugo.ioen-GBMon, 26 Jun 2023 00:00:00 +0000
-
+ so you want to write a neovim plugin with lua
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/
Sat, 06 Apr 2024 00:00:00 +0000
- http://localhost:1313/so-you-want-to-write-a-neovim-plugin-with-lua/
+ https://nonsense.dymc.win/so-you-want-to-write-a-neovim-plugin-with-lua/<p>I’ve recently been messing around with writing neovim plugins.
When I initially got going I found it a little tricky to know how to get started.
There’s the <a href="https://neovim.io/doc">official neovim docs</a> which are great; but in my beginner experience exhaustive to the point of slight impenetrability.
@@ -91,10 +91,10 @@ As a little coda, this is how you can use your fancy new plugin using <a href
making nix-colors talk to neovim
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/
Fri, 18 Aug 2023 00:00:00 +0000
- http://localhost:1313/making-nix-colors-talk-to-neovim/
+ https://nonsense.dymc.win/making-nix-colors-talk-to-neovim/<p>I recently started fiddling around with home-managerifying my neovim config.
After moving across most of my stuff I came across the problem of how to hook things up with with <a href="https://github.com/misterio77/nix-colors">nix-colors</a> so that my neovim theme would follow color changes in home-manager.</p>
<p>Luckily, I came across <a href="https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-base16.md">this</a> handy little plugin from the lovely <a href="https://github.com/echasnovski/mini.nvim">mini.nvim</a> suite of plugins which lets you create your own theme with your custom colors.</p>
@@ -145,10 +145,10 @@ After moving across most of my stuff I came across the problem of how to hook th
vanilla javascript theme toggle for simpletons
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/
Mon, 26 Jun 2023 00:00:00 +0000
- http://localhost:1313/vanilla-javascript-theme-toggle-for-simpletons/
+ https://nonsense.dymc.win/vanilla-javascript-theme-toggle-for-simpletons/<p>Sometimes when I’m trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I’ve been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you’re looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach.</p>
<p>Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with.</p>
<h3 id="html">HTML</h3>
@@ -232,10 +232,10 @@ After moving across most of my stuff I came across the problem of how to hook th
tailscale, caddy, and nixos containers - a match made in heaven
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
Tue, 16 May 2023 00:00:00 +0000
- http://localhost:1313/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/
+ https://nonsense.dymc.win/tailscale-caddy-and-nixos-containers-a-match-made-in-heaven/<p>For a little while now I’ve been running some services (jellyfin etc.) on an old laptop in my house. I’m not trying to sound like a podcast ad but as a networking novice, the simplicity <a href="https://tailscale.com/">tailscale</a> brings to accessing these services remotely is very nice. Until recently though, I had been accessing my services like a heathen with http and port numbers (eg http://tailscale-ip:service-port). This works and is perfectly secure thanks to tailscale though it lacks a certain finesse. In an ideal world you’d have a reverse proxy and set up SSL certs so your browser doesn’t get stressed and you dont have to rememeber ip addresses and port numbers.</p>
<p>When I initially looked at how to do this it seemed like it was above my paygrade and not worth the stress; that was until I came across <a href="https://caddy.community/t/https-in-your-vpn-caddy-now-uses-tls-certificates-from-tailscale/15380">this</a>. This works great and is as simple as advertised though there is one drawback: you can only reverse proxy one service per host. So for my usecase of the laptop with multiple services running on it I could only use the magic caddy tailscale auto-https thing for one of them.</p>
<h3 id="what-to-do">what to do?</h3>
@@ -301,10 +301,10 @@ After moving across most of my stuff I came across the problem of how to hook th
learning about qtile widgets via the medium of cricket
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/
Mon, 03 Apr 2023 00:00:00 +0000
- http://localhost:1313/learning-about-qtile-widgets-via-the-medium-of-cricket/
+ https://nonsense.dymc.win/learning-about-qtile-widgets-via-the-medium-of-cricket/<p>I’m a person who has spent an unreasonable amount of time making minute changes to the appearance of my bar in qtile. Despite the very nice selection of widgets availabe by default with qtile, it was only a matter of time before I decided I wanted to experiment with making my own custom widget. Fortunately, if you can do a bit of python this is quite an approachable undertaking.</p>
<p>The dream widget I was lacking was a little live crikcet score ticker type thing; something which would scroll along on my bar showing me the score in live cricket matches. I’m sure this will interest very few people but I learnt some good stuff along the way.</p>
<h3 id="hello-world">Hello World?!</h3>
@@ -413,10 +413,10 @@ After moving across most of my stuff I came across the problem of how to hook th
theming nirvana
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/
Mon, 13 Mar 2023 00:00:00 +0000
- http://localhost:1313/theming-nirvana/
+ https://nonsense.dymc.win/theming-nirvana/<p>As I fall deeper and deeper down the nixos rabbit hole, I find myself becoming more and more obsessed with controlling every little thing on my computers declaratively. It starts with: ‘oh this is cool I can specify which desktop environment to use in my configuration.nix’. Next thing you know you’ve discovered <a href="https://github.com/nix-community/home-manager">home-manager</a> and every program on every linux system you use needs to be controlled in your nix-config. Of course this slightly insane approach has its downsides; it also opens some doors though.</p>
<p><a href="https://sr.ht/~misterio/nix-colors/">Nix-colors</a> lets you dyanmically change the theming of programs controlled in your nix config. So when you want to change the color of everything and have it match and all be pretty lol, you are able to do so with one word as opposed to poring over everything changing each individual color. For a certain type of person, this is very nice!</p>
<h3 id="how-to-make-it-work">how to make it work</h3>
@@ -512,10 +512,10 @@ After moving across most of my stuff I came across the problem of how to hook th
translating docker to nix?!
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/
Tue, 28 Feb 2023 00:00:00 +0000
- http://localhost:1313/translating-docker-to-nix/
+ https://nonsense.dymc.win/translating-docker-to-nix/<p>In my opinion, there are moments when the convenience of docker and its surrounding ecosystem can’t be beat. I’ve been dabbling in the self hosting world and oftentimes the best maintained packaging option is a docker image. As a result of this I’ve been playing around with the nixos approach to managing docker containers.</p>
<h3 id="nix---docker-compose---docker-run">nix -> docker compose -> docker run</h3>
<p>To illustrate how to translate a simple example from the world of docker to nix let’s have a look at the config for my <a href="https://docs.searxng.org/">searxng</a> instance.</p>
@@ -566,10 +566,10 @@ After moving across most of my stuff I came across the problem of how to hook th
simple nixos config for vps static site
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/
Sun, 29 Jan 2023 00:00:00 +0000
- http://localhost:1313/simple-nixos-config-for-vps-static-site/
+ https://nonsense.dymc.win/simple-nixos-config-for-vps-static-site/<p>Setting up a little static site is something I’ve done a few different times on a few different operating systems. It’s a slightly fiddly task with a few disparate jobs that all need looking after: ssh, let’s encrypt, nginx. In my opinion, it is one of the moments where consolidating all the little bits and bobs you need to setup into one common configuration is very useful.</p>
<p>I’m going to go through a bit of the nixos config I’ve got for my vps.</p>
<h3 id="ssh">SSH</h3>
@@ -626,10 +626,10 @@ After moving across most of my stuff I came across the problem of how to hook th