Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
set -euo pipefail
# --- Argument validation ---
if [ "$#" -ne 3 ]; then
echo "Usage: $(basename "$0") <target-file> <secrets-list-file> <secret-retrieval-script>" >&2
exit 1
fi
#!/usr/bin/env bash
secret_id=$1
aws_bin_path="/snap/bin/aws"
secret_val=$(${aws_bin_path} secretsmanager get-secret-value --secret-id ${secret_id} --query SecretString --output text | jq '.[]')
return_code=$?
if [ "$return_code" -eq 0 ]; then
package main
import (
"context"
"fmt"
"github.com/mark3labs/mcp-go/mcp"
"github.com/mark3labs/mcp-go/server"
)
/*
Using repository_access_token_test.go as an example generate integration test cases for the following issues functions;
Gets, Get, Create, Update, Delete.
*/
package tests
import (
@HauptJ
HauptJ / client.go
Created February 10, 2026 02:45
go-bitbucket
package bitbucket
import (
"bytes"
"crypto/tls"
"crypto/x509"
"encoding/json"
"fmt"
"io"
"io/ioutil"
package fake
import (
"errors"
"net/http"
"github.com/ktrysmt/go-bitbucket"
)
type APIResponse[O any] struct {
@HauptJ
HauptJ / wsl-kernel-headers.sh
Created January 21, 2026 20:48
WSL Ubuntu Compile and Install Kernel with Kernel Headers
#!/usr/bin/env bash
set -e
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
user=josh
version=$(uname -r)
@HauptJ
HauptJ / cluster.tfvars
Last active January 21, 2026 00:38
KubeSpray cluster.tfvars for OpenStack with Master and all Nodes with floating IPs
# your Kubernetes cluster name here
cluster_name = "test-cluster"
# list of availability zones available in your OpenStack cluster
#az_list = ["nova"]
# SSH key to use for access to nodes
public_key_path = "~/.ssh/.pub"
# image to use for bastion, masters, standalone etcd instances, and nodes
@HauptJ
HauptJ / ko_install.sh
Created January 18, 2026 21:52
Bash script to install Ko on Linux
#!/usr/bin/env bash
set -e
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
version=0.18.1
bin_name=ko
@HauptJ
HauptJ / containers.conf
Created January 15, 2026 20:26
Fedora 43 WSL Config Fix for KIND with Podman - /etc/containers/containers.conf
[containers]
pids_limit = 65536
[network]
firewall_driver="iptables"