Today we automated updating the database after git pushing to the server... It did not go smoothly.

We learned how to use read to read in variables from a file. To guard against ourselves, we checked the variable names for matches before assigning. To make the shell file simpler, we had to keep a trailing newline in the file.

Then we interpolated the variables into an INSERT query which we piped to mysql.

echo "INSERT INTO tablename (col1 col2) VALUES ('$val1' '$val2');" | mysql  --defaults-extra-file=/pathtoconffile/.my.cnf  -D nameofdatabase -uusername

Not sure if this is a good way of interacting with mysql.

Thus our site got a publicly accessible though short-lived configuration file. We now see the rationale behind putting publicly accessible files in a sub-folder of the development folder. Oh, well, we will do that during rewriting of the backend and things will break. Sorry, Feedly and anybody's bookmarks.

And we noticed that we had not pushed anything when git updated to version 2+, because it changed its default pushing policy. 😳 Meanwhile the coming of WSL broke our remote links because we used to use PuTTY. We switched back to Msys2's git for pushing. Meanwhile our lease on the original host server expired.

Indeed, a long time had elapsed.


Today the lecture was about finding the factor of proportionality of two vectors lying in a one-dimension space. :3 The latter part of the lecture was a bit messy, as the speaker jumped here and there, throwing us off. The main idea was that there were two ways to compute one thing and then miracle happened. The proof will be continued into the next lecture.

Sorry, we don't want to be too precise, so we did not write down the names of subjects.