Theme:
Melee Redux
Meuon 2024-07-19
Years ago, I built a very simple mailing list server to run a few mailing lists (chugalug.org and others). As I moved it to a new server and updated the code, I had to eat my own dog food. As I read my readme.txt and figure things out from scratch: I sucked. Younger me that had just written the software had a lot of stuff stuck in his head that did not make it to the docs. Now updated.
Melee Ready
Meuon 2024-07-16
Bringing projects to PHP 8.x+
Got the basic Melee working. Easier than I was expecting. Need a few tweaks like using port 993 and SSL instead of depreciated TLS on port 143. for imap. I think it's time to migrate Chugalug.org to the new server.
Melee Update
Meuon 2024-07-14
Bringing projects to PHP 8.x+
Having fun testing code, but also noting that MELEE (the Mail Engine) has not been tweaked for PHP 8.x and needs to be. This is my reminder to self.
Future Goal
Meuon 2024-07-14
I need to make a web UI for my website posts that allows easy uploading and posting of pictures, in my spare time. Buwahahahaha..
I am so old that...
Meuon 2024-07-14
I remember when almost any UUCP or SMTP mail server would accept and forward an email from any address to any other address. It was considered the polite thing to do. It often took multiple hops, as everything, even mail servers, were not connected all of the time. This is also a test of venerable code to post to Fosstodon, but why be boring? #old
Upgraded Server to Debian 12 - July 2024
Meuon 2024-07-14
The old geeklabs.com server was Debian 10, and that was an in place uprade from Debian 9. Spent the weekend cleaning up DNS, DKIM, PostFix, OpenDKIM, Dovevot and movig a handful of sites. Got more to move including Chugalug.org. If you see something weirder than normal: reach out. Please.
Just pretending to be sales weasel.
Meuon 2024-02-13
Stepping out of my normal role as just a geek to attend ITExpo and Astricon (this week in Ft. Lauderdale) to network a bit more. Am here in both a technical learn and share role, as well as trying to figure out future business development angles for Ring-U.com. Not normally a biz-dev guy (anymore), but I can fake it. If you are also around and want to rant technically or biz-dev together, hunt me down. #asterisk #astericon #itexpo
Enabling VNC module in xorg.conf
Meuon 2023-10-23
This is a strange 2006 era device built on Fedora.
Could not use x0vncserver as it was b0rk3n badly. 0: Make sure it has a vnc module for X. locate vnc.so works 1: vncpasswd /root/.vnc/passwd 2: Add to /etc/X11/xorg.conf
 Section "Module"         Load            "vnc" EndSection Section "Screen"         Option "SecurityTypes" "VncAuth"         Option "UserPasswdVerifier" "VncAuth"         Option "PasswordFile" "/root/.vnc/passwd" EndSection 
Future Geeky Youtube Channel?
Meuon 2023-08-29
Am mostly playing... OBS and toys
Diving into OBS/Open Broadcast Studio for possibly streaming some live events. There is not much there. Yet. This is mostly a test post for when there is. https://www.youtube.com/channel/UCqsH6pnnpOWjlNpjfRdNmFw
Bespoke Solutions
Meuon 2023-05-10
When you can not convince the company you own that it makes any sense to do things.

I keep tossing new ideas at the ring-u.com team, which does small business phone systems in a repeatable supportable manner to do some "special projects". I get it. Cognitive load is a real problem at scale.

So... time to officially open the door for some telecom special use cases. If it:

  • Helps people solve a problem
  • Can at least cover costs
  • Interesting - very important.
You are going to see me doing it as GeekLabs. Excuse me while I go set some things up for someone. There will be more later. --Mike-- aka --Meuon--
Asterisk Thinking
Meuon 2023-03-15
Do not solve the problem you think you have.
Problem: Transfering an outgoing call causes MixMonitor to close the recording file. There are insanely complicated ways to solve this, bridges, pre-dial handlers, etc. Rabbit holes. The answer was simply start a new recording in the local dial setup [Internal-Setup]. Works for parked calls, transfers and internal calls. The difference was how we thought about the problem. #asterisk #thinking
Password Sweat
Meuon 2022-12-19
Not enough coffee.

Anyone else type a password in via SSH a couple of times and the third time it refuses you the first thought is: Oh no, the servers hacked!

Then you realize you are misaligned on the keyboard you were not looking at as you typed it.

