A recent OS upgrade rendered the crontab to malfunction on macOS Monterey. It turned out the system just needed a reset of System Preferences > Security & Privacy > Privacy tab, and to make sure cron has full access to disks. Once you flipped that, your crontab should start working. Hope that helps.
Here’s how to reset a file from the master branch.
git checkout origin/master test.py
This will undo your changes and matches what’s in the master repo.
Instead of the GCP Console, you can reset Windows Server password via gcloud.
gcloud compute reset-windows-password server-name \ --zone us-central1-a \ --project project-id
Username and password will generated.
Reset uncommitted changes to both files and directories.
git reset --hard
Remove untracked files and directories.
git clean -fd
How to reset password of a GCP Compute Engine running on Windows OS.
gcloud compute reset-windows-password servername \ --zone us-central1-a \ --project your-project-id
This command creates an account and sets an initial password for the user [firstname_lastname] if the account does not already exist. If the account already exists, resetting the password can cause the LOSS OF ENCRYPTED DATA secured with the current password, including files and stored passwords. For more information, see: https://cloud.google.com/compute/docs/operating-systems/windows#reset Would you like to set or reset the password for [firstname_lastname] (Y/n)? y Resetting and retrieving password for [firstname_lastname] on [servername] Updated [https://www.googleapis.com/compute/v1/projects/your-project-id/zones/us-central1-a/instances/servername]. WARNING: Instance [servername] does not appear to have an external IP address, so it will not be able to accept external connections. To add an external IP address to the instance, use gcloud compute instances add-access-config. password: xxxxxxxxxxxxxxx username: firstname_lastname
To undo a git add, run git reset file or get reset.
git reset filename git reset
Run git status to check.
I tried running git after the Mac OS Catalina upgrade and got this error.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Here’s the fix. For some very odd reason, Apple does not automatically reinstall xcode after each Mac OS upgrade.
You will need to either reset it or install it again.
# Try reset first xcode-select --reset # Or install it if reset doesn't work xcode-select --install
Close your terminal, and reopen and run git again.
How to recover a MySQL root password without a password.
- Stop MySQL.
- Start MySQL Safe Mode.
- Login to MySQL as root without password.
- Change root password.
# Stop MySQL. service mysql stop # MySQL Safe Mode. mysqld_safe --skip-grant-tables &
# Login to MySQL without password. Set new password. mysql -u root -p use mysql; # For MySQL 5.6 or lower UPDATE mysql.user SET Password=PASSWORD('newpassword') WHERE User='root'; # For MySQL 5.7 or higher SET PASSWORD FOR 'root'@'localhost' = PASSWORD("newpassword"); FLUSH PRIVILEGES; exit;
# Kill mysqld killall mysqld # Restart MySQL service mysql start
I ran into issues running MySQL Safe mode. I got a “UNIX socket file don’t exists” error. Here’s the fix.
mkdir -p /var/run/mysqld chown mysql:mysql /var/run/mysqld