<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>if err != nil</title><link>https://if-not-nil.github.io/</link><description>on if err != nil</description><generator>Hugo -- gohugo.io</generator><lastBuildDate>Tue, 17 Feb 2026 17:43:42 +0200</lastBuildDate><atom:link href="https://if-not-nil.github.io/index.xml" rel="self" type="application/rss+xml"/><item><title>deriving your linux</title><link>https://if-not-nil.github.io/wiki/computers/derive/</link><pubDate>Tue, 17 Feb 2026 17:43:42 +0200</pubDate><guid>https://if-not-nil.github.io/wiki/computers/derive/</guid><description>&lt;blockquote>
&lt;p>choose life, choose a job, choose a linux distribution&lt;br>
this is wip&lt;/p>&lt;/blockquote>
&lt;p>universal covered: setup, partitioning, UEFI bootloader, wayland&lt;br>
hardware-specific covered (thinkpad t480, intel network, cpu and gpu): network,&lt;br>
not covered: swap, proprietary drivers, x11&lt;/p>
&lt;h1 id="u-should-know-this">u should know this&lt;/h1>
&lt;p>there are many advantages to a simple linux system, and some will be applied here, sometimes unnecessarily. i&amp;rsquo;ll try to have this be transparent and educational&lt;/p>
&lt;p>!!!please do all of this on a ventoy drive with the derive iso and also an arch iso. not everything is guaranteed to work/exist&lt;/p></description></item><item><title>typesafe structs in lua</title><link>https://if-not-nil.github.io/lua-structs/</link><pubDate>Sat, 13 Dec 2025 16:32:24 +0000</pubDate><guid>https://if-not-nil.github.io/lua-structs/</guid><description>it should have them though</description></item><item><title>no, the moon</title><link>https://if-not-nil.github.io/no-the-moon/</link><pubDate>Wed, 11 Jun 2025 15:57:24 +0300</pubDate><guid>https://if-not-nil.github.io/no-the-moon/</guid><description>a love letter to lua</description></item><item><title>nvim hat tricks</title><link>https://if-not-nil.github.io/wiki/computers/nvim/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://if-not-nil.github.io/wiki/computers/nvim/</guid><description>&lt;p>&lt;strong>linus lung tips&lt;/strong>&lt;/p>
&lt;h1 id="random-commands">random commands&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-md" data-lang="md">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`&amp;lt;C-g&amp;gt;`&lt;/span> file info
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`g&amp;lt;C-g&amp;gt;`&lt;/span> wc (count lines, chars, etc)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`:r[ead]`&lt;/span> can read a file into the current buffer under cursor
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`:TOhtml`&lt;/span> renders whatever you have with whatever your theme is to HTML
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`s/\(QUERY\)/\L\1`&lt;/span> find QUERY and make it lowercase
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>align:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`:center`&lt;/span> center text
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`:right`&lt;/span> align text right
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`:left`&lt;/span> align text left
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> you can also get mini.align to align your text neatly
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>in visual mode:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`gu/gU`&lt;/span> lower/upper the case
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="g-commands">&lt;code>:g[]&lt;/code> commands&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-md" data-lang="md">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`ga`&lt;/span> shows ascii for char under cursor. useful for int&amp;lt;&lt;span style="color:#f92672">-&lt;/span>&amp;gt;char shenanigans
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`gf`&lt;/span> on a file name goes to the file
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`gi`&lt;/span> goes to where you last exited insert mode
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="spellcheck">spellcheck&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-md" data-lang="md">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`:set spell`&lt;/span> enable spellcheck
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`[s`&lt;/span>, &lt;span style="color:#e6db74">`]s`&lt;/span> move around spelling mistakes
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`=z`&lt;/span> autocorrect
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`=z[num]`&lt;/span> accept suggestion #num
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`zg`&lt;/span> add misspelled word to dict
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`zug`&lt;/span> remove from dict
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="insert-mode">insert mode&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-md" data-lang="md">&lt;span style="display:flex;">&lt;span>remap your readline actions like &amp;lt;&lt;span style="color:#f92672">C-w&lt;/span>&amp;gt;, &amp;lt;&lt;span style="color:#f92672">C-h&lt;/span>&amp;gt;, &amp;lt;&lt;span style="color:#f92672">C-b&lt;/span>&amp;gt; and &amp;lt;&lt;span style="color:#f92672">C-f&lt;/span>&amp;gt;, &amp;lt;&lt;span style="color:#f92672">C-a&lt;/span>&amp;gt;, &amp;lt;&lt;span style="color:#f92672">C-e&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>to look for help pages go &lt;span style="color:#e6db74">`:h i_`&lt;/span> and tab
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`&amp;lt;C-o&amp;gt;`&lt;/span> to oneshot normal mode
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`&amp;lt;C-g&amp;gt;`&lt;/span> to start moving with hjkl. it&amp;#39;s a weird semi-normal mode. i still can&amp;#39;t figure it out
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`&amp;lt;C-r&amp;gt;`&lt;/span> and then a register name to insert from register
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`&amp;lt;C-t&amp;gt;`&lt;/span> indent (tabulate)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`&amp;lt;C-d&amp;gt;`&lt;/span> unindent (delete tabulation)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`&amp;lt;C-v&amp;gt;`&lt;/span> insert next input verbatim
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`&amp;lt;C-a&amp;gt;`&lt;/span> similar to normal mode&amp;#39;s dot command
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="registers">registers&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-md" data-lang="md">&lt;span style="display:flex;">&lt;span>dont ignore them
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>do &lt;span style="color:#e6db74">`:[dis]play`&lt;/span> to list all registers
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>default ones
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`&amp;#34;`&lt;/span> contents of the unnamed register
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`0`&lt;/span> last yanked text (not delete)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`*`&lt;/span> system clipboard selection
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`+`&lt;/span> system clipboard
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`=`&lt;/span> expression register. try &lt;span style="color:#e6db74">`i&amp;lt;C-r&amp;gt;=pow(2,7)`&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`%`&lt;/span> current filename
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`-`&lt;/span> small delete
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`.`&lt;/span> the dot register
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`/`&lt;/span> last search pattern
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`:`&lt;/span> last ex (command mode) command
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`1-9`&lt;/span> whatever u deleted (where 1 is closest)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>this is all useless without knowing about
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`&amp;lt;C-r&amp;gt;&amp;#34;`&lt;/span> insert register &amp;#34; in insert mode
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`@:`&lt;/span> execute command from register &amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">`&amp;#34;:p`&lt;/span> execute command from register &amp;#34;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>the sauce</title><link>https://if-not-nil.github.io/wiki/music/sauce/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://if-not-nil.github.io/wiki/music/sauce/</guid><description>&lt;h2 id="fl-808s-outside-of-fl">`fl 808s outside of fl&lt;/h2>
&lt;p>i use like three daws all the time&lt;/p>
&lt;p>the 2023+ sc ug signature sound happens because of how the 808&amp;rsquo;s clipping affects every other part and aroudn the punch kinda. so thats what you wanna make sure you care about the most - layer it with snares, whatever&lt;/p>
&lt;p>you wanna take your 808 and then u clip the fuck out of it&lt;br>
it&amp;rsquo;s binary, it doesn&amp;rsquo;t hit if you don&amp;rsquo;t clip it&lt;/p></description></item><item><title>void cheat sheet</title><link>https://if-not-nil.github.io/wiki/computers/void/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://if-not-nil.github.io/wiki/computers/void/</guid><description>&lt;h1 id="xbps">xbps&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-md" data-lang="md">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-install -Su`&lt;/span> - synchronize repositories and update system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-install [pkg]`&lt;/span> - install package
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-remove [pkg]`&lt;/span> - remove package
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-remove -R [pkg]`&lt;/span> - remove package and its unused dependencies
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-query -Rs [string]`&lt;/span> - search for package in repositories
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-query -l`&lt;/span> - list installed packages
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-query -S [pkg]`&lt;/span> - show information about package
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-query -f [pkg]`&lt;/span> - list files owned by installed package
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-remove -Oo`&lt;/span> - remove orphaned packages and clean cache
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-query -m`&lt;/span> - list manually installed packages
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-install -uf [pkg]`&lt;/span> - force reinstall/update package
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-pkgdb -a`&lt;/span> - check for broken package databases
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="xtools">xtools&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-md" data-lang="md">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xq [string]`&lt;/span> - search for package (shorthand)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xi [pkg]`&lt;/span> - install package (shorthand)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xr [pkg]`&lt;/span> - remove package (shorthand)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xlocate [file]`&lt;/span> - find which package owns file
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xdirents [pkg]`&lt;/span> - list files in repository package (not installed)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xrev [pkg]`&lt;/span> - list packages that depend on package
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xmypkgs [name]`&lt;/span> - list packages maintained by person
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xcheckshlibs`&lt;/span> - check for broken library links
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xgensum -i [template]`&lt;/span> - update checksums in template
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xlint [template]`&lt;/span> - check template for errors
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xsubpkg [pkg]`&lt;/span> - list subpackages of package
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="services-runit">services (runit)&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-md" data-lang="md">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`sv status [service]`&lt;/span> - check service status
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`sv start [service]`&lt;/span> - start service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`sv stop [service]`&lt;/span> - stop service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`sv restart [service]`&lt;/span> - restart service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`ln -s /etc/sv/[service] /var/service/`&lt;/span> - enable service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`rm /var/service/[service]`&lt;/span> - disable service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`sv up [service]`&lt;/span> - start service once
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`sv down [service]`&lt;/span> - stop service once
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="kernel">kernel&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-md" data-lang="md">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-reconfigure -f linux[version]`&lt;/span> - reconfigure kernel and regenerate initramfs
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`vkpurge list`&lt;/span> - list old kernels
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`vkpurge rm [version]`&lt;/span> - remove old kernel
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`vkpurge rm all`&lt;/span> - remove all old kernels
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`dracut --force --hostonly`&lt;/span> - regenerate initramfs manually
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="system">system&lt;/h1>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-md" data-lang="md">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xbps-reconfigure -fa`&lt;/span> - reconfigure all packages
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xcheckrestart`&lt;/span> - check which processes need restart after update
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`vsv`&lt;/span> - interactive service manager
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`void-mklive`&lt;/span> - create custom Void Linux live image
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xmirror`&lt;/span> - select fastest repository mirror
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74">`xlocate -S`&lt;/span> - sync xlocate database
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item></channel></rss>