Skip to content

Instantly share code, notes, and snippets.

View eswarijayakumar's full-sized avatar
💃
Loves Creating products

Eswari Jayakumar eswarijayakumar

💃
Loves Creating products
View GitHub Profile
@eswarijayakumar
eswarijayakumar / access-s3-presignedurl.py
Created July 14, 2023 01:17
Python code to Generate Presigned URL for accessing S3 bucket files
import boto3
session = boto3.Session(
aws_access_key_id="<Provide your AWS access Key ID>",
aws_secret_access_key="<Provide your AWS Secret Key>",
region_name="us-east-1"
)
s3_client = session.client('s3')
@eswarijayakumar
eswarijayakumar / create_ubuntu_user.sh
Created July 1, 2023 16:42
Script to automate Ubuntu User creation with SSH Key access
#!/bin/sh
public_key="<provide your public key here>"
sudo adduser --disabled-password --gecos "" testuser
sudo usermod -aG sudo testuser
sudo mkdir -p /home/testuser/.ssh && sudo touch /home/testuser/.ssh/authorized_keys
sudo chmod 700 /home/testuser/.ssh && sudo chmod 600 /home/testuser/.ssh/authorized_keys
sudo chown -R testuser /home/testuser/.ssh
sudo sh -c "echo $public_key > /home/testuser/.ssh/authorized_keys"
@eswarijayakumar
eswarijayakumar / System Design.md
Created March 15, 2020 06:38 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?