Skip to content

Instantly share code, notes, and snippets.

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

Carl Javier carljavier

☁️
Cloud DevOps Infrastructure Engineering
View GitHub Profile
@carljavier
carljavier / hashicups-new-ui.nomad
Last active February 22, 2022 04:06
Nomad Demo Job
variable "public_api_ip" {
type = string
description = "Public Host IP Address"
default = "localhost"
}
job "hashicups" {
datacenters = ["dc1"]
@carljavier
carljavier / Workaround_M1_TF_Template_provider.md
Last active February 20, 2024 21:13
M1 Macs and Terraform template provider (Depcreated) local build
@carljavier
carljavier / consul-client-aws.hcl
Last active January 19, 2022 10:15
Hashicorp Consul Config
acl {
enabled = true
down_policy = "async-cache"
default_policy = "deny"
}
ca_file = "/opt/consul/ca.pem"
data_dir = "/opt/consul"
datacenter = "sydney"
verify_outgoing = true
@carljavier
carljavier / vault-server-aws.hcl
Last active November 30, 2021 11:47
Hashicorp Vault Config - AWS
ui = true
#mlock = true
disable_mlock = true
storage "raft" {
path = "/opt/vault/data"
retry_join {
auto_join = "provider=aws region=ap-southeast-2 tag_key=App tag_value=vault"
@carljavier
carljavier / whoisit.py
Last active February 9, 2021 01:30
Programming/Scriptin - Using your preferred programming or scripting language, write a function that takes a number as an argument and returns the string “aunty” if that number is divisible by 3 and returns “uncle” otherwise.
import sys
# Assumes what is passed into function is integer, however prefer to type cast it to be sure.
def whoisit(index):
# Given that there are two scenarios where value could not be divisible by x could be 0 or any other number.
if (int(index) % 3 > 0) or (int(index) == 0) :
return "uncle"
else :
return "aunty"