-
Open a new Amazon Linux 2 EC2(amd64) on AWS. Make it spot instance if you prefer.
ssh ec2-user@<EC2_IP> into the EC2 instance:
# install and start docker
$ sudo yum install -y docker
$ sudo service docker start| #!/bin/bash | |
| echo "Searching for trusted tools..." | |
| TOOLS=$(grep -v "not trusted$" "$0" | grep "trusted$" | sed 's/^- \([^ ]*\).*/\1/' | tr '\n' ',' | sed 's/,$//') | |
| echo "Found tools: $TOOLS" | |
| if [ -z "$TOOLS" ]; then | |
| echo "Warning: No trusted tools found!" | |
| exit 1 | |
| fi |
| #!/bin/sh | |
| kubectl --namespace=kube-system get po | |
| helm upgrade --install --create-namespace -n nginx my-nginx oci://registry-1.docker.io/bitnamicharts/nginx | |
| kubectl --namespace=nginx get po |
| function updateData(){ | |
| // var ss = SpreadsheetApp.getActiveSpreadsheet(), | |
| var sheet = SpreadsheetApp.getActive().getSheetByName('GST') | |
| let coins = [ | |
| 'green-satoshi-token-bsc', | |
| 'green-satoshi-token', | |
| 'binancecoin', | |
| 'solana', | |
| ]; | |
| var prices = getCGSimplePrices(coins.join(','), 'usd') |
| # watch the demo at https://youtu.be/cGUNf1FMNvI | |
| # | |
| # customize these variables | |
| # | |
| DEFAULT_PROFILE='default' | |
| DEFAULT_REGION='us-east-1' | |
| DEFAULT_OUTPUT='json' | |
| SSO_START_URL='https://your-sso.awsapps.com/start' | |
| SSO_REGION='us-east-1' | |
| SSO_ACCOUNT_ID='123456789012' |
| #!/bin/bash | |
| # video demo - https://www.youtube.com/watch?v=Y8TyE_DNds8 | |
| mkdir ~/.tmp && cd $_ | |
| # install aws-cli v2 | |
| curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ | |
| unzip awscliv2.zip && \ | |
| sudo ./aws/install |
Open a new Amazon Linux 2 EC2(amd64) on AWS. Make it spot instance if you prefer.
ssh ec2-user@<EC2_IP> into the EC2 instance:
# install and start docker
$ sudo yum install -y docker
$ sudo service docker start| Resources: | |
| FlaskService3B7F72B9: | |
| Type: AWS::AppRunner::Service | |
| Properties: | |
| SourceConfiguration: | |
| CodeRepository: | |
| CodeConfiguration: | |
| ConfigurationSource: REPOSITORY | |
| RepositoryUrl: https://github.com/aws-containers/hello-app-runner | |
| SourceCodeVersion: |
| import { App, CfnOutput, Construct, Stack, StackProps } from '@aws-cdk/core'; | |
| import * as ec2 from '@aws-cdk/aws-ec2'; | |
| export class MyStack extends Stack { | |
| constructor(scope: Construct, id: string, props: StackProps = {}) { | |
| super(scope, id, props); | |
| const vpc = ec2.Vpc.fromLookup(this, 'Vpc', { isDefault: true }); | |
| const subnetId = vpc.privateSubnets[0].subnetId; |
| import { App, Construct, Stack, StackProps, CfnParameter, CfnCondition, Fn } from '@aws-cdk/core'; | |
| import * as sns from '@aws-cdk/aws-sns'; | |
| export interface DemoProps { } | |
| export class Demo extends Construct { | |
| constructor(scope: Construct, id: string) { | |
| super(scope, id) | |
| const stack = Stack.of(this); |
| // For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: | |
| // https://github.com/microsoft/vscode-dev-containers/tree/v0.128.0/containers/docker-from-docker | |
| { | |
| // "name": "Docker from Docker", | |
| // "dockerFile": "Dockerfile", | |
| "name": "jsii", | |
| "image": "jsii/superchain", | |
| "mounts": [ | |
| "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" | |
| ], |