Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / dl-gh
Last active April 24, 2024 20:30
Download latest GitHub releases by user, repo, and extension
#!/usr/bin/env bash
# shellcheck disable=SC2207
user_name="microsoft"
repo_name="go-sqlcmd"
base_url="https://github.com/$user_name/$repo_name/releases"
pkg_type="deb"
help() {
@pythoninthegrass
pythoninthegrass / kamal.md
Last active April 19, 2024 04:14 — forked from huksley/mrsk.md
kamal - the missing manual

kamal

This documentation adds important additions to the docs for kamal deploy tool (see github.com/basecamp/kamal)

Destination flag

You can use kamal deploy --destination staging

This will read config/deploy.yml and config/deploy.staging.yml files, and also will read .env.staging file if it exists.

@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 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 / 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 / .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