openssl genrsa -out DevDan.key 2048
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -fsSLo weave-daemonset.yaml "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')&env.IPALLOC_RANGE=10.32.0.0/16" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
flag_iptables=true | |
flag_dry_run=true | |
while getopts ":nf" arg; do | |
case $arg in | |
n) # Dry-run - does not preserve iptables rules. | |
flag_dry_run=false | |
;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -RunAsAdministrator | |
function Uninstall-Pester ([switch]$All) { | |
if ([IntPtr]::Size * 8 -ne 64) { throw "Run this script from 64bit PowerShell." } | |
#Requires -RunAsAdministrator | |
$pesterPaths = foreach ($programFiles in ($env:ProgramFiles, ${env:ProgramFiles(x86)})) { | |
$path = "$programFiles\WindowsPowerShell\Modules\Pester" | |
if ($null -ne $programFiles -and (Test-Path $path)) { | |
if ($All) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import boto3 | |
import re | |
from botocore.signers import RequestSigner | |
def get_bearer_token(cluster_id, region): | |
STS_TOKEN_EXPIRES_IN = 60 | |
session = boto3.session.Session() | |
client = session.client('sts', region_name=region) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INTERACTIVE_BASHPID_TIMER="/tmp/${USER}.START.$$" | |
PS0='$(echo $SECONDS > "$INTERACTIVE_BASHPID_TIMER")' | |
function _update_ps1() { | |
local __ERRCODE=$? | |
local __JOBS=$(jobs -p | wc -l) | |
local __DURATION=0 | |
if [ -e $INTERACTIVE_BASHPID_TIMER ]; then | |
local __END=$SECONDS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
package_update: true | |
package_upgrade: true | |
packages: | |
- curl | |
- ruby | |
runcmd: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Description: Deploys lambda functions to forward cloudwatch logs to logstash | |
Parameters: | |
coreNetworkingStackName: | |
Type: String | |
Resources: | |
lambdaRole: | |
Type: "AWS::IAM::Role" | |
Properties: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$wc = New-Object System.Net.WebClient | |
if (!(Test-Path "C:\Tools")) { | |
New-Item -Path "C:\" -Name "Tools" -ItemType "directory" | |
} | |
# SYSMON | |
# Download Sysmon | |
$SysmonDirectory = "C:\Tools\Sysmon\" |
My attempt to collect all Kubernetes demo applications in one place
- Stars (Mesos) - https://mesosphere.github.io/star/
- Socks Shop (Weaveworks) - https://microservices-demo.github.io/
- Bookinfo (Istio) - https://github.com/istio/istio/tree/master/samples/bookinfo and https://istio.io/latest/docs/examples/bookinfo/
- Online Bootique (GKE) - https://github.com/GoogleCloudPlatform/microservices-demo
- Guestbook - https://github.com/kubernetes/examples/tree/master/guestbook
- Emojivoto (Linkerd) - https://github.com/BuoyantIO/emojivoto