Skip to content

Instantly share code, notes, and snippets.

View abuxton's full-sized avatar
💭
discombobulated as always

adam buxton abuxton

💭
discombobulated as always
View GitHub Profile
@gitrgoliveira
gitrgoliveira / nomad_sentinel_demo.sh
Last active December 3, 2024 12:25
Nomad Enterprise Sentinel Testing
nomad agent -dev -bind 0.0.0.0 -acl-enabled >nomad-server.log &
sleep 5
nomad acl bootstrap -json > bootstrap.json
export NOMAD_TOKEN=$(jq -r .SecretID bootstrap.json)
# creating a namespace and quota
nomad namespace apply -description "QA instances of webservers" web-qa
nomad quota init
nomad quota apply spec.hcl
@straubt1
straubt1 / Terraform on Mac M1.md
Created June 14, 2022 18:38
Notes to install Terraform on M1

Installing the amd64 version of Terraform on Mac with M1

Not all Terraform providers are built for arm64.

One solution here is to install Terraform as amd64 which can be easily done from the downloads page.

However, for those who are using and switching between versions of Terraform often, a more streamlined approach is desirable.

Enter asdf.

#!/usr/bin/env bash
set -e
readonly CONTENT_MAIN_TF='module "wrapper" {}'
readonly CONTENT_VARIABLES_TF='variable "items" {
description = "Maps of items to create a wrapper from. Values are passed through to the module."
type = any
default = {}
}'
@jpogran
jpogran / custom-minimal-settings.json
Last active April 27, 2021 18:41
Puppet Camp VS Code Tips Settings
{
// // settings for all languages
"editor.fontFamily": "'Cascadia Code PL', 'Cascadia Code', Consolas, monaco, monospace",
"editor.fontSize": 18,
"editor.minimap.enabled": false,
// "editor.suggest.showStatusBar": true,
// "editor.suggest.insertMode": "insert",
// "workbench.tree.indent": 16
@wolftales
wolftales / ansible cheat sheet
Last active August 9, 2024 13:26 — forked from githubfoam/ansible cheat sheet
ansible cheat sheet
----------------------------------------------------------------------------------------------------------------------
# Not inventory, remote passwordless ssh connection
[clients]
control01 ansible_host=192.168.45.10 ansible_connection=ssh ansible_ssh_port=22 ansible_ssh_private_key_file=/home/vagrant/.ssh/id_rsa ansible_user=vagrant
#vagrant-client01 ansible_host=10.10.40.94 ansible_ssh_private_key_file='.vagrant/machines/vagrant-client01/virtualbox/private_key' ansible_connection=local ansible_ssh_user='vagrant'
[all:vars]
ansible_python_interpreter=/usr/bin/python3
----------------------------------------------------------------------------------------------------------------------
# Running a playbook in dry-run mode
@alexbasista
alexbasista / create_tfe_org.py
Last active September 7, 2021 13:03
Examples of interacting with Terraform Cloud/Enterprise API via Python
import os
import sys
import json
import requests
def create_team(hostname, org, name, **kwargs):
"""
POST /organizations/:organization_name/teams
"""
if kwargs.get('tfe_token'):
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active April 24, 2025 19:34
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@straubt1
straubt1 / get-airgap-versions.sh
Last active July 7, 2022 15:07
TFE Download Airgap
#!/bin/bash
# export LICENSE_ID=""
# export PASSWORD=""
[[ -z "$LICENSE_ID" ]] && echo "Please Set LICENSE_ID Environment Variable" && exit 1
[[ -z "$PASSWORD" ]] && echo "Please Set PASSWORD Environment Variable" && exit 1
b64_password=$(echo -n ${PASSWORD} | base64)
go mod edit -module {NEW_MODULE_NAME}
-- rename all imported module
find . -type f -name '*.go' \
-exec sed -i -e 's,{OLD_MODULE},{NEW_MODULE},g' {} \;