Skip to content

Instantly share code, notes, and snippets.

View marazmiki's full-sized avatar

Mikhail Porokhovnichenko marazmiki

View GitHub Profile
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active March 25, 2025 08:05
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
@Voronenko
Voronenko / nginx.conf
Created March 9, 2018 13:08
nginx proxy private s3 bucket
worker_processes 1;
daemon off;
error_log /dev/stdout info;
pid /usr/local/var/nginx/nginx.pid;
events {
worker_connections 1024;
}
import boto3
def pull_s3_prefix(dst_dir, bucket, prefix):
client = boto3.client('s3')
resource = boto3.resource('s3')
download_dir(client, resource, prefix, prefix, dst_dir, bucket)
def download_dir(client, resource, prefix, start_prefix, local, bucket ):
paginator = client.get_paginator('list_objects')
for result in paginator.paginate(Bucket=bucket, Delimiter='/', Prefix=prefix):
@skonik
skonik / upload_to_s3.py
Last active June 3, 2024 16:30
Asyncio S3 Multipart Upload
# Details https://skonik.me/uploading-large-file-to-s3-using-aiobotocore/
import asyncio
import math
import os
import aiobotocore
import aiofiles
AWS_S3_HOST = 'http://localhost:9000'
AWS_SECRET_ACCESS_KEY = 'SECRET_KEY'