Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / .hadolint.yml
Last active April 14, 2024 16:56
Hadolint config stored in $HOME
failure-threshold: info # error|warning|info|style|ignore|none
ignored:
- DL3006 # explicit tag
- DL3008 # pin versions in apt
- DL3018 # pin versions in apk
- DL3026 # allowed registry
trustedRegistries:
- docker.io
@pythoninthegrass
pythoninthegrass / sysctl.conf
Last active April 12, 2024 09:30
Proxmox /etc/sysctl.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3
@pythoninthegrass
pythoninthegrass / set_vault_password.sh
Last active April 11, 2024 17:05
Ansible Vault w/macOS Keychain
#!/usr/bin/env bash
# $USER
[[ -n $(logname >/dev/null 2>&1) ]] && logged_in_user=$(logname) || logged_in_user=$(whoami)
# $UID
# logged_in_uid=$(id -u "${logged_in_user}")
# $HOME
logged_in_home=$(eval echo "~${logged_in_user}")
version: "1"
rules:
- fakeDirective: fakeyfake
label:
conflictLabel:
version: "1"
rules:
- base: main
upstream: somet-code:main
mergeMethod: hardreset # Optional, one of [none, merge, squash, rebase, hardreset], Default: none.
mergeUnstable: false # Optional, merge pull request even when the mergeable_state is not clean. Default: false
label: ":arrow_heading_down: pull" # Optional
conflictLabel: "merge-conflict" # Optional, on merge conflict assign a custom label, Default: merge-conflict
@pythoninthegrass
pythoninthegrass / resize_disk_image.md
Created April 6, 2024 06:01 — forked from joseluisq/resize_disk_image.md
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2

@pythoninthegrass
pythoninthegrass / README.md
Last active April 5, 2024 23:44
sysctl.conf stand-in on macOS 10.15+

com.startup.sysctl.plist

As of at least macOS Catalina 10.15.3, /etc/sysctl.conf values are no longer respected and/or the file straight up doesn't exist (confirmed on macOS Monterey 12.4.)

Ran across a fio shm error: failed to setup shm segment while benchmarking SSDs. The fix was to set shmmni to 4096. The following has to happen:

  • Disable SIP
    • Disclaimer from Apple

      Warning

      Disable SIP only temporarily to perform necessary tasks, and reenable it as soon as possible. Failure to reenable SIP when you are done testing leaves your computer vulnerable to malicious code.

@pythoninthegrass
pythoninthegrass / .env.example
Created March 28, 2024 23:14
Public facing version of an internal Infisical export script
BASE_URL=
ID=
SERVICE_TOKEN=
OUT_DIR=
@pythoninthegrass
pythoninthegrass / Dockerfile
Last active March 22, 2024 05:24 — forked from orenitamar/Dockerfile
Installing numpy, scipy, pandas and matplotlib in Alpine (Docker)
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib
# in an Alpine based Docker image.
ARG VERSION=3.18
FROM alpine:${VERSION}
RUN apk update \
&& apk add \
--no-cache \
# Source: https://gist.github.com/vfarcic/77c63cede031951654d5fea5ce0acb43
#########################################################################################
# Say Goodbye to Makefile - Use Taskfile to Manage Tasks in CI/CD Pipelines and Locally #
#########################################################################################
# Additional Info:
# - Task: https://taskfile.dev
# - Dagger: The Missing Ingredient for Your Disastrous CI/CD Pipeline: https://youtu.be/oosQ3z_9UEM