Skip to content

Instantly share code, notes, and snippets.

View b-'s full-sized avatar
🐧
automating the shit out of it all

bri b-

🐧
automating the shit out of it all
View GitHub Profile
@b-
b- / C.css
Created September 12, 2025 10:22
@font-face {
font-family: 'System';
src: url('/media/custom/fonts/system-ms/SystemBold.woff2') format('woff2'),
url('/media/custom/fonts/system-ms/SystemBold.woff') format('woff');
font-weight: bold;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'MS Serif';
@b-
b- / docker-compose.yml
Created September 12, 2025 02:27
tailscale serve inline example with redirect and health check
services:
whoami-ts:
image: tailscale/tailscale:latest
environment:
TS_HOSTNAME: "whoami"
TS_SERVE_CONFIG: /config/ts_serve.json
TS_AUTHKEY: ${TS_AUTHKEY}
TS_EXTRA_ARGS: "--advertise-tags=tag:docker"
TS_ENABLE_HEALTH_CHECK: true
TS_LOCAL_ADDR_PORT: 127.0.0.1:41234
networks:
default:
lo32:
driver: ipvlan
internal: true
ipam:
config:
- subnet: 192.168.32.32/32
ip_range: 192.168.32.32/32
@b-
b- / one-true-optfix.sh
Created August 10, 2025 18:15
one-true-optfix.sh
#!/usr/bin/env bash
set -euxo pipefail
shopt -s nullglob
optdirs=(/opt/*)
if [[ -n "${optdirs[*]}" ]]; then
optfix_dir="/usr/lib/bluebuild-optfix"
mkdir -pv "${optfix_dir}"
echo "Creating symlinks to fix packages that installed to /opt:"
for optdir in "${optdirs[@]}"; do
@b-
b- / generate-docker-compose-dependabot.sh
Created June 6, 2025 01:24
generate-docker-compose-dependabot.sh
#!/bin/bash
# https://medium.com/@svenvanginkel/automating-dependabot-for-docker-compose-13acdff61133
set -euo pipefail
mkdir -p .github
tmpfile=$(mktemp)
trap 'rm -f "$tmpfile"' EXIT
# Header
@b-
b- / setup_gh_webhooks
Created May 20, 2025 15:35
Script to enroll webhooks with GitHub
#!/usr/bin/env bash
set -euo pipefail
errHookAlreadyExists="Hook already exists on this repository"
WEBHOOK_SECRET_REFERENCE="${WEBHOOK_SECRET_REFERENCE:-"op://komodo secrets/KOMODO_WEBHOOK_SECRET/credential"}"
WEBHOOK_SECRET="${WEBHOOK_SECRET:-$(op read "${WEBHOOK_SECRET_REFERENCE}")}"
get_gh_repo_name() {
gh repo view --json nameWithOwner | jq '.nameWithOwner' -r
@b-
b- / replace_link_with_wrapper.sh
Created January 31, 2025 20:44
wrapper script generator
@b-
b- / komodo-core.butane.yaml
Last active January 24, 2025 14:29
provision fedora coreos with ucore, komodo core, and komodo periphery as a systemd service
variant: fcos
version: 1.4.0
passwd:
users:
- name: core
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDx+KV/SW4RGIeKA2FHU9S7bZgnJMy77N6lBeo2n8sJ
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKvsoJVOLJ3FshnAF5sJTpCxjNu2MAcCsN/hq0/qIBAe
password_hash: $y$j9T$Pb/.....
storage:
(stack trace truncated; use '--show-trace' to show the full trace)
error: The option `nix.registry.nixpkgs.to.path' has conflicting definition values:
- In `/nix/store/cbbsvzjcqvzlylq9s7p6d2gyxh64q88p-source/nixos/modules/config/nix-flakes.nix': "/nix/store/sssy7p3frs3vrr7ymcp7y016ykl1si7d-source"
- In `/nix/store/cbbsvzjcqvzlylq9s7p6d2gyxh64q88p-source/nixos/modules/misc/nixpkgs-flake.nix': "/nix/store/cbbsvzjcqvzlylq9s7p6d2gyxh64q88p-source"
Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
@b-
b- / shmerge.sh
Created December 31, 2023 05:59
shmerge
#!/bin/bash
function shmerge() { git switch -c "$1" &&shift; git commit -am"$*" && gh pr create && echo "waiting 10s to start checks" ; sleep 10s; gh run view --exit-status && gh pr merge -d}