# This must be done as root:
sudo mkdir /root/.secrets
sudo touch /root/.secrets/cloudflare.ini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RED='\033[0;31m' | |
| YELLOW='\033[1;33m' | |
| BOLD='\033[1m' | |
| NC='\033[0m' | |
| GOOGLE_CLOUD_IMAGE_NAME_BASE="europe-west4-docker.pkg.dev/my-project-id/foo-bar" | |
| if ! gcloud auth print-access-token >/dev/null 2>&1; then | |
| printf "\n${RED}${BOLD}gcloud auth is not valid${NC} — the push to ${GOOGLE_CLOUD_IMAGE_NAME_BASE} would fail.\n" | |
| printf "Your Google session has likely expired. Run:\n\n ${BOLD}gcloud auth login${NC}\n\n" | |
| printf "then re-run this build. ${YELLOW}Nothing was built or changed.${NC}\n\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function activate_venv_if_exists() { | |
| local current_dir="$PWD" | |
| local found_venv="" | |
| # Loop upwards through the directory hierarchy | |
| while [[ "$current_dir" != "/" && "$current_dir" != "" ]]; do | |
| if [[ -d "$current_dir/venv" ]]; then | |
| found_venv="$current_dir/venv" | |
| break | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # In the server tag: | |
| include /etc/nginx/locations.conf.d/favicons.conf; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // You should be using the web app for this. Open developer tools, navigate to console, and paste this. | |
| // Then press enter. It'll take a while! If you've got many unsaved creations, I'd suggest doing a page at a time | |
| // by not scrolling down the page too far. | |
| let spanSave = document.querySelectorAll('span'); | |
| spanSave.forEach(function(span){ | |
| if(span.textContent === 'Save'){ | |
| let parentButton = span.parentElement; | |
| parentButton.click(); | |
| span.style.color = 'red'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get exiftool here -> https://exiftool.org/ | |
| exiftool -r -d %s -tagsfromfile %d%f.%e.json -description "-createdate<creationdatetimestamp" "-datetimeoriginal<phototakentimetimestamp" "-modifydate<modificationtimetimestamp" -overwrite_original |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa | |
| ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa | |
| ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| The garage stores vehicles. | |
| """ | |
| class Garage: | |
| _vehicles = [] | |
| def __init__(self): | |
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "af": "Afghanistan", | |
| "ax": "Åland Islands", | |
| "al": "Albania", | |
| "dz": "Algeria", | |
| "as": "American Samoa", | |
| "ad": "Andorra", | |
| "ao": "Angola", | |
| "ai": "Anguilla", | |
| "aq": "Antarctica", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| iVBORw0KGgoAAAANSUhEUgAAAc4AAAF5CAMAAAAh9zpPAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAGXRFWHRTb2Z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