Skip to content

Instantly share code, notes, and snippets.

#!/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`";
# 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
@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
@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 / .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 / auto-update-kmods.ignition
Created April 26, 2018 19:54 — forked from dm0-/auto-update-kmods.ignition
Automatically update custom kernel modules on CoreOS
{
"ignition": { "version": "2.0.0" },
"systemd": {
"units": [
{
"name": "auto-update-kmods.service",
"enable": true,
"contents": "[Unit]\nDescription=Install custom kernel modules\nAfter=lib-modules.mount network-online.target\nRequires=lib-modules.mount network-online.target\nConditionPathExists=!/opt/modules/%v\nConditionPathExistsGlob=/lib/modules/auto-update-kmods.d/*.sh\n\n[Service]\nType=oneshot\nExecStart=/bin/bash -ex /lib/modules/auto-update-kmods.sh\n\n[Install]\nWantedBy=multi-user.target\n"
},
{
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
@jwieringa
jwieringa / infra-secret-management-overview.md
Created May 10, 2018 20:14 — forked from maxvt/infra-secret-management-overview.md
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.