Skip to content

Instantly share code, notes, and snippets.

View mrpackethead's full-sized avatar
😁
Focusing

Andrew mrpackethead

😁
Focusing
  • Raindancers
  • Wellington, New Zealand
View GitHub Profile
@mrpackethead
mrpackethead / bedrock-chess.py
Last active August 2, 2024 12:23
AI Chess - LLama3 vs Antrophic3
import boto3
import json
import os
session = boto3.session.Session(profile_name='yourprofile', region_name='us-east-1')
bedrock = session.client('bedrock-runtime', 'us-east-1', endpoint_url='https://bedrock-runtime.us-east-1.amazonaws.com')
def answer_query(message_list, who):
if who == 'sonnet':
@mrpackethead
mrpackethead / error.html
Created January 22, 2024 03:26
error.html
<html>
<header><title>Hello world: Error</title></header>
<body>
Uh oh, you reached the error page!
</body>
</html>
<html>
<header><title>Hello world</title></header>
<body>
Hello World, This is Andrews web page about Orca
</body>
</html>
import {
App,
Stack,
StackProps,
}
from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { StaticSite } from './staticSite';
import {
aws_route53 as r53,
aws_s3 as s3,
aws_certificatemanager as acm,
aws_cloudfront as cloudfront,
aws_s3_deployment as s3deploy,
aws_route53_targets as targets,
aws_cloudfront_origins as cloudfront_origins,
aws_iam as iam,
}
@mrpackethead
mrpackethead / staticSite.ts
Created January 21, 2024 07:59
Construct to build a static Site
import {
aws_route53 as r53,
aws_s3 as s3,
aws_certificatemanager as acm,
aws_cloudfront as cloudfront,
aws_s3_deployment as s3deploy,
aws_route53_targets as targets,
aws_cloudfront_origins as cloudfront_origins,
aws_iam as iam,
}
@mrpackethead
mrpackethead / main.ts
Created January 20, 2024 23:23
First CDK application
import {
App,
Stack,
StackProps,
aws_s3 as s3,
}
from 'aws-cdk-lib';
import * as core from 'aws-cdk-lib'
import * as cdk from 'aws-cdk-lib';
import {
aws_ec2 as ec2,
aws_resourcegroups as resourcegroups,
}
from 'aws-cdk-lib'
import { Construct } from 'constructs';
// import * as sqs from 'aws-cdk-lib/aws-sqs';
import * as network from 'raindancers-network'
import * as cdk from 'aws-cdk-lib';
import {
aws_ec2 as ec2,
}
from 'aws-cdk-lib';
import * as constructs from 'constructs';
import * as raindancersNetwork from 'raindancers-network';
export interface TgDXS2SProps extends cdk.StackProps{
import * as cdk from 'aws-cdk-lib';
import {
aws_networkfirewall as firewall,
}
from 'aws-cdk-lib';
import * as constructs from 'constructs';
export interface FirewallRulesProps {
cloudwanCidr: string;