These are are some notes I put together on butchering the rectangular dishy cable.
FOLLOW THESE GUIDELINES AT YOUR OWN RISK. I TAKE NO RESPONSIBILITY FOR ANY DAMAGE OR INJURY YOU SUSTAIN FROM FOLLOWING OR NOT FOLLOWING THESE GUIDELINES.
#!/usr/bin/env bash | |
INI_FILE=~/.aws/credentials | |
while IFS=' = ' read key value | |
do | |
if [[ $key == \[*] ]]; then | |
section=$key | |
elif [[ $value ]] && [[ $section == '[default]' ]]; then | |
if [[ $key == 'aws_access_key_id' ]]; then |
#!/usr/bin/env bash | |
# | |
# File: | |
# aws-signature-creator.sh | |
# | |
# Description: | |
# A signature creator for AWS signature version 4 | |
# | |
# References: | |
# https://czak.pl/2015/09/15/s3-rest-api-with-curl.html |
#!/bin/bash | |
fileLocal="filename.ext" | |
bucket="name-of-bucket" | |
s3dir="nameofdirectory/" | |
region="us-east-2" | |
storageClass="STANDARD" | |
awsAccess='XXXXXXXXXXXXXXXXXXXX' | |
awsSecret='0000000000aaaaaaaaaa0000000000aaaaaaaaaa' #Make sure to use credentials with WRITE access to the bucket |
The package linked to from here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.#!/bin/bash | |
if test -z "$1"; then | |
echo "Usage: $0 <prompt>" | |
exit 1 | |
fi | |
if test -z "$OPENAI_API_KEY"; then | |
echo "OpenAI key is missing - \$OPENAI_API_KEY must be set" | |
exit 1 |