Skip to content

Instantly share code, notes, and snippets.

Avatar

Billie Thompson PurpleBooth

View GitHub Profile
@PurpleBooth
PurpleBooth / README-Template.md
Last active Aug 12, 2022
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

View Good-CONTRIBUTING.md-template.md

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@PurpleBooth
PurpleBooth / README.md
Last active Jul 30, 2022
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
View README.md

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 / Dockerfile
Last active Jul 22, 2022
Create a static binary in go and put it in a from scratch docker container
View Dockerfile
FROM golang:1.9
WORKDIR /go/src/github.com/purplebooth/example
COPY . .
RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go
FROM scratch
COPY --from=0 /go/src/github.com/purplebooth/example/main /main
CMD ["/main"]
View books-that-have-influenced-me.md

Here is a non-exhaustive list of books that have influenced how I think about software.

View README.md

Coin Changer Kata

You've just created a virtual vending machine that will dispense widgets of programming goodness when a user puts money into the machine. The machine should dispense the proper change. You now need the programming logic to determine which coins to dispense.

Write a program that will correctly determine the least number of coins to be given to the user such that the sum of the coins' value would equal the correct amount of change.

Interface

Parameters

View Template-README-for-containers.md

Docker Container Name

A one paragraph description about the container.

Getting Started

These instructions will cover usage information and for the docker container

Prerequisities

@PurpleBooth
PurpleBooth / README.md
Last active Oct 4, 2021
How to use docker in without docker-desktop on mac using lima
View README.md

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 Sep 17, 2021
Change your default branch on github without checkout anything out
View README.md

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.