Skip to content

Instantly share code, notes, and snippets.

View ArchTaqi's full-sized avatar
🏠
Working from home

Muhammad Taqi ArchTaqi

🏠
Working from home
View GitHub Profile
for region in `aws ec2 describe-regions --query 'Regions[].RegionName' --output text`; do
aws sns list-subscriptions --query "Subscriptions[?starts_with(Endpoint, 'arn:aws:sqs:')].[TopicArn, Endpoint]" --output text --region $region
done
@ArchTaqi
ArchTaqi / who_has_access.py
Created June 9, 2021 19:38 — forked from gene1wood/who_has_access.py
Script to check what AWS IAM users and roles have rights to perform an action
#!/usr/bin/env python
import sys
import boto3
def get_paginated_results(product, action, key, credentials=None, args=None):
args = {} if args is None else args
return [y for sublist in [x[key] for x in boto3.client(product, **({} if credentials is None else credentials)).get_paginator(action).paginate(**args)] for y in sublist]
@ArchTaqi
ArchTaqi / 01_setup_lets_encrypt.sh
Created June 9, 2021 19:57 — forked from gene1wood/01_setup_lets_encrypt.sh
Example of how to setup Let's Encrypt on RHEL / CentOS and automate certificate rewnewal
#!/bin/bash
[email protected]
DOMAINS=example.com,www.example.com,foo.example.com,example.org.example.net,www.example.org,www.example.net
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt/
mkdir -p /var/lib/letsencrypt/global-webroot
# Setup the global alias
@ArchTaqi
ArchTaqi / Procfile
Created February 12, 2022 18:42 — forked from adamghill/Procfile
Settings, files, and a checklist to deploy a Django app to Heroku with nginx + gunicorn + postgres + redis and using `poetry` for dependencies.
web: python manage.py collectstatic --noinput && bin/start-pgbouncer bin/start-nginx gunicorn -c gunicorn.conf.py project.wsgi
@ArchTaqi
ArchTaqi / deploy-django.md
Created March 24, 2022 07:50 — forked from rmiyazaki6499/deploy-django.md
Deploying a Production ready Django app on AWS

Deploying a Production ready Django app on AWS

In this tutorial, I will be going over to how to deploy a Django app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app Hygge Homes (a vacation home rental app for searching and booking vacation homes based off Airbnb) and we wanted to share with other developers some of the lessons we learned along the way.

Following this tutorial, you will have an application that has:

  • An AWS EC2 server configured to host your application
  • SSL-certification with Certbot
  • A custom domain name
  • Continuous deployment with Github Actions/SSM Agent
@ArchTaqi
ArchTaqi / SolanaToolchainInstaller.sh
Created August 5, 2022 15:20
Shell Script to Install Node/Rust/Solana/Anchor/Metaplex/VS Code for Solana Web Development
#!/bin/bash
# Known working on a vanilla Ubuntu 20.04 install
# as of November 12 2021.
# Usage:
# $ sudo chmod +x ./SolanaToolchainInstaller.sh
# $ ./SolanaToolchainInstaller.sh
TIMESRUN=0