Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / README.md
Last active April 17, 2024 13:14
Disable external drives from automatically mounting on macOS
git clone git@gist.github.com:35b1c2781cd7a782cc521a75731b4040.git
ln -s $(pwd)/disable_automount.sh ~/.local/bin/no-mount
no-mount <DISK_NAME>
@pythoninthegrass
pythoninthegrass / game.sh
Last active April 18, 2024 17:37
sunshine, gamescope + steam
#!/usr/bin/env bash
# TODO: test wayland gamescope session
export DISPLAY=:0 # vnc
export WAYLAND_DISPLAY=:2 # xwayland
export DXVK_HDR=1
export ENABLE_GAMESCOPE_WSI=1
# Check existing X server
start_x() {
@pythoninthegrass
pythoninthegrass / README.md
Last active April 15, 2024 20:12
Ollama + Continue.dev VSCode settings

Ollama

Quickstart

# install ollama
brew install --cask ollama

# install continue.dev
code --install-extension Continue.continue
@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}")
@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 / .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
# get root
sudo -s
# format nvme
mkfs.btrfs /dev/nvme0n1
# create partitions
parted /dev/nvme0n1 mklabel gpt
parted /dev/nvme0n1 mkpart primary 1MiB 100GiB
parted /dev/nvme0n1 mkpart primary 100GiB 100%
# 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