Include a technical summary of the code update.
[x] added unit test [x] executed all unit tests in DEV env [x] added PHPUnit groups to facilitate unit tests execution
[x] conducted basic QA in TEST/DEV envs
# | |
# BACKUP FILES | |
# sources: | |
# https://tonyteaches.tech/rsync-backup-tutorial/ | |
# https://www.nexcess.net/help/using-rsync-for-backups/ | |
# | |
# daily | |
tar -zcf /home/tony/backup/daily/backup-$(date +%Y%m%d).tar.gz /home/website/public_html | |
find /home/tony/backup/daily/* -mtime +7 -delete |
## zsh git aliases | |
https://github.com/ohmyzsh/ohmyzsh/wiki/Cheatsheet | |
## stash files for later | |
# add files to stash | |
git stash push -m "mystash" | |
# use specific stash | |
# use by number (n) |
## Add current logged in linux user to docker group | |
1. sudo usermod -aG docker ${USER} | |
# To apply the new group membership, log out of the server and back in, or type the following: | |
2. su - ${USER} | |
# You will be prompted to enter your user’s password to continue. | |
# Confirm that your user is now added to the docker group by typing: | |
3. groups |
const myMethod = function () { | |
const promise = new Promise(function (resolve, reject) { | |
const result = null; | |
const y = "geeksforgeeks"; | |
if (result !== null) { | |
resolve(result); | |
} else { | |
reject("Error"); | |
} | |
}); |
# | |
# renews lets encrypt on a running server | |
# note: not ideal as it stops/renews nginx for a few millisecs | |
# | |
sudo certbot certonly --standalone --pre-hook "service nginx stop" --post-hook "service nginx restart" -d mydomain.com -d www.mydomain.com | |
# PHP COMPATIBILITY CHECK | |
# PHP CODE SNIFFER (with compatibility 7.4) | |
docker run --rm -v $(pwd):/app vfac/php7compatibility 7.4 [folder or file path] --extensions=php --ignore=vendor | |
# ------- | |
# PHPSTAN (with .neon configs) |
<?php | |
namespace App; | |
use PHPMailer\PHPMailer\PHPMailer; | |
use PHPMailer\PHPMailer\SMTP; | |
class Mailer | |
{ | |
private $client; |