Project Structure - Modules - Signing tab - add a configuration, and under Build types tab, release build, under signing config, choose the one which we have added.
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, April 07, 2021
signing release build apk files in android studio
Project Structure - Modules - Signing tab - add a configuration, and under Build types tab, release build, under signing config, choose the one which we have added.
loading software on a few hundred tablets
There was some discussion about loading software on some Android devices which were to be shipped to schools.
Initial thought was to create ids like
OurPrefix.TAB.2021.01@gmail.com
to log on to the play store for the tablet which has asset id OurPrefix-TAB-01 etc.
We could then print out the password and put it in the box for the teachers to change if necessary.
This is required, since this is not a factory install, and factory install process is very different from manual install :) For a manual install, we have to log on to the play store with a particular account, etc etc.
If we are to not create such ids, installing and then logging out of the account used to install can work for our free apps, but with the drawback that the apps will not update. For updates, the users would have to uninstall and reinstall.
The next idea was to install all these apps using pre-downloaded APK files, so that the internet connection would not be a bottleneck in the prep process which was planned to be done on a single day for several hundred devices - taking the help of a score or more of volunteers. This too had the drawback of the apps not updating automatically from the Play store.
Finally the idea of links to the Play store was mooted.
- Connect via USB cable to the computer, Choose the "File transfer' USB usage preference, copy the tabletslinks.txt file to the Download directory on the tablet.
- Navigate to the txt file using Google Files on the tablet, click on it and choose to open with Chrome.
- Copy each line (each link), open a new tab in Chrome, paste in Chrome, hit Enter (while offline)
- Click the three vertical dots on the right hand side of the Chrome address bar, choose "Add to Home Screen"
- Write an appropriate short link title like Pdf for the adobe pdf reader link, Office for the office link, Teams/Meet/Zoom for the respective links.
- Drag and drop the link to the home screen.
Monday, April 05, 2021
Sunday, April 04, 2021
change default app in Android
Saturday, April 03, 2021
Android studio Git checkout
For checking out at a specific commit -
https://stackoverflow.com/questions/36517118/how-do-i-checkout-an-old-git-commit-in-android-studio
right-click relevant commit on the Git tab's history, choose 'Checkout revision <hash>'
keeping Windows and Linux dual-boot times correct
This 2011 post has the Kubuntu 10 way, and for current machines running systemd, the way to do it is, if choosing to make Linux use the hardware clock as local time,
timedatectl set-local-rtc 1
Thursday, April 01, 2021
fixing Filezilla error about LC_CTYPE environment variable
As described on this page, the solution was
sudo nano /usr/share/applications/filezilla.desktop
Find the line
Exec=filezilla
and replace it with
Exec=env LC_ALL=en_US.UTF-8 filezilla
Tuesday, March 30, 2021
how to identify if a DLL is a debug or release build
Monday, March 29, 2021
repairing boot after installing windows
creating Windows installer USB drive from ISO - on Linux with woeusb
The usual route using unetbootin would need the USB drive to be partitioned as FAT32 (using gparted, the Disks utility on Linux Mint doesn't do it - and have to mount with Disks utility after gparted does the reformatting). But then the Windows 10 installation ISO contains a file installer.wim which is 5 GB, so it can't be written to the FAT32 volume. So we have to use ntfs -
https://askubuntu.com/questions/162174/how-do-i-use-unetbootin-to-make-a-bootable-windows-usb-installer
or use woeusb.
(Detailed steps:
woeusb ppa gives error on install,
The following packages have unmet dependencies:
woeusb : Depends: libwxgtk3.0-0v5 (>= 3.0.4+dfsg) but it is not installable
E: Unable to correct problems, you have held broken packages.
woeusb
needs https://wimlib.net/
sudo apt install build-essential
./configure
gave
No package 'libxml-2.0' found
sudo apt install libxml2-dev
Cannot find libntfs-3g
sudo apt install ntfs-3g-dev
error: Cannot find libfuse
sudo apt install libfuse-dev
sudo ./woeusb-5.1.0.bash --device /home/path/Win10_20H2_v2_EnglishInternational_x64.iso /dev/sdb
wimlib-imagex: error while loading shared libraries: libwim.so.15: cannot open shared object file: No such file or directory
Solution was to run ldconfig, as found in
https://wimlib.net/forums/viewtopic.php?t=240
sudo ldconfig -v
)
Visual Studio publish and deploy ASP .NET Core app to IIS
This link has the basics on how to do the setup, and also some do's and don'ts for ASP .NET apps on IIS - https://docs.microsoft.com/en-us/aspnet/core/tutorials/publish-to-iis?view=aspnetcore-3.0&tabs=visual-studio
Sunday, March 28, 2021
run explorer as Administrator
On Windows server, there is no "Run As Administrator" directly available for File Explorer. So, we can go to C:\Windows with File Explorer, and then right-click on explorer.exe and Run As Administrator.
sql query to replace a substring
We needed to replace some Windows paths in a MySQL database. Following
https://www.mysqltutorial.org/mysql-string-replace-function.aspx/
update tablename set tablename.MediaSource = REPLACE(tablename.MediaSource,
m4a,
mp3)
WHERE
tablename.MediaSource like '%Dashboard%1%1%2%1%2.m4a';
and if we wanted to be more specific, the '\' in the Windows paths need to be escaped as four backslashes - following https://stackoverflow.com/questions/14926386/how-to-search-for-slash-in-mysql-and-why-escaping-not-required-for-wher -
select * from tablename where tablename.MediaSource like '%Dashboard%1%1%2\\\\1\\\\2.m4a';
And the syntax for a count statement was like
select count(*) from (select * from tablename where tablename.MediaSource like '%Dashboard%m4a') myqueryname;
finding mysql data size
According to
https://support.microfocus.com/kb/doc.php?id=7019203#
we can find the data directory from my.ini which would be in server directory in program files - the datadir line in my.ini
But on our install, it was in c:\programdata\mysql
and data was also there.
Notes on locally mounting Windows NTFS drive on dual boot Linux
In order to make the partition visible as a separate entry on the side bar, move mount point to /media/windows1 or something like that -
https://forums.linuxmint.com/viewtopic.php?t=300597
https://www.google.com/search?q=umask+needed+to+make+vfat+drive+writable+by+all+users+on+linux
umask=0 for writable by all.
visual studio offline installer
Adding google search to Firefox on Linux Mint
Linux Mint has removed Google from the search engines available by default, and we have to follow a "Microsoft-esque" convoluted procedure to make Google search available from the address bar or the search box - following https://www.techbrown.com/add-google-default-search-engine-firefox-linux-mint/
- Go to https://linuxmint.com/searchengines.php
- Scroll down to the bottom of the page and click on the Google logo
- The page which loads up then has instructions to right-click on the address bar and add Google search from the context menu.
- Then we can choose to make Google the default search from the search box from the "Change search settings" gear icon under the search box also.
Restoring Linux after Windows install
Friday, March 26, 2021
customizing Moodle theme per course
Replying to a request of adding blocks to some courses on one of our Moodle servers -
https://moodle.org/mod/forum/discuss.php?d=256667
Site administration>Appearance>Themes>Theme settings - can set it to allow course themes.
Then I went to an example test course I created,
- Turned editing on,
- clicked on the gear icon,
- clicked on Edit settings,
- Scrolled down to Appearance, opened up the Appearance section,
- and in the appearance section, chose
- Force Theme : Boost.
- After doing that, I'm able to add blocks as per this video,
https://www.youtube.com/watch?v=uByp1qqcWt8
But please note, not all types of blocks are supported on mobile - please see the list of supported blocks below.
https://docs.moodle.org/310/en/Moodle_App_Block_support
In this way, you can set your own look and feel for only some courses as per the method above, without disturbing the look and feel of the rest of the site.
finding and listing files without extensions in Linux
This post -
https://askubuntu.com/questions/337964/list-all-files-that-do-not-have-extensions
uses ls to list all files without extensions.
Then there is the technique using find,
https://unix.stackexchange.com/questions/47151/how-do-i-list-every-file-in-a-directory-except-those-with-specified-extensions
to list those files other than those with specific extensions, which I used like
find nameofdirectory ! '(' -name '*.mp3' -o -name '*.docx' -o -name '*.zip' ')'
find nameofdirectory ! '(' -name '*.*' ')'
lists directories also.
find nameofdirectory -type f ! '(' -name '*.*' ')' | wc -l
for counting the total.