Skip to content

Instantly share code, notes, and snippets.

View subtlecaffeine's full-sized avatar

Jay Moore subtlecaffeine

View GitHub Profile
@subtlecaffeine
subtlecaffeine / 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.

@subtlecaffeine
subtlecaffeine / 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

@subtlecaffeine
subtlecaffeine / 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.

@subtlecaffeine
subtlecaffeine / 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%')')