Or you were hitting caps lock...

Maybe the caffiene keeps me paranoid.

cURL as Linqua Franca
Meuon 2022-12-19
Because we must communicate

Again and again, I read code that shows bare cURL examples and cURL-ish syntax in a language and applied it to a different one. And it Just Worked(tm)!

I'm blown away when I meet a "programmer" that escews learning cURL. You don't have to be an expert, that's what documenation is for. Please at least experiment with it. If you are a web centric programmer, it is the gateway to understanding what is really going on, especially with API's.

https://curl.se/
Something to say?
Meuon 2022-12-19
Playing with code to post/save, organize, search, categorize and display content is EASY! What's really hard is creating content worth doing those things for. We've got to work on more / better / relevant content. Not just reposting, sharing and linking to things. CREATE! Me included.
Curl Post Test
Meuon 2022-12-19
Playing with idea of posting from my website at geeklabs.com directly to fosstodon.org using code munged from Chris Jones and his excellent example at: https://chrisjones.io/articles/using-php-and-curl-to-post-to-the-mastodon-api/ If you are seeing this on Mastodon/Fosstodon: It works!
New Website Code 2022-2023
Meuon 2022-12-16
Going minimal. Mobile Friendly. Will expand.

Yeah yeah, it's 2022 and I'm very late to the "Mobile First" practices of the web. Mostly because I hadn't found CSS and code I liked. So I built it. As in all internet things, I built on the shoulders of giants, dwarves, faeries, furries and whatever else they identify as. I started with Cutestrap as a clean minimal CSS that makes sense to me. I tweaked it some, and added the drop down menu code using the same CSS thoughts in the base CSS. I like it because most of the time, the CSS just makes plain standard HTML look good. It isn't trying to reinvent the UI. Let the browser do it's thing. There are a few quirks as you move page widths from mobile size to a more normal size, but less than most places.

The underlying code is "GLASS". In this case what I'm calling "GLASS-2023" as in the "Geek Labs Application Starter Set" a continuation of the framework and methods that have built a few enterprise applications and a bunch of small projects. This will eventually be made public again. The problem is documenting it. What a pain. Ugh. Should I? Yeah, there are other people that use it for projects in several countries. I've heard the report generator is worth big bucks ;)

Anyway, like most of the internet, this website is a work in progress. Very minimal right now, but functional enough for now.

Social Media Redux 2022
Meuon 2022-12-14
Because Post-Musk Twitter broke my social media habit

Once upon a time, there were BBS's and islands of people with limited coms between them. Even the early internet worked this way, email, mailing lists. These islands became early online systems: Compuserve, Prodigy, AOL/America Online, etc.. which got absorbed by the internet as they joined it. The internet created it's own new islands.. big islands/mainlands: Facebook, Twitter, Reddit.. which seems to exist to post/share things from each other.

I gave in, became active in Twitter and Facebook and... and enjoyed parts of them, mostly the people that I interacted with. Good people, many of whom I know in real life as well.

In late 2022, Elon Musk bought Twitter.com, which broke the facade he had crafted of who and what he was. Twitter has devolved. Many of us geeks left to Mastadon and other places. Back to S=smaller islands that talked to each other. I joined Fosstodon for geeky conversations where I might learn something.

In doing so, I realized that while I can (and did) export my tweets, it's a mess to import (I will eventually). Wow, I created a lot of funny, snarky and useful content. That Elon paid for, but I didn't get any of. It's time to take back control of my content, brain farts, musing and rambling rants. After all, I have the skills. and the technology

2023 GeekLabs Social Media Goals:
  • Initial posts to all social media platforms will be made on this system and then copied via API's to various platforms as apropos.
  • All subsequent conversations may or may not be archived here. Unsure at this point.
  • All sharable photo's will be stored and searchable here.
  • Create More and Better Content.
  • A lot of little things I haven't thought about yet.
Override Network Manager DNS
Mike 2022-03-17
because nmcli does not always work
Sometimes, you just want to set DNS Servers the old fashioned way, but Linux's Network Manager won't let you. Two ways to fix this:

1. Edit NetworkManager.conf

Edit /etc/networkmanager/NetworkManager.conf setting dns=none Then edit /etc/resolv.conf to be whatever you want.. NetworkManager will leave it alone. Am currently preferring/using this one, for no particular reasons.

