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
#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
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
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
IAM_GROUP=${1:-admins} | |
EKS_ROLE_ARN=${2:-arn:aws:iam::111122223333:role/eks-node-role} | |
RBAC_GROUP=${3:-system:masters} |
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 | |
# | |
# download yq | |
# | |
curl -fsSL https://github.com/mikefarah/yq/releases/download/v4.43.1/yq_linux_amd64 -o /usr/local/bin/yq | |
chmod +x /usr/local/bin/yq | |
# |
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
DASEL_VER="1.15.0" | |
CRI_VER="1.5.1" | |
# | |
# install dasel | |
# | |
curl -fsSL "https://github.com/TomWright/dasel/releases/download/v${DASEL_VER}/dasel_linux_amd64" -o /usr/local/bin/dasel | |
chmod +x /usr/local/bin/dasel |
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 boto3 | |
import sagemaker | |
from time import gmtime, strftime, sleep | |
# | |
# be careful, this might be very expensive operation! | |
# | |
session = sagemaker.Session(default_bucket='my-demo-amazon-reviews-bucket') | |
bucket = session.default_bucket() |
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
pip install -U awscli pandas | |
aws s3 cp s3://amazon-reviews-pds/tsv/amazon_reviews_us_Automotive_v1_00.tsv.gz . | |
cat << 'EOF' | python | |
import pandas as pd | |
fields = ['star_rating', 'review_body', 'review_id'] | |
dfs = pd.read_csv('amazon_reviews_us_Automotive_v1_00.tsv.gz', sep='\t', usecols=fields, compression='gzip', chunksize=100) | |
for df in dfs: | |
df.to_csv('amazon_reviews_us_Automotive_v1_00.csv', index=None, header=True, mode='a') |