Skip to content

Instantly share code, notes, and snippets.

View stacedan's full-sized avatar

Dan Stacey stacedan

  • The Stars Group (TSG)
  • Isle of Man
View GitHub Profile
@stacedan
stacedan / pre-push
Created July 11, 2024 07:55
Git Workflow Pre-Push Hook to Prevent Pushing to Main Origin (to stop accidental bypass of PR Workflow)
#!/bin/sh
branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$branch" = "main" ]; then
echo "You are not allowed to push directly to the main branch."
exit 1
fi
@stacedan
stacedan / tasks.json
Created July 11, 2024 07:48
VScode Git Tasks
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "checkout main & pull",
"type": "shell",
"command": "git checkout main && git pull"
}
@stacedan
stacedan / devcontainer.json
Last active May 9, 2025 14:38
Devcontainer Config - Ubuntu - Terraform/AWS
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "XXXXXXXXXXXXXXXXXXXXXXX",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
//"image": "mcr.microsoft.com/devcontainers/base:jammy",
"image": "mcr.microsoft.com/devcontainers/base:bookworm",
"features": {
"ghcr.io/devcontainers-contrib/features/terraform-asdf:2": {},
"ghcr.io/dhoeric/features/terraform-docs:1": {},