This file contains 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 os | |
import openai | |
import json | |
import frontmatter | |
import time | |
import requests | |
# pip install python-frontmatter requests openai | |
openai.api_key = os.getenv("OPENAI_API_KEY") |
This file contains 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
name: Workflow | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
ci: |
This file contains 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
name: OIDC Example action | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
example: |
This file contains 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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: Roles and Resources required to export Amazon WorkMail content programmatically | |
Resources: | |
WorkMailExportBucket: | |
Type: AWS::S3::Bucket | |
WorkMailExportBucketKey: | |
Type: AWS::KMS::Key | |
DeletionPolicy: Retain |
This file contains 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
name: Component deploy | |
on: | |
repository_dispatch: | |
push: | |
branches: | |
- main | |
jobs: |
This file contains 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
python3 -m pip install -U git+https://github.com/aws-greengrass/aws-greengrass-gdk-cli.git@v1.1.0 | |
gdk component build | |
gdk component publish |
This file contains 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
--- | |
- name: Identify reachable hosts | |
hosts: all | |
connection: local | |
gather_facts: false | |
tasks: | |
- block: | |
- name: determine hosts that are reachable | |
ansible.builtin.wait_for_connection: |
This file contains 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
# Auto start keychain | |
eval $(/usr/bin/keychain --eval --quiet id_rsa) |
This file contains 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 | |
STACKSET_NAME="template-us-west-2-shared-services" | |
STACKSET_REGION="us-west-2" | |
STACKSET_DEPLOYMENT_REGIONS="us-west-2" | |
STACKSET_DEPLOYMENT_ACCOUNTS="123456789012" | |
ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text) | |
STACK_STATE=$(aws cloudformation describe-stack-set --stack-set-name "$STACKSET_NAME" --region "$STACKSET_REGION" --query "StackSet.StackSetName" 2>/dev/null) | |
if [ -z "$STACK_STATE" ] |
This file contains 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
# on ckamaster1 | |
sudo -i | |
apt install docker.io kubeadm=1.15.1-00 kubectl=1.15.1-00 kubelet=1.15.1-00 | |
kubeadm init --config=kubeadm-config.yaml --upload-certs| tee kubeadm-init.out | |
## OUTPUT | |
# kubeadm join ckamaster:6443 --token 4gttsi.cpkvihy9jwb8o8aq \ | |
# --discovery-token-ca-cert-hash sha256:c70ef81c9dd7064432a255b9f617e8c3c83b4cce64db17e2518c32b0e3aaf460 | |
exit | |
mkdir -p $HOME/.kube | |
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config |