Skip to content

Instantly share code, notes, and snippets.

View nstankov-bg's full-sized avatar
🎯
Focusing

Nikolay Stankov nstankov-bg

🎯
Focusing
View GitHub Profile
@nstankov-bg
nstankov-bg / python3issue
Last active October 10, 2023 21:31
Python3 Issue Gist
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)
@nstankov-bg
nstankov-bg / gpt4_docker_ubuntu.sh
Created March 21, 2023 09:15
ubuntu_packer_gpt4
#!/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
@nstankov-bg
nstankov-bg / macrbook_fingerprint_as_sudo.md
Created July 7, 2022 09:21
Use Fingerprint Reader on a MacBook to Validate SUDO | 1 Liner