Skip to content

Instantly share code, notes, and snippets.

View carljavier's full-sized avatar
☁️
Cloud DevOps Infrastructure Engineering Contract

Carl Javier carljavier

☁️
Cloud DevOps Infrastructure Engineering Contract
View GitHub Profile
@devops-adeel
devops-adeel / audit.tf
Last active November 15, 2022 10:20
Vault Baseline Configuration
resource "vault_audit" "file" {
type = "file"
description = "Vault Audit to File"
options = {
file_path = "/var/log/vault_audit.log"
format = "json"
mode = "0000"
prefix = "vault"
}
@arodd
arodd / connect-job-sample.hcl
Last active December 3, 2021 01:21
Nomad HCL2 Job Sample w/ Connect Upstreams
variable "api_group_count" {
type = number
default = 1
}
variable "dash_group_count" {
type = number
default = 1
}
variable "datacenters" {
@abuxton
abuxton / rhel7-docker-install.sh
Created December 1, 2021 15:27
rhel7-docker-install
#! /bin/bash +X
# later we will disable selinux
# sudo setenforce Permissive
# getenforce # just incase youy want to check selinuxmode
# lets make sure we are a clean install of docker
sudo yum remove docker docker-common docker-selinux docker-engine-selinux docker-engine docker-ce
# now install some tools dmpd(for short) ensures rhel 7 respects gpg settings in repos (issue is https://access.redhat.com/solutions/2850911) see https://access.redhat.com/discussions/5336741 for the fix
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
@abuxton
abuxton / README.MD
Last active February 9, 2022 16:14
Publish pmr script

Publish PMR helper script

Script to publish modules utilizing the API https://www.terraform.io/docs/cloud/api/modules.html. Uses native OS python json library, but the alt. jq lines are included feel free to amend.

Usage

> git clone https://gist.github.com/abuxton/ea5f37767af44a710020ee2fbe97a7f3 publish-pmr-module && cd publish-pmr-module
export TFE_ORG=# your TFE/C organisation name
export TFE_ADDR=app.terraform.io #set your internal TFE DNS
@sbailliez
sbailliez / vagrant-vmware-tech-preview-apple-m1-pro.md
Last active April 10, 2024 07:51
Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

UPDATE November 20, 2022: VMWare Fusion 13

VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.

Summary

This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated

@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)
@nathandines
nathandines / assume_role.ps1
Last active November 1, 2021 10:49
Assume role wrapper scripts in bash and PowerShell (Using Role ARN from environment variable "ROLE_ARN")
if (Get-Command "powershell" -ErrorAction SilentlyContinue) {
$powershell = "powershell"
} else {
$powershell = "pwsh"
}
& $powershell -Command {
Set-StrictMode -Version 2.0
Import-Module AWSPowerShell.NetCore
@mpj
mpj / order-total.js
Created November 26, 2017 21:03
Code from Unit testing in JavaScript Part 3 - Test runners
function orderTotal(order) {
return order.items.reduce((prev, cur) => cur.price * (cur.quantity || 1) + prev, 0)
}
module.exports = orderTotal
@tristanmorgan
tristanmorgan / vault-token-helper.sh
Last active February 22, 2021 03:25
HashiCorp Vault Token Helper (save into macOS keychain)
#!/bin/sh
set -e
[ -z "$VAULT_ADDR" ] && VAULT_ADDR="https://127.0.0.1:8200"
case $1 in
store)
security add-generic-password -U -a "VAULT-$USER" -c "hvlt" -C "hvlt" -D "Hashicorp Vault" -s "$VAULT_ADDR" -w "$(cat)"
;;
get)