https://l.uvasds.sh/828
class User:
def __init__(self, username, email, age):
self.username = username
| [alias] | |
| lol = log --graph --oneline --decorate --color --all | |
| s = status -sb | |
| pom = push origin main | |
| undo = reset HEAD~1 --soft | |
| outgoing = log @{u}.. | |
| oops = commit --amend --no-edit | |
| monitor = "!f() { repo=$(gh repo view --json nameWithOwner -q .nameWithOwner); id=$(gh run list --repo \"$repo\" --limit 1 --json databaseId -q '.[0].databaseId'); echo \"Watching run $id on $repo\"; gh run watch \"$id\" --repo \"$repo\" --exit-status; }; f" |
| apiVersion: batch/v1 | |
| kind: Job | |
| metadata: | |
| name: papermill-job-NEM2P | |
| namespace: default | |
| spec: | |
| template: | |
| spec: | |
| containers: | |
| - name: papermill-container |
| FROM python:3.12-slim | |
| RUN python3 -m pip install requests | |
| COPY joke.py /joke.py | |
| ENTRYPOINT ["python3", "joke.py"] |
| #!/bin/bash | |
| apt-get update | |
| apt-get install -y nginx jq | |
| # IMDSv2 token-based access (recommended) | |
| TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600") | |
| # Get instance metadata using the token | |
| INSTANCE_ID=$(curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/instance-id) | |
| AZ=$(curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/placement/availability-zone) |
| name: container-build | |
| on: | |
| push: | |
| branches: [ main ] | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ACCOUNT/IMAGE-NAME # replace these as needed | |
| IMAGE_TAG: 1.${{ github.run_number }} # GITHUB_RUN_NUMBER, so versions will be 1.1, 1.2, etc. |