2. Symlink

Seems at least in my testing, Network Manager will not override a symlink. This is RedHat's official solution, but works on Armbian/Debian. YMMV. Create a file like /etc/resolv.manual.conf with what you need. like:
nameserver 8.8.8.8
nameserver 192.168.1.2
Then remove the current /etc/resolv.conf and symlink it.
rm /etc/resolv.conf
ln -s /etc/resolv.manual.conf /etc/resolv.conf
PHP Shell Exec, pdfinfo example
Mike 2022-03-15

I swear I recreate a variant of parsing the returned text of a PHP shell_exec from scratch once a month for something. Today it was for PDFInfo, just to get the pages of a PDF and other attributes as a bonus.

I'm sticking this here, so a month from now I can forget I saved a generic example and can recreate it again. There are more efficient ways, but this is how my brain works and I can read it and modify to suit. That's important.
pdfinfo = shell_exec("/usr/bin/pdfinfo $file") ; 
$pdi = preg_split('/\n/', $pdfinfo);
foreach($pdi as $pi) { 
  list($key,$val) = preg_split('/\:s+/', $pi);
  if(!empty($key)) { $pdf[$key] = $val ; } ; 
} ; 
print "Pages: $pdf[Pages]n" ; 
Asterisk ALSA notes for Dial(CONSOLE/ALSA...
meuon 2022-03-10
Because I could not find this anywhere.
On Asterisk 16.2 on a small ARM SoC computer using a very generic USB to 3.5mm audio out simply recognized as "USB PnP Sound Device". Some notes:

Alsa Configuration

in /etc/asound.conf
pcm.!default {
    type hw
    card 1
}
ctl.!default {
    type hw           
    card 1
}

Asterisk Config

In /etc/asterisk/alsa.conf
[general]
autoanswer=yes
context=local
extension=s
input_device=plughw:1,0
output_device=plughw:1,0
noaudiocapture=true
;above turns off mic/input 
The magic is plughw because aplay -L lists
plughw:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    Hardware device with all software conversions

This solves the problem/errors with 8000hz and 44100hz conversions. like
chan_alsa.c: Rate not correct, requested 8000, got 44100
as Alsa will do some magic conversions. Also solved Stereo to Mono

This post exists because I could not find anyone using this to solve that problem, but lots of people are having that problem with an insane amount of bad "assistance" out there.,

You also need to put this in /etc/asterisk/modules.conf

noload = chan_oss.so
load = chan_alsa.so

Asterisk Usage

Lots of variations of how to get here, but the important part is:
    same => n,Dial(CONSOLE/ALSA,20,A(beep))

And file system perms

I have a script on boot up that does chown -R asterisk:audio /dev/snd/* to fix the perms. Note that they get reset on boot and on USB audio device insertion and this causes asterisk's ALSA load to blow chunks. You can also set asterisk to be part of the audio group and and.. other ways. Just gotta make sure Asterisk can use that /dev/snd/*
#ls -al /dev/snd

drwxr-xr-x  4 asterisk audio     220 Mar 10 15:35 .
drwxr-xr-x 20 root     root     4420 Mar 10 15:35 ..
drwxr-xr-x  2 asterisk audio      60 Mar 10 15:35 by-id
drwxr-xr-x  2 asterisk audio      80 Mar 10 15:35 by-path
crw-rw----  1 asterisk audio 116,  6 Mar 10 15:35 controlC0
crw-rw----  1 asterisk audio 116,  4 Mar 10 15:35 controlC1
crw-rw----  1 asterisk audio 116,  5 Mar 10 15:35 pcmC0D0p
crw-rw----  1 asterisk audio 116,  3 Mar 10 15:35 pcmC1D0c
crw-rw----  1 asterisk audio 116,  2 Mar 10 15:37 pcmC1D0p
crw-rw----  1 asterisk audio 116,  1 Mar 10 15:35 seq
crw-rw----  1 asterisk audio 116, 33 Mar 10 15:35 timer

Finally

So now, on more modern Asterisk systems using bare ALSA (No pulseaudio, no JackD, etc.. ) you can use that 3.5mm audio jack, or in this case, a USB to 3.5mm audio socket to feed a PA system, overhead speakers, etc..

Disclaimer: This has worked for me, using Allwinner H6's running Armbian on exactly 2 boxen. YMMV, Good Luck!