Skip to content

Instantly share code, notes, and snippets.

View mamun67's full-sized avatar

SK MAMUN ARFIN mamun67

  • INDIA (WEST BENGAL)
View GitHub Profile
@mamun67
mamun67 / reports.py
Created October 18, 2019 09:57 — forked from jackparmer/reports.py
Python script to autogen. HTML reports with Plotly graph embeds
#!/usr/bin/env python
# coding: utf-8
## Generate HTML reports with D3 graphs using Python, Plotly, and Pandas
# You can download the example report that this script generate from this link.
# <a href="d3.js">d3.js</a> is an amazing JavaScript library for creating interactive, online graphics and charts. Plotly lets you create d3.js charts using Python, R, or MATLAB. This IPython notebook shows you how to embed these charts in an HTML report that you can then share by email or <a href="">host on a website</a>.
@mamun67
mamun67 / nginx-cors.conf
Created September 26, 2019 11:22 — forked from algal/nginx-cors.conf
nginx configuration for CORS (Cross-Origin Resource Sharing), with an origin whitelist, and HTTP Basic Access authentication allowed
#
# A CORS (Cross-Origin Resouce Sharing) config for nginx
#
# == Purpose
#
# This nginx configuration enables CORS requests in the following way:
# - enables CORS just for origins on a whitelist specified by a regular expression
# - CORS preflight request (OPTIONS) are responded immediately
# - Access-Control-Allow-Credentials=true for GET and POST requests
@mamun67
mamun67 / Linux Series part 2: File & Folder Permission Management.txt
Created September 4, 2019 15:54 — forked from sd031/Linux Series part 2: File & Folder Permission Management.txt
This Gist contains basics Linux File & Folder Permission Management Commands and their meaning, this gist's sole purpose is to help students learn basic file management commands.
Linux Series part 2: File & Folder Permission Management:
To see file list, their crrent permission level and much more, you can run:
ls -la -lh -lt
(To know more on ls commands check tutorial: https://www.youtube.com/watch?v=h6sDtGN5hYs)
chmod <specification> filename : Change the file permissions. Specifications = u user/owner, g group, o other, + add permission, - remove, r read, w write,x execute.
chmod -R <specification> dir-name: Change the permissions of a directory recursively. To change permission of a directory and everything within that directory, use this command.
@mamun67
mamun67 / python_mailer_smtplib.py
Created August 26, 2019 12:06 — forked from ruanbekker/python_mailer_smtplib.py
Python SMTP Mailer using Amazon SES (smtplib)
import sys
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
name = "Ruan"
from_address = "[email protected]"
to_address = "[email protected]"
subject = "Test"
@mamun67
mamun67 / grafana-config.yml
Created May 14, 2019 08:39 — forked from buo/grafana-config.yml
Kubernetes ConfigMap for Grafana default configuration
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-config
data:
grafana.ini: |
##################### Grafana Configuration Example #####################
#
# Everything has defaults so you only need to uncomment things you want to
# change
@mamun67
mamun67 / kubeadm.md
Created May 9, 2019 10:14 — forked from jamesbuckett/kubeadm.md
kubeadm

Deploy a Kubernetes cluster and Microservices Application

image

What Problem are we solving

What is Kubernetes?

Agenda

  • Deploy a Kubernetes cluster on Digital Ocean using kubeadm

Monitoring Kubernetes with Prometheus and Grafana via Helm

image

What Problem are we solving

Monitoring on Kubernetes.

tl;dr

@mamun67
mamun67 / boto3-list-instances.py
Created January 15, 2019 05:15 — forked from ableasdale/boto3-list-instances.py
Using Boto 3 to list out AWS EC2 instance information
import boto3
from termcolor import colored
ec2 = boto3.resource('ec2')
for i in ec2.instances.all():
print("Id: {0}\tState: {1}\tLaunched: {2}\tRoot Device Name: {3}".format(
colored(i.id, 'cyan'),
colored(i.state['Name'], 'green'),
@mamun67
mamun67 / setup-kubernetes-ubuntu-16.md
Created November 10, 2018 16:16 — forked from ruanbekker/setup-kubernetes-ubuntu-16.md
Install a 3 Node Kubernetes Cluster on Ubuntu 16

Master: Dependencies

apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
@mamun67
mamun67 / gist:a9a9e182b1fd5a086ec544f7d3d9ca9c
Created October 30, 2018 09:18 — forked from mikepfeiffer/gist:4d9386afdcceaf29493a
EC2 UserData script to install CodeDeploy agent
#!/bin/bash
yum install -y aws-cli
cd /home/ec2-user/
aws s3 cp 's3://aws-codedeploy-us-east-1/latest/codedeploy-agent.noarch.rpm' . --region us-east-1
yum -y install codedeploy-agent.noarch.rpm