I hereby claim:
- I am bruceherve on github.
- I am bruceherve (https://keybase.io/bruceherve) on keybase.
- I have a public key ASBBrIuovhK8JrMEcBkO4oE5PwYdyu9a29GEV_vSZnSnNQo
To claim this, I am signing this object:
#!/usr/bin/env python | |
import boto3 | |
s3 = boto3.resource('s3') | |
bucket = s3.Bucket('teracar-bucket') | |
bucket.object_versions.all().delete() | |
bucket.delete() |
kubectl patch ingress $Ingressname -n $namespace -p '{"metadata":{"finalizers":[]}}' --type=merge |
for app in $(kubectl get applications --output=jsonpath={.items..metadata.name}); do \ | |
echo $app &&\ | |
kubectl patch app $app --type json -p='[{"op": "remove", "path": "/metadata/finalizers"}]'; \ | |
kubectl delete $app; \ | |
done |
# Advanced config for NGINX | |
server_tokens off; | |
add_header X-XSS-Protection "1; mode=block"; | |
add_header X-Content-Type-Options nosniff; | |
# Redirect all HTTP traffic to HTTPS | |
server { | |
listen 80; | |
server_name www.domain.com domain.com; | |
return 301 https://$host$request_uri; |
func SendPushNotification(deviceTokens []string) error { | |
decodedKey, err := getDecodedFireBaseKey() | |
if err != nil { | |
return err | |
} | |
opts := []option.ClientOption{option.WithCredentialsJSON(decodedKey)} | |
app, err := firebase.NewApp(context.Background(), nil, opts...) |
# syntax=docker/dockerfile:1 | |
# specify base image | |
FROM golang:1.19.3-alpine as build | |
# enable Go Modules | |
ENV GO111MODULE=on | |
# create working directory inside the image | |
WORKDIR /app |
#!/bin/bash | |
######################################## | |
##### USE THIS WITH AMAZON LINUX 2 ##### | |
######################################## | |
# get admin privileges | |
sudo su | |
# install httpd (Linux 2 version) |
I hereby claim:
To claim this, I am signing this object:
This document explains the steps required to set up Nginx proxy and SSL termination for Minio servers running in the backgronud.
Create a directory /etc/nginx/ssl/domain.abc
, here domain.abc
is the name of your website domain. Then use the below commands
sudo openssl genrsa -out private.key 2048
sudo openssl req -new -x509 -days 3650 -key private.key -out public.crt -subj "/C=US/ST=state/L=location/O=organization/CN=domain.abc"
#!/bin/bash | |
if [ "$#" -lt 0 ]; then | |
echo "Usage: $0" | |
exit 1 | |
fi | |
echo "Generating nip.io based on found external IP" | |
FOUNDIP=$(docker run --rm --net=host appropriate/curl https://api.ipify.org) | |
APIFQDN="minio-api.${FOUNDIP}.nip.io" | |
FQDN="minio.${FOUNDIP}.nip.io" |