Skip to content

Instantly share code, notes, and snippets.

View PurpleBooth's full-sized avatar

Billie Thompson PurpleBooth

View GitHub Profile
@PurpleBooth
PurpleBooth / setup-git-delta.sh
Last active January 19, 2025 14:15
Git Setup
#!/usr/bin/env bash
git config --global core.pager delta
git config --global interactive.diffFilter "delta --color-only"
git config --global delta.navigate true
git config --global merge.conflictstyle zdiff3
@PurpleBooth
PurpleBooth / thingy.go
Created July 20, 2024 09:43
Scrape github for merge durations
package main
import (
"golang.org/x/oauth2"
"github.com/google/go-github/github"
"context"
"fmt"
"time"
"os"
"log"
@PurpleBooth
PurpleBooth / copy-labels.sh
Created February 15, 2023 10:37
Copy labels between repos on github
#!/usr/bin/env bash
set -xeuo pipefail
# Set the source repository
SOURCE_REPO=org-name/source-repo
# Set the target repository
TARGET_REPO=org-name/dest-repo
@PurpleBooth
PurpleBooth / write-me-a-commit-message.py
Last active March 25, 2024 02:20
I cba with writing my own commit messages anymore
#!/usr/bin/env python
import json
import logging
import subprocess
import sys
import textwrap
from typing import Literal, Sequence, TypedDict, Union
from urllib.error import HTTPError
from urllib.request import Request, urlopen
dependabot:
needs: [ validate ]
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && ( github.head_ref || github.ref_name ) != 'main' }}
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
@PurpleBooth
PurpleBooth / README.md
Last active May 31, 2024 16:56
How to use docker in without docker-desktop on mac using lima

First run ths install.sh script

Then add an environment variable so tools you use that use docker can find docker

## Add this to your bashrc if you want this to be permenant
export DOCKER_HOST=ssh://localhost:60006

This will need the lima vm for docker running, you can do that by running

@PurpleBooth
PurpleBooth / README.md
Last active September 17, 2021 15:07
Change your default branch on github without checkout anything out

change-github-default-branch.sh

Usage

change-github-default-branch.sh "$GITHUB_TOKEN" PurpleBooth/homebrew-repo

Does not delete the old default branch, or change where pull requests are based from, incase something breaks.

@PurpleBooth
PurpleBooth / README.md
Last active September 8, 2023 20:52
A github workflow pipeline for rust that does test, build and deploy windows, linux and mac, creates releases, and does SemVer Versioning, and releases to a homebrew tap

Features

  • Automatically bump SemVer
  • Update a personal homebrew tap
  • Keep that pesky version in the Cargo.toml up to date
  • (From dependabot) Get new versions out as soon as possible

Assumptions

  • You don't want a changelog
@PurpleBooth
PurpleBooth / demo.rs
Created April 19, 2020 20:25
Reading git config from global and the containing repo in rust
#!/usr/bin/env run-cargo-script
//! This is a regular crate doc comment, but it also contains a partial
//! Cargo manifest. Note the use of a *fenced* code block, and the
//! `cargo` "language".
//!
//! ```cargo
//! [dependencies]
//! git2 = "0.13"
//! ```
use futures::future::join_all;
use futures::StreamExt;
use reqwest::Client;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug)]
struct ProjectsItem {
hash_id: String,
}
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy