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
#Check the below url
#https://docs.mongodb.com/tutorials/install-mongodb-on-amazon/
#for ubuntu https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
Step 1: Configure the package management system (yum).
Create a /etc/yum.repos.d/mongodb-org-3.6.repo file so that you can install MongoDB directly, using yum.
For MongoDB 3.6
@mamun67
mamun67 / selfsigned_certs
Created February 7, 2018 09:00
Create self signed certificates for https
#please follow this link
#http://voidcanvas.com/create-ssl-https-server-in-nodejs/
@mamun67
mamun67 / gist:6115ee23be2c87b09ef47e7cd3755a05
Created February 9, 2018 08:21 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@mamun67
mamun67 / ssl
Created February 9, 2018 08:25
good ssl
#https://www.digitalocean.com/community/tutorials/how-to-create-an-ssl-certificate-on-nginx-for-ubuntu-14-04
@mamun67
mamun67 / nginxproxy.md
Created February 9, 2018 13:41 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@mamun67
mamun67 / DSB setup
Created February 12, 2018 08:55
AWS Setup for DSB ( MongoDB + VirtualEnv + Bower + NGINX)
##MondoDB Setup
#https://gist.github.com/mamun67/6b8a12e07184a00e543145d524e97bbd
##Virtualenv setup
#https://gist.github.com/mamun67/4999678dc6ed7bce714c67eaacc58316
##Bower Setup
#We have run bower in sudo mode to do the installation correctly
$sudo bower install --allow-root
@mamun67
mamun67 / new_volume
Created February 23, 2018 06:09
Steps to make new volume available for use in EC2
1.Connect to your instance using SSH.
2.Use the lsblk command to view your available disk devices and their mount points (if applicable) to help you determine the correct device name to use.
[ec2-user ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvdf 202:80 0 100G 0 disk
xvda1 202:1 0 8G 0 disk /
3.Determine whether to create a file system on the volume. New volumes are raw block devices, and you must create a file system on them before you can mount and use them. Volumes that have been restored from snapshots likely have a file system on them already; if you create a new file system on top of an existing file system, the operation overwrites your data. Use the sudo file -s device command to list special information, such as file system type.
@mamun67
mamun67 / Node_AWS_Linux.md
Created February 23, 2018 11:32 — forked from nrollr/Node_AWS_Linux.md
Install Node.js on Amazon Linux (EC2)

Installing Node.js on Amazon Linux AMI

The following will guide you through the process of installing Node.js on an AWS EC2 instance running Amazon Linux AMI 2016.09 - Release Notes

For this process I'll be using a t2.micro EC2 instance running Amazon Linux AMI (ami-d41d58a7). Once the EC2 instance is up-and-running, connect to your server via ssh

@mamun67
mamun67 / Add Users
Last active November 7, 2018 07:23
Adding users in Linux
#Create public and private key
#private and public key will be generated
$ ssh-keygen -f name
#Create user
$sudo adduser username --disabled-password
# Change to the new user
sudo su - username
var express = require("express");
var mongoose = require("mongoose");
var bodyParser = require("body-parser");
var encode = require('hashcode').hashCode;
var path = require("path");
const HttpProxy = require('http-proxy');
const proxy = new HttpProxy();