Bespoke askpass script for macOS.
Moved to a proper repo as gists are pretty limited for organization.
Bespoke askpass script for macOS.
Moved to a proper repo as gists are pretty limited for organization.
| [General] | |
| sIntroSequence= | |
| fChancesToPlayAlternateIntro=0 | |
| uMainMenuDelayBeforeAllowSkip=0 | |
| bAllowConsole=1 | |
| bPlayMainmenuMusic=1 | |
| uGridsToLoad=5 | |
| uExterior Cell Buffer=36 | |
| bForceUpdateDiffuseOnly=1 | |
| iTextureDegradeDistance0=800 |
| #!/usr/bin/env python | |
| import markdown | |
| import resend | |
| from decouple import config | |
| # from pathlib import Path | |
| # env vars | |
| resend_api_key = config("RESEND_API_KEY") | |
| resend_from = config("RESEND_FROM", default="Acme <onboarding@resend.dev>") |
| #!/usr/bin/env bash | |
| # SOURCE: https://kind.sigs.k8s.io/docs/user/local-registry/ | |
| set -o errexit | |
| # Global variables | |
| reg_name='kind-registry' | |
| reg_port='5001' | |
| REGISTRY_DIR="/etc/containerd/certs.d/localhost:${reg_port}" |
| # https://learn.microsoft.com/en-us/windows/wsl/wsl-config#example-wslconf-file | |
| # Per-distro settings go in /etc/wsl.conf | |
| # $env:userprofile\.wslconfig | |
| # WSL2-specific options | |
| [wsl2] | |
| processors = 4 # Makes the WSL 2 VM use two virtual processors | |
| memory = 8GB # Limits VM memory in WSL 2 | |
| swap = 0 # Do not use swap file | |
| localhostforwarding=true # bind WSL 2 localhost to Windows localhost |
| #!/usr/bin/env python | |
| import os | |
| from geopy.geocoders import Nominatim | |
| from pprint import pprint | |
| app = Nominatim(user_agent="tutorial") | |
| if len(os.sys.argv) > 1: | |
| your_loc = os.sys.argv[1] |
| ... | |
| @log_call | |
| def file_exists(filename): | |
| """Check if a file exists.""" | |
| fn = Path.cwd() / filename | |
| if fn.exists(): | |
| overwrite = input(f"File '{filename}' already exists. Do you want to overwrite it? (y/n): ") | |
| match overwrite.lower(): | |
| case "y" | "yes": | |
| fn.touch(exist_ok=True) |
| #!/usr/bin/env python | |
| import sys | |
| import signal | |
| timeout = 5 # Timeout in seconds | |
| def handle_timeout(signum, frame): | |
| raise TimeoutError("Input timed out!") |
| # syntax=docker/dockerfile:1.7 | |
| FROM ubuntu:20.04 | |
| ARG PYTHON_VERSION="3.11" | |
| ENV TZ=US/Chicago | |
| ARG DEBIAN_FRONTEND=noninteractive | |
| RUN <<EOF | |
| #!/usr/bin/env bash |
| #!/usr/bin/env bash | |
| # shellcheck disable=SC1091,SC2317 | |
| # shift shim behind real binary | |
| export PATH="/usr/local/bin/:${PATH}" | |
| # env vars | |
| git_root="$(git rev-parse --show-toplevel 2>/dev/null)" | |
| script_dir=$(dirname "$(readlink -f "$0")") |