When you need to find a difference in large lists, simply compare their indexes one at a time and break when something doesn't match.
x = ['a', 'b', 'c']
y = ['a', 'c', 'c']
Getting access to SSH inside a Crontab is often a problem for many as the environment in which your cron runs is not the same as your normal shell. Simply running ssh-add
will not allow you to use your SSH Agent inside your crontab. Follow the below guide to setup your crontab to use your ssh-agent
:
~/.zlogin
file which will be invoked on each login. This will allow your crontab (and normal shell) to use your ssh keys and bypass needing to punch in your password each time you need SSH. This will also span across multiple sessions and shells.After years of trying to setup a mail server on macOS without requiring dependencies or messing with ports to trick my ISP into letting mail out, I figured out a solution.
Note: This guide is opinionated towards a Gmail setup.
Having troubles with Xcode or their Command Line Tools? Follow this guide to reset your Xcode instance on macOS and resolve issues such as "No Xcode or CLT version detected!"
xcode-select -print-path
#!/bin/bash | |
# Copy a set of files to each repo in a dir, create a branch, and push to origin | |
# Requires GitHub CLI: `brew install gh` and must be logged in with `gh auth login` | |
# GitHub CLI Docs: https://cli.github.com/manual/ | |
MAIN_BRANCH="master" | |
BRANCH_NAME="ignore_cassette_diffs" | |
COMMIT_MESSAGE="chore: ignore cassette diffs via gitattributes" | |
PR_TITLE="$COMMIT_MESSAGE" |
Frameworks such as Laravel will no longer work with the native mysql passwords when upgraded. Follow these steps to correct:
docker exec -it database_container bash
mysql -u root -p
ALTER USER username IDENTIFIED WITH caching_sha2_password BY 'MYPASSWORDHERE';
Guide to migrating Google Drives across domains.
Have you ever needed to migrate files or an entire drive structure from one domain to another? Many people have. Whether you rebrand or just want to share some files with another company quickly, there is a growing need to do this; however, Google does not provide a way to automatically migrate files across domains. I spent the last two years brainstorming and testing methods to do this after the company I worked for rebranded and we suddenly had a need to move 4+ terrabytes of data and thousands of folders across domains. Here is the journey we took to get there.