When you inevitably break the repository right before a deadline, use these.
Leaves your working directory exactly as it was, just removes the commit from history.
git reset --soft HEAD~1
Warning: This deletes all uncommitted work.
git fetch origin
git reset --hard origin/main
git stash -u
Quick reference for string parsing.
\d - Any digit\w - Alphanumeric + underscore\s - Whitespace+ - One or more* - Zero or moreimport re
pattern = r"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"
is_valid = re.match(pattern, "[email protected]")
Base URL: http://localhost:3000/api/v1
GET /users - Fetch all usersPOST /users - Create new userGET /users/:id - Fetch specific user detailsPOST /auth/login - Returns JWT tokenPOST /auth/refresh - Renew tokenNote: Need to implement JWT authorization middleware before Friday's capstone demo!
tar CommandI always forget the flags for this.
tar -cvf archive_name.tar /path/to/directory
tar -xvf archive_name.tar
-c : Create-x : Extract-v : Verbose (show files being processed)-f : File (specify the filename)-z : Compress with gzip (use .tar.gz extension)