Skip to content

Instantly share code, notes, and snippets.

View nq4t's full-sized avatar

Jay Moore nq4t

View GitHub Profile
@nq4t
nq4t / gist:cc3c2c2869d6238cdcf45ad5ff7416d5
Created September 5, 2025 17:56
mpd-dbcreate - Deep Dive In To The Why

Here's a more detailed and deep-dive in to why I created mpd-dbcreate.

First of all, when I say it was "wrong"...it was wrong for me. My massive old collection was part of the problem. I could have fixed half the issues by modifying the actual media on my drive. Would this have been easier? No. We're talking TBs of stuff. There's also a .0005% chance I'd regret modifying the collection like this in the future. I don't really want to go around changing it. It's bad enough I'm finding 20 year old garbage in folders I'd long forgotten about. "Oh, I'll remove the converted version later." I know from experience with a collection this large that those things rarely get found. There are probably still things messed up from the great-crash-and-recovery of 2002 that I....still haven't found....23 years later. Or the great backup and reset of 2005...which was 20 years ago. I finally fixed my Powerman 5000 album from 6.3 filenames though.

I never adopted databases. I still use traditional folder organization. Make a

@nq4t
nq4t / rmpc.md
Last active July 15, 2025 22:39
Passing `rmpc` off as a dedicated application on KDE Plasma on Arch/Cachy

For the last few months I'd been using Cantata as my mpd client despite the fact it's pretty much been abandoned. Wanting to break away from that, I went in search of some other clients that are still actively maintained. rmpc wasn't what I was looking for; but I liked it. But the one thing I didn't like was having it be just another tab or grouped with all my other Konsole apps.

I did this in alacritty...because at the time I wasn't using it for anything else and could just mess with it's global config all I wanted. In production...you probably want to make a seperate config file for whatever you're using. I also don't know what options you'll need to change...so hopefully you can keep up.

alacritty.toml

[window.class]
instance = "rmpc"
general = "rmpc"
@nq4t
nq4t / asterisk-alpine.md
Created April 12, 2023 16:25
Compiling Asterisk on Alpine Linux

Compiling Asterisk on Alpine

This is currently a quick and very dirty way document on compiling Asterisk on Alpine.

This is not intended to be a Tutorial or HOWTO. I am not holding hands.

This has been tested on 3.16 and edge as of 27-FEB. It works and was stable. I built optimized for low memory and it ran in a 512MB VM just fine for 3 months.

This is based heavily off Alpine's own buildlog and uses some of their scripts from aports.

@nq4t
nq4t / miab.md
Created April 12, 2023 16:23
Custom Hostname for Mail-In-A-Box Webmail (roundcube)

Custom Hostname for Mail-In-A-Box Webmail (Roundcube)

Typically when you access webmail for MIAB systems it's hostname/mail. That's neat and all...but I've complicated things by the fact the server running my MIAB installation isn't the same as my main webserver, so this winds up being mail.hostname/mail.

But what if I wanted webmail.hostname?

Custom configs "not supported".

One of the upsides with MIAB is that it does everything for you...even more so if you let it run as the NS server for your domain. Even if you have to punch

@nq4t
nq4t / gogs-2-gitea.md
Created April 12, 2023 16:22
Semi-painless Migration from Gogs 0.13 to GitTea

Migrating from Gogs 0.13 to Gitea

In short...it is not possible to directly migrate from Gogs 0.13 to Gitea. While methods were published to do this from 0.11; the database structure has apparently changed entirely too much to be imported.

This is not a direct migration

You will lose some things in doing this; primarily you'll lose all your existing users and issues unless you use external issue tracking. If you have a large number of users and repositories, this is not a good solution sadly.

Your repositories and repository-data however, remains intact.

@nq4t
nq4t / fb2ksyntax.md
Created April 12, 2023 16:21
Foobar2k Syntax

foobar2k-syntax

Here are a few things I've coded for Foobar2000's formatting for various things.

Columns

Tech Specs

The Tech Specs column just displays some basic information; codec, rate/bitdepth, bitrate, and possibly HDCD info. This converts sample rates in to kHz/MHz despite foobar2000 syntax not supporting decimal.

$if($stricmp($right(%filename_ext%,3),iso),%codec%/SACD,%codec%) | $ifgreater(%samplerate%,1000000,$insert($div(%samplerate%,100000),'.',$sub($len($div(%samplerate%,100000)),1)) MHz,$ifgreater($mod(%samplerate%,1000),0,$insert($div(%samplerate%,100),'.',$sub($len($div(%samplerate%,100)),1)) kHz,$div(%samplerate%,1000) kHz))$if($info(bitspersample),/$info(bitspersample)-$ifgreater($info(bitspersample),1,bits,bit)) | %bitrate% kbps) | $if($info(hdcd),'(HDCD:',) $if(%__hdcd%,PE: %__hdcd_peak_extend% LLE: %__hdcd_gain% TF: %__hdcd_transient_filter%')')