Skip to content

Instantly share code, notes, and snippets.

View richbl's full-sized avatar

Rich richbl

View GitHub Profile
@richbl
richbl / GithubFlowPattern-ProtectMAIN.json
Created June 19, 2026 00:39
Branch protection for MAIN branch following the Github Flow Pattern
{
"name": "GitHub Flow Pattern: Protect MAIN",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [],
"include": [
"~DEFAULT_BRANCH"
]
@richbl
richbl / mirror_to_codeberg.yml
Last active June 19, 2026 00:40
Github Action script for mirroring a repo to Codeberg (also changes any Github refs to Codeberg in documentation files)
# mirror-to-codeberg.yml
#
# Mirrors this repository to Codeberg on every push or branch/tag deletion
#
# SETUP (do this once per repository):
# 1. Create a Codeberg access token with write access to the target repo
# 2. Add it as a repository (or organisation) secret named CODEBERG_GLOBAL_ACCESS_TOKEN
# 3. Copy this file to .github/workflows/ — no other edits are required
#
# HOW IT WORKS:
@richbl
richbl / starship.toml
Last active October 17, 2022 20:51
Powerline prompt using Starship.rs: based on Git logo color palette (using 4-color tetrad)
# order of modules in prompt
format = """[](bg:#464347 fg:#4e8c63)\
$sudo\
$time\
$battery\
$hostname\
$username\
$git_branch\
$git_commit\
$git_status\