Draw the short straw? Getting paid to kill the time with strangers? Need to heal some relationships to get some work done?
Maybe you need a team building exercise.
#!/bin/bash | |
REMOTE_REPO=origin | |
PR=${1} | |
git fetch -v ${REMOTE_REPO} +refs/pull/${PR}*:refs/remotes/${REMOTE_REPO}/pull/${PR}* | |
git checkout -f ${REMOTE_REPO}/pull/${PR}/merge |
import os | |
from jinja2 import Environment, FileSystemLoader | |
import yaml | |
import argparse | |
import sys | |
from pathlib import Path | |
def render_template(template_path: Path, output_path: Path, var_values: dict) -> None: | |
""" | |
Render a Jinja2 template from a file and save it to the specified output path. |
#!/bin/bash | |
DEFAULT_IMAGE=armbian_24.5.0-trunk_Uefi-arm64_bookworm_edge_6.8.9.img.raw | |
DEFAULT_MEM=2048 | |
DEFAULT_CPU=2 | |
IMAGE_FORMAT=raw | |
IMAGE_DIR=/mnt/zfs/cheapo/images |
#!/bin/bash | |
NEW_USER="someuser" | |
USER_PUBLIC_KEY="some public key" | |
mkdir -p /home/${NEW_USER}/.ssh | |
echo "${NEW_USER_PUBLIC_KEY}" >> /home/${NEW_USER}/authorized_keys | |
chown -R ${NEW_USER} /home/${NEW_USER}/.ssh | |
chmod 700 /home/${NEW_USER}/.ssh/ |
#!/bin/bash | |
brew install xz pyenv ninja cmake gettext curl npm wget ripgrep lazygit wget fzf | |
## also forreal you can probably just use the homebrew package now | |
git clone --single-branch --branch stable https://github.com/neovim/neovim | |
pushd neovim | |
git checkout stable |
Sometimes you just need an easy way to have a private git repo. Put it on your favorite VPS, SBC, linux box, etc
creates a folder and git repo via relative path of user directory
GIT_REMOTE_DIR=GIT/hosted/example
GIT_REMOTE_HOST=myhost.example.com
ssh ${GIT_REMOTE_HOST} "mkdir -p ${GIT_REMOTE_DIR} && git init --bare ${GIT_REMOTE_DIR}"
!/usr/bin/env bash | |
# Examples: | |
# linx hello.txt # paste file (name/ext will be set). | |
# echo Hello world. | linx # read from STDIN (won't set name/ext). | |
# linx -n 1 self_destruct.txt # paste will be deleted after one read. | |
# linx -i ID hello.txt # replace ID, if you have permission. | |
# linx -d ID | |
fastly_headers() { | |
curl -I -X GET https://mirrors.fossho.st/armbian/apt/ |
job "grafana" { | |
datacenters = ["example_datacenter"] | |
type = "service" | |
constraint { | |
attribute = "${attr.kernel.name}" | |
value = "linux" | |
} |