Skip to content

Instantly share code, notes, and snippets.

View elvis2's full-sized avatar

Elvis McNeely elvis2

View GitHub Profile
@abuxton
abuxton / Terraform on Mac M1.md
Created August 3, 2022 10:42 — forked from straubt1/Terraform on Mac M1.md
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.

@kosyfrances
kosyfrances / terraform_template_to_file
Created November 29, 2019 13:10
Render terraform template to local file tested on Terraform v0.12.16
locals {
our_rendered_content = templatefile("${path.module}/yourtemplatefile.tmpl", { yourvars = var.yourvars })
}
resource "null_resource" "local" {
triggers = {
template = local.our_rendered_content
}
# Render to local file on machine
@GuyBarros
GuyBarros / Vaul DR Cheat Sheet
Created December 5, 2018 09:52
Vault DR Cheat Sheet
What you'll need:
<recovery key of the primary>
<root token of primary>
Step 1 - begin process
vault operator generate-root -dr-token -init -tls-skip-verify
Step 2 - Generate DR Token (repeat one per key shard)
vault operator generate-root -tls-skip-verify -dr-token -nonce=<nonce value from step 1> <recovery key of the primary>
@rmulley
rmulley / golang_emails.go
Last active December 11, 2016 03:17
Sends an email in Go with text/HTML and an attachment.
package main
import (
"bytes"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
"net/smtp"
) //import
@lennart
lennart / gist:3787187
Created September 26, 2012 10:16
Web Config for Symfony 2 in WebMatrix 2
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="TempRewriteToWeb" stopProcessing="false">
<match url="^(web/)?(.*)$" />
<action type="Rewrite" url="web/{R:2}" logRewrittenUrl="true" />
</rule>
@copernicus
copernicus / ec2-metadata
Created April 20, 2012 13:00 — forked from yaronf/ec2-metadata
ec2-metadata: a simple tool for exploring Amazon EC2 metadata, extended with network and VPC info
#!/bin/bash
#
#########################################################################
#This software code is made available "AS IS" without warranties of any #
#kind. You may copy, display, modify and redistribute the software #
#code either by itself or as incorporated into your code; provided that #
#you do not remove any proprietary notices. Your use of this software #
#code is at your own risk and you waive any claim against Amazon #
#Digital Services, Inc. or its affiliates with respect to your use of #
#this software code. (c) 2006-2007 Amazon Digital Services, Inc. or its #