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 25, 2024 18:17
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__)
date.timezone=Europe/London
display_errors=Off
log_errors=On
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 2048M
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 500M
@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} .
brew upgrade go
export GOPATH=$HOME/go
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
import os
import base64
base64.b64encode(os.urandom(128))
apiVersion: getambassador.io/v2
kind: TLSContext
metadata:
name: sslapi-termination-context
spec:
hosts:
- xxxxxx.com
secretName: secret-tls
{
"name": "app",
"script": "app.js",
"instances": "max",
"max_memory_restart": "500M",
"exec_mode": "cluster",
"node_args" : "",
"env": {
"NODE_ENV": "development"
},
kind: Service
apiVersion: v1
metadata:
name: tiller-deploy
namespace: kube-system
labels:
app: helm
name: tiller
spec:
ports: