Melee Redux
Melee Ready
Bringing projects to PHP 8.x+
Melee Update
Bringing projects to PHP 8.x+
Future Goal
I am so old that...
Upgraded Server to Debian 12 - July 2024
Just pretending to be sales weasel.
Enabling VNC module in xorg.conf
This is a strange 2006 era device built on Fedora.
Section "Module" Load "vnc" EndSection Section "Screen" Option "SecurityTypes" "VncAuth" Option "UserPasswdVerifier" "VncAuth" Option "PasswordFile" "/root/.vnc/passwd" EndSection
Future Geeky Youtube Channel?
Am mostly playing... OBS and toys
Bespoke Solutions
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.
Asterisk Thinking
Do not solve the problem you think you have.
Password Sweat
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
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?
Curl Post Test
New Website Code 2022-2023
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
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
because nmcli does not always work
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.2Then 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
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...
Because I could not find this anywhere.
Alsa Configuration
in /etc/asound.confpcm.!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/inputThe 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 doeschown -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!