The following is derived from the article Use Touch ID for sudo on Mac: Credits to: https://gist.github.com/GLMeece/08a0b1da2d28437466a68e2e563089bc
- Input 1 liner in Terminal.
sudo sed -i '' '2 i \
import boto3 | |
def download_s3_file(bucket_name, file_prefix, local_filename): | |
try: | |
s3_client = boto3.client('s3') | |
response = s3_client.list_objects_v2(Bucket=bucket_name, Prefix=file_prefix) | |
if 'Contents' in response: | |
target_file = response['Contents'][0]['Key'] | |
local_path = f"/tmp/{local_filename}" | |
s3_client.download_file(bucket_name, target_file, local_path) |
#!/bin/bash | |
set -euo pipefail | |
export DEBIAN_FRONTEND=noninteractive | |
# Install Docker | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
sh get-docker.sh | |
rm get-docker.sh |
The following is derived from the article Use Touch ID for sudo on Mac: Credits to: https://gist.github.com/GLMeece/08a0b1da2d28437466a68e2e563089bc
sudo sed -i '' '2 i \