Use this script to create a new AWS IoT Thing from the command line.
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
# created 2024-04-25 by Noah Coad ncoad@amazon.com | |
# demo video at https://youtu.be/9UkoTsXMnlQ | |
import streamlit as st, boto3 | |
# setup app | |
amazon_q = boto3.client('qbusiness', 'us-west-2') | |
st.title("Amazon Q Chatbot") #page title |
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
# created 2024-04-25 by Noah Coad ncoad@amazon.com | |
# demo video at https://youtu.be/9UkoTsXMnlQ | |
import streamlit as st, boto3 | |
# parameters | |
aws_region = 'us-west-2' | |
q_app_id = 'be05d006-3c25-439e-b25d-781ad5b2xxxx' | |
q_user_id = 'AmazonQ-Administrator' |
When working with multiple AWS accounts, it can be a pain to keep signing out and signing back in. I work with a number of accounts, my own, customer accts, burner accts, etc. It was a pain to keep logging in and out of the AWS Console. Thankfully the AWS Console has a "Role Switcher" that lets you quickly switch between accounts built-in. It does this by assuming a role from another account. Here's how to set that up...
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
#!/usr/bin/env python3 | |
# convert json to yaml | |
# http://pyyaml.org/wiki/PyYAMLDocumentation | |
# python3 json2yaml.py < ~/code/manpow/moneybug/mbuploader/support/offices.json | |
# gist https://gist.github.com/noahcoad/46909253a5891af3699580b8f17baba8 | |
import yaml, json, sys | |
sys.stdout.write(yaml.dump(json.load(sys.stdin))) |
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
; ========================================================================================== | |
; == Modal Dialog Automation | |
; == | |
; == Automates away pesky modal dialogs by applying a default response when they pop up | |
; == Helper functions are at the bottom | |
; ========================================================================================== | |
; Defaults to fast no-regex title matching | |
SetTitleMatchMode, 2 |
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
// | |
// Example of using ESP32 Arudino mbed library to | |
// Encrypt and Decrypt using an asyncronous RSA 2048 bit public and private key pair | |
// created 2020-07-05 by Noah Coad | |
// | |
// Inside a "data" directory, run these commands to generate a key pair | |
// then use the ESP32 Sketch Data Uploader to upload files to ESP32 SPIFFS files | |
// | |
// openssl genrsa -out private-rsa 2048 | |
// openssl pkcs8 -topk8 -inform pem -in private-rsa -outform pem -nocrypt -out private |
NewerOlder