user = ouruser
command = /usr/bin/python ourapp.py
directory = /home/our/path/to/WebServer
autostart = true
autorestart = true
https://www.digitalocean.com/community/tutorials/how-to- add-authentication-to-your- app-with-flask-login
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!
https://www.digitalocean.com/community/tutorials/how-to- add-authentication-to-your- app-with-flask-login
Testing out various options, found that these two smart lamps do the job for us.
Wipro Next Smart Wi-Fi 20W CCT+RGB LED Batten | 16 Million Colours | White Tunable | Dimmable |Scheduling |Scene Creation |Smart Grouping of Lights |Amazon Alexa & Google Asst. Compatible |Pack of 1
https://www.amazon.in/gp/product/B08D19X3LS/
Amazon Basics - 9W Smart LED Bulb with Alexa, Google Assistant & Wi-Fi Enabled (Pack of 1, Cool White, B22 Holder)
https://www.amazon.in/gp/product/B0BBMRCFGW/
Apparently these are Tuya compatible, since they are controlled using the Smart Life app.
We could control these using either the Smart Life app or the Alexa app, but in case future updates cause them to need a subscription or something, I thought of writing python controls for them with the help of tinytuya.
Some notes.
The Amazon basics lamp - for pairing, need to put on and off exactly 5 times: doing 10 times does not seem to work. First need to set up in smart life app, only then can we set up in Alexa app.
1. Smart Life App -
2. Alexa App -
3. Writing a python script: I'll write a separate post on my notes for writing this set of scripts.
There was a request to find/replace some boilerplate text in a few thousand pdfs. One option was to use https://pdfreplacer.com/
and see if it does the job with a watermark.
(You may need to find/replace one line at a time).
Just for interest, looked at scripting options, found it was quite complicated. Some notes below.
We purchased a cheap dimmer off Amazon which advertised "suitable for LED", but when we hooked up some of the lights we have, the lights started flashing instead of dimming. Dimming worked OK for incandescent bulbs. Looking around for solutions, found these videos which gave some good info.
The problem with dimming AC LED bulbs - https://www.youtube.com/watch?
Apparently the issue is that those LEDs which are sold as "not dimmable" (or in our case which specifically don't say "dimmable") contain an SMPS with a capacitor across it, so the pulse width modulation of the dimmer circuit causes it to flash instead of dim.
Apparently we can dim such bulbs using a capacitor - https://www.youtube.com/watch?
Following the different methods given at https://kodekloud.com/blog/file-creation-time-linux/#
On one of our Azure Ubuntu 20.04 servers, only the debugfs solution worked.
sudo debugfs -R 'stat /path/to/our/file.txt' /dev/root
... etc crtime: 0x64afbcf8:ea7086a8 -- Thu Jul 13 08:59:36 2023-----------------------------------------
ls -l --time=birth ourfile.txt
ls: invalid argument ‘birth’ for ‘--time’
Valid arguments are:
- ‘atime’, ‘access’, ‘use’
- ‘ctime’, ‘status’
--------------------------------------
stat additionalplugins.txt
... etc ...
Change: 2023-07-24 05:00:13.991923547 +0000
Birth: -
Bulk deleting all files on a website - found that deleting via Filezilla ftp client was taking a long time, since each file delete command was being sent via ftp. Logged on to Plesk, chose the directories to delete and chose the Remove button, opting to not move to Recycle bin - this went much faster, since Plesk would just use the OS command to delete the entire folder and all files in it.
The upgrade from Linux Mint 21.1 to 21.2 went surprisingly easily. For a change, I just clicked on the graphical update manager / system reports prompt which said that a new version is available. I did read through the release notes as prompted, but overall, the upgrade did not force me to take a timeshift backup etc. I just started the process and continued working on Firefox - the upgrade went on in the background, and finished after an hour or so. It took an hour because (a) my internet speed was limited to 4 Mbps and (b) the machine is an old Macbook Pro.
After a reboot, the only thing removed by apt autoremove was "vera backgrounds". I went into Update Manager, changed to local mirrors, and then via View -> Linux Kernels -> Remove Kernels , removed the 5.19 kernel in favour of the installed 6.2 kernel. After going through the menu again, removed 5.15 kernel too.
I've been trying out test html pages on W3Schools' new free offering, https://spaces.w3schools.com/
Useful for quick tests of css/html changes. Easier than setting up a web server on every local machine I work on.
Recently I got an automated email from reporter at repo-lookout.org warning of an exposed git repo on one of our sites. According to this,
https://iosentrix.com/blog/git-source-code-disclosure-vulnerability/
I fixed it using the method for Apache 2.4
<DirectoryMatch "^/.*/\.git/">
Require all denied
</DirectoryMatch>
If we log out after printing the generated application form, we can either wait for a week for the application form to get reset, or go to Service Requests Tracker, where the application form is noted as incomplete, which we can then resume. Perhaps this is shown only after a day or so. (Phone support asked me to email portalsupport at licindia.com but there was no response from them.)
Edit: As noted in the other post about issues with the website etc, had a good experience with LIC's customer zone, Kozhikode, via telephone. Very helpful, unlike the toll-free phone support.