- Another wednesday has arrived. Thinking about how to make my /rec page into a full fledged app/svc...
still needs /register /login components... Which need to integrate with my chat server etc.
Ie: still headed toward a full platform of some sort =)
- Made some modifications to /rec page
--added a screen shot button [TODO] make it only active while camera is on
--added a delete screen button [TODO] make it only active when there's a screenshot to wipe
- Done with module 1 of the first course today.
- My oldest was born 38 years ago today. Hard to believe.
- Watched the 14th launch of SpaceX's Starship this morning.
- On track to finish mod1 of the first course in Google UX Design tomorrow.
- More Google UX Design
- Got multi-cam page working with help from Gemini
What a pain lol - cf Multipass - note relay may be offline or firewalled.
- Studied my new course again today, Google UX Design.
- Finished verifying all the pages I copied to victory worked. Had to change a lot of wss hosts and
fiddle just a bit with the cms but they work as intended now. Got file uploads to work and video saves
to save. Think I got all the ports necessary opened up on victory now too, that helps lol.
- Need to look at my uuid situation, pretty sure that is still broken on victory's install of postgresql.
a todo for tomorrow after I study.
- Woke up to rain and another wonderful internet outage. Bye bye 14 week streak.
[NOTE: Sept 28th] Since internet came back on at 6pm the day it went I, I saved my streak. Hello Week 16!
- It didn't come back online until 6pm, 14 hours into my usual day (i did sleep an extra hour though)
- After dinner, I got online, backed up important pages like /sendcam /recvcam /showcam /new-dash-viewer-page
and of course this one.
phil@victory:~$ cat encode-mp4.sh
#!/usr/bin/bash
ffmpeg -loop 1 -i image.png -i song.mp3 -c:v libopenh264 -c:a aac -b:a 192k -pix_fmt yuv420p -shortest output.mp4
- Updated my new-dash-viewer-page to turn the video off and back on in the webpage at least. Still need to
get the signal from the viewer->hub->video-producer script to shut off there with the last viewer stopping.
- Now, at least, the page acts like /show-cam does and /rec too. Since the script I use for the video on
new-dash-viewer-page uses jsmpeg.min.js, the actual context for the canvas element is set to webgl rather
than 2d so cloning the canvas element and replacing the old one with the clone worked the best to get it
back to transparent and off.
- I think I will archive my daily_notes by month as soon as I get to October. This gets long now.
- Think I will start the Google UX Design program on my next classwork monday (ie: Friday morning) [5:52am]
- Updated my README.md on github to show a link to my last cert on coursera. Github acting really slow today.
May have to add the rest on a page here instead. It's almost always lively since it doesn't get hammered...
[5:45am]
- Did another backup of ~user (where all my websockets scripts live) and dumped cms3 from postgresql today.
I really didn't want another day without access to my code just because the internet goes down when it
rains.
- Finished mod4. The last graded assignment on debugging was pretty easy. Over all I'd rate this course,
as beginner only. Don't take it if you've done the Crash Course in Python or Google Data Analytics with
Python already.
- Thinking about switching to the Google UX Design program next. I doubt I'd learn much from the SQL bit in
this one considering the caliber of the python section. I just want to get past the 3NF...
- Mom took Honey for her yearly vax today. Vet stuck her with an extra rabies jab too. Failed to listen. =(
- Monday morning. Volumeicon is still working, yay! Up since 4am.
- Got through to mod4 to the portfolio exercise. Pointless rehash of previous (slow) lab.
- Got diverted trying to get a complex shell command to work in a subprocess. Rule: don't.
Just use the damn shell command in a shell script as what to run in python. lol
30 minute exercise turned into 2 hours, then I reverted back to what I should have been doing and 10 minutes
later had it all done and written up: algo
I do intend to write up my bot banning script the same way, once i finished the exercise. Worked out ok.
- Added about 40 edits to main page, including removing the sitemap, since the blog section hid it.
- 16 Week Streak on Coursera today. Used pavucontrol to get back gui for volume control (also pactl cmd)
- Genealogy for today - Sir Alan Fitzflaad of Dol in Bretony. Friend of Henry I of England. Went to holy
land at the request of Urban II and met interesting people and killed them. 1st Crusade check.
Kingdom of Jerusalem established check. 24th ggf.
Sarkasian-2 my new fav 16th cousin once removed. Sang Happy Together with Sony Bono and Believe.
A fellow descendant of John Drummond, 1st Lord Drummond
Elizabeth Sydenham Courtenay, 10th cousin 13 times removed. Was 2nd wife of Sir Francis Drake.
- Latin: avunculus = maternal uncle, one's mother's brother.
- Midweek arrives - for my coursera studies at least.
- mild nausea from late-friday's ozempic shot.
- [TODO]'s for today include:
Study
Work on /login and /register chat server functions - both need to popup little forms on the chat server
window I'm thinking.
Get send-webcam closer to actually working.
Bi-directional streaming on one page... If it's doable, maybe 3-4 even.
- Also, what set off my rebuild of /login and /register was a bookmarklet I made to do the /login user pw
on the chat server automatically. I can make 3-4 and have 3-4 users in 3-4 different tabs log in, one at
a time, naturally, for debugging purposes. Once I fix the dang /register command.
- Go through with mod 3 in my Automate Security Tasks today.
- Also finished off exercises for first 4 sections of part1 on Intro to Programming on mooc.fi, a free
course at the University of Helsinki.
I am at 67% exercises done with 67% points on https://programming-26.mooc.fi/part-1/4-arithmetic-operations
- Banged hard on the /login /register parts of my chat server. Meta AI impressed upon me that having it
showing the pw in plaintext in the ws logs (okay, only shows in your browser for your login but hey) was
a bad idea. /register was doing the same thing, so now i have to fork those commands off, at least the
/register one and instead of storing it in the cms3 tables, i need to store the data in chat server's
tables, and bcrypt the hashed value it sends.
- i messed up the async/await sections and was only getting an empty password from the form. Having jquery
compose and send the data part didn't help but getting async and await keywords works wonders lol!!!!
- i did remove the wss port from public firewall zone before tearing this apart. maybe by tomorrow...
- Got some new css for posts on main page, including note about chat being down/firewalled...
- Need to take the allpages snippet off that page and leave it for sitemap since I have to scroll down
otherwise. No extra work, amiright?
I can see the draw of just 3-4 buttons at the top of a mobile page, now.
- I don't often remember to make a note of it, but got updates run on gohacker, victory, and laptop
just now this morning (4:06am CDT) Weather says 67F out but AC is running inside...
[root@gohacker ~]# firewall-cmd --zone=FedoraServer --remove-port 8766/tcp success [root@gohacker ~]# firewall-cmd --zone=FedoraServer --remove-port 8766/tcp --permanent success [root@gohacker ~]# firewall-cmd --zone=FedoraServer --list-all|grep -v reject
FedoraServer (default, active) target: default ingress-priority: 0 egress-priority: 0 icmp-block-inversion: no interfaces: eth0 sources: services: cockpit dhcpv6-client http https ports: protocols: forward: no masquerade: no forward-ports: source-ports: icmp-blocks: rich rules:
- Will finish mod 3 tomorrow, barring any internet/power outage
-
- Starting mod 3 in Automate Security Tasks. Wow we can .upper() or .lower() strings, How F'ing fancy
is that?! LOL, yup another SCARcastic day.
- Strings are an ordered and iterable data type. You can use the + symbol on them but not the - symbol
- What would a function like minus(string1,string2) do after all? Convert to int/float and subtract?
Or convert to list then to set and difference out the second string's characters?
- I've been brainstorming some lan or heavily firewalled version of video chat based on /sendcam and /recvcam
It does require an https url, so maybe I'll start with my desktop, victory.gohacker.info and see...
Think: video walkie talkies.
- Watched coding streamers on twitch.tv
- Recharged phone
- added a stop cam button to my /rec page
I really should add a way to track the videos uploaded there, maybe in localstorage...
- Added simple demo of starting/stopping webcam at Show-Cam
- Pondering something like a dating site but using short video clips instead of pics...
- Almost boring after recording video on /rec but /sendcam -> /recvcam works too
- Finished mod 2 in Automate Cybersecurity.
- Studied Automate Cybersecurity Tasks with Python - almost done with mod 2 now.
- Back to working on my webcam remote control button for new-dash-viewer-page
Video window there is draggable. The load and log windows aren't, debating making the log windows
draggable too.
- Getting 40 updated packages on Victory, reboot incoming in about 5 min.
- Need to update my i3 config to feh --bg-center black.jpg when it starts up, maybe a cronjob
to set a new pic occasionally... Need a good source of background pics
- Slight diversion with Gemini into getting Video recording from user camera working - plugged into my jq_this
jquery upload handler in the cms and voila (after a minor caching glitch) it works lol, webm format but hey.
I really don't want to lag my server with converting a bunch of test videos...
- Studied Cybersecurity with Python - ten ways to print... *slow*
- Had nice visit with Arielle and her new bf when they came over today.
- Hit a 14-week streak on Coursera this morning. Think my longest was a 21-week streak ruined by a multi day power outage.
- Studied on coursera
- Added a cam window to my new-dash-viewer-page
I did have a slight bug, re-using id="b1" for the 'bigger' button and the button that started the video. Fixed it.
Also made position: absolute; for the video window which is draggable using jqueryui's draggable module.
Video and monitoring is still on firewalled websocket ports 8765 and 8888
Chat is up in its own page on port 8766, open to the world, heavily logged.
- I grepped thru journalctl output looking for any sign of bots hitting my ssh port but since I put ssh on
the zone called internal, no bots can get thru. =) bliss
- Back to studying on coursea after 5am this morning.
- Finished off mod 1 and 100% on graded assignment in one try. Trivial easy.
- The rain my knees/hips have been forewarning me of arrived this morning, lots of rain.
- Dug into my backup drive looking for That email from 25yrs ago today. Found and posted that email on FB.
- Posted on IG a reformat (gif->png) of a render I made of a 3D maze cube from Nov 2000
- Rest day #2 from coursera
- Got two loads of laundry done lol
- Fetched the trash can after it was emptied by the trash guys
- Relaxed, watched TV, nothing else really useful.
[DONE Sep 11th]- Make the logs button and log divs disappear when clicked off. Right now it stops sending logs but the
viewer doesn't remove the elements from the page like it does for load graphs.
- Got a tail on two logs producing from same script. Got the protocol implemented for logs producer in
hub.py and in my current viewer page, new-dash-viewer-page
- Rest day #1 from coursera.
[DONE] - going to try and combine multiple log tails into one logs-producer, two error logs and two access logs
just for Apache alone on gohacker.info...
- 3rd day of Cybersecurity class (python bits are going glacially, like during a new freeze)
- Today was 5th day of my study week, so I have tomorrow and thursday to fiddle with my monitoring stuff
- Got a good version of the send mpeg-ts bash script converted to python
- Fixed an issue with the microphone reading as mono so I had wrong hw: numbers. Went thru a ton
of diagnostic commands with Gemini to find the solution: -ac 1 and -ac 2 at the end before url
to make it take mono audio input and duplicate it to stereo in the output stream. audio working!
Link to convo on Gemini
- Gemini gave me this code to use with websockets and asyncio (I want to receive start/stop commands from hub
and to send on the output of the ffmpeg streaming as a message to parse into some graphs)
import asyncio
async def run_continuous_command():
process = await asyncio.create_subprocess_exec(
"ping", "gohacker.info",
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.STDOUT
)
# Read output asynchronously as lines arrive
async for line in process.stdout:
print(line.decode().strip())
await process.wait()
asyncio.run(run_continuous_command())
- Note that Gemini remembered that I use websockets and my domain name is gohacker.info, which I didn't
remind it of today.
- 2nd day of Cybersecurity class (python course#6 of it)
- Changed course of study to Google Cybersecurity Professional Certificate instead.
I really am not into data analytics or business intelligence I find lol.
- Changed course of study to Google Data Analytics Professional Certificate
[DONE] - Fixed authentication for my file upload form. It was allowing anyone to upload.
-
- Friday, so back to studying Business Intelligence on Coursera.
3rd day of BI (my mondays start on Fridays, also the day I now take my 0.25mg dose of Ozempic.
- Need to add buttons/msgs/etc for logs, chat, and webcam on/off to viewer & hub. [TODO]
- Need a graph for network traffic in/out from a producer too [TODO]
- Publish current system under ~user/improved-hub to Github once logs and chat at least are usable on
new-dash-viewer-page (need to back those up regularly otherwise, ~user/improved-hub + new-dash-viewer-page)
- Successfully modified hub.py to turn load monitor feeds on/off based on signals from viewer.
- Buttons on viewer show what's available. CLicking them turns on the load feed and turns the
button green. Clicking again, turns the load graph back off, pauses load messages from hub.py
and sets the button color to gray again. No AI assistance, but I did fix at least one AI generated
bug in that code section of hub.py, plus of course, my own logic error. consuming is now a dict of lists.
- Internet was offline when I first woke up. It came back up in the last hour. Got code under ~user
- all backed up plus current cms3.pm and cms3 directory. Now I need to pgdump my cms3 table - should be
- able to leave the one for chat server alone, not much goes in that that doesn't get rebuilt easily.
- Lost most of today due to internet outage. Meant to back up my code/pages/etc from server
- but didn't and when I was about to go to bed at 10pm, i noticed it had come back on. I figured
- it would be on when I woke up...
[DONE] - 3rd day of BI
[DONE-Sept3] - Fix disconnect bug in the on/off function for load monitor - consuming set gets overwritten
needs to be specified as a dict of lists of what viewers are consuming which server-svc...
[DONE] - 2nd day of studying Business Intelligence class.
[DONE] - Remove works on new-dash-viewer-page now but has a bug where a 2nd viewer looking at the same load graph
disables traffic of load data to the 1st viewer (upon removing/re-adding it too)
[DONE] - Implemented pause command in hub.py
[DONE] - Got on/off buttons generating correctly. CSS adjusted. [noon to 2pm: Aug 30th]
[DONE] - Make the button go green when clicked to give feedback for on/off status.
[DONE] - id="server-svc" would be good differentiator
[DONE] - maybe set to green background while running
[DONE] - need a message when a producer closes to remove the button and load graph if present - keep load data
as long as viewer tab is constant, it saves the load data it rcvd in load_pts[server]
- need to deque load data lol
- Had an idea for a dash with lots of graphs. Display just load graph icon, log icon, network traffic icon
- When each is pressed, it shows a row of buttons for each server that has those available, green for on
- and displays the graph for them
- When another icon is pressed, the graphs for that type display, allowing for a lot more info.
[DONE 9:30am] - hub is now processing sendme messages from viewer correctly to turn on load messages
- manually setup buttons for 3 load producers on viewer and they each activate a load window when pressed
- reseting viewer tab no longer throws all kinds of errors - fixed cleanup when socket closes
Watched TinyToxicTofu streaming physics and the Nancy Grace Roman telescope launch for about 90 minutes this morning.[5am-6:30am]
Started the Google Business Intelligence Certificate today.
Added a little logging of slash commands in new-server.py for chat. /login, /register, /lookup, /oldmsgs Finished off last of course 6 for Data Analytics with Python on Coursera today.
[TODO] add an edit snippet to cms3 - it should give ?edit if logged in, or /api/login if correct IP but not logged in
- i should separate TODO's by topic/subject. cms3 vs load-page etc
getting a better notes/blog/blurbs system working should be a todo too, once i have on/off buttons working end to end
on my load-page (needs a controller for webcam too, so i can turn it on/off from webpage, versus starting and stopping
the bash script with LONG ffmpeg command) lol
Started editing this page before 7:45am
Finished reading exemplar to today's lab at 10:15am
Rewriting my viewer-page and producers and hub to make it a little less pre-formatted and more dynamic. Producers will send a message like {"type": "load", "server": "gohacker.info", "load1": "0.07"} after the producer first sends a hello message and gets a sendme message back. Also a pause message will keep the hub from sending data and will make it shut off the producers data for any data-stream that has no viewers that want to see it.
{"type": "hello", "server": "gohacker.info", "provides": ['load','http log','https log','etc'] } # from producer
- Producer8888 sending hellos correctly now. [DONE Aug 27]
- Hub needs to pass on to viewers. [DONE Aug 27]
- also hub needs to send available message for all producers when a viewer connects [DONE Aug 27]
Hub now forwards the hellos it got, removing them when viewer/producer disconnects
- Test a 2nd/3rd producer to verify they get hellos correctly too. [DONE Aug 27]
- renaming this producer to producer8888.py since it and the improved hub run on port 8888 [DONE Aug 27 8:34am]
- Fixed minor bug with producer restarting resulting in duplicate hello messages keyed
to the no longer valid websocket
- Another bug, producers shouldn't see hello's from other producers. Fixed. [DONE Aug 27 8:51am]
- Hub needs a rehi message to get the hello messages from producers since they no longer [DONE Fixed this by
crash when the hub is changed/restarted resending hello_list
when viewer resets]
- Unless the producers get into a timeout and then reconnect loop, they won't reconnect.
- started them off in paused=False mode instead and they immediately notice nothing is going
thru =) [DONE Aug 27 10:14am]
[DONE] - have viewer send a sendme message to start getting data
[DONE] - have hub track which viewer is consuming before sending them the data.
[BREAK 10:15am]
[BACK 10:30am] - read about jquery mobile and media queries - added mq480 page
- changed it to 400px as my iphone shows about 360 - thus a white background on it
[DONE] - hub has to parse messages between types: load,hello,sendme
[TODO] - hub needs to deque up to N messages so restarting will display recent load data
- deque docs
Hub starts
Producer starts -> sends hello to hub, hub forwards to any connected Viewers
-> connected viewers add a button to unpause/show this producer's services
Viewer starts -> hub sends initial msg with services of connected producers
Viewer sends sendme msg -> hub, hub unpauses producer if paused, other wise adds viewer to list of actively viewing viewers for that svc.
Viewer only gets msgs from producer it has requested, can pause them at any time.
{"type": "sendme", "server": "gohacker.info", "streams": ['load','http log'] } # from viewer to get load/log
{"type": "pause", "server": "gohacker.info", "streams": ['load'] } # from hub->producer pause load
# also sent from viewer->hub to pause a stream
{"type": "disconnected", "server": "gohacker.info" } # notice from hub->viewer when producer dies
{"type": "shutdown" } # notice from hub->producer to shut it off
# also what viewer sends to shutdown hub&producers
# if authenticated or just pause all for that
# viewer otherwise
Like the constructors that build the load graph I need to make controls for each producer and the streams it provides
Hub has to keep track of who is providing what and which viewer is consuming each stream from each producer.
Added a note when i moved this note to its own page so I didn't have to go thru and see when I added it to that log/load page lol The data is there, i keep the timestamp for each version of a page's creation and an active True/False field in the pages table...