Skip to content

Instantly share code, notes, and snippets.

Avatar

hilal aissani hillal20

View GitHub Profile
@hillal20
hillal20 / node_nginx_ssl.md
Created Aug 4, 2020 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL
View node_nginx_ssl.md

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@hillal20
hillal20 / node_nginx_ssl.md
Created Aug 4, 2020 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL
View node_nginx_ssl.md

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@hillal20
hillal20 / LongestSubstringWithNoRepeatedCharacters.js
Last active Jul 28, 2020
LongestSubstringWithNoRepeatedCharacters
View LongestSubstringWithNoRepeatedCharacters.js
let string = "abcfggedkhlysd";
let splited = string.split('');
let str2 = "";
let str1 = "" ;
let str3 = "";
const obj = {};
View LINKED_LIST.js
class Node {
constructor(x,next){
this.value = x;
this.next = next;
}
}
class LinkedList {
View allPossibleCombinations.js
et string = "abcfed";
let splited = string.split('');
let str2 = "";
let str1 = "" ;
let str3 = "";
const obj = {};
for(let i = 0; i < splited.length ; i++){
View anograms.js
const arr = ["art","tra","filo","olif",'bilal', "labil", "hi", "ho"];
let el = [];
const newArr = [];
const obj ={}
let te
let result = [];
const fn = (arr)=>{
View allAlgorithm2.js
const mergeSort = (arr) =>{
if(arr.length < 2 ) {
return arr
}
const middle = Math.floor(arr.length/2);
const right = arr.slice(0, middle);
const left = arr.slice(middle, arr.length)
return merge(mergeSort(left),mergeSort(right))
View allAlgorithms.js
const mergeSort = (arr) =>{
if(arr.length < 2 ) {
return arr
}
const middle = Math.floor(arr.length/2);
const right = arr.slice(0, middle);
const left = arr.slice(middle, arr.length)
return merge(mergeSort(left),mergeSort(right))
View quickSort.js
let arr = [100,1,50,2,3,4,7,2,10,5,2,1,20,13]
function quickSort(arr){
if(arr.length <= 1 ){
return arr
}
let pivote = arr[arr.length - 1];
let right = [];
You can’t perform that action at this time.