Skip to content

Instantly share code, notes, and snippets.

View Anishmourya's full-sized avatar
🖥️
Working remotely

Anish Dhanka Anishmourya

🖥️
Working remotely
View GitHub Profile
@Anishmourya
Anishmourya / app.py
Last active June 26, 2023 18:42
FLASK + S3 Presigned URLs + FIle upload to s3
from s3 import AwsS3UploadClass
from config import id_key
from config import secret_key
from config import bucket_name
from flask import Flask
from flask import jsonify
from flask import request
import requests
app = Flask(__name__)
@Anishmourya
Anishmourya / bitbucket-pipeline.yaml
Last active April 8, 2020 12:27
AWS ECS: Deploy Docker Container from Bitbucket Pipeline to AWS ECR
image: atlassian/default-image:2
definitions:
steps:
- step: &BuildAndPushVersion
name: Build Image Push to ECR
services:
- docker
script:
- docker build -t ${BITBUCKET_REPO_SLUG} .
@ravsau
ravsau / RDS-notes.MD
Last active March 12, 2024 11:01
RDS Notes

What does Amazon RDS manage on my behalf?

  • Amazon RDS manages the work involved in setting up a relational database: from provisioning the infrastructure capacity you request to installing the database software.
  • Once your database is up and running, Amazon RDS automates common administrative tasks such as performing backups and patching the software that powers your database.
  • With optional Multi-AZ deployments, Amazon RDS also manages synchronous data replication across Availability Zones with automatic failover.

How do I access my running DB instance?

  • Once your DB instance is available, you can retrieve its endpoint via the DB instance description in the AWS Management Console, DescribeDBInstances API or describe-db-instances command. image
@zparnold
zparnold / one_liner.sh
Last active May 6, 2024 13:14
A simply script to delete all failed pods from Kubernetes
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
@holmberd
holmberd / php-pools.md
Last active May 17, 2024 07:21
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@tstrohmeier
tstrohmeier / bitbucket-pipelines.yml
Last active September 5, 2022 08:46
AWS ECS: Deploy Docker Container from Bitbucket Pipeline to AWS ECR
# enable Docker for your repository
options:
docker: true
pipelines:
branches:
development:
- step:
#python image with aws-cli installed
@marty-wang
marty-wang / gist:5a71e9d0a6a2c6d6263c
Last active February 13, 2024 07:34
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@jimothyGator
jimothyGator / README.md
Last active April 25, 2024 18:00
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/