Skip to content

Instantly share code, notes, and snippets.

View ravikyada's full-sized avatar
🎯
Focusing

Ravi Kyada ravikyada

🎯
Focusing
View GitHub Profile
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "*",
"Resource": [
"arn:aws:s3:::bucketname",
@ravikyada
ravikyada / swapper.sh
Created May 9, 2024 08:16
Create Swap File Inside Debian Server
#! /usr/bin/bash
read -p "Give size of swap you wants to create:" usr_input
echo "Your swap memory will be create of size : $usr_input"
sudo fallocate -l $usr_input /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
@ravikyada
ravikyada / s3-cors-policy.json
Created April 12, 2024 12:25
CORS Policy for S3 Bucket
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"PUT",
"POST",
"GET"
],
@ravikyada
ravikyada / domain-name-nginx.conf
Created January 8, 2024 06:53
NGINX Conf to Reverse Proxy
server {
server_name domain.com;
location / {
proxy_pass http://localhost:1111;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
@ripiuk
ripiuk / s3_async_dowload_folder.py
Last active July 26, 2024 11:45
A tool for downloading a list of files from s3 using asyncio
import os
import time
import asyncio
import aiobotocore
import aiofiles
AWS_ACCESS_KEY_ID = '' # aws access key
AWS_SECRET_ACCESS_KEY = '' # aws secret key
READ_TIMEOUT = 500