Skip to content

Instantly share code, notes, and snippets.

Avatar
👾
Building.

Mitchell Hashimoto mitchellh

👾
Building.
View GitHub Profile
@mitchellh
mitchellh / preview-tf-0.11.md
Last active Nov 7, 2017
Previewing the upcoming module provider configurations in TF 0.11
View preview-tf-0.11.md

Note: This is a preview for TF 0.11. You should reference the official Terraform docs for up to date information.

Before (Terraform <= 0.10.x)

Modules can only inherit provider configurations, and modules inheritance around aliased providers is unclear.

Use case: if you want two have two modules where you want one two create resources in the us-west region and the other to create resources in the us-east region. In Terraform <= 0.10.x, this is not possible.

View jobspec.hcl
// A job that is used to run the GC more often than the Nomad client
// default for machines that have low disk.
job "periodic-gc" {
datacenters = ["dc1"]
type = "batch"
periodic {
// Launch every hour
cron = "0 * * * * *"
View ss.go
// +build windows
package screen
import (
"fmt"
"image"
"reflect"
"syscall"
"unsafe"
View getknownfolder.go
// Package winfolder returns the path to known folders on Windows.
// This package will only build on Windows, so make sure that any
// Go file using it is guarded to only build on Windows.
package winfolder
import (
"fmt"
"syscall"
"unsafe"
)
View gist:d4edf683cf792fe02dd0
### Keybase proof
I hereby claim:
* I am mitchellh on github.
* I am mitchellh (https://keybase.io/mitchellh) on keybase.
* I have a public key whose fingerprint is 1B5F 2FC0 833F CDBC 72E7 AACB 851F 4EC2 E7E2 D724
To claim this, I am signing this object:
@mitchellh
mitchellh / setup_winrm.txt
Created Jun 14, 2015
Packer 0.8 Windows Example on AWS
View setup_winrm.txt
<powershell>
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow
View gist:9859371
### Keybase proof
I hereby claim:
* I am mitchellh on github.
* I am mitchellh (https://keybase.io/mitchellh) on keybase.
* I have a public key whose fingerprint is 6607 CB95 C7C3 E98D F889 98CA 7508 59F2 E481 99B9
To claim this, I am signing this object:
View gist:8308267

"stormbrew",

This is in response to your comment here: https://news.ycombinator.com/item?id=6877676

I am putting this in a public gist because I couldn't easily find your email, and nothing I'm going to say is secret anyways.

Thanks to many things, including your comment, I was motivated to take a look at plugin management and attempt to fix it in a real way. I wanted to let you know that today, I merged in the [giant] pull request that fixes this once and for all: https://github.com/mitchellh/vagrant/commit/ba85627c214a936bbdd4bf003f501f6f92ba2f60

I don't expect you to read all that code, but please do read the commit message. I think this will make you quite happy!

View centos6-ks.cfg
text
skipx
install
url --url http://mirror.raystedman.net/centos/6/os/x86_64/
repo --name=updates --baseurl=http://mirror.raystedman.net/centos/6/updates/x86_64/
lang en_US.UTF-8
keyboard us
rootpw s0m3password
firewall --disable
authconfig --enableshadow --passalgo=sha512
@mitchellh
mitchellh / gist:7131431
Created Oct 24, 2013
Packer / Serf Download "APIs"
View gist:7131431