Mostly work related stuff which I would've entered into my "Log book". Instead of hosting it on an intranet site, outsourcing the hosting to blogger!
Saturday, October 28, 2023
moodle site registration issue and fix
request for new font in Moodle instance
Following a request to install a new font in a Moodle instance, I did a local install with
sudo mkdir -p /user/share/fonts/googlefonts
cd /usr/share/fonts/googlefonts
sudo unzip -d . ~/Tangerine.zip
sudo fc-cache -fv
Thursday, October 26, 2023
more reading about prototype pollution - even front-end can have vulnerabilities
Checking to see how critical are prototype pollution vulnerabilities for front-end code, apparently they are:
google photos links sent by email, not working on iPhone
I had shared some google photos albums using the sharing link, which is of the form https://photos.app.goo.gl/<id> and A said that they could not see the album.
My reply was,
those links are probably not opening in your iPhone because your phone's Apple Mail is not configured to use Safari or Chrome browser to open links.And that seemed to work.
It might work if you long press on the link, choose "Copy", and paste the link in Safari or Chrome browser in your phone.
Mongodb pros and cons
One of the many sites which list Mongodb vs Postgres comparisons,
https://www.knowledgenile.com/
Transaction-safety and joins etc are what mongodb doesn't offer, while sharding is its strength.
Wednesday, October 25, 2023
Amazon firestick not recognizing a USB drive - issue was with partitioning
There was one drive which was being recognized, and another drive which was not. The drive which was being recognized had the original 16 GB FAT32 partition, while the one which was not being recognized had been used as a Linux Mint installation disk, and had been later reformatted as FAT32 using the "Disks" utility on Linux Mint.
Suspecting that block size might be the issue, to show the block size,
sudo mkfs.fat /dev/(device name from above) -s 64 -F 16Then, tried GParted. GParted showed the partition to be of type iso9660!
Unmounted, Deleted the partition, recreated partition table with device -> create partition table (msdos), formatted as msdos, then the Firestick recognizes it OK even though the block size is 8K as shown in
stat -f /media/mac/LM
File: "/media/mac/LM"
ID: 83100000000 Namelen: 1530 Type: msdos
Block size: 8192 Fundamental block size: 8192
Blocks: Total: 1951116 Free: 1318805 Available: 1318805
Inodes: Total: 0 Free: 0
Tuesday, October 24, 2023
quick blender refresher
A quick 20 minute video walk-through of Blender 3.0
https://www.youtube.com/watch?v=Rqhtw7dg6Wk
Similar to https://hnsws.blogspot.com/2011/10/getting-started-with-blender.html
Monday, October 23, 2023
Sunday, October 22, 2023
upload artifact from github actions build
Create a Release and Upload Artifacts with GitHub Actions | Thomas Stringer (trstringer.com)
Just add the following, and it will create a zip file with the path -
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: artifact-of-build
path: platforms/android/app/build/outputs/
linux on ipad
In case someone wants to do some serious work on the ipad with a keyboard etc - installing alpine linux, python etc
app for new Moodle instance - several options
Saturday, October 21, 2023
optimizing github actions build using cache
Friday, October 20, 2023
folder permissions for webserver on Apache
https://www.internalpointers.com/post/right-folder-permission-website - Good solution is to chown -R all files and folder to yourusername:www-data - so that the web server and you can access, and then chmod 750 for all files / folders - "read, write and execute (7) for the owner (i.e. you), read and execute (5) for the group owner (i.e. the web server), zero permissions at all (0) for others."
(But when we want Moodle to be able to update plugins with the web interface, we've used 775 instead.)
Wednesday, October 18, 2023
Travis deploy to Github releases - requires classic personal access token
OCVWarp deployment from Travis-CI to Github Releases failed because the token had expired. When creating a new token, I tried a fine-grained token with write permissions to releases on that repo alone. But that did not seem to work. A "classic" personal token with "repo" scope worked fine.
Tuesday, October 17, 2023
"Self driving car" on a budget using webcam and arduino
An interesting video and project via Computerphile on youtube -
SelfDriving/DataCapture.py at main · apt503/SelfDriving · GitHub
Of course, this is just a side project, but the approach is interesting.
Sunday, October 15, 2023
migrating from Android to iPhone
How to migrate your WhatsApp data from Android to iPhone | WhatsApp Help Center
Though this method was followed, only the photos and media were transferred from whatsapp, not the chat history. Probably that was because whatsapp had been earlier installed on the iphone, though it was then removed with "delete all data"?
https://faq.whatsapp.com/1195710084347483?helpref=faq_content
then, to transfer music, move content manually from your Android device to your iPhone,
Friday, October 13, 2023
playing local video from firestick without internet
While setting up the Firestick, we wanted to create a new dedicated account for it, but it asked for a unique phone number - so we just used my account.
We found VLC player was stuttering with our 4K videos on USB, but MXPlayer works with hardware acceleration, and plays them perfectly. To access MXPlayer without internet, via Quora,
Settings --> “Applications” --> “Manage installed applications” --> "MXPlayer" --> "Launch"
And it looks like there is no "shutdown" option - we just press "home" to come out of MXPlayer, and then turn off power to the device.
Our Firestick runs FireOS 6.4, but we did not have to do any ADB commands to use FAT32 formatted USB memory. The ADB commands in this pdf may be useful for increasing system usable memory, installing apps and so on, but not needed for us.
As recommended in this troubleshooting video, when connecting for the first time, doing so from the "home" screen might be beneficial.
How to play our own content from USB on Amazon Firestick
We can't just connect the firestick to a computer and transfer files to its internal memory - MTP does not work with Firestick 4k -
But far simpler to just use a removable USB drive.
Thursday, October 12, 2023
error updating snapd
Investigating unresponsive server behaviour on one of our servers,
grep -i error /var/log/syslog
showed some lines with WALinuxAgent - this is Azure's agent, I guess, as well as snapd.
snapd[63805]: stateengine.go:149: state ensure error: cannot query the store for updates
To check if we can remove snapd
How to remove LXD from my system - LXD - Linux Containers Forum
So I left it alone, and tried a manual update with
sudo snap refresh
which indicated all packages were up to date. So maybe the error was a temporary error.
issue with one of our Linux servers
One of our Linux servers was becoming unresponsive around 2-5 pm daily over 2-3 days. Checked the logs as in my earlier post but did not find anything except the usual SSH brute-forcing attacks. Changed the port from 22 to something else by
sudo nano /etc/ssh/sshd_config
sudo service sshd restart
And opened the new port on Azure portal Networking screen.
This seems to have worked.
