Bespoke askpass script for macOS.
Moved to a proper repo as gists are pretty limited for organization.
#!/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")") |
# 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 python | |
import sys | |
import signal | |
timeout = 5 # Timeout in seconds | |
def handle_timeout(signum, frame): | |
raise TimeoutError("Input timed out!") |
... | |
@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 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] |
# 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 |
# kind create cluster --config kind-config.yaml | |
--- | |
kind: Cluster | |
apiVersion: kind.x-k8s.io/v1alpha4 | |
networking: | |
# Set the API server address to be accessible from the LAN | |
apiServerAddress: "192.168.25.196" | |
apiServerPort: 6443 | |
disableDefaultCNI: true | |
nodes: |
#!/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>") |
[General] | |
sIntroSequence= | |
fChancesToPlayAlternateIntro=0 | |
uMainMenuDelayBeforeAllowSkip=0 | |
bAllowConsole=1 | |
bPlayMainmenuMusic=1 | |
uGridsToLoad=5 | |
uExterior Cell Buffer=36 | |
bForceUpdateDiffuseOnly=1 | |
iTextureDegradeDistance0=800 |
Bespoke askpass script for macOS.
Moved to a proper repo as gists are pretty limited for organization.