- What software readiness is required? (This may or may not work.)
- Any documentation to be completed?
- We are currently on version 1.3.6 which is distributed as a link on Google drive. The way it works is that if someone has 1.3.5 on their device, 1.3.6 understands that and overwrites 1.3.5 while installing 1.3.6. Now, if we place either 1.3.6 or the later version in Google PlayStore, will it automatically detect the version installed using a Google drive link?
- Some releases will be mandatory, and we would like the app to force update (for critical errors) and some releases may not be mandatory. Is this possible?
- Can our developer team place it in Google PlayStore or will it be placed by you?
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!
Wednesday, July 06, 2022
FAQ about uploading an Android app to Google's Play store
Saturday, July 02, 2022
iframe contents resizing
We had an iframe with a blogspot blog being displayed on the website. But the iframe content was too wide, there were horizontal scroll-bars on the iframe. Looking for solutions to resize the content, this answer scales it by half, and this answer has support for more browsers. I used the latter, but without the pos. So,
....
<head>
....
<link rel="stylesheet" type="text/css" href="../../css/iframe-for-blog.css" />
....
</head>
and in the iframe-for-blog css file,
iframe {
| /* Set the width of the iframe the size you want to transform it FROM */ |
| width: 1108px; |
| height: 710px; |
| /* apply the transform */ |
| -webkit-transform:scale(0.75); |
| -moz-transform:scale(0.75); |
| -o-transform:scale(0.75); |
| transform:scale(0.75); |
| /* position it, as if it was the original size |
| position: absolute; - we're not using this. |
| left: -400px; |
| top: -200px; */ |
Wednesday, June 29, 2022
regexmatch in google sheets
https://spreadsheetpoint.com/regexmatch-function-google-sheets/
Regexmatch() returns TRUE if expression matches, FALSE if it doesn't.
Syntax like
=if(regexmatch(D20,"NANDA"),if(regexmatch(D20,"LIFE"),G20,0),0)
means that the cell value would equal G20 if it matches both conditions, and 0 if it doesn't.
https://support.google.com/docs/answer/3093364?hl=en
IF(logical_expression, value_if_true, value_if_false)
Monday, June 27, 2022
adding applications to cinnamon menu
https://kerneltips.com/add-applications-to-cinnamon-menu-in-linux-mint-20
Right-click --> Configure --> Menu Editor --> New Item
or
Right-click on Desktop --> Create new launcher here
(it asks "Would you like to add this launcher to the menu also" and will add to the "Other" category.)
Sunday, June 26, 2022
notes on giving access to ad-hoc queries
Copy-pasting from an email exchange:
who apart from admin can be given a role which will enable viewing and downloading ad-hoc data base query reports for example non editing teacher.
Saturday, June 25, 2022
local file sharing over wifi - Android to PC etc
https://linuxhint.com/wireless_file_sharing_apps_linux_android/
seemed to be the easiest option, since nothing needs to be installed. But right now it doesn't seem to work. Similarly,
Maybe it is blocked by the Studio network, and would work at home?
Monday, June 06, 2022
changing DNS server for lookups on a systemd Linux machine using the terminal
GUI-based DNS changes are fine, but there seems to be a lot of conflicting info on changing the DNS server using the command line on Linux. For example,
For Ubuntu 20.04, https://phoenixnap.com/kb/ubuntu-dns-nameservers needs the yaml file in /etc/netplan to be edited, but on Linux Mint 20.3, that yaml file does not contain anything except
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
This post https://forums.linuxmint.com/viewtopic.php?t=321682 talks about installing resolvconf and creating / editing a file /etc/resolvconf/resolv.conf.d/head which does not exist on Linux Mint 20.3
What does exist is
/etc/systemd/resolved.conf
(but it has no entries) and also
/etc/resolv.conf
(but it says # This file is managed by man:systemd-resolved(8). Do not edit.
And it does not have the custom name server 8.8.8.8 I have configured via the GUI. )
From https://wiki.archlinux.org/title/Systemd-resolved#Manually I find that the file
/etc/systemd/resolved.conf.d/dns_servers.conf
does not exist - there is no directory called /etc/systemd/resolved.conf.d/
This thread
https://www.digitalocean.com/community/questions/fedora-33-how-to-persist-dns-settings-via-etc-resolv-conf
has some clues about why some methods work, and why some don't - various distros are changing the way in which DNS resolution works, so we would need to look at our specific distribution's docs for correct info.
Edit: And this thread gives some details about Linux Mint 20.3 - basically saying that we have to use the GUI - https://forums.linuxmint.com/viewtopic.php?t=371120
Wednesday, June 01, 2022
restoring a Windows 11 laptop - Samsung Galaxy Book2 Windows 11 restore install with wifi not recognized
A Samsung Galaxy Book2 laptop which came with Windows 11 Home pre-loaded was not booting into Windows after MX Linux was installed. Checking, found that the reason why Windows was not booting was that MX Linux had been installed on top of the 200 GB Windows partition. The other Windows RE partition which was undisturbed was just the recovery partition, not the C drive.
Going into "BIOS" settings was a bit of a chore. If Windows was booting, the method is to press Shift+click on Start - Reboot. Without Windows, we need to boot with some bootable device - if it is Grub based, there would be an entry similar to "System Settings", choosing which the machine would reboot into the "BIOS" screen - which in this case also had a GUI. Booting 3 times unsuccessfully is also supposed to take us to that screen. Then we can go to Boot - Boot Device Priority and choose a USB drive as the first boot device.
Edit: Pressing F10 on power-on also gives the option to choose boot device and or change UEFI boot settings.
Creating a Windows 11 install disk on a 16 GB USB drive using Linux did not work, following the method given here. Perhaps it was due to the NTFS formatting? Or maybe due to some wrong boot flag? Anyway, created a bootable USB drive Windows 11 installer using Windows 10 on another computer, which took 2-3 hours because it downloaded around 5 GB. Booting from that device, once the installation was completed and "Restore from username" was chosen, files were restored from Microsoft OneDrive and activation of Windows 11 Home was also shown to be completed.
Before the installation could complete, there was the same issue as with the Samsung Galaxy Book Go LTE, which is that the built in wifi network adapter was not recognized by the Windows 11 installer, so installation would stop at the point where it requires you to log in to a Microsoft account. The workaround in this case was to plug in a USB wifi adapter which was known to work with Linux, which also worked with the Windows 11 installer.
Tuesday, May 31, 2022
cloning disks on Linux
Just a reminder to myself - dd can clone not just partitions but entire devices as well. https://linuxhint.com/clone-disk-using-dd-linux/ So, if only one partition needs to be cloned,
sudo dd if=/dev/sdb1 of=/dev/sdc1 status=progress
This will take only as much time as needed for the data present that one partition.
If we want to make a complete clone of all partitions of one USB drive into another,
sudo dd if=/dev/sdb of=/dev/sdc status=progress
This will take much longer, even if the devices are mostly empty. For example, for 16 GB flash drives with only 2 GB of data, it took around 90 minutes on the Macbook Pro, using the default block size, going at around 3 MB per second.
16000 / 3 / 60 = 88.89 minutes.
Monday, May 30, 2022
checking battery cycles in Linux
Sunday, May 29, 2022
suspend to RAM - sleep mode - issue with Linux Mint 20.3
After an upgrade to Linux Mint 20.3 from 19.3, the Macbook was showing a garbled screen when waking up from sleep - i.e. suspend to RAM had some issue, probably with the graphics card. The suspend would also take 1 to 3 minutes to complete, with the fan being on for that time with a blank screen. Ctrl+Option+Fn+F2 was allowing a text-mode terminal to be opened, and syslog showed "Buffer eviction failed" before the suspend was taking effect.
https://hnsws.blogspot.com/2021/03/linux-mint-workspace-size.html
since I had mirrored displays instead of disabling one display. But even after disabling one display, the same issue continued.
https://hnsws.blogspot.com/2021/08/verbose-display-while-booting-with.html
https://www.cyberciti.biz/faq/display-view-linux-kernel-parameters-for-booted/
Friday, May 27, 2022
mapping custom domains to github pages on multiple repositories
I was under the impression that one user can only map one custom domain to one repository with Github pages. But this post shows how to map multiple custom domains to multiple repositories for the same username -
https://deanattali.com/blog/multiple-github-pages-domains/
So, instead of Nettigritty's flaky domain redirection which doesn't work half the time, I've now used a meta redirect on another repo which has only index.html to redirect one of our websites. So the steps are:
- Add A records with IP addresses obtained by dig username.github.io
- Add CNAME record pointing to username.github.io (this is the tricky part which people miss out)
- Enable github pages in the Github repository settings
- Enable custom domain in the Github repository settings.
- After site works, enforce HTTPS in the Github repository settings - if necessary, wait 24 hours before doing this for DNS to propagate.
Wednesday, May 25, 2022
privacy policy and other policies in Moodle
There was a request to add an amended privacy and usage policy on one of our Moodle servers. It was desirable that users click to agree to the policy on their next sign-in.
Under Site Administration - Users tab - Privacy and Policies - Policy settings,
there is the option to change from the Default policy handler (which has the option only for a single site policy and a single site policy for guests)
to the policy_tool policy handler, which has the option to add more policies.
https://docs.moodle.org/400/en/Policies
According to this page, when a new policy is added using this tool, all users will be required to agree to that policy on next login.
After the policy handler is changed to policy_tool , then
The new policy can be added using the page
Site Administration - Users tab - Privacy and Policies - Manage policies
https://our.domain/admin/tool/policy/editpolicydoc.php
The policy can be of type
Site policy
Privacy policy
3rd party policy
or
Other policy
Monday, May 23, 2022
dos disk repair on Linux
https://askubuntu.com/
So, either
sudo apt-get install dosfstools
sudo dosfsck -w -r -l -a -v -t /dev/sdc1
or
fsck.vfat -a /dev/sdc1
Logical sector size is zero.
https://ubuntuforums.org/
Apparently
testdisk is the solution.
Disk /dev/sdc: 232.91 GiB, 250059350016 bytes, 488397168 sectors
Disk model: External USB HDD
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4d2b50bb
Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 63 488392064 488392002 232.9G 83 Linux
(In this case, found that the partition had been overwritten by a linux partition :)
Sunday, May 22, 2022
installing a printer on the samsung galaxy book go LTE laptop
Saturday, May 21, 2022
troubleshooting ad-hoc query reports in Moodle
Number of files downloaded per user query
The following was my procedure for making corrections to this ad-hoc Moodle query:
Expanding out the sub-query and running it in DBeaver, could see the discrepancies in the count. Changed the select count() to just select, then went step by step to identify which rows were causing discrepancies, copy-pasting the filenames to adjacent columns on a temporary google sheet for easy comparison.
It turns out the bugs in the query were due to some assumptions which I made about the prefix_logstore_standard_log table:
1. I assumed each file download led to a single log entry - no, there are multiple log entries for each download
2. I assumed that the shorter query which I used for counting the number of files will be sufficient, apparently it is not.
3. There were also overcounting in case the user was downloading the same file multiple times.
So, I have made some modifications to both the queries, now they shows the number of files downloaded which are of non-zero size. The files listing only shows one filename for each download and does not indicate multiple downloads, so now I have modified the number of files counted per user also to ignore multiple downloads of the same file.
In the case of these users I tested, one user has download some files many times, like
Even after this, there were mismatches in the count. The reason is that was, the query "Number of files downloaded per user" counted only distinct filenames.
Now, there are some files with the same name, but with different content, like Fractions.pdf which occurs with different content in different courses. The listing of files shows these separately.
I can correct for this by choosing
count(distinct f2.contenthash) instead of
count(distinct f2.filename)
But still the numbers won't match. This is because there are some files with exactly the same name and same content, in different courses.
For example,
VI Maths || Fractions || VC_Way of Sharing from the Whole.pptx || 779583
VI TNSSE Maths || Fractions Term III || VC_Way of Sharing from the Whole.pptx || 779583
which have both been downloaded by the user we checked.
So, in order to count these files also separately, I will count
count(distinct concat(f2.contenthash,l2.contextinstanceid) instead of simply
count(distinct f2.contenthash)
Then it matches for this user.
Files downloaded per user query
The reason for the "short name of the course, resource reviewed and files downloaded mismatch" for the other query was wrong mapping of resourceid in the log.
In our query, we have
left join vv_resource r on l.objectid = r.id
i.e. we are mapping the objectid to resourceid. But this seems to be wrong.
To see why, I went through all the columns in the logstore log table.
There is a column which says objecttable. For those entries where objecttable says resource, the mapping is correct. For example, pdf files. The contextinstanceid seems to be unique to each course section.
So, I modified the query so that instead of "Resource viewed", I have put the column "Course Module" which shows the correct course module -
vcs.name, from
left join {course_modules} vcm on l.contextinstanceid = vcm.id
left join {course_sections} vcs on vcm.section = vcs.id
Then the query gives correct results for pdf files as well as other file types like pptx.
Thursday, May 19, 2022
usrmerge message after fresh Linux Mint 20.3 Install
There are two scripts:/usr/lib/convert-etc-shells/usr/lib/convert-usrmergewhich execute the needed changes, in case they have not been done already.
But in my case, ls -l / was showing all the symlinks like bin -> usr/bin etc. So I asked Mint to ignore this report and not show it again.
Friday, May 13, 2022
Samsung Galaxy Book Go LTE - no wifi after factory reset
Thursday, May 12, 2022
blocking phishing emails from Google Workspace
- simple content search NameOfVC in headers
- AND is from @gmail.com
- should be blocked



