Skip to content

Instantly share code, notes, and snippets.

@jwieringa
jwieringa / .config
Created April 2, 2017 15:36 — forked from brianredbeard/.config
buildroot config for node.js
BR2_HAVE_DOT_CONFIG=y
BR2_ARCH_IS_64=y
BR2_x86_64=y
BR2_ARCH="x86_64"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_ARCH="nocona"
BR2_ARCH_HAS_ATOMICS=y
BR2_X86_CPU_HAS_MMX=y
BR2_X86_CPU_HAS_SSE=y
BR2_X86_CPU_HAS_SSE2=y
@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`";
@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)
@jwieringa
jwieringa / Makefile
Created March 31, 2016 02:57 — forked from pgporada/Makefile
Terraform Makefile
.ONESHELL:
.PHONEY: help set-env init update plan plan-destroy show graph apply output taint
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
set-env:
@if [ -z $(ENVIRONMENT) ]; then\
echo "ENVIRONMENT was not set"; exit 10;\
fi
- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions
numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Centralized locking can be based on this K/V store.