Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@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%
@aleksandersumowski
aleksandersumowski / media-keys.py
Created February 29, 2024 16:51
Python script to emulate media keys on mac
#!/opt/homebrew/bin/python3
# CLI program to control the mediakeys on OS X. Used to emulate the mediakey on a keyboard with no such keys.
# Easiest used in combination with a launcher/trigger software such as Quicksilver.
# Main part taken from http://stackoverflow.com/questions/11045814/emulate-media-key-press-on-mac
# Glue to make it into cli program by Fredrik Wallner http://www.wallner.nu/fredrik/
# requires installing `pyobjc` eg via `/opt/homebrew/bin/pip3 install -U pyobjc`
import Quartz
import sys
@usrbinkat
usrbinkat / README.md
Last active December 8, 2025 23:38
TuringPi2 RK1 Build Journal

Turing Pi 2 + 4x RK1 32GB Kubevirt Cluster

In this gist we will attempt to capture the prominent steps in building an RK1 TPI2 Talos K8s Cluster for use with the github.com/ContainerCraft/Kargo kubevirt platform.

Info

If you try this and achieve success imaging your RK1 compute modules with the un-merged talos rk1 fork please report your success on this rfe issue: github.com/siderolabs/talos/issues/8187

Update Turing Pi 2 BMC Firmware

# 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
@pythoninthegrass
pythoninthegrass / gen_certbot.sh
Last active May 22, 2024 17:48
Create a certbot letsencrypt cert
#!/usr/bin/env bash
# shellcheck disable=SC2162
# certbot location
UNAME=$(uname -s)
if [ "$UNAME" = "Darwin" ]; then
BREW_PREFIX=$(brew --prefix)
PATH="$BREW_PREFIX/bin:/usr/local/bin:$PATH"
elif [ "$UNAME" = "Linux" ]; then
@yunruse
yunruse / yt.py
Last active March 7, 2026 06:36
very basic YouTube-to-RSS extractor
#!/usr/bin/env python3
# pip install scrapetube
# for basic operation, use `python -m http.server --cgi`
# and access /cgi-bin/yt.py?c={CHANNEL_ID}
# Note that due to scrapetube limits, dates are fetched as eg "3 days ago"
# so the further in the past a video is, the less precise the date will be.
@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 / icon.png
Last active January 12, 2024 19:19
Alfred workflow to convert time between ms/secs/min
icon.png