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:

As you had asked :
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.

It is safer to keep the visibility of ad-hoc reports limited, because they are very powerful, and making a mistake can cause catastrophic damage to the database. 

But there is an option to send ad-hoc reports by email. Perhaps the non-admins can be sent the reports by email instead?
 
If we want to send those emails directly to those people, Moodle requires us to give access to the query to them - only then does it allow that user to be emailed the report. Instead, if the report is sent to you by email, and you forward it to the relevant users, would that be OK? 

The relevant queries for each user could be named in such a way that when you get emails from those queries, you could put in a GMail filter to automatically forward those emails to the respective people. 

I have set up a test query at
which will email daily at 3 pm. 


Saturday, June 25, 2022

local file sharing over wifi - Android to PC etc

https://linuxhint.com/wireless_file_sharing_apps_linux_android/

https://snapdrop.net

seemed to be the easiest option, since nothing needs to be installed. But right now it doesn't seem to work. Similarly,

https://www.sharedrop.io/

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.