Skip to content

Instantly share code, notes, and snippets.

@jwieringa
jwieringa / main.go
Last active March 26, 2017 21:24
Trying out Rspec style test via Golang in Ginkgo/Gomega
package resource_proxy_integration
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"log"
"net/http"
"testing"
)
@jwieringa
jwieringa / main.tf
Created March 2, 2017 19:58
Nearly fully working example (seems to have an IAM policy issue). Demonstrates that `aws_opsworks_custom_layer.app.ebs_volume.size` is not refreshing values
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "main" {
vpc_id = "${aws_vpc.main.id}"
cidr_block = "10.0.1.0/24"
}
resource "aws_security_group" "allow_all" {
@jwieringa
jwieringa / README.md
Created August 20, 2016 22:34 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index:

@jwieringa
jwieringa / wait-for-db
Created August 6, 2016 14:05 — forked from csexton/wait-for-db
A ruby script that will wait for a port to be connectable on a host, normally used to check if another Docker container has booted up
#!/usr/bin/env ruby
require "socket"
require "uri"
if ENV["DATABASE_URL"]
url = URI.parse ENV["DATABASE_URL"]
puts "Waiting for DB on #{url}..."
30.times do
begin
# set up iam users, groups, roles, policies for cross account sts assume role access
# devs have near full rights to dev account, read access to prod with mfa requirement
# works great with a bit of https://github.com/remind101/assume-role for cli switching
# create a thing in one account vs the other
variable "prod_enable_flag" {
default = {
stage = 0
prod = 1
#!/bin/bash
DEBUG=1;
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
GREP="`which grep`";
variable "s3_bucket_id" {
default = "s3-assets"
}
variable "s3_origin_id" {
default = "S3-assets"
}
resource "aws_cloudfront_distribution" "main" {
enabled = true
@jwieringa
jwieringa / main.md
Created June 4, 2016 13:08
Installing Fedora 23 on 4th gen (2016) X1 Carbon

Installing Fedora 23 on 4th gen (2016) X1 Carbon

(Last updated Apr 29 2016)

If you attempt to install Fedora 23 (any spin) on the 2016 X1 Carbon you'll receive a black screen just after kernel selection. This is caused by a kernel bug. You will need to add intel_pstate=no_hwp to the kernel boot arguments, which you are able to do from the kernel selection screen. After installation you must do this again to boot into the installed OS. Once booted, I recommend adding intel_pstate=no_hwp to your /etc/default/grub and running sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg, which will then cause any kernel to have this parameter added to it.

Once Fedora ships with the upcoming 4.6 kernel (and perhaps a patch to the 4.4 kernel, but that remains to be seen), you should be able to remove this argument.

~~Update Apr 21: The 4.4.7 kernel was released but still has these issues. It appears that the fix will be shipped in the 4.4.8 kernel: htt

resource "aws_security_group" "gocd_agent_elb" {
name = "gocd-agent-elb-sg"
description = "Security group for the gocd agent ELBs"
vpc_id = "${var.vpc_id}"
tags {
Name = "gocd agent (ELB)"
}
# HTTP - SSL (SERVER TO AGENT)