Skip to content

Instantly share code, notes, and snippets.

View ecshreve's full-sized avatar
🥸

Eric Shreve ecshreve

🥸
View GitHub Profile
@ecshreve
ecshreve / gen_commit.sh
Last active March 22, 2024 01:47
cli commit message helper
#!/bin/sh
# Navigate to the root of the Git repository
repo_root=$(git rev-parse --show-toplevel)
cd "$repo_root"
# Check if there are too many changes to commit
DIFF_LINES=$(git diff --cached | wc -l)
if [ "$DIFF_LINES" -gt 500 ]; then
echo "Too many changes to send to mods. Please commit fewer changes at a time."
@ecshreve
ecshreve / image.pkr.hcl
Created February 25, 2023 01:32
build a custom ubuntu docker image with packer and ansible
packer {
required_plugins {
docker = {
version = " >= 1.0.8"
source = "github.com/hashicorp/docker"
}
}
}
source "docker" "ubuntu-base" {
@ecshreve
ecshreve / passwordless_sudo.sh
Created September 8, 2022 09:15
enable passwordless sudo access for all users on a ubuntu host
sudo visudo
# add an entry to the file allowing all users sudo access without a password
ALL ALL = (ALL) NOPASSWD: ALL
@ecshreve
ecshreve / README.md
Last active July 31, 2022 10:27
docker rootless setup on fresh ubuntu install
@ecshreve
ecshreve / my-custom-card.js
Created July 7, 2022 16:23 — forked from thomasloven/my-custom-card.js
Simplest custom card
// Simplest possible custom card
// Does nothing. Doesn't look like anything
class MyCustomCard extends HTMLElement {
setConfig(config) {
// The config object contains the configuration specified by the user in ui-lovelace.yaml
// for your card.
// It will minimally contain:
// config.type = "custom:my-custom-card"
@ecshreve
ecshreve / runner.py
Created March 28, 2022 09:36
DnDAPI - poc to generate postman collection for e2e testing
# There's some other setup needed for this to work, like installing
# swagger-cli, portman, and newman.
import subprocess
import requests
import yaml
SWAGGER_FILE = '~/github.com/5e-srd-api/src/swagger/swagger.yml'
NEWM_FILE = '~/github.com/5e-srd-api/src/swagger/swagger-newm.yml'
API_BASE = 'http://localhost:3000'