Skip to content

Instantly share code, notes, and snippets.

View devholland's full-sized avatar

Dave Holland devholland

View GitHub Profile
@devholland
devholland / wordle.md
Created March 4, 2024 05:44 — forked from huytd/wordle.md
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@devholland
devholland / remove_gitlab_artifacts.sh
Created February 2, 2024 06:51 — forked from carceneaux/remove_gitlab_artifacts.sh
Script for removing GitLab Job Artifacts.
#!/bin/bash
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: carcenea@gmail.com
# Website: http://arsano.ninja
#
# Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage
# "artifacts:expire_in" in your .gitlab-ci.yml
#
# Don't print a new line at the start of the prompt
add_newline = false
# Replace the "❯" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
symbol = "" # The "symbol" segment is being set to "➜"
error_symbol = ""
use_symbol_for_status = true
# Disable the package module, hiding it from the prompt completely
@devholland
devholland / deployment.yaml
Created August 24, 2023 11:12 — forked from imranismail/deployment.yaml
Using Kustomize with Terraform
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
selector:
matchLabels:
app: myapp
template:
metadata:
@devholland
devholland / Git.md
Last active August 9, 2023 17:42 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
@devholland
devholland / mutually_exclusive_options.py
Created July 12, 2023 10:56 — forked from stanchan/mutually_exclusive_options.py
Python Click Mutually Exclusive Options
from click import command, option, Option, UsageError
class MutuallyExclusiveOption(Option):
def __init__(self, *args, **kwargs):
self.mutually_exclusive = set(kwargs.pop('mutually_exclusive', []))
help = kwargs.get('help', '')
if self.mutually_exclusive:
ex_str = ', '.join(self.mutually_exclusive)
kwargs['help'] = help + (
' NOTE: This argument is mutually exclusive with '
@devholland
devholland / git: gitignore.md
Created June 9, 2023 09:47 — forked from jstnlvns/git: gitignore.md
a gitignore cheatsheet

Git sees every file in your working copy as one of three things:

  1. tracked - a file which has been previously staged or committed;
  2. untracked - a file which has not been staged or committed; or
  3. ignored - a file which Git has been explicitly told to ignore.

Ignored files are usually build artifacts and machine generated files that can be derived from your repository source or should otherwise not be committed. Some common examples are:

  • dependency caches, such as the contents of /node_modules or /packages
  • compiled code, such as .o, .pyc, and .class files