Skip to content

Instantly share code, notes, and snippets.

View tristanfisher's full-sized avatar
🇺🇸

tristan fisher tristanfisher

🇺🇸
View GitHub Profile
@tristanfisher
tristanfisher / Multipart MIME Email.md
Created December 20, 2022 20:30 — forked from tylermakin/Multipart MIME Email.md
Multipart MIME Email Guide

Multipart MIME Email Guide

This is a guide on how to send a properly formatted multipart email. Multipart email strings are MIME encoded, raw text email templates. This method of structuring an email allows for multiple versions of the same email to support different email clients.

// Example Multipart Email:
From: [email protected]
To: [email protected]
Subject: Multipart Email Example
Content-Type: multipart/alternative; boundary="boundary-string"
package main
import (
"fmt"
"sync"
"time"
)
func simulatedWork(id int) {
time.Sleep(250 * time.Millisecond)
@tristanfisher
tristanfisher / Ansible-Vault how-to.md
Last active June 11, 2024 13:23
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

Working with ansible-vault


I